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/// Contains information about the AI model associated with the finding.
423#[derive(Clone, Default, PartialEq)]
424#[non_exhaustive]
425pub struct AiModel {
426    /// The name of the AI model, for example, "gemini:1.0.0".
427    pub name: std::string::String,
428
429    /// The domain of the model, for example, “image-classification”.
430    pub domain: std::string::String,
431
432    /// The name of the model library, for example, “transformers”.
433    pub library: std::string::String,
434
435    /// The region in which the model is used, for example, “us-central1”.
436    pub location: std::string::String,
437
438    /// The publisher of the model, for example, “google” or “nvidia”.
439    pub publisher: std::string::String,
440
441    /// The platform on which the model is deployed.
442    pub deployment_platform: crate::model::ai_model::DeploymentPlatform,
443
444    /// The user defined display name of model. Ex. baseline-classification-model
445    pub display_name: std::string::String,
446
447    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
448}
449
450impl AiModel {
451    /// Creates a new default instance.
452    pub fn new() -> Self {
453        std::default::Default::default()
454    }
455
456    /// Sets the value of [name][crate::model::AiModel::name].
457    ///
458    /// # Example
459    /// ```ignore,no_run
460    /// # use google_cloud_securitycenter_v2::model::AiModel;
461    /// let x = AiModel::new().set_name("example");
462    /// ```
463    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
464        self.name = v.into();
465        self
466    }
467
468    /// Sets the value of [domain][crate::model::AiModel::domain].
469    ///
470    /// # Example
471    /// ```ignore,no_run
472    /// # use google_cloud_securitycenter_v2::model::AiModel;
473    /// let x = AiModel::new().set_domain("example");
474    /// ```
475    pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
476        self.domain = v.into();
477        self
478    }
479
480    /// Sets the value of [library][crate::model::AiModel::library].
481    ///
482    /// # Example
483    /// ```ignore,no_run
484    /// # use google_cloud_securitycenter_v2::model::AiModel;
485    /// let x = AiModel::new().set_library("example");
486    /// ```
487    pub fn set_library<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
488        self.library = v.into();
489        self
490    }
491
492    /// Sets the value of [location][crate::model::AiModel::location].
493    ///
494    /// # Example
495    /// ```ignore,no_run
496    /// # use google_cloud_securitycenter_v2::model::AiModel;
497    /// let x = AiModel::new().set_location("example");
498    /// ```
499    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
500        self.location = v.into();
501        self
502    }
503
504    /// Sets the value of [publisher][crate::model::AiModel::publisher].
505    ///
506    /// # Example
507    /// ```ignore,no_run
508    /// # use google_cloud_securitycenter_v2::model::AiModel;
509    /// let x = AiModel::new().set_publisher("example");
510    /// ```
511    pub fn set_publisher<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
512        self.publisher = v.into();
513        self
514    }
515
516    /// Sets the value of [deployment_platform][crate::model::AiModel::deployment_platform].
517    ///
518    /// # Example
519    /// ```ignore,no_run
520    /// # use google_cloud_securitycenter_v2::model::AiModel;
521    /// use google_cloud_securitycenter_v2::model::ai_model::DeploymentPlatform;
522    /// let x0 = AiModel::new().set_deployment_platform(DeploymentPlatform::VertexAi);
523    /// let x1 = AiModel::new().set_deployment_platform(DeploymentPlatform::Gke);
524    /// let x2 = AiModel::new().set_deployment_platform(DeploymentPlatform::Gce);
525    /// ```
526    pub fn set_deployment_platform<
527        T: std::convert::Into<crate::model::ai_model::DeploymentPlatform>,
528    >(
529        mut self,
530        v: T,
531    ) -> Self {
532        self.deployment_platform = v.into();
533        self
534    }
535
536    /// Sets the value of [display_name][crate::model::AiModel::display_name].
537    ///
538    /// # Example
539    /// ```ignore,no_run
540    /// # use google_cloud_securitycenter_v2::model::AiModel;
541    /// let x = AiModel::new().set_display_name("example");
542    /// ```
543    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
544        self.display_name = v.into();
545        self
546    }
547}
548
549impl wkt::message::Message for AiModel {
550    fn typename() -> &'static str {
551        "type.googleapis.com/google.cloud.securitycenter.v2.AiModel"
552    }
553}
554
555/// Defines additional types related to [AiModel].
556pub mod ai_model {
557    #[allow(unused_imports)]
558    use super::*;
559
560    /// The platform on which the model is deployed.
561    ///
562    /// # Working with unknown values
563    ///
564    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
565    /// additional enum variants at any time. Adding new variants is not considered
566    /// a breaking change. Applications should write their code in anticipation of:
567    ///
568    /// - New values appearing in future releases of the client library, **and**
569    /// - New values received dynamically, without application changes.
570    ///
571    /// Please consult the [Working with enums] section in the user guide for some
572    /// guidelines.
573    ///
574    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
575    #[derive(Clone, Debug, PartialEq)]
576    #[non_exhaustive]
577    pub enum DeploymentPlatform {
578        /// Unspecified deployment platform.
579        Unspecified,
580        /// Vertex AI.
581        VertexAi,
582        /// Google Kubernetes Engine.
583        Gke,
584        /// Google Compute Engine.
585        Gce,
586        /// Fine tuned model.
587        FineTunedModel,
588        /// If set, the enum was initialized with an unknown value.
589        ///
590        /// Applications can examine the value using [DeploymentPlatform::value] or
591        /// [DeploymentPlatform::name].
592        UnknownValue(deployment_platform::UnknownValue),
593    }
594
595    #[doc(hidden)]
596    pub mod deployment_platform {
597        #[allow(unused_imports)]
598        use super::*;
599        #[derive(Clone, Debug, PartialEq)]
600        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
601    }
602
603    impl DeploymentPlatform {
604        /// Gets the enum value.
605        ///
606        /// Returns `None` if the enum contains an unknown value deserialized from
607        /// the string representation of enums.
608        pub fn value(&self) -> std::option::Option<i32> {
609            match self {
610                Self::Unspecified => std::option::Option::Some(0),
611                Self::VertexAi => std::option::Option::Some(1),
612                Self::Gke => std::option::Option::Some(2),
613                Self::Gce => std::option::Option::Some(3),
614                Self::FineTunedModel => std::option::Option::Some(4),
615                Self::UnknownValue(u) => u.0.value(),
616            }
617        }
618
619        /// Gets the enum value as a string.
620        ///
621        /// Returns `None` if the enum contains an unknown value deserialized from
622        /// the integer representation of enums.
623        pub fn name(&self) -> std::option::Option<&str> {
624            match self {
625                Self::Unspecified => std::option::Option::Some("DEPLOYMENT_PLATFORM_UNSPECIFIED"),
626                Self::VertexAi => std::option::Option::Some("VERTEX_AI"),
627                Self::Gke => std::option::Option::Some("GKE"),
628                Self::Gce => std::option::Option::Some("GCE"),
629                Self::FineTunedModel => std::option::Option::Some("FINE_TUNED_MODEL"),
630                Self::UnknownValue(u) => u.0.name(),
631            }
632        }
633    }
634
635    impl std::default::Default for DeploymentPlatform {
636        fn default() -> Self {
637            use std::convert::From;
638            Self::from(0)
639        }
640    }
641
642    impl std::fmt::Display for DeploymentPlatform {
643        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
644            wkt::internal::display_enum(f, self.name(), self.value())
645        }
646    }
647
648    impl std::convert::From<i32> for DeploymentPlatform {
649        fn from(value: i32) -> Self {
650            match value {
651                0 => Self::Unspecified,
652                1 => Self::VertexAi,
653                2 => Self::Gke,
654                3 => Self::Gce,
655                4 => Self::FineTunedModel,
656                _ => Self::UnknownValue(deployment_platform::UnknownValue(
657                    wkt::internal::UnknownEnumValue::Integer(value),
658                )),
659            }
660        }
661    }
662
663    impl std::convert::From<&str> for DeploymentPlatform {
664        fn from(value: &str) -> Self {
665            use std::string::ToString;
666            match value {
667                "DEPLOYMENT_PLATFORM_UNSPECIFIED" => Self::Unspecified,
668                "VERTEX_AI" => Self::VertexAi,
669                "GKE" => Self::Gke,
670                "GCE" => Self::Gce,
671                "FINE_TUNED_MODEL" => Self::FineTunedModel,
672                _ => Self::UnknownValue(deployment_platform::UnknownValue(
673                    wkt::internal::UnknownEnumValue::String(value.to_string()),
674                )),
675            }
676        }
677    }
678
679    impl serde::ser::Serialize for DeploymentPlatform {
680        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
681        where
682            S: serde::Serializer,
683        {
684            match self {
685                Self::Unspecified => serializer.serialize_i32(0),
686                Self::VertexAi => serializer.serialize_i32(1),
687                Self::Gke => serializer.serialize_i32(2),
688                Self::Gce => serializer.serialize_i32(3),
689                Self::FineTunedModel => serializer.serialize_i32(4),
690                Self::UnknownValue(u) => u.0.serialize(serializer),
691            }
692        }
693    }
694
695    impl<'de> serde::de::Deserialize<'de> for DeploymentPlatform {
696        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
697        where
698            D: serde::Deserializer<'de>,
699        {
700            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DeploymentPlatform>::new(
701                ".google.cloud.securitycenter.v2.AiModel.DeploymentPlatform",
702            ))
703        }
704    }
705}
706
707/// Represents an application associated with a finding.
708#[derive(Clone, Default, PartialEq)]
709#[non_exhaustive]
710pub struct Application {
711    /// The base URI that identifies the network location of the application in
712    /// which the vulnerability was detected. For example, `<http://example.com>`.
713    pub base_uri: std::string::String,
714
715    /// The full URI with payload that could be used to reproduce the
716    /// vulnerability. For example, `<http://example.com>?p=aMmYgI6H`.
717    pub full_uri: std::string::String,
718
719    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
720}
721
722impl Application {
723    /// Creates a new default instance.
724    pub fn new() -> Self {
725        std::default::Default::default()
726    }
727
728    /// Sets the value of [base_uri][crate::model::Application::base_uri].
729    ///
730    /// # Example
731    /// ```ignore,no_run
732    /// # use google_cloud_securitycenter_v2::model::Application;
733    /// let x = Application::new().set_base_uri("example");
734    /// ```
735    pub fn set_base_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
736        self.base_uri = v.into();
737        self
738    }
739
740    /// Sets the value of [full_uri][crate::model::Application::full_uri].
741    ///
742    /// # Example
743    /// ```ignore,no_run
744    /// # use google_cloud_securitycenter_v2::model::Application;
745    /// let x = Application::new().set_full_uri("example");
746    /// ```
747    pub fn set_full_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
748        self.full_uri = v.into();
749        self
750    }
751}
752
753impl wkt::message::Message for Application {
754    fn typename() -> &'static str {
755        "type.googleapis.com/google.cloud.securitycenter.v2.Application"
756    }
757}
758
759/// An attack exposure contains the results of an attack path simulation run.
760#[derive(Clone, Default, PartialEq)]
761#[non_exhaustive]
762pub struct AttackExposure {
763    /// A number between 0 (inclusive) and infinity that represents how important
764    /// this finding is to remediate. The higher the score, the more important it
765    /// is to remediate.
766    pub score: f64,
767
768    /// The most recent time the attack exposure was updated on this finding.
769    pub latest_calculation_time: std::option::Option<wkt::Timestamp>,
770
771    /// The resource name of the attack path simulation result that contains the
772    /// details regarding this attack exposure score.
773    /// Example: `organizations/123/simulations/456/attackExposureResults/789`
774    pub attack_exposure_result: std::string::String,
775
776    /// Output only. What state this AttackExposure is in. This captures whether or
777    /// not an attack exposure has been calculated or not.
778    pub state: crate::model::attack_exposure::State,
779
780    /// The number of high value resources that are exposed as a result of this
781    /// finding.
782    pub exposed_high_value_resources_count: i32,
783
784    /// The number of medium value resources that are exposed as a result of this
785    /// finding.
786    pub exposed_medium_value_resources_count: i32,
787
788    /// The number of high value resources that are exposed as a result of this
789    /// finding.
790    pub exposed_low_value_resources_count: i32,
791
792    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
793}
794
795impl AttackExposure {
796    /// Creates a new default instance.
797    pub fn new() -> Self {
798        std::default::Default::default()
799    }
800
801    /// Sets the value of [score][crate::model::AttackExposure::score].
802    ///
803    /// # Example
804    /// ```ignore,no_run
805    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
806    /// let x = AttackExposure::new().set_score(42.0);
807    /// ```
808    pub fn set_score<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
809        self.score = v.into();
810        self
811    }
812
813    /// Sets the value of [latest_calculation_time][crate::model::AttackExposure::latest_calculation_time].
814    ///
815    /// # Example
816    /// ```ignore,no_run
817    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
818    /// use wkt::Timestamp;
819    /// let x = AttackExposure::new().set_latest_calculation_time(Timestamp::default()/* use setters */);
820    /// ```
821    pub fn set_latest_calculation_time<T>(mut self, v: T) -> Self
822    where
823        T: std::convert::Into<wkt::Timestamp>,
824    {
825        self.latest_calculation_time = std::option::Option::Some(v.into());
826        self
827    }
828
829    /// Sets or clears the value of [latest_calculation_time][crate::model::AttackExposure::latest_calculation_time].
830    ///
831    /// # Example
832    /// ```ignore,no_run
833    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
834    /// use wkt::Timestamp;
835    /// let x = AttackExposure::new().set_or_clear_latest_calculation_time(Some(Timestamp::default()/* use setters */));
836    /// let x = AttackExposure::new().set_or_clear_latest_calculation_time(None::<Timestamp>);
837    /// ```
838    pub fn set_or_clear_latest_calculation_time<T>(mut self, v: std::option::Option<T>) -> Self
839    where
840        T: std::convert::Into<wkt::Timestamp>,
841    {
842        self.latest_calculation_time = v.map(|x| x.into());
843        self
844    }
845
846    /// Sets the value of [attack_exposure_result][crate::model::AttackExposure::attack_exposure_result].
847    ///
848    /// # Example
849    /// ```ignore,no_run
850    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
851    /// let x = AttackExposure::new().set_attack_exposure_result("example");
852    /// ```
853    pub fn set_attack_exposure_result<T: std::convert::Into<std::string::String>>(
854        mut self,
855        v: T,
856    ) -> Self {
857        self.attack_exposure_result = v.into();
858        self
859    }
860
861    /// Sets the value of [state][crate::model::AttackExposure::state].
862    ///
863    /// # Example
864    /// ```ignore,no_run
865    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
866    /// use google_cloud_securitycenter_v2::model::attack_exposure::State;
867    /// let x0 = AttackExposure::new().set_state(State::Calculated);
868    /// let x1 = AttackExposure::new().set_state(State::NotCalculated);
869    /// ```
870    pub fn set_state<T: std::convert::Into<crate::model::attack_exposure::State>>(
871        mut self,
872        v: T,
873    ) -> Self {
874        self.state = v.into();
875        self
876    }
877
878    /// Sets the value of [exposed_high_value_resources_count][crate::model::AttackExposure::exposed_high_value_resources_count].
879    ///
880    /// # Example
881    /// ```ignore,no_run
882    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
883    /// let x = AttackExposure::new().set_exposed_high_value_resources_count(42);
884    /// ```
885    pub fn set_exposed_high_value_resources_count<T: std::convert::Into<i32>>(
886        mut self,
887        v: T,
888    ) -> Self {
889        self.exposed_high_value_resources_count = v.into();
890        self
891    }
892
893    /// Sets the value of [exposed_medium_value_resources_count][crate::model::AttackExposure::exposed_medium_value_resources_count].
894    ///
895    /// # Example
896    /// ```ignore,no_run
897    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
898    /// let x = AttackExposure::new().set_exposed_medium_value_resources_count(42);
899    /// ```
900    pub fn set_exposed_medium_value_resources_count<T: std::convert::Into<i32>>(
901        mut self,
902        v: T,
903    ) -> Self {
904        self.exposed_medium_value_resources_count = v.into();
905        self
906    }
907
908    /// Sets the value of [exposed_low_value_resources_count][crate::model::AttackExposure::exposed_low_value_resources_count].
909    ///
910    /// # Example
911    /// ```ignore,no_run
912    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
913    /// let x = AttackExposure::new().set_exposed_low_value_resources_count(42);
914    /// ```
915    pub fn set_exposed_low_value_resources_count<T: std::convert::Into<i32>>(
916        mut self,
917        v: T,
918    ) -> Self {
919        self.exposed_low_value_resources_count = v.into();
920        self
921    }
922}
923
924impl wkt::message::Message for AttackExposure {
925    fn typename() -> &'static str {
926        "type.googleapis.com/google.cloud.securitycenter.v2.AttackExposure"
927    }
928}
929
930/// Defines additional types related to [AttackExposure].
931pub mod attack_exposure {
932    #[allow(unused_imports)]
933    use super::*;
934
935    /// This enum defines the various states an AttackExposure can be in.
936    ///
937    /// # Working with unknown values
938    ///
939    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
940    /// additional enum variants at any time. Adding new variants is not considered
941    /// a breaking change. Applications should write their code in anticipation of:
942    ///
943    /// - New values appearing in future releases of the client library, **and**
944    /// - New values received dynamically, without application changes.
945    ///
946    /// Please consult the [Working with enums] section in the user guide for some
947    /// guidelines.
948    ///
949    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
950    #[derive(Clone, Debug, PartialEq)]
951    #[non_exhaustive]
952    pub enum State {
953        /// The state is not specified.
954        Unspecified,
955        /// The attack exposure has been calculated.
956        Calculated,
957        /// The attack exposure has not been calculated.
958        NotCalculated,
959        /// If set, the enum was initialized with an unknown value.
960        ///
961        /// Applications can examine the value using [State::value] or
962        /// [State::name].
963        UnknownValue(state::UnknownValue),
964    }
965
966    #[doc(hidden)]
967    pub mod state {
968        #[allow(unused_imports)]
969        use super::*;
970        #[derive(Clone, Debug, PartialEq)]
971        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
972    }
973
974    impl State {
975        /// Gets the enum value.
976        ///
977        /// Returns `None` if the enum contains an unknown value deserialized from
978        /// the string representation of enums.
979        pub fn value(&self) -> std::option::Option<i32> {
980            match self {
981                Self::Unspecified => std::option::Option::Some(0),
982                Self::Calculated => std::option::Option::Some(1),
983                Self::NotCalculated => std::option::Option::Some(2),
984                Self::UnknownValue(u) => u.0.value(),
985            }
986        }
987
988        /// Gets the enum value as a string.
989        ///
990        /// Returns `None` if the enum contains an unknown value deserialized from
991        /// the integer representation of enums.
992        pub fn name(&self) -> std::option::Option<&str> {
993            match self {
994                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
995                Self::Calculated => std::option::Option::Some("CALCULATED"),
996                Self::NotCalculated => std::option::Option::Some("NOT_CALCULATED"),
997                Self::UnknownValue(u) => u.0.name(),
998            }
999        }
1000    }
1001
1002    impl std::default::Default for State {
1003        fn default() -> Self {
1004            use std::convert::From;
1005            Self::from(0)
1006        }
1007    }
1008
1009    impl std::fmt::Display for State {
1010        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1011            wkt::internal::display_enum(f, self.name(), self.value())
1012        }
1013    }
1014
1015    impl std::convert::From<i32> for State {
1016        fn from(value: i32) -> Self {
1017            match value {
1018                0 => Self::Unspecified,
1019                1 => Self::Calculated,
1020                2 => Self::NotCalculated,
1021                _ => Self::UnknownValue(state::UnknownValue(
1022                    wkt::internal::UnknownEnumValue::Integer(value),
1023                )),
1024            }
1025        }
1026    }
1027
1028    impl std::convert::From<&str> for State {
1029        fn from(value: &str) -> Self {
1030            use std::string::ToString;
1031            match value {
1032                "STATE_UNSPECIFIED" => Self::Unspecified,
1033                "CALCULATED" => Self::Calculated,
1034                "NOT_CALCULATED" => Self::NotCalculated,
1035                _ => Self::UnknownValue(state::UnknownValue(
1036                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1037                )),
1038            }
1039        }
1040    }
1041
1042    impl serde::ser::Serialize for State {
1043        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1044        where
1045            S: serde::Serializer,
1046        {
1047            match self {
1048                Self::Unspecified => serializer.serialize_i32(0),
1049                Self::Calculated => serializer.serialize_i32(1),
1050                Self::NotCalculated => serializer.serialize_i32(2),
1051                Self::UnknownValue(u) => u.0.serialize(serializer),
1052            }
1053        }
1054    }
1055
1056    impl<'de> serde::de::Deserialize<'de> for State {
1057        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1058        where
1059            D: serde::Deserializer<'de>,
1060        {
1061            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
1062                ".google.cloud.securitycenter.v2.AttackExposure.State",
1063            ))
1064        }
1065    }
1066}
1067
1068/// A path that an attacker could take to reach an exposed resource.
1069#[derive(Clone, Default, PartialEq)]
1070#[non_exhaustive]
1071pub struct AttackPath {
1072    /// The attack path name, for example,
1073    /// `organizations/12/simulations/34/valuedResources/56/attackPaths/78`
1074    pub name: std::string::String,
1075
1076    /// A list of nodes that exist in this attack path.
1077    pub path_nodes: std::vec::Vec<crate::model::attack_path::AttackPathNode>,
1078
1079    /// A list of the edges between nodes in this attack path.
1080    pub edges: std::vec::Vec<crate::model::attack_path::AttackPathEdge>,
1081
1082    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1083}
1084
1085impl AttackPath {
1086    /// Creates a new default instance.
1087    pub fn new() -> Self {
1088        std::default::Default::default()
1089    }
1090
1091    /// Sets the value of [name][crate::model::AttackPath::name].
1092    ///
1093    /// # Example
1094    /// ```ignore,no_run
1095    /// # use google_cloud_securitycenter_v2::model::AttackPath;
1096    /// # let organization_id = "organization_id";
1097    /// # let simulation_id = "simulation_id";
1098    /// # let valued_resource_id = "valued_resource_id";
1099    /// # let attack_path_id = "attack_path_id";
1100    /// let x = AttackPath::new().set_name(format!("organizations/{organization_id}/simulations/{simulation_id}/valuedResources/{valued_resource_id}/attackPaths/{attack_path_id}"));
1101    /// ```
1102    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1103        self.name = v.into();
1104        self
1105    }
1106
1107    /// Sets the value of [path_nodes][crate::model::AttackPath::path_nodes].
1108    ///
1109    /// # Example
1110    /// ```ignore,no_run
1111    /// # use google_cloud_securitycenter_v2::model::AttackPath;
1112    /// use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1113    /// let x = AttackPath::new()
1114    ///     .set_path_nodes([
1115    ///         AttackPathNode::default()/* use setters */,
1116    ///         AttackPathNode::default()/* use (different) setters */,
1117    ///     ]);
1118    /// ```
1119    pub fn set_path_nodes<T, V>(mut self, v: T) -> Self
1120    where
1121        T: std::iter::IntoIterator<Item = V>,
1122        V: std::convert::Into<crate::model::attack_path::AttackPathNode>,
1123    {
1124        use std::iter::Iterator;
1125        self.path_nodes = v.into_iter().map(|i| i.into()).collect();
1126        self
1127    }
1128
1129    /// Sets the value of [edges][crate::model::AttackPath::edges].
1130    ///
1131    /// # Example
1132    /// ```ignore,no_run
1133    /// # use google_cloud_securitycenter_v2::model::AttackPath;
1134    /// use google_cloud_securitycenter_v2::model::attack_path::AttackPathEdge;
1135    /// let x = AttackPath::new()
1136    ///     .set_edges([
1137    ///         AttackPathEdge::default()/* use setters */,
1138    ///         AttackPathEdge::default()/* use (different) setters */,
1139    ///     ]);
1140    /// ```
1141    pub fn set_edges<T, V>(mut self, v: T) -> Self
1142    where
1143        T: std::iter::IntoIterator<Item = V>,
1144        V: std::convert::Into<crate::model::attack_path::AttackPathEdge>,
1145    {
1146        use std::iter::Iterator;
1147        self.edges = v.into_iter().map(|i| i.into()).collect();
1148        self
1149    }
1150}
1151
1152impl wkt::message::Message for AttackPath {
1153    fn typename() -> &'static str {
1154        "type.googleapis.com/google.cloud.securitycenter.v2.AttackPath"
1155    }
1156}
1157
1158/// Defines additional types related to [AttackPath].
1159pub mod attack_path {
1160    #[allow(unused_imports)]
1161    use super::*;
1162
1163    /// Represents one point that an attacker passes through in this attack path.
1164    #[derive(Clone, Default, PartialEq)]
1165    #[non_exhaustive]
1166    pub struct AttackPathNode {
1167        /// The name of the resource at this point in the attack path.
1168        /// The format of the name follows the Cloud Asset Inventory [resource
1169        /// name
1170        /// format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
1171        pub resource: std::string::String,
1172
1173        /// The [supported resource
1174        /// type](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
1175        pub resource_type: std::string::String,
1176
1177        /// Human-readable name of this resource.
1178        pub display_name: std::string::String,
1179
1180        /// The findings associated with this node in the attack path.
1181        pub associated_findings:
1182            std::vec::Vec<crate::model::attack_path::attack_path_node::PathNodeAssociatedFinding>,
1183
1184        /// Unique id of the attack path node.
1185        pub uuid: std::string::String,
1186
1187        /// A list of attack step nodes that exist in this attack path node.
1188        pub attack_steps:
1189            std::vec::Vec<crate::model::attack_path::attack_path_node::AttackStepNode>,
1190
1191        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1192    }
1193
1194    impl AttackPathNode {
1195        /// Creates a new default instance.
1196        pub fn new() -> Self {
1197            std::default::Default::default()
1198        }
1199
1200        /// Sets the value of [resource][crate::model::attack_path::AttackPathNode::resource].
1201        ///
1202        /// # Example
1203        /// ```ignore,no_run
1204        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1205        /// let x = AttackPathNode::new().set_resource("example");
1206        /// ```
1207        pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1208            self.resource = v.into();
1209            self
1210        }
1211
1212        /// Sets the value of [resource_type][crate::model::attack_path::AttackPathNode::resource_type].
1213        ///
1214        /// # Example
1215        /// ```ignore,no_run
1216        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1217        /// let x = AttackPathNode::new().set_resource_type("example");
1218        /// ```
1219        pub fn set_resource_type<T: std::convert::Into<std::string::String>>(
1220            mut self,
1221            v: T,
1222        ) -> Self {
1223            self.resource_type = v.into();
1224            self
1225        }
1226
1227        /// Sets the value of [display_name][crate::model::attack_path::AttackPathNode::display_name].
1228        ///
1229        /// # Example
1230        /// ```ignore,no_run
1231        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1232        /// let x = AttackPathNode::new().set_display_name("example");
1233        /// ```
1234        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
1235            mut self,
1236            v: T,
1237        ) -> Self {
1238            self.display_name = v.into();
1239            self
1240        }
1241
1242        /// Sets the value of [associated_findings][crate::model::attack_path::AttackPathNode::associated_findings].
1243        ///
1244        /// # Example
1245        /// ```ignore,no_run
1246        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1247        /// use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::PathNodeAssociatedFinding;
1248        /// let x = AttackPathNode::new()
1249        ///     .set_associated_findings([
1250        ///         PathNodeAssociatedFinding::default()/* use setters */,
1251        ///         PathNodeAssociatedFinding::default()/* use (different) setters */,
1252        ///     ]);
1253        /// ```
1254        pub fn set_associated_findings<T, V>(mut self, v: T) -> Self
1255        where
1256            T: std::iter::IntoIterator<Item = V>,
1257            V: std::convert::Into<
1258                    crate::model::attack_path::attack_path_node::PathNodeAssociatedFinding,
1259                >,
1260        {
1261            use std::iter::Iterator;
1262            self.associated_findings = v.into_iter().map(|i| i.into()).collect();
1263            self
1264        }
1265
1266        /// Sets the value of [uuid][crate::model::attack_path::AttackPathNode::uuid].
1267        ///
1268        /// # Example
1269        /// ```ignore,no_run
1270        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1271        /// let x = AttackPathNode::new().set_uuid("example");
1272        /// ```
1273        pub fn set_uuid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1274            self.uuid = v.into();
1275            self
1276        }
1277
1278        /// Sets the value of [attack_steps][crate::model::attack_path::AttackPathNode::attack_steps].
1279        ///
1280        /// # Example
1281        /// ```ignore,no_run
1282        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1283        /// use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::AttackStepNode;
1284        /// let x = AttackPathNode::new()
1285        ///     .set_attack_steps([
1286        ///         AttackStepNode::default()/* use setters */,
1287        ///         AttackStepNode::default()/* use (different) setters */,
1288        ///     ]);
1289        /// ```
1290        pub fn set_attack_steps<T, V>(mut self, v: T) -> Self
1291        where
1292            T: std::iter::IntoIterator<Item = V>,
1293            V: std::convert::Into<crate::model::attack_path::attack_path_node::AttackStepNode>,
1294        {
1295            use std::iter::Iterator;
1296            self.attack_steps = v.into_iter().map(|i| i.into()).collect();
1297            self
1298        }
1299    }
1300
1301    impl wkt::message::Message for AttackPathNode {
1302        fn typename() -> &'static str {
1303            "type.googleapis.com/google.cloud.securitycenter.v2.AttackPath.AttackPathNode"
1304        }
1305    }
1306
1307    /// Defines additional types related to [AttackPathNode].
1308    pub mod attack_path_node {
1309        #[allow(unused_imports)]
1310        use super::*;
1311
1312        /// A finding that is associated with this node in the attack path.
1313        #[derive(Clone, Default, PartialEq)]
1314        #[non_exhaustive]
1315        pub struct PathNodeAssociatedFinding {
1316            /// Canonical name of the associated findings. Example:
1317            /// `organizations/123/sources/456/findings/789`
1318            pub canonical_finding: std::string::String,
1319
1320            /// The additional taxonomy group within findings from a given source.
1321            pub finding_category: std::string::String,
1322
1323            /// Full resource name of the finding.
1324            pub name: std::string::String,
1325
1326            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1327        }
1328
1329        impl PathNodeAssociatedFinding {
1330            /// Creates a new default instance.
1331            pub fn new() -> Self {
1332                std::default::Default::default()
1333            }
1334
1335            /// Sets the value of [canonical_finding][crate::model::attack_path::attack_path_node::PathNodeAssociatedFinding::canonical_finding].
1336            ///
1337            /// # Example
1338            /// ```ignore,no_run
1339            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::PathNodeAssociatedFinding;
1340            /// let x = PathNodeAssociatedFinding::new().set_canonical_finding("example");
1341            /// ```
1342            pub fn set_canonical_finding<T: std::convert::Into<std::string::String>>(
1343                mut self,
1344                v: T,
1345            ) -> Self {
1346                self.canonical_finding = v.into();
1347                self
1348            }
1349
1350            /// Sets the value of [finding_category][crate::model::attack_path::attack_path_node::PathNodeAssociatedFinding::finding_category].
1351            ///
1352            /// # Example
1353            /// ```ignore,no_run
1354            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::PathNodeAssociatedFinding;
1355            /// let x = PathNodeAssociatedFinding::new().set_finding_category("example");
1356            /// ```
1357            pub fn set_finding_category<T: std::convert::Into<std::string::String>>(
1358                mut self,
1359                v: T,
1360            ) -> Self {
1361                self.finding_category = v.into();
1362                self
1363            }
1364
1365            /// Sets the value of [name][crate::model::attack_path::attack_path_node::PathNodeAssociatedFinding::name].
1366            ///
1367            /// # Example
1368            /// ```ignore,no_run
1369            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::PathNodeAssociatedFinding;
1370            /// let x = PathNodeAssociatedFinding::new().set_name("example");
1371            /// ```
1372            pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1373                self.name = v.into();
1374                self
1375            }
1376        }
1377
1378        impl wkt::message::Message for PathNodeAssociatedFinding {
1379            fn typename() -> &'static str {
1380                "type.googleapis.com/google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding"
1381            }
1382        }
1383
1384        /// Detailed steps the attack can take between path nodes.
1385        #[derive(Clone, Default, PartialEq)]
1386        #[non_exhaustive]
1387        pub struct AttackStepNode {
1388            /// Unique ID for one Node
1389            pub uuid: std::string::String,
1390
1391            /// Attack step type. Can be either AND, OR or DEFENSE
1392            pub r#type: crate::model::attack_path::attack_path_node::NodeType,
1393
1394            /// User friendly name of the attack step
1395            pub display_name: std::string::String,
1396
1397            /// Attack step labels for metadata
1398            pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1399
1400            /// Attack step description
1401            pub description: std::string::String,
1402
1403            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1404        }
1405
1406        impl AttackStepNode {
1407            /// Creates a new default instance.
1408            pub fn new() -> Self {
1409                std::default::Default::default()
1410            }
1411
1412            /// Sets the value of [uuid][crate::model::attack_path::attack_path_node::AttackStepNode::uuid].
1413            ///
1414            /// # Example
1415            /// ```ignore,no_run
1416            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::AttackStepNode;
1417            /// let x = AttackStepNode::new().set_uuid("example");
1418            /// ```
1419            pub fn set_uuid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1420                self.uuid = v.into();
1421                self
1422            }
1423
1424            /// Sets the value of [r#type][crate::model::attack_path::attack_path_node::AttackStepNode::type].
1425            ///
1426            /// # Example
1427            /// ```ignore,no_run
1428            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::AttackStepNode;
1429            /// use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::NodeType;
1430            /// let x0 = AttackStepNode::new().set_type(NodeType::And);
1431            /// let x1 = AttackStepNode::new().set_type(NodeType::Or);
1432            /// let x2 = AttackStepNode::new().set_type(NodeType::Defense);
1433            /// ```
1434            pub fn set_type<
1435                T: std::convert::Into<crate::model::attack_path::attack_path_node::NodeType>,
1436            >(
1437                mut self,
1438                v: T,
1439            ) -> Self {
1440                self.r#type = v.into();
1441                self
1442            }
1443
1444            /// Sets the value of [display_name][crate::model::attack_path::attack_path_node::AttackStepNode::display_name].
1445            ///
1446            /// # Example
1447            /// ```ignore,no_run
1448            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::AttackStepNode;
1449            /// let x = AttackStepNode::new().set_display_name("example");
1450            /// ```
1451            pub fn set_display_name<T: std::convert::Into<std::string::String>>(
1452                mut self,
1453                v: T,
1454            ) -> Self {
1455                self.display_name = v.into();
1456                self
1457            }
1458
1459            /// Sets the value of [labels][crate::model::attack_path::attack_path_node::AttackStepNode::labels].
1460            ///
1461            /// # Example
1462            /// ```ignore,no_run
1463            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::AttackStepNode;
1464            /// let x = AttackStepNode::new().set_labels([
1465            ///     ("key0", "abc"),
1466            ///     ("key1", "xyz"),
1467            /// ]);
1468            /// ```
1469            pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1470            where
1471                T: std::iter::IntoIterator<Item = (K, V)>,
1472                K: std::convert::Into<std::string::String>,
1473                V: std::convert::Into<std::string::String>,
1474            {
1475                use std::iter::Iterator;
1476                self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1477                self
1478            }
1479
1480            /// Sets the value of [description][crate::model::attack_path::attack_path_node::AttackStepNode::description].
1481            ///
1482            /// # Example
1483            /// ```ignore,no_run
1484            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::AttackStepNode;
1485            /// let x = AttackStepNode::new().set_description("example");
1486            /// ```
1487            pub fn set_description<T: std::convert::Into<std::string::String>>(
1488                mut self,
1489                v: T,
1490            ) -> Self {
1491                self.description = v.into();
1492                self
1493            }
1494        }
1495
1496        impl wkt::message::Message for AttackStepNode {
1497            fn typename() -> &'static str {
1498                "type.googleapis.com/google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode"
1499            }
1500        }
1501
1502        /// The type of the incoming attack step node.
1503        ///
1504        /// # Working with unknown values
1505        ///
1506        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1507        /// additional enum variants at any time. Adding new variants is not considered
1508        /// a breaking change. Applications should write their code in anticipation of:
1509        ///
1510        /// - New values appearing in future releases of the client library, **and**
1511        /// - New values received dynamically, without application changes.
1512        ///
1513        /// Please consult the [Working with enums] section in the user guide for some
1514        /// guidelines.
1515        ///
1516        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1517        #[derive(Clone, Debug, PartialEq)]
1518        #[non_exhaustive]
1519        pub enum NodeType {
1520            /// Type not specified
1521            Unspecified,
1522            /// Incoming edge joined with AND
1523            And,
1524            /// Incoming edge joined with OR
1525            Or,
1526            /// Incoming edge is defense
1527            Defense,
1528            /// Incoming edge is attacker
1529            Attacker,
1530            /// If set, the enum was initialized with an unknown value.
1531            ///
1532            /// Applications can examine the value using [NodeType::value] or
1533            /// [NodeType::name].
1534            UnknownValue(node_type::UnknownValue),
1535        }
1536
1537        #[doc(hidden)]
1538        pub mod node_type {
1539            #[allow(unused_imports)]
1540            use super::*;
1541            #[derive(Clone, Debug, PartialEq)]
1542            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1543        }
1544
1545        impl NodeType {
1546            /// Gets the enum value.
1547            ///
1548            /// Returns `None` if the enum contains an unknown value deserialized from
1549            /// the string representation of enums.
1550            pub fn value(&self) -> std::option::Option<i32> {
1551                match self {
1552                    Self::Unspecified => std::option::Option::Some(0),
1553                    Self::And => std::option::Option::Some(1),
1554                    Self::Or => std::option::Option::Some(2),
1555                    Self::Defense => std::option::Option::Some(3),
1556                    Self::Attacker => std::option::Option::Some(4),
1557                    Self::UnknownValue(u) => u.0.value(),
1558                }
1559            }
1560
1561            /// Gets the enum value as a string.
1562            ///
1563            /// Returns `None` if the enum contains an unknown value deserialized from
1564            /// the integer representation of enums.
1565            pub fn name(&self) -> std::option::Option<&str> {
1566                match self {
1567                    Self::Unspecified => std::option::Option::Some("NODE_TYPE_UNSPECIFIED"),
1568                    Self::And => std::option::Option::Some("NODE_TYPE_AND"),
1569                    Self::Or => std::option::Option::Some("NODE_TYPE_OR"),
1570                    Self::Defense => std::option::Option::Some("NODE_TYPE_DEFENSE"),
1571                    Self::Attacker => std::option::Option::Some("NODE_TYPE_ATTACKER"),
1572                    Self::UnknownValue(u) => u.0.name(),
1573                }
1574            }
1575        }
1576
1577        impl std::default::Default for NodeType {
1578            fn default() -> Self {
1579                use std::convert::From;
1580                Self::from(0)
1581            }
1582        }
1583
1584        impl std::fmt::Display for NodeType {
1585            fn fmt(
1586                &self,
1587                f: &mut std::fmt::Formatter<'_>,
1588            ) -> std::result::Result<(), std::fmt::Error> {
1589                wkt::internal::display_enum(f, self.name(), self.value())
1590            }
1591        }
1592
1593        impl std::convert::From<i32> for NodeType {
1594            fn from(value: i32) -> Self {
1595                match value {
1596                    0 => Self::Unspecified,
1597                    1 => Self::And,
1598                    2 => Self::Or,
1599                    3 => Self::Defense,
1600                    4 => Self::Attacker,
1601                    _ => Self::UnknownValue(node_type::UnknownValue(
1602                        wkt::internal::UnknownEnumValue::Integer(value),
1603                    )),
1604                }
1605            }
1606        }
1607
1608        impl std::convert::From<&str> for NodeType {
1609            fn from(value: &str) -> Self {
1610                use std::string::ToString;
1611                match value {
1612                    "NODE_TYPE_UNSPECIFIED" => Self::Unspecified,
1613                    "NODE_TYPE_AND" => Self::And,
1614                    "NODE_TYPE_OR" => Self::Or,
1615                    "NODE_TYPE_DEFENSE" => Self::Defense,
1616                    "NODE_TYPE_ATTACKER" => Self::Attacker,
1617                    _ => Self::UnknownValue(node_type::UnknownValue(
1618                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1619                    )),
1620                }
1621            }
1622        }
1623
1624        impl serde::ser::Serialize for NodeType {
1625            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1626            where
1627                S: serde::Serializer,
1628            {
1629                match self {
1630                    Self::Unspecified => serializer.serialize_i32(0),
1631                    Self::And => serializer.serialize_i32(1),
1632                    Self::Or => serializer.serialize_i32(2),
1633                    Self::Defense => serializer.serialize_i32(3),
1634                    Self::Attacker => serializer.serialize_i32(4),
1635                    Self::UnknownValue(u) => u.0.serialize(serializer),
1636                }
1637            }
1638        }
1639
1640        impl<'de> serde::de::Deserialize<'de> for NodeType {
1641            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1642            where
1643                D: serde::Deserializer<'de>,
1644            {
1645                deserializer.deserialize_any(wkt::internal::EnumVisitor::<NodeType>::new(
1646                    ".google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType",
1647                ))
1648            }
1649        }
1650    }
1651
1652    /// Represents a connection between a source node and a destination node in
1653    /// this attack path.
1654    #[derive(Clone, Default, PartialEq)]
1655    #[non_exhaustive]
1656    pub struct AttackPathEdge {
1657        /// The attack node uuid of the source node.
1658        pub source: std::string::String,
1659
1660        /// The attack node uuid of the destination node.
1661        pub destination: std::string::String,
1662
1663        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1664    }
1665
1666    impl AttackPathEdge {
1667        /// Creates a new default instance.
1668        pub fn new() -> Self {
1669            std::default::Default::default()
1670        }
1671
1672        /// Sets the value of [source][crate::model::attack_path::AttackPathEdge::source].
1673        ///
1674        /// # Example
1675        /// ```ignore,no_run
1676        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathEdge;
1677        /// let x = AttackPathEdge::new().set_source("example");
1678        /// ```
1679        pub fn set_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1680            self.source = v.into();
1681            self
1682        }
1683
1684        /// Sets the value of [destination][crate::model::attack_path::AttackPathEdge::destination].
1685        ///
1686        /// # Example
1687        /// ```ignore,no_run
1688        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathEdge;
1689        /// let x = AttackPathEdge::new().set_destination("example");
1690        /// ```
1691        pub fn set_destination<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1692            self.destination = v.into();
1693            self
1694        }
1695    }
1696
1697    impl wkt::message::Message for AttackPathEdge {
1698        fn typename() -> &'static str {
1699            "type.googleapis.com/google.cloud.securitycenter.v2.AttackPath.AttackPathEdge"
1700        }
1701    }
1702}
1703
1704/// Information related to Google Cloud Backup and DR Service findings.
1705#[derive(Clone, Default, PartialEq)]
1706#[non_exhaustive]
1707pub struct BackupDisasterRecovery {
1708    /// The name of a Backup and DR template which comprises one or more backup
1709    /// policies. See the [Backup and DR
1710    /// documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp)
1711    /// for more information. For example, `snap-ov`.
1712    pub backup_template: std::string::String,
1713
1714    /// The names of Backup and DR policies that are associated with a template
1715    /// and that define when to run a backup, how frequently to run a backup, and
1716    /// how long to retain the backup image. For example, `onvaults`.
1717    pub policies: std::vec::Vec<std::string::String>,
1718
1719    /// The name of a Backup and DR host, which is managed by the backup and
1720    /// recovery appliance and known to the management console. The host can be of
1721    /// type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file
1722    /// system, etc.), vCenter, or an ESX server. See the [Backup and DR
1723    /// documentation on
1724    /// hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications)
1725    /// for more information. For example, `centos7-01`.
1726    pub host: std::string::String,
1727
1728    /// The names of Backup and DR applications. An application is a VM, database,
1729    /// or file system on a managed host monitored by a backup and recovery
1730    /// appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
1731    /// `centos7-01-vol02`.
1732    pub applications: std::vec::Vec<std::string::String>,
1733
1734    /// The name of the Backup and DR storage pool that the backup and recovery
1735    /// appliance is storing data in. The storage pool could be of type Cloud,
1736    /// Primary, Snapshot, or OnVault. See the [Backup and DR documentation on
1737    /// storage
1738    /// pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools).
1739    /// For example, `DiskPoolOne`.
1740    pub storage_pool: std::string::String,
1741
1742    /// The names of Backup and DR advanced policy options of a policy applying to
1743    /// an application. See the [Backup and DR documentation on policy
1744    /// options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
1745    /// For example, `skipofflineappsincongrp, nounmap`.
1746    pub policy_options: std::vec::Vec<std::string::String>,
1747
1748    /// The name of the Backup and DR resource profile that specifies the storage
1749    /// media for backups of application and VM data. See the [Backup and DR
1750    /// documentation on
1751    /// profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile).
1752    /// For example, `GCP`.
1753    pub profile: std::string::String,
1754
1755    /// The name of the Backup and DR appliance that captures, moves, and manages
1756    /// the lifecycle of backup data. For example, `backup-server-57137`.
1757    pub appliance: std::string::String,
1758
1759    /// The backup type of the Backup and DR image.
1760    /// For example, `Snapshot`, `Remote Snapshot`, `OnVault`.
1761    pub backup_type: std::string::String,
1762
1763    /// The timestamp at which the Backup and DR backup was created.
1764    pub backup_create_time: std::option::Option<wkt::Timestamp>,
1765
1766    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1767}
1768
1769impl BackupDisasterRecovery {
1770    /// Creates a new default instance.
1771    pub fn new() -> Self {
1772        std::default::Default::default()
1773    }
1774
1775    /// Sets the value of [backup_template][crate::model::BackupDisasterRecovery::backup_template].
1776    ///
1777    /// # Example
1778    /// ```ignore,no_run
1779    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1780    /// let x = BackupDisasterRecovery::new().set_backup_template("example");
1781    /// ```
1782    pub fn set_backup_template<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1783        self.backup_template = v.into();
1784        self
1785    }
1786
1787    /// Sets the value of [policies][crate::model::BackupDisasterRecovery::policies].
1788    ///
1789    /// # Example
1790    /// ```ignore,no_run
1791    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1792    /// let x = BackupDisasterRecovery::new().set_policies(["a", "b", "c"]);
1793    /// ```
1794    pub fn set_policies<T, V>(mut self, v: T) -> Self
1795    where
1796        T: std::iter::IntoIterator<Item = V>,
1797        V: std::convert::Into<std::string::String>,
1798    {
1799        use std::iter::Iterator;
1800        self.policies = v.into_iter().map(|i| i.into()).collect();
1801        self
1802    }
1803
1804    /// Sets the value of [host][crate::model::BackupDisasterRecovery::host].
1805    ///
1806    /// # Example
1807    /// ```ignore,no_run
1808    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1809    /// let x = BackupDisasterRecovery::new().set_host("example");
1810    /// ```
1811    pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1812        self.host = v.into();
1813        self
1814    }
1815
1816    /// Sets the value of [applications][crate::model::BackupDisasterRecovery::applications].
1817    ///
1818    /// # Example
1819    /// ```ignore,no_run
1820    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1821    /// let x = BackupDisasterRecovery::new().set_applications(["a", "b", "c"]);
1822    /// ```
1823    pub fn set_applications<T, V>(mut self, v: T) -> Self
1824    where
1825        T: std::iter::IntoIterator<Item = V>,
1826        V: std::convert::Into<std::string::String>,
1827    {
1828        use std::iter::Iterator;
1829        self.applications = v.into_iter().map(|i| i.into()).collect();
1830        self
1831    }
1832
1833    /// Sets the value of [storage_pool][crate::model::BackupDisasterRecovery::storage_pool].
1834    ///
1835    /// # Example
1836    /// ```ignore,no_run
1837    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1838    /// let x = BackupDisasterRecovery::new().set_storage_pool("example");
1839    /// ```
1840    pub fn set_storage_pool<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1841        self.storage_pool = v.into();
1842        self
1843    }
1844
1845    /// Sets the value of [policy_options][crate::model::BackupDisasterRecovery::policy_options].
1846    ///
1847    /// # Example
1848    /// ```ignore,no_run
1849    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1850    /// let x = BackupDisasterRecovery::new().set_policy_options(["a", "b", "c"]);
1851    /// ```
1852    pub fn set_policy_options<T, V>(mut self, v: T) -> Self
1853    where
1854        T: std::iter::IntoIterator<Item = V>,
1855        V: std::convert::Into<std::string::String>,
1856    {
1857        use std::iter::Iterator;
1858        self.policy_options = v.into_iter().map(|i| i.into()).collect();
1859        self
1860    }
1861
1862    /// Sets the value of [profile][crate::model::BackupDisasterRecovery::profile].
1863    ///
1864    /// # Example
1865    /// ```ignore,no_run
1866    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1867    /// let x = BackupDisasterRecovery::new().set_profile("example");
1868    /// ```
1869    pub fn set_profile<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1870        self.profile = v.into();
1871        self
1872    }
1873
1874    /// Sets the value of [appliance][crate::model::BackupDisasterRecovery::appliance].
1875    ///
1876    /// # Example
1877    /// ```ignore,no_run
1878    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1879    /// let x = BackupDisasterRecovery::new().set_appliance("example");
1880    /// ```
1881    pub fn set_appliance<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1882        self.appliance = v.into();
1883        self
1884    }
1885
1886    /// Sets the value of [backup_type][crate::model::BackupDisasterRecovery::backup_type].
1887    ///
1888    /// # Example
1889    /// ```ignore,no_run
1890    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1891    /// let x = BackupDisasterRecovery::new().set_backup_type("example");
1892    /// ```
1893    pub fn set_backup_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1894        self.backup_type = v.into();
1895        self
1896    }
1897
1898    /// Sets the value of [backup_create_time][crate::model::BackupDisasterRecovery::backup_create_time].
1899    ///
1900    /// # Example
1901    /// ```ignore,no_run
1902    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1903    /// use wkt::Timestamp;
1904    /// let x = BackupDisasterRecovery::new().set_backup_create_time(Timestamp::default()/* use setters */);
1905    /// ```
1906    pub fn set_backup_create_time<T>(mut self, v: T) -> Self
1907    where
1908        T: std::convert::Into<wkt::Timestamp>,
1909    {
1910        self.backup_create_time = std::option::Option::Some(v.into());
1911        self
1912    }
1913
1914    /// Sets or clears the value of [backup_create_time][crate::model::BackupDisasterRecovery::backup_create_time].
1915    ///
1916    /// # Example
1917    /// ```ignore,no_run
1918    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1919    /// use wkt::Timestamp;
1920    /// let x = BackupDisasterRecovery::new().set_or_clear_backup_create_time(Some(Timestamp::default()/* use setters */));
1921    /// let x = BackupDisasterRecovery::new().set_or_clear_backup_create_time(None::<Timestamp>);
1922    /// ```
1923    pub fn set_or_clear_backup_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1924    where
1925        T: std::convert::Into<wkt::Timestamp>,
1926    {
1927        self.backup_create_time = v.map(|x| x.into());
1928        self
1929    }
1930}
1931
1932impl wkt::message::Message for BackupDisasterRecovery {
1933    fn typename() -> &'static str {
1934        "type.googleapis.com/google.cloud.securitycenter.v2.BackupDisasterRecovery"
1935    }
1936}
1937
1938/// Configures how to deliver Findings to BigQuery Instance.
1939#[derive(Clone, Default, PartialEq)]
1940#[non_exhaustive]
1941pub struct BigQueryExport {
1942    /// Identifier. The relative resource name of this export. See:
1943    /// <https://cloud.google.com/apis/design/resource_names#relative_resource_name>.
1944    /// The following list shows some examples:
1945    ///
1946    ///
1947    /// `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}`
1948    ///
1949    /// + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}`
1950    ///
1951    /// `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}`
1952    ///
1953    /// This field is provided in responses, and is ignored when provided in create
1954    /// requests.
1955    pub name: std::string::String,
1956
1957    /// The description of the export (max of 1024 characters).
1958    pub description: std::string::String,
1959
1960    /// Expression that defines the filter to apply across create/update events
1961    /// of findings. The expression is a list of zero or more restrictions combined
1962    /// via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
1963    /// has higher precedence than `AND`.
1964    ///
1965    /// Restrictions have the form `<field> <operator> <value>` and may have a
1966    /// `-` character in front of them to indicate negation. The fields map to
1967    /// those defined in the corresponding resource.
1968    ///
1969    /// The supported operators are:
1970    ///
1971    /// * `=` for all value types.
1972    /// * `>`, `<`, `>=`, `<=` for integer values.
1973    /// * `:`, meaning substring matching, for strings.
1974    ///
1975    /// The supported value types are:
1976    ///
1977    /// * string literals in quotes.
1978    /// * integer literals without quotes.
1979    /// * boolean literals `true` and `false` without quotes.
1980    pub filter: std::string::String,
1981
1982    /// The dataset to write findings' updates to. Its format is
1983    /// "projects/[project_id]/datasets/[bigquery_dataset_id]".
1984    /// BigQuery dataset unique ID  must contain only letters (a-z, A-Z), numbers
1985    /// (0-9), or underscores (_).
1986    pub dataset: std::string::String,
1987
1988    /// Output only. The time at which the BigQuery export was created.
1989    /// This field is set by the server and will be ignored if provided on export
1990    /// on creation.
1991    pub create_time: std::option::Option<wkt::Timestamp>,
1992
1993    /// Output only. The most recent time at which the BigQuery export was updated.
1994    /// This field is set by the server and will be ignored if provided on export
1995    /// creation or update.
1996    pub update_time: std::option::Option<wkt::Timestamp>,
1997
1998    /// Output only. Email address of the user who last edited the BigQuery export.
1999    /// This field is set by the server and will be ignored if provided on export
2000    /// creation or update.
2001    pub most_recent_editor: std::string::String,
2002
2003    /// Output only. The service account that needs permission to create table and
2004    /// upload data to the BigQuery dataset.
2005    pub principal: std::string::String,
2006
2007    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2008}
2009
2010impl BigQueryExport {
2011    /// Creates a new default instance.
2012    pub fn new() -> Self {
2013        std::default::Default::default()
2014    }
2015
2016    /// Sets the value of [name][crate::model::BigQueryExport::name].
2017    ///
2018    /// # Example
2019    /// ```ignore,no_run
2020    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2021    /// # let organization_id = "organization_id";
2022    /// # let location_id = "location_id";
2023    /// # let export_id = "export_id";
2024    /// let x = BigQueryExport::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}"));
2025    /// ```
2026    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2027        self.name = v.into();
2028        self
2029    }
2030
2031    /// Sets the value of [description][crate::model::BigQueryExport::description].
2032    ///
2033    /// # Example
2034    /// ```ignore,no_run
2035    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2036    /// let x = BigQueryExport::new().set_description("example");
2037    /// ```
2038    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2039        self.description = v.into();
2040        self
2041    }
2042
2043    /// Sets the value of [filter][crate::model::BigQueryExport::filter].
2044    ///
2045    /// # Example
2046    /// ```ignore,no_run
2047    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2048    /// let x = BigQueryExport::new().set_filter("example");
2049    /// ```
2050    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2051        self.filter = v.into();
2052        self
2053    }
2054
2055    /// Sets the value of [dataset][crate::model::BigQueryExport::dataset].
2056    ///
2057    /// # Example
2058    /// ```ignore,no_run
2059    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2060    /// let x = BigQueryExport::new().set_dataset("example");
2061    /// ```
2062    pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2063        self.dataset = v.into();
2064        self
2065    }
2066
2067    /// Sets the value of [create_time][crate::model::BigQueryExport::create_time].
2068    ///
2069    /// # Example
2070    /// ```ignore,no_run
2071    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2072    /// use wkt::Timestamp;
2073    /// let x = BigQueryExport::new().set_create_time(Timestamp::default()/* use setters */);
2074    /// ```
2075    pub fn set_create_time<T>(mut self, v: T) -> Self
2076    where
2077        T: std::convert::Into<wkt::Timestamp>,
2078    {
2079        self.create_time = std::option::Option::Some(v.into());
2080        self
2081    }
2082
2083    /// Sets or clears the value of [create_time][crate::model::BigQueryExport::create_time].
2084    ///
2085    /// # Example
2086    /// ```ignore,no_run
2087    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2088    /// use wkt::Timestamp;
2089    /// let x = BigQueryExport::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
2090    /// let x = BigQueryExport::new().set_or_clear_create_time(None::<Timestamp>);
2091    /// ```
2092    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2093    where
2094        T: std::convert::Into<wkt::Timestamp>,
2095    {
2096        self.create_time = v.map(|x| x.into());
2097        self
2098    }
2099
2100    /// Sets the value of [update_time][crate::model::BigQueryExport::update_time].
2101    ///
2102    /// # Example
2103    /// ```ignore,no_run
2104    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2105    /// use wkt::Timestamp;
2106    /// let x = BigQueryExport::new().set_update_time(Timestamp::default()/* use setters */);
2107    /// ```
2108    pub fn set_update_time<T>(mut self, v: T) -> Self
2109    where
2110        T: std::convert::Into<wkt::Timestamp>,
2111    {
2112        self.update_time = std::option::Option::Some(v.into());
2113        self
2114    }
2115
2116    /// Sets or clears the value of [update_time][crate::model::BigQueryExport::update_time].
2117    ///
2118    /// # Example
2119    /// ```ignore,no_run
2120    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2121    /// use wkt::Timestamp;
2122    /// let x = BigQueryExport::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
2123    /// let x = BigQueryExport::new().set_or_clear_update_time(None::<Timestamp>);
2124    /// ```
2125    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
2126    where
2127        T: std::convert::Into<wkt::Timestamp>,
2128    {
2129        self.update_time = v.map(|x| x.into());
2130        self
2131    }
2132
2133    /// Sets the value of [most_recent_editor][crate::model::BigQueryExport::most_recent_editor].
2134    ///
2135    /// # Example
2136    /// ```ignore,no_run
2137    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2138    /// let x = BigQueryExport::new().set_most_recent_editor("example");
2139    /// ```
2140    pub fn set_most_recent_editor<T: std::convert::Into<std::string::String>>(
2141        mut self,
2142        v: T,
2143    ) -> Self {
2144        self.most_recent_editor = v.into();
2145        self
2146    }
2147
2148    /// Sets the value of [principal][crate::model::BigQueryExport::principal].
2149    ///
2150    /// # Example
2151    /// ```ignore,no_run
2152    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2153    /// let x = BigQueryExport::new().set_principal("example");
2154    /// ```
2155    pub fn set_principal<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2156        self.principal = v.into();
2157        self
2158    }
2159}
2160
2161impl wkt::message::Message for BigQueryExport {
2162    fn typename() -> &'static str {
2163        "type.googleapis.com/google.cloud.securitycenter.v2.BigQueryExport"
2164    }
2165}
2166
2167/// Contains details about a chokepoint, which is a resource or resource group
2168/// where high-risk attack paths converge, based on [attack path simulations]
2169/// (<https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations>).
2170#[derive(Clone, Default, PartialEq)]
2171#[non_exhaustive]
2172pub struct Chokepoint {
2173    /// List of resource names of findings associated with this chokepoint.
2174    /// For example, organizations/123/sources/456/findings/789.
2175    /// This list will have at most 100 findings.
2176    pub related_findings: std::vec::Vec<std::string::String>,
2177
2178    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2179}
2180
2181impl Chokepoint {
2182    /// Creates a new default instance.
2183    pub fn new() -> Self {
2184        std::default::Default::default()
2185    }
2186
2187    /// Sets the value of [related_findings][crate::model::Chokepoint::related_findings].
2188    ///
2189    /// # Example
2190    /// ```ignore,no_run
2191    /// # use google_cloud_securitycenter_v2::model::Chokepoint;
2192    /// let x = Chokepoint::new().set_related_findings(["a", "b", "c"]);
2193    /// ```
2194    pub fn set_related_findings<T, V>(mut self, v: T) -> Self
2195    where
2196        T: std::iter::IntoIterator<Item = V>,
2197        V: std::convert::Into<std::string::String>,
2198    {
2199        use std::iter::Iterator;
2200        self.related_findings = v.into_iter().map(|i| i.into()).collect();
2201        self
2202    }
2203}
2204
2205impl wkt::message::Message for Chokepoint {
2206    fn typename() -> &'static str {
2207        "type.googleapis.com/google.cloud.securitycenter.v2.Chokepoint"
2208    }
2209}
2210
2211/// Fields related to Google Cloud Armor findings.
2212#[derive(Clone, Default, PartialEq)]
2213#[non_exhaustive]
2214pub struct CloudArmor {
2215    /// Information about the [Google Cloud Armor security
2216    /// policy](https://cloud.google.com/armor/docs/security-policy-overview)
2217    /// relevant to the finding.
2218    pub security_policy: std::option::Option<crate::model::SecurityPolicy>,
2219
2220    /// Information about incoming requests evaluated by [Google Cloud Armor
2221    /// security
2222    /// policies](https://cloud.google.com/armor/docs/security-policy-overview).
2223    pub requests: std::option::Option<crate::model::Requests>,
2224
2225    /// Information about potential Layer 7 DDoS attacks identified by [Google
2226    /// Cloud Armor Adaptive
2227    /// Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview).
2228    pub adaptive_protection: std::option::Option<crate::model::AdaptiveProtection>,
2229
2230    /// Information about DDoS attack volume and classification.
2231    pub attack: std::option::Option<crate::model::Attack>,
2232
2233    /// Distinguish between volumetric & protocol DDoS attack and
2234    /// application layer attacks. For example, "L3_4" for Layer 3 and Layer 4 DDoS
2235    /// attacks, or "L_7" for Layer 7 DDoS attacks.
2236    pub threat_vector: std::string::String,
2237
2238    /// Duration of attack from the start until the current moment (updated every 5
2239    /// minutes).
2240    pub duration: std::option::Option<wkt::Duration>,
2241
2242    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2243}
2244
2245impl CloudArmor {
2246    /// Creates a new default instance.
2247    pub fn new() -> Self {
2248        std::default::Default::default()
2249    }
2250
2251    /// Sets the value of [security_policy][crate::model::CloudArmor::security_policy].
2252    ///
2253    /// # Example
2254    /// ```ignore,no_run
2255    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2256    /// use google_cloud_securitycenter_v2::model::SecurityPolicy;
2257    /// let x = CloudArmor::new().set_security_policy(SecurityPolicy::default()/* use setters */);
2258    /// ```
2259    pub fn set_security_policy<T>(mut self, v: T) -> Self
2260    where
2261        T: std::convert::Into<crate::model::SecurityPolicy>,
2262    {
2263        self.security_policy = std::option::Option::Some(v.into());
2264        self
2265    }
2266
2267    /// Sets or clears the value of [security_policy][crate::model::CloudArmor::security_policy].
2268    ///
2269    /// # Example
2270    /// ```ignore,no_run
2271    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2272    /// use google_cloud_securitycenter_v2::model::SecurityPolicy;
2273    /// let x = CloudArmor::new().set_or_clear_security_policy(Some(SecurityPolicy::default()/* use setters */));
2274    /// let x = CloudArmor::new().set_or_clear_security_policy(None::<SecurityPolicy>);
2275    /// ```
2276    pub fn set_or_clear_security_policy<T>(mut self, v: std::option::Option<T>) -> Self
2277    where
2278        T: std::convert::Into<crate::model::SecurityPolicy>,
2279    {
2280        self.security_policy = v.map(|x| x.into());
2281        self
2282    }
2283
2284    /// Sets the value of [requests][crate::model::CloudArmor::requests].
2285    ///
2286    /// # Example
2287    /// ```ignore,no_run
2288    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2289    /// use google_cloud_securitycenter_v2::model::Requests;
2290    /// let x = CloudArmor::new().set_requests(Requests::default()/* use setters */);
2291    /// ```
2292    pub fn set_requests<T>(mut self, v: T) -> Self
2293    where
2294        T: std::convert::Into<crate::model::Requests>,
2295    {
2296        self.requests = std::option::Option::Some(v.into());
2297        self
2298    }
2299
2300    /// Sets or clears the value of [requests][crate::model::CloudArmor::requests].
2301    ///
2302    /// # Example
2303    /// ```ignore,no_run
2304    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2305    /// use google_cloud_securitycenter_v2::model::Requests;
2306    /// let x = CloudArmor::new().set_or_clear_requests(Some(Requests::default()/* use setters */));
2307    /// let x = CloudArmor::new().set_or_clear_requests(None::<Requests>);
2308    /// ```
2309    pub fn set_or_clear_requests<T>(mut self, v: std::option::Option<T>) -> Self
2310    where
2311        T: std::convert::Into<crate::model::Requests>,
2312    {
2313        self.requests = v.map(|x| x.into());
2314        self
2315    }
2316
2317    /// Sets the value of [adaptive_protection][crate::model::CloudArmor::adaptive_protection].
2318    ///
2319    /// # Example
2320    /// ```ignore,no_run
2321    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2322    /// use google_cloud_securitycenter_v2::model::AdaptiveProtection;
2323    /// let x = CloudArmor::new().set_adaptive_protection(AdaptiveProtection::default()/* use setters */);
2324    /// ```
2325    pub fn set_adaptive_protection<T>(mut self, v: T) -> Self
2326    where
2327        T: std::convert::Into<crate::model::AdaptiveProtection>,
2328    {
2329        self.adaptive_protection = std::option::Option::Some(v.into());
2330        self
2331    }
2332
2333    /// Sets or clears the value of [adaptive_protection][crate::model::CloudArmor::adaptive_protection].
2334    ///
2335    /// # Example
2336    /// ```ignore,no_run
2337    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2338    /// use google_cloud_securitycenter_v2::model::AdaptiveProtection;
2339    /// let x = CloudArmor::new().set_or_clear_adaptive_protection(Some(AdaptiveProtection::default()/* use setters */));
2340    /// let x = CloudArmor::new().set_or_clear_adaptive_protection(None::<AdaptiveProtection>);
2341    /// ```
2342    pub fn set_or_clear_adaptive_protection<T>(mut self, v: std::option::Option<T>) -> Self
2343    where
2344        T: std::convert::Into<crate::model::AdaptiveProtection>,
2345    {
2346        self.adaptive_protection = v.map(|x| x.into());
2347        self
2348    }
2349
2350    /// Sets the value of [attack][crate::model::CloudArmor::attack].
2351    ///
2352    /// # Example
2353    /// ```ignore,no_run
2354    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2355    /// use google_cloud_securitycenter_v2::model::Attack;
2356    /// let x = CloudArmor::new().set_attack(Attack::default()/* use setters */);
2357    /// ```
2358    pub fn set_attack<T>(mut self, v: T) -> Self
2359    where
2360        T: std::convert::Into<crate::model::Attack>,
2361    {
2362        self.attack = std::option::Option::Some(v.into());
2363        self
2364    }
2365
2366    /// Sets or clears the value of [attack][crate::model::CloudArmor::attack].
2367    ///
2368    /// # Example
2369    /// ```ignore,no_run
2370    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2371    /// use google_cloud_securitycenter_v2::model::Attack;
2372    /// let x = CloudArmor::new().set_or_clear_attack(Some(Attack::default()/* use setters */));
2373    /// let x = CloudArmor::new().set_or_clear_attack(None::<Attack>);
2374    /// ```
2375    pub fn set_or_clear_attack<T>(mut self, v: std::option::Option<T>) -> Self
2376    where
2377        T: std::convert::Into<crate::model::Attack>,
2378    {
2379        self.attack = v.map(|x| x.into());
2380        self
2381    }
2382
2383    /// Sets the value of [threat_vector][crate::model::CloudArmor::threat_vector].
2384    ///
2385    /// # Example
2386    /// ```ignore,no_run
2387    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2388    /// let x = CloudArmor::new().set_threat_vector("example");
2389    /// ```
2390    pub fn set_threat_vector<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2391        self.threat_vector = v.into();
2392        self
2393    }
2394
2395    /// Sets the value of [duration][crate::model::CloudArmor::duration].
2396    ///
2397    /// # Example
2398    /// ```ignore,no_run
2399    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2400    /// use wkt::Duration;
2401    /// let x = CloudArmor::new().set_duration(Duration::default()/* use setters */);
2402    /// ```
2403    pub fn set_duration<T>(mut self, v: T) -> Self
2404    where
2405        T: std::convert::Into<wkt::Duration>,
2406    {
2407        self.duration = std::option::Option::Some(v.into());
2408        self
2409    }
2410
2411    /// Sets or clears the value of [duration][crate::model::CloudArmor::duration].
2412    ///
2413    /// # Example
2414    /// ```ignore,no_run
2415    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2416    /// use wkt::Duration;
2417    /// let x = CloudArmor::new().set_or_clear_duration(Some(Duration::default()/* use setters */));
2418    /// let x = CloudArmor::new().set_or_clear_duration(None::<Duration>);
2419    /// ```
2420    pub fn set_or_clear_duration<T>(mut self, v: std::option::Option<T>) -> Self
2421    where
2422        T: std::convert::Into<wkt::Duration>,
2423    {
2424        self.duration = v.map(|x| x.into());
2425        self
2426    }
2427}
2428
2429impl wkt::message::Message for CloudArmor {
2430    fn typename() -> &'static str {
2431        "type.googleapis.com/google.cloud.securitycenter.v2.CloudArmor"
2432    }
2433}
2434
2435/// Information about the [Google Cloud Armor security
2436/// policy](https://cloud.google.com/armor/docs/security-policy-overview)
2437/// relevant to the finding.
2438#[derive(Clone, Default, PartialEq)]
2439#[non_exhaustive]
2440pub struct SecurityPolicy {
2441    /// The name of the Google Cloud Armor security policy, for example,
2442    /// "my-security-policy".
2443    pub name: std::string::String,
2444
2445    /// The type of Google Cloud Armor security policy for example, 'backend
2446    /// security policy', 'edge security policy', 'network edge security policy',
2447    /// or 'always-on DDoS protection'.
2448    pub r#type: std::string::String,
2449
2450    /// Whether or not the associated rule or policy is in preview mode.
2451    pub preview: bool,
2452
2453    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2454}
2455
2456impl SecurityPolicy {
2457    /// Creates a new default instance.
2458    pub fn new() -> Self {
2459        std::default::Default::default()
2460    }
2461
2462    /// Sets the value of [name][crate::model::SecurityPolicy::name].
2463    ///
2464    /// # Example
2465    /// ```ignore,no_run
2466    /// # use google_cloud_securitycenter_v2::model::SecurityPolicy;
2467    /// let x = SecurityPolicy::new().set_name("example");
2468    /// ```
2469    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2470        self.name = v.into();
2471        self
2472    }
2473
2474    /// Sets the value of [r#type][crate::model::SecurityPolicy::type].
2475    ///
2476    /// # Example
2477    /// ```ignore,no_run
2478    /// # use google_cloud_securitycenter_v2::model::SecurityPolicy;
2479    /// let x = SecurityPolicy::new().set_type("example");
2480    /// ```
2481    pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2482        self.r#type = v.into();
2483        self
2484    }
2485
2486    /// Sets the value of [preview][crate::model::SecurityPolicy::preview].
2487    ///
2488    /// # Example
2489    /// ```ignore,no_run
2490    /// # use google_cloud_securitycenter_v2::model::SecurityPolicy;
2491    /// let x = SecurityPolicy::new().set_preview(true);
2492    /// ```
2493    pub fn set_preview<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2494        self.preview = v.into();
2495        self
2496    }
2497}
2498
2499impl wkt::message::Message for SecurityPolicy {
2500    fn typename() -> &'static str {
2501        "type.googleapis.com/google.cloud.securitycenter.v2.SecurityPolicy"
2502    }
2503}
2504
2505/// Information about the requests relevant to the finding.
2506#[derive(Clone, Default, PartialEq)]
2507#[non_exhaustive]
2508pub struct Requests {
2509    /// For 'Increasing deny ratio', the ratio is the denied traffic divided by the
2510    /// allowed traffic. For 'Allowed traffic spike', the ratio is the allowed
2511    /// traffic in the short term divided by allowed traffic in the long term.
2512    pub ratio: f64,
2513
2514    /// Allowed RPS (requests per second) in the short term.
2515    pub short_term_allowed: i32,
2516
2517    /// Allowed RPS (requests per second) over the long term.
2518    pub long_term_allowed: i32,
2519
2520    /// Denied RPS (requests per second) over the long term.
2521    pub long_term_denied: i32,
2522
2523    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2524}
2525
2526impl Requests {
2527    /// Creates a new default instance.
2528    pub fn new() -> Self {
2529        std::default::Default::default()
2530    }
2531
2532    /// Sets the value of [ratio][crate::model::Requests::ratio].
2533    ///
2534    /// # Example
2535    /// ```ignore,no_run
2536    /// # use google_cloud_securitycenter_v2::model::Requests;
2537    /// let x = Requests::new().set_ratio(42.0);
2538    /// ```
2539    pub fn set_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
2540        self.ratio = v.into();
2541        self
2542    }
2543
2544    /// Sets the value of [short_term_allowed][crate::model::Requests::short_term_allowed].
2545    ///
2546    /// # Example
2547    /// ```ignore,no_run
2548    /// # use google_cloud_securitycenter_v2::model::Requests;
2549    /// let x = Requests::new().set_short_term_allowed(42);
2550    /// ```
2551    pub fn set_short_term_allowed<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2552        self.short_term_allowed = v.into();
2553        self
2554    }
2555
2556    /// Sets the value of [long_term_allowed][crate::model::Requests::long_term_allowed].
2557    ///
2558    /// # Example
2559    /// ```ignore,no_run
2560    /// # use google_cloud_securitycenter_v2::model::Requests;
2561    /// let x = Requests::new().set_long_term_allowed(42);
2562    /// ```
2563    pub fn set_long_term_allowed<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2564        self.long_term_allowed = v.into();
2565        self
2566    }
2567
2568    /// Sets the value of [long_term_denied][crate::model::Requests::long_term_denied].
2569    ///
2570    /// # Example
2571    /// ```ignore,no_run
2572    /// # use google_cloud_securitycenter_v2::model::Requests;
2573    /// let x = Requests::new().set_long_term_denied(42);
2574    /// ```
2575    pub fn set_long_term_denied<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2576        self.long_term_denied = v.into();
2577        self
2578    }
2579}
2580
2581impl wkt::message::Message for Requests {
2582    fn typename() -> &'static str {
2583        "type.googleapis.com/google.cloud.securitycenter.v2.Requests"
2584    }
2585}
2586
2587/// Information about [Google Cloud Armor Adaptive
2588/// Protection](https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection).
2589#[derive(Clone, Default, PartialEq)]
2590#[non_exhaustive]
2591pub struct AdaptiveProtection {
2592    /// A score of 0 means that there is low confidence that the detected event is
2593    /// an actual attack. A score of 1 means that there is high confidence that the
2594    /// detected event is an attack. See the [Adaptive Protection
2595    /// documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning)
2596    /// for further explanation.
2597    pub confidence: f64,
2598
2599    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2600}
2601
2602impl AdaptiveProtection {
2603    /// Creates a new default instance.
2604    pub fn new() -> Self {
2605        std::default::Default::default()
2606    }
2607
2608    /// Sets the value of [confidence][crate::model::AdaptiveProtection::confidence].
2609    ///
2610    /// # Example
2611    /// ```ignore,no_run
2612    /// # use google_cloud_securitycenter_v2::model::AdaptiveProtection;
2613    /// let x = AdaptiveProtection::new().set_confidence(42.0);
2614    /// ```
2615    pub fn set_confidence<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
2616        self.confidence = v.into();
2617        self
2618    }
2619}
2620
2621impl wkt::message::Message for AdaptiveProtection {
2622    fn typename() -> &'static str {
2623        "type.googleapis.com/google.cloud.securitycenter.v2.AdaptiveProtection"
2624    }
2625}
2626
2627/// Information about DDoS attack volume and classification.
2628#[derive(Clone, Default, PartialEq)]
2629#[non_exhaustive]
2630pub struct Attack {
2631    /// Total PPS (packets per second) volume of attack.
2632    pub volume_pps_long: i64,
2633
2634    /// Total BPS (bytes per second) volume of attack.
2635    pub volume_bps_long: i64,
2636
2637    /// Type of attack, for example, 'SYN-flood', 'NTP-udp', or 'CHARGEN-udp'.
2638    pub classification: std::string::String,
2639
2640    /// Total PPS (packets per second) volume of attack. Deprecated - refer to
2641    /// volume_pps_long instead.
2642    #[deprecated]
2643    pub volume_pps: i32,
2644
2645    /// Total BPS (bytes per second) volume of attack. Deprecated - refer to
2646    /// volume_bps_long instead.
2647    #[deprecated]
2648    pub volume_bps: i32,
2649
2650    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2651}
2652
2653impl Attack {
2654    /// Creates a new default instance.
2655    pub fn new() -> Self {
2656        std::default::Default::default()
2657    }
2658
2659    /// Sets the value of [volume_pps_long][crate::model::Attack::volume_pps_long].
2660    ///
2661    /// # Example
2662    /// ```ignore,no_run
2663    /// # use google_cloud_securitycenter_v2::model::Attack;
2664    /// let x = Attack::new().set_volume_pps_long(42);
2665    /// ```
2666    pub fn set_volume_pps_long<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2667        self.volume_pps_long = v.into();
2668        self
2669    }
2670
2671    /// Sets the value of [volume_bps_long][crate::model::Attack::volume_bps_long].
2672    ///
2673    /// # Example
2674    /// ```ignore,no_run
2675    /// # use google_cloud_securitycenter_v2::model::Attack;
2676    /// let x = Attack::new().set_volume_bps_long(42);
2677    /// ```
2678    pub fn set_volume_bps_long<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2679        self.volume_bps_long = v.into();
2680        self
2681    }
2682
2683    /// Sets the value of [classification][crate::model::Attack::classification].
2684    ///
2685    /// # Example
2686    /// ```ignore,no_run
2687    /// # use google_cloud_securitycenter_v2::model::Attack;
2688    /// let x = Attack::new().set_classification("example");
2689    /// ```
2690    pub fn set_classification<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2691        self.classification = v.into();
2692        self
2693    }
2694
2695    /// Sets the value of [volume_pps][crate::model::Attack::volume_pps].
2696    ///
2697    /// # Example
2698    /// ```ignore,no_run
2699    /// # use google_cloud_securitycenter_v2::model::Attack;
2700    /// let x = Attack::new().set_volume_pps(42);
2701    /// ```
2702    #[deprecated]
2703    pub fn set_volume_pps<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2704        self.volume_pps = v.into();
2705        self
2706    }
2707
2708    /// Sets the value of [volume_bps][crate::model::Attack::volume_bps].
2709    ///
2710    /// # Example
2711    /// ```ignore,no_run
2712    /// # use google_cloud_securitycenter_v2::model::Attack;
2713    /// let x = Attack::new().set_volume_bps(42);
2714    /// ```
2715    #[deprecated]
2716    pub fn set_volume_bps<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2717        self.volume_bps = v.into();
2718        self
2719    }
2720}
2721
2722impl wkt::message::Message for Attack {
2723    fn typename() -> &'static str {
2724        "type.googleapis.com/google.cloud.securitycenter.v2.Attack"
2725    }
2726}
2727
2728/// The [data profile](https://cloud.google.com/dlp/docs/data-profiles)
2729/// associated with the finding.
2730#[derive(Clone, Default, PartialEq)]
2731#[non_exhaustive]
2732pub struct CloudDlpDataProfile {
2733    /// Name of the data profile, for example,
2734    /// `projects/123/locations/europe/tableProfiles/8383929`.
2735    pub data_profile: std::string::String,
2736
2737    /// The resource hierarchy level at which the data profile was generated.
2738    pub parent_type: crate::model::cloud_dlp_data_profile::ParentType,
2739
2740    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2741}
2742
2743impl CloudDlpDataProfile {
2744    /// Creates a new default instance.
2745    pub fn new() -> Self {
2746        std::default::Default::default()
2747    }
2748
2749    /// Sets the value of [data_profile][crate::model::CloudDlpDataProfile::data_profile].
2750    ///
2751    /// # Example
2752    /// ```ignore,no_run
2753    /// # use google_cloud_securitycenter_v2::model::CloudDlpDataProfile;
2754    /// let x = CloudDlpDataProfile::new().set_data_profile("example");
2755    /// ```
2756    pub fn set_data_profile<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2757        self.data_profile = v.into();
2758        self
2759    }
2760
2761    /// Sets the value of [parent_type][crate::model::CloudDlpDataProfile::parent_type].
2762    ///
2763    /// # Example
2764    /// ```ignore,no_run
2765    /// # use google_cloud_securitycenter_v2::model::CloudDlpDataProfile;
2766    /// use google_cloud_securitycenter_v2::model::cloud_dlp_data_profile::ParentType;
2767    /// let x0 = CloudDlpDataProfile::new().set_parent_type(ParentType::Organization);
2768    /// let x1 = CloudDlpDataProfile::new().set_parent_type(ParentType::Project);
2769    /// ```
2770    pub fn set_parent_type<
2771        T: std::convert::Into<crate::model::cloud_dlp_data_profile::ParentType>,
2772    >(
2773        mut self,
2774        v: T,
2775    ) -> Self {
2776        self.parent_type = v.into();
2777        self
2778    }
2779}
2780
2781impl wkt::message::Message for CloudDlpDataProfile {
2782    fn typename() -> &'static str {
2783        "type.googleapis.com/google.cloud.securitycenter.v2.CloudDlpDataProfile"
2784    }
2785}
2786
2787/// Defines additional types related to [CloudDlpDataProfile].
2788pub mod cloud_dlp_data_profile {
2789    #[allow(unused_imports)]
2790    use super::*;
2791
2792    /// Parents for configurations that produce data profile findings.
2793    ///
2794    /// # Working with unknown values
2795    ///
2796    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2797    /// additional enum variants at any time. Adding new variants is not considered
2798    /// a breaking change. Applications should write their code in anticipation of:
2799    ///
2800    /// - New values appearing in future releases of the client library, **and**
2801    /// - New values received dynamically, without application changes.
2802    ///
2803    /// Please consult the [Working with enums] section in the user guide for some
2804    /// guidelines.
2805    ///
2806    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
2807    #[derive(Clone, Debug, PartialEq)]
2808    #[non_exhaustive]
2809    pub enum ParentType {
2810        /// Unspecified parent type.
2811        Unspecified,
2812        /// Organization-level configurations.
2813        Organization,
2814        /// Project-level configurations.
2815        Project,
2816        /// If set, the enum was initialized with an unknown value.
2817        ///
2818        /// Applications can examine the value using [ParentType::value] or
2819        /// [ParentType::name].
2820        UnknownValue(parent_type::UnknownValue),
2821    }
2822
2823    #[doc(hidden)]
2824    pub mod parent_type {
2825        #[allow(unused_imports)]
2826        use super::*;
2827        #[derive(Clone, Debug, PartialEq)]
2828        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2829    }
2830
2831    impl ParentType {
2832        /// Gets the enum value.
2833        ///
2834        /// Returns `None` if the enum contains an unknown value deserialized from
2835        /// the string representation of enums.
2836        pub fn value(&self) -> std::option::Option<i32> {
2837            match self {
2838                Self::Unspecified => std::option::Option::Some(0),
2839                Self::Organization => std::option::Option::Some(1),
2840                Self::Project => std::option::Option::Some(2),
2841                Self::UnknownValue(u) => u.0.value(),
2842            }
2843        }
2844
2845        /// Gets the enum value as a string.
2846        ///
2847        /// Returns `None` if the enum contains an unknown value deserialized from
2848        /// the integer representation of enums.
2849        pub fn name(&self) -> std::option::Option<&str> {
2850            match self {
2851                Self::Unspecified => std::option::Option::Some("PARENT_TYPE_UNSPECIFIED"),
2852                Self::Organization => std::option::Option::Some("ORGANIZATION"),
2853                Self::Project => std::option::Option::Some("PROJECT"),
2854                Self::UnknownValue(u) => u.0.name(),
2855            }
2856        }
2857    }
2858
2859    impl std::default::Default for ParentType {
2860        fn default() -> Self {
2861            use std::convert::From;
2862            Self::from(0)
2863        }
2864    }
2865
2866    impl std::fmt::Display for ParentType {
2867        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2868            wkt::internal::display_enum(f, self.name(), self.value())
2869        }
2870    }
2871
2872    impl std::convert::From<i32> for ParentType {
2873        fn from(value: i32) -> Self {
2874            match value {
2875                0 => Self::Unspecified,
2876                1 => Self::Organization,
2877                2 => Self::Project,
2878                _ => Self::UnknownValue(parent_type::UnknownValue(
2879                    wkt::internal::UnknownEnumValue::Integer(value),
2880                )),
2881            }
2882        }
2883    }
2884
2885    impl std::convert::From<&str> for ParentType {
2886        fn from(value: &str) -> Self {
2887            use std::string::ToString;
2888            match value {
2889                "PARENT_TYPE_UNSPECIFIED" => Self::Unspecified,
2890                "ORGANIZATION" => Self::Organization,
2891                "PROJECT" => Self::Project,
2892                _ => Self::UnknownValue(parent_type::UnknownValue(
2893                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2894                )),
2895            }
2896        }
2897    }
2898
2899    impl serde::ser::Serialize for ParentType {
2900        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2901        where
2902            S: serde::Serializer,
2903        {
2904            match self {
2905                Self::Unspecified => serializer.serialize_i32(0),
2906                Self::Organization => serializer.serialize_i32(1),
2907                Self::Project => serializer.serialize_i32(2),
2908                Self::UnknownValue(u) => u.0.serialize(serializer),
2909            }
2910        }
2911    }
2912
2913    impl<'de> serde::de::Deserialize<'de> for ParentType {
2914        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2915        where
2916            D: serde::Deserializer<'de>,
2917        {
2918            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ParentType>::new(
2919                ".google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType",
2920            ))
2921        }
2922    }
2923}
2924
2925/// Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection
2926/// job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced
2927/// the finding.
2928#[derive(Clone, Default, PartialEq)]
2929#[non_exhaustive]
2930pub struct CloudDlpInspection {
2931    /// Name of the inspection job, for example,
2932    /// `projects/123/locations/europe/dlpJobs/i-8383929`.
2933    pub inspect_job: std::string::String,
2934
2935    /// The type of information (or
2936    /// *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found,
2937    /// for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`.
2938    pub info_type: std::string::String,
2939
2940    /// The number of times Cloud DLP found this infoType within this job
2941    /// and resource.
2942    pub info_type_count: i64,
2943
2944    /// Whether Cloud DLP scanned the complete resource or a sampled subset.
2945    pub full_scan: bool,
2946
2947    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2948}
2949
2950impl CloudDlpInspection {
2951    /// Creates a new default instance.
2952    pub fn new() -> Self {
2953        std::default::Default::default()
2954    }
2955
2956    /// Sets the value of [inspect_job][crate::model::CloudDlpInspection::inspect_job].
2957    ///
2958    /// # Example
2959    /// ```ignore,no_run
2960    /// # use google_cloud_securitycenter_v2::model::CloudDlpInspection;
2961    /// let x = CloudDlpInspection::new().set_inspect_job("example");
2962    /// ```
2963    pub fn set_inspect_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2964        self.inspect_job = v.into();
2965        self
2966    }
2967
2968    /// Sets the value of [info_type][crate::model::CloudDlpInspection::info_type].
2969    ///
2970    /// # Example
2971    /// ```ignore,no_run
2972    /// # use google_cloud_securitycenter_v2::model::CloudDlpInspection;
2973    /// let x = CloudDlpInspection::new().set_info_type("example");
2974    /// ```
2975    pub fn set_info_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2976        self.info_type = v.into();
2977        self
2978    }
2979
2980    /// Sets the value of [info_type_count][crate::model::CloudDlpInspection::info_type_count].
2981    ///
2982    /// # Example
2983    /// ```ignore,no_run
2984    /// # use google_cloud_securitycenter_v2::model::CloudDlpInspection;
2985    /// let x = CloudDlpInspection::new().set_info_type_count(42);
2986    /// ```
2987    pub fn set_info_type_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2988        self.info_type_count = v.into();
2989        self
2990    }
2991
2992    /// Sets the value of [full_scan][crate::model::CloudDlpInspection::full_scan].
2993    ///
2994    /// # Example
2995    /// ```ignore,no_run
2996    /// # use google_cloud_securitycenter_v2::model::CloudDlpInspection;
2997    /// let x = CloudDlpInspection::new().set_full_scan(true);
2998    /// ```
2999    pub fn set_full_scan<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3000        self.full_scan = v.into();
3001        self
3002    }
3003}
3004
3005impl wkt::message::Message for CloudDlpInspection {
3006    fn typename() -> &'static str {
3007        "type.googleapis.com/google.cloud.securitycenter.v2.CloudDlpInspection"
3008    }
3009}
3010
3011/// Contains compliance information about a security standard indicating unmet
3012/// recommendations.
3013#[derive(Clone, Default, PartialEq)]
3014#[non_exhaustive]
3015pub struct Compliance {
3016    /// Industry-wide compliance standards or benchmarks, such as CIS, PCI, and
3017    /// OWASP.
3018    pub standard: std::string::String,
3019
3020    /// Version of the standard or benchmark, for example, 1.1
3021    pub version: std::string::String,
3022
3023    /// Policies within the standard or benchmark, for example, A.12.4.1
3024    pub ids: std::vec::Vec<std::string::String>,
3025
3026    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3027}
3028
3029impl Compliance {
3030    /// Creates a new default instance.
3031    pub fn new() -> Self {
3032        std::default::Default::default()
3033    }
3034
3035    /// Sets the value of [standard][crate::model::Compliance::standard].
3036    ///
3037    /// # Example
3038    /// ```ignore,no_run
3039    /// # use google_cloud_securitycenter_v2::model::Compliance;
3040    /// let x = Compliance::new().set_standard("example");
3041    /// ```
3042    pub fn set_standard<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3043        self.standard = v.into();
3044        self
3045    }
3046
3047    /// Sets the value of [version][crate::model::Compliance::version].
3048    ///
3049    /// # Example
3050    /// ```ignore,no_run
3051    /// # use google_cloud_securitycenter_v2::model::Compliance;
3052    /// let x = Compliance::new().set_version("example");
3053    /// ```
3054    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3055        self.version = v.into();
3056        self
3057    }
3058
3059    /// Sets the value of [ids][crate::model::Compliance::ids].
3060    ///
3061    /// # Example
3062    /// ```ignore,no_run
3063    /// # use google_cloud_securitycenter_v2::model::Compliance;
3064    /// let x = Compliance::new().set_ids(["a", "b", "c"]);
3065    /// ```
3066    pub fn set_ids<T, V>(mut self, v: T) -> Self
3067    where
3068        T: std::iter::IntoIterator<Item = V>,
3069        V: std::convert::Into<std::string::String>,
3070    {
3071        use std::iter::Iterator;
3072        self.ids = v.into_iter().map(|i| i.into()).collect();
3073        self
3074    }
3075}
3076
3077impl wkt::message::Message for Compliance {
3078    fn typename() -> &'static str {
3079        "type.googleapis.com/google.cloud.securitycenter.v2.Compliance"
3080    }
3081}
3082
3083/// Contains information about the IP connection associated with the finding.
3084#[derive(Clone, Default, PartialEq)]
3085#[non_exhaustive]
3086pub struct Connection {
3087    /// Destination IP address. Not present for sockets that are listening and not
3088    /// connected.
3089    pub destination_ip: std::string::String,
3090
3091    /// Destination port. Not present for sockets that are listening and not
3092    /// connected.
3093    pub destination_port: i32,
3094
3095    /// Source IP address.
3096    pub source_ip: std::string::String,
3097
3098    /// Source port.
3099    pub source_port: i32,
3100
3101    /// IANA Internet Protocol Number such as TCP(6) and UDP(17).
3102    pub protocol: crate::model::connection::Protocol,
3103
3104    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3105}
3106
3107impl Connection {
3108    /// Creates a new default instance.
3109    pub fn new() -> Self {
3110        std::default::Default::default()
3111    }
3112
3113    /// Sets the value of [destination_ip][crate::model::Connection::destination_ip].
3114    ///
3115    /// # Example
3116    /// ```ignore,no_run
3117    /// # use google_cloud_securitycenter_v2::model::Connection;
3118    /// let x = Connection::new().set_destination_ip("example");
3119    /// ```
3120    pub fn set_destination_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3121        self.destination_ip = v.into();
3122        self
3123    }
3124
3125    /// Sets the value of [destination_port][crate::model::Connection::destination_port].
3126    ///
3127    /// # Example
3128    /// ```ignore,no_run
3129    /// # use google_cloud_securitycenter_v2::model::Connection;
3130    /// let x = Connection::new().set_destination_port(42);
3131    /// ```
3132    pub fn set_destination_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3133        self.destination_port = v.into();
3134        self
3135    }
3136
3137    /// Sets the value of [source_ip][crate::model::Connection::source_ip].
3138    ///
3139    /// # Example
3140    /// ```ignore,no_run
3141    /// # use google_cloud_securitycenter_v2::model::Connection;
3142    /// let x = Connection::new().set_source_ip("example");
3143    /// ```
3144    pub fn set_source_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3145        self.source_ip = v.into();
3146        self
3147    }
3148
3149    /// Sets the value of [source_port][crate::model::Connection::source_port].
3150    ///
3151    /// # Example
3152    /// ```ignore,no_run
3153    /// # use google_cloud_securitycenter_v2::model::Connection;
3154    /// let x = Connection::new().set_source_port(42);
3155    /// ```
3156    pub fn set_source_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3157        self.source_port = v.into();
3158        self
3159    }
3160
3161    /// Sets the value of [protocol][crate::model::Connection::protocol].
3162    ///
3163    /// # Example
3164    /// ```ignore,no_run
3165    /// # use google_cloud_securitycenter_v2::model::Connection;
3166    /// use google_cloud_securitycenter_v2::model::connection::Protocol;
3167    /// let x0 = Connection::new().set_protocol(Protocol::Icmp);
3168    /// let x1 = Connection::new().set_protocol(Protocol::Tcp);
3169    /// let x2 = Connection::new().set_protocol(Protocol::Udp);
3170    /// ```
3171    pub fn set_protocol<T: std::convert::Into<crate::model::connection::Protocol>>(
3172        mut self,
3173        v: T,
3174    ) -> Self {
3175        self.protocol = v.into();
3176        self
3177    }
3178}
3179
3180impl wkt::message::Message for Connection {
3181    fn typename() -> &'static str {
3182        "type.googleapis.com/google.cloud.securitycenter.v2.Connection"
3183    }
3184}
3185
3186/// Defines additional types related to [Connection].
3187pub mod connection {
3188    #[allow(unused_imports)]
3189    use super::*;
3190
3191    /// IANA Internet Protocol Number such as TCP(6) and UDP(17).
3192    ///
3193    /// # Working with unknown values
3194    ///
3195    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3196    /// additional enum variants at any time. Adding new variants is not considered
3197    /// a breaking change. Applications should write their code in anticipation of:
3198    ///
3199    /// - New values appearing in future releases of the client library, **and**
3200    /// - New values received dynamically, without application changes.
3201    ///
3202    /// Please consult the [Working with enums] section in the user guide for some
3203    /// guidelines.
3204    ///
3205    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
3206    #[derive(Clone, Debug, PartialEq)]
3207    #[non_exhaustive]
3208    pub enum Protocol {
3209        /// Unspecified protocol (not HOPOPT).
3210        Unspecified,
3211        /// Internet Control Message Protocol.
3212        Icmp,
3213        /// Transmission Control Protocol.
3214        Tcp,
3215        /// User Datagram Protocol.
3216        Udp,
3217        /// Generic Routing Encapsulation.
3218        Gre,
3219        /// Encap Security Payload.
3220        Esp,
3221        /// If set, the enum was initialized with an unknown value.
3222        ///
3223        /// Applications can examine the value using [Protocol::value] or
3224        /// [Protocol::name].
3225        UnknownValue(protocol::UnknownValue),
3226    }
3227
3228    #[doc(hidden)]
3229    pub mod protocol {
3230        #[allow(unused_imports)]
3231        use super::*;
3232        #[derive(Clone, Debug, PartialEq)]
3233        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3234    }
3235
3236    impl Protocol {
3237        /// Gets the enum value.
3238        ///
3239        /// Returns `None` if the enum contains an unknown value deserialized from
3240        /// the string representation of enums.
3241        pub fn value(&self) -> std::option::Option<i32> {
3242            match self {
3243                Self::Unspecified => std::option::Option::Some(0),
3244                Self::Icmp => std::option::Option::Some(1),
3245                Self::Tcp => std::option::Option::Some(6),
3246                Self::Udp => std::option::Option::Some(17),
3247                Self::Gre => std::option::Option::Some(47),
3248                Self::Esp => std::option::Option::Some(50),
3249                Self::UnknownValue(u) => u.0.value(),
3250            }
3251        }
3252
3253        /// Gets the enum value as a string.
3254        ///
3255        /// Returns `None` if the enum contains an unknown value deserialized from
3256        /// the integer representation of enums.
3257        pub fn name(&self) -> std::option::Option<&str> {
3258            match self {
3259                Self::Unspecified => std::option::Option::Some("PROTOCOL_UNSPECIFIED"),
3260                Self::Icmp => std::option::Option::Some("ICMP"),
3261                Self::Tcp => std::option::Option::Some("TCP"),
3262                Self::Udp => std::option::Option::Some("UDP"),
3263                Self::Gre => std::option::Option::Some("GRE"),
3264                Self::Esp => std::option::Option::Some("ESP"),
3265                Self::UnknownValue(u) => u.0.name(),
3266            }
3267        }
3268    }
3269
3270    impl std::default::Default for Protocol {
3271        fn default() -> Self {
3272            use std::convert::From;
3273            Self::from(0)
3274        }
3275    }
3276
3277    impl std::fmt::Display for Protocol {
3278        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3279            wkt::internal::display_enum(f, self.name(), self.value())
3280        }
3281    }
3282
3283    impl std::convert::From<i32> for Protocol {
3284        fn from(value: i32) -> Self {
3285            match value {
3286                0 => Self::Unspecified,
3287                1 => Self::Icmp,
3288                6 => Self::Tcp,
3289                17 => Self::Udp,
3290                47 => Self::Gre,
3291                50 => Self::Esp,
3292                _ => Self::UnknownValue(protocol::UnknownValue(
3293                    wkt::internal::UnknownEnumValue::Integer(value),
3294                )),
3295            }
3296        }
3297    }
3298
3299    impl std::convert::From<&str> for Protocol {
3300        fn from(value: &str) -> Self {
3301            use std::string::ToString;
3302            match value {
3303                "PROTOCOL_UNSPECIFIED" => Self::Unspecified,
3304                "ICMP" => Self::Icmp,
3305                "TCP" => Self::Tcp,
3306                "UDP" => Self::Udp,
3307                "GRE" => Self::Gre,
3308                "ESP" => Self::Esp,
3309                _ => Self::UnknownValue(protocol::UnknownValue(
3310                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3311                )),
3312            }
3313        }
3314    }
3315
3316    impl serde::ser::Serialize for Protocol {
3317        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3318        where
3319            S: serde::Serializer,
3320        {
3321            match self {
3322                Self::Unspecified => serializer.serialize_i32(0),
3323                Self::Icmp => serializer.serialize_i32(1),
3324                Self::Tcp => serializer.serialize_i32(6),
3325                Self::Udp => serializer.serialize_i32(17),
3326                Self::Gre => serializer.serialize_i32(47),
3327                Self::Esp => serializer.serialize_i32(50),
3328                Self::UnknownValue(u) => u.0.serialize(serializer),
3329            }
3330        }
3331    }
3332
3333    impl<'de> serde::de::Deserialize<'de> for Protocol {
3334        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3335        where
3336            D: serde::Deserializer<'de>,
3337        {
3338            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Protocol>::new(
3339                ".google.cloud.securitycenter.v2.Connection.Protocol",
3340            ))
3341        }
3342    }
3343}
3344
3345/// Details about specific contacts
3346#[derive(Clone, Default, PartialEq)]
3347#[non_exhaustive]
3348pub struct ContactDetails {
3349    /// A list of contacts
3350    pub contacts: std::vec::Vec<crate::model::Contact>,
3351
3352    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3353}
3354
3355impl ContactDetails {
3356    /// Creates a new default instance.
3357    pub fn new() -> Self {
3358        std::default::Default::default()
3359    }
3360
3361    /// Sets the value of [contacts][crate::model::ContactDetails::contacts].
3362    ///
3363    /// # Example
3364    /// ```ignore,no_run
3365    /// # use google_cloud_securitycenter_v2::model::ContactDetails;
3366    /// use google_cloud_securitycenter_v2::model::Contact;
3367    /// let x = ContactDetails::new()
3368    ///     .set_contacts([
3369    ///         Contact::default()/* use setters */,
3370    ///         Contact::default()/* use (different) setters */,
3371    ///     ]);
3372    /// ```
3373    pub fn set_contacts<T, V>(mut self, v: T) -> Self
3374    where
3375        T: std::iter::IntoIterator<Item = V>,
3376        V: std::convert::Into<crate::model::Contact>,
3377    {
3378        use std::iter::Iterator;
3379        self.contacts = v.into_iter().map(|i| i.into()).collect();
3380        self
3381    }
3382}
3383
3384impl wkt::message::Message for ContactDetails {
3385    fn typename() -> &'static str {
3386        "type.googleapis.com/google.cloud.securitycenter.v2.ContactDetails"
3387    }
3388}
3389
3390/// The email address of a contact.
3391#[derive(Clone, Default, PartialEq)]
3392#[non_exhaustive]
3393pub struct Contact {
3394    /// An email address. For example, "`person123@company.com`".
3395    pub email: std::string::String,
3396
3397    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3398}
3399
3400impl Contact {
3401    /// Creates a new default instance.
3402    pub fn new() -> Self {
3403        std::default::Default::default()
3404    }
3405
3406    /// Sets the value of [email][crate::model::Contact::email].
3407    ///
3408    /// # Example
3409    /// ```ignore,no_run
3410    /// # use google_cloud_securitycenter_v2::model::Contact;
3411    /// let x = Contact::new().set_email("example");
3412    /// ```
3413    pub fn set_email<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3414        self.email = v.into();
3415        self
3416    }
3417}
3418
3419impl wkt::message::Message for Contact {
3420    fn typename() -> &'static str {
3421        "type.googleapis.com/google.cloud.securitycenter.v2.Contact"
3422    }
3423}
3424
3425/// Container associated with the finding.
3426#[derive(Clone, Default, PartialEq)]
3427#[non_exhaustive]
3428pub struct Container {
3429    /// Name of the container.
3430    pub name: std::string::String,
3431
3432    /// Container image URI provided when configuring a pod or container. This
3433    /// string can identify a container image version using mutable tags.
3434    pub uri: std::string::String,
3435
3436    /// Optional container image ID, if provided by the container runtime. Uniquely
3437    /// identifies the container image launched using a container image digest.
3438    pub image_id: std::string::String,
3439
3440    /// Container labels, as provided by the container runtime.
3441    pub labels: std::vec::Vec<crate::model::Label>,
3442
3443    /// The time that the container was created.
3444    pub create_time: std::option::Option<wkt::Timestamp>,
3445
3446    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3447}
3448
3449impl Container {
3450    /// Creates a new default instance.
3451    pub fn new() -> Self {
3452        std::default::Default::default()
3453    }
3454
3455    /// Sets the value of [name][crate::model::Container::name].
3456    ///
3457    /// # Example
3458    /// ```ignore,no_run
3459    /// # use google_cloud_securitycenter_v2::model::Container;
3460    /// let x = Container::new().set_name("example");
3461    /// ```
3462    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3463        self.name = v.into();
3464        self
3465    }
3466
3467    /// Sets the value of [uri][crate::model::Container::uri].
3468    ///
3469    /// # Example
3470    /// ```ignore,no_run
3471    /// # use google_cloud_securitycenter_v2::model::Container;
3472    /// let x = Container::new().set_uri("example");
3473    /// ```
3474    pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3475        self.uri = v.into();
3476        self
3477    }
3478
3479    /// Sets the value of [image_id][crate::model::Container::image_id].
3480    ///
3481    /// # Example
3482    /// ```ignore,no_run
3483    /// # use google_cloud_securitycenter_v2::model::Container;
3484    /// let x = Container::new().set_image_id("example");
3485    /// ```
3486    pub fn set_image_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3487        self.image_id = v.into();
3488        self
3489    }
3490
3491    /// Sets the value of [labels][crate::model::Container::labels].
3492    ///
3493    /// # Example
3494    /// ```ignore,no_run
3495    /// # use google_cloud_securitycenter_v2::model::Container;
3496    /// use google_cloud_securitycenter_v2::model::Label;
3497    /// let x = Container::new()
3498    ///     .set_labels([
3499    ///         Label::default()/* use setters */,
3500    ///         Label::default()/* use (different) setters */,
3501    ///     ]);
3502    /// ```
3503    pub fn set_labels<T, V>(mut self, v: T) -> Self
3504    where
3505        T: std::iter::IntoIterator<Item = V>,
3506        V: std::convert::Into<crate::model::Label>,
3507    {
3508        use std::iter::Iterator;
3509        self.labels = v.into_iter().map(|i| i.into()).collect();
3510        self
3511    }
3512
3513    /// Sets the value of [create_time][crate::model::Container::create_time].
3514    ///
3515    /// # Example
3516    /// ```ignore,no_run
3517    /// # use google_cloud_securitycenter_v2::model::Container;
3518    /// use wkt::Timestamp;
3519    /// let x = Container::new().set_create_time(Timestamp::default()/* use setters */);
3520    /// ```
3521    pub fn set_create_time<T>(mut self, v: T) -> Self
3522    where
3523        T: std::convert::Into<wkt::Timestamp>,
3524    {
3525        self.create_time = std::option::Option::Some(v.into());
3526        self
3527    }
3528
3529    /// Sets or clears the value of [create_time][crate::model::Container::create_time].
3530    ///
3531    /// # Example
3532    /// ```ignore,no_run
3533    /// # use google_cloud_securitycenter_v2::model::Container;
3534    /// use wkt::Timestamp;
3535    /// let x = Container::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
3536    /// let x = Container::new().set_or_clear_create_time(None::<Timestamp>);
3537    /// ```
3538    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3539    where
3540        T: std::convert::Into<wkt::Timestamp>,
3541    {
3542        self.create_time = v.map(|x| x.into());
3543        self
3544    }
3545}
3546
3547impl wkt::message::Message for Container {
3548    fn typename() -> &'static str {
3549        "type.googleapis.com/google.cloud.securitycenter.v2.Container"
3550    }
3551}
3552
3553/// Details about a data access attempt made by a principal not authorized under
3554/// applicable data security policy.
3555#[derive(Clone, Default, PartialEq)]
3556#[non_exhaustive]
3557pub struct DataAccessEvent {
3558    /// Unique identifier for data access event.
3559    pub event_id: std::string::String,
3560
3561    /// The email address of the principal that accessed the data. The principal
3562    /// could be a user account, service account, Google group, or other.
3563    pub principal_email: std::string::String,
3564
3565    /// The operation performed by the principal to access the data.
3566    pub operation: crate::model::data_access_event::Operation,
3567
3568    /// Timestamp of data access event.
3569    pub event_time: std::option::Option<wkt::Timestamp>,
3570
3571    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3572}
3573
3574impl DataAccessEvent {
3575    /// Creates a new default instance.
3576    pub fn new() -> Self {
3577        std::default::Default::default()
3578    }
3579
3580    /// Sets the value of [event_id][crate::model::DataAccessEvent::event_id].
3581    ///
3582    /// # Example
3583    /// ```ignore,no_run
3584    /// # use google_cloud_securitycenter_v2::model::DataAccessEvent;
3585    /// let x = DataAccessEvent::new().set_event_id("example");
3586    /// ```
3587    pub fn set_event_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3588        self.event_id = v.into();
3589        self
3590    }
3591
3592    /// Sets the value of [principal_email][crate::model::DataAccessEvent::principal_email].
3593    ///
3594    /// # Example
3595    /// ```ignore,no_run
3596    /// # use google_cloud_securitycenter_v2::model::DataAccessEvent;
3597    /// let x = DataAccessEvent::new().set_principal_email("example");
3598    /// ```
3599    pub fn set_principal_email<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3600        self.principal_email = v.into();
3601        self
3602    }
3603
3604    /// Sets the value of [operation][crate::model::DataAccessEvent::operation].
3605    ///
3606    /// # Example
3607    /// ```ignore,no_run
3608    /// # use google_cloud_securitycenter_v2::model::DataAccessEvent;
3609    /// use google_cloud_securitycenter_v2::model::data_access_event::Operation;
3610    /// let x0 = DataAccessEvent::new().set_operation(Operation::Read);
3611    /// let x1 = DataAccessEvent::new().set_operation(Operation::Move);
3612    /// let x2 = DataAccessEvent::new().set_operation(Operation::Copy);
3613    /// ```
3614    pub fn set_operation<T: std::convert::Into<crate::model::data_access_event::Operation>>(
3615        mut self,
3616        v: T,
3617    ) -> Self {
3618        self.operation = v.into();
3619        self
3620    }
3621
3622    /// Sets the value of [event_time][crate::model::DataAccessEvent::event_time].
3623    ///
3624    /// # Example
3625    /// ```ignore,no_run
3626    /// # use google_cloud_securitycenter_v2::model::DataAccessEvent;
3627    /// use wkt::Timestamp;
3628    /// let x = DataAccessEvent::new().set_event_time(Timestamp::default()/* use setters */);
3629    /// ```
3630    pub fn set_event_time<T>(mut self, v: T) -> Self
3631    where
3632        T: std::convert::Into<wkt::Timestamp>,
3633    {
3634        self.event_time = std::option::Option::Some(v.into());
3635        self
3636    }
3637
3638    /// Sets or clears the value of [event_time][crate::model::DataAccessEvent::event_time].
3639    ///
3640    /// # Example
3641    /// ```ignore,no_run
3642    /// # use google_cloud_securitycenter_v2::model::DataAccessEvent;
3643    /// use wkt::Timestamp;
3644    /// let x = DataAccessEvent::new().set_or_clear_event_time(Some(Timestamp::default()/* use setters */));
3645    /// let x = DataAccessEvent::new().set_or_clear_event_time(None::<Timestamp>);
3646    /// ```
3647    pub fn set_or_clear_event_time<T>(mut self, v: std::option::Option<T>) -> Self
3648    where
3649        T: std::convert::Into<wkt::Timestamp>,
3650    {
3651        self.event_time = v.map(|x| x.into());
3652        self
3653    }
3654}
3655
3656impl wkt::message::Message for DataAccessEvent {
3657    fn typename() -> &'static str {
3658        "type.googleapis.com/google.cloud.securitycenter.v2.DataAccessEvent"
3659    }
3660}
3661
3662/// Defines additional types related to [DataAccessEvent].
3663pub mod data_access_event {
3664    #[allow(unused_imports)]
3665    use super::*;
3666
3667    /// The operation of a data access event.
3668    ///
3669    /// # Working with unknown values
3670    ///
3671    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3672    /// additional enum variants at any time. Adding new variants is not considered
3673    /// a breaking change. Applications should write their code in anticipation of:
3674    ///
3675    /// - New values appearing in future releases of the client library, **and**
3676    /// - New values received dynamically, without application changes.
3677    ///
3678    /// Please consult the [Working with enums] section in the user guide for some
3679    /// guidelines.
3680    ///
3681    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
3682    #[derive(Clone, Debug, PartialEq)]
3683    #[non_exhaustive]
3684    pub enum Operation {
3685        /// The operation is unspecified.
3686        Unspecified,
3687        /// Represents a read operation.
3688        Read,
3689        /// Represents a move operation.
3690        Move,
3691        /// Represents a copy operation.
3692        Copy,
3693        /// If set, the enum was initialized with an unknown value.
3694        ///
3695        /// Applications can examine the value using [Operation::value] or
3696        /// [Operation::name].
3697        UnknownValue(operation::UnknownValue),
3698    }
3699
3700    #[doc(hidden)]
3701    pub mod operation {
3702        #[allow(unused_imports)]
3703        use super::*;
3704        #[derive(Clone, Debug, PartialEq)]
3705        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3706    }
3707
3708    impl Operation {
3709        /// Gets the enum value.
3710        ///
3711        /// Returns `None` if the enum contains an unknown value deserialized from
3712        /// the string representation of enums.
3713        pub fn value(&self) -> std::option::Option<i32> {
3714            match self {
3715                Self::Unspecified => std::option::Option::Some(0),
3716                Self::Read => std::option::Option::Some(1),
3717                Self::Move => std::option::Option::Some(2),
3718                Self::Copy => std::option::Option::Some(3),
3719                Self::UnknownValue(u) => u.0.value(),
3720            }
3721        }
3722
3723        /// Gets the enum value as a string.
3724        ///
3725        /// Returns `None` if the enum contains an unknown value deserialized from
3726        /// the integer representation of enums.
3727        pub fn name(&self) -> std::option::Option<&str> {
3728            match self {
3729                Self::Unspecified => std::option::Option::Some("OPERATION_UNSPECIFIED"),
3730                Self::Read => std::option::Option::Some("READ"),
3731                Self::Move => std::option::Option::Some("MOVE"),
3732                Self::Copy => std::option::Option::Some("COPY"),
3733                Self::UnknownValue(u) => u.0.name(),
3734            }
3735        }
3736    }
3737
3738    impl std::default::Default for Operation {
3739        fn default() -> Self {
3740            use std::convert::From;
3741            Self::from(0)
3742        }
3743    }
3744
3745    impl std::fmt::Display for Operation {
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 Operation {
3752        fn from(value: i32) -> Self {
3753            match value {
3754                0 => Self::Unspecified,
3755                1 => Self::Read,
3756                2 => Self::Move,
3757                3 => Self::Copy,
3758                _ => Self::UnknownValue(operation::UnknownValue(
3759                    wkt::internal::UnknownEnumValue::Integer(value),
3760                )),
3761            }
3762        }
3763    }
3764
3765    impl std::convert::From<&str> for Operation {
3766        fn from(value: &str) -> Self {
3767            use std::string::ToString;
3768            match value {
3769                "OPERATION_UNSPECIFIED" => Self::Unspecified,
3770                "READ" => Self::Read,
3771                "MOVE" => Self::Move,
3772                "COPY" => Self::Copy,
3773                _ => Self::UnknownValue(operation::UnknownValue(
3774                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3775                )),
3776            }
3777        }
3778    }
3779
3780    impl serde::ser::Serialize for Operation {
3781        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3782        where
3783            S: serde::Serializer,
3784        {
3785            match self {
3786                Self::Unspecified => serializer.serialize_i32(0),
3787                Self::Read => serializer.serialize_i32(1),
3788                Self::Move => serializer.serialize_i32(2),
3789                Self::Copy => serializer.serialize_i32(3),
3790                Self::UnknownValue(u) => u.0.serialize(serializer),
3791            }
3792        }
3793    }
3794
3795    impl<'de> serde::de::Deserialize<'de> for Operation {
3796        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3797        where
3798            D: serde::Deserializer<'de>,
3799        {
3800            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Operation>::new(
3801                ".google.cloud.securitycenter.v2.DataAccessEvent.Operation",
3802            ))
3803        }
3804    }
3805}
3806
3807/// Details about a data flow event, in which either the data is moved to or is
3808/// accessed from a non-compliant geo-location, as defined in the applicable data
3809/// security policy.
3810#[derive(Clone, Default, PartialEq)]
3811#[non_exhaustive]
3812pub struct DataFlowEvent {
3813    /// Unique identifier for data flow event.
3814    pub event_id: std::string::String,
3815
3816    /// The email address of the principal that initiated the data flow event. The
3817    /// principal could be a user account, service account, Google group, or other.
3818    pub principal_email: std::string::String,
3819
3820    /// The operation performed by the principal for the data flow event.
3821    pub operation: crate::model::data_flow_event::Operation,
3822
3823    /// Non-compliant location of the principal or the data destination.
3824    pub violated_location: std::string::String,
3825
3826    /// Timestamp of data flow event.
3827    pub event_time: std::option::Option<wkt::Timestamp>,
3828
3829    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3830}
3831
3832impl DataFlowEvent {
3833    /// Creates a new default instance.
3834    pub fn new() -> Self {
3835        std::default::Default::default()
3836    }
3837
3838    /// Sets the value of [event_id][crate::model::DataFlowEvent::event_id].
3839    ///
3840    /// # Example
3841    /// ```ignore,no_run
3842    /// # use google_cloud_securitycenter_v2::model::DataFlowEvent;
3843    /// let x = DataFlowEvent::new().set_event_id("example");
3844    /// ```
3845    pub fn set_event_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3846        self.event_id = v.into();
3847        self
3848    }
3849
3850    /// Sets the value of [principal_email][crate::model::DataFlowEvent::principal_email].
3851    ///
3852    /// # Example
3853    /// ```ignore,no_run
3854    /// # use google_cloud_securitycenter_v2::model::DataFlowEvent;
3855    /// let x = DataFlowEvent::new().set_principal_email("example");
3856    /// ```
3857    pub fn set_principal_email<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3858        self.principal_email = v.into();
3859        self
3860    }
3861
3862    /// Sets the value of [operation][crate::model::DataFlowEvent::operation].
3863    ///
3864    /// # Example
3865    /// ```ignore,no_run
3866    /// # use google_cloud_securitycenter_v2::model::DataFlowEvent;
3867    /// use google_cloud_securitycenter_v2::model::data_flow_event::Operation;
3868    /// let x0 = DataFlowEvent::new().set_operation(Operation::Read);
3869    /// let x1 = DataFlowEvent::new().set_operation(Operation::Move);
3870    /// let x2 = DataFlowEvent::new().set_operation(Operation::Copy);
3871    /// ```
3872    pub fn set_operation<T: std::convert::Into<crate::model::data_flow_event::Operation>>(
3873        mut self,
3874        v: T,
3875    ) -> Self {
3876        self.operation = v.into();
3877        self
3878    }
3879
3880    /// Sets the value of [violated_location][crate::model::DataFlowEvent::violated_location].
3881    ///
3882    /// # Example
3883    /// ```ignore,no_run
3884    /// # use google_cloud_securitycenter_v2::model::DataFlowEvent;
3885    /// let x = DataFlowEvent::new().set_violated_location("example");
3886    /// ```
3887    pub fn set_violated_location<T: std::convert::Into<std::string::String>>(
3888        mut self,
3889        v: T,
3890    ) -> Self {
3891        self.violated_location = v.into();
3892        self
3893    }
3894
3895    /// Sets the value of [event_time][crate::model::DataFlowEvent::event_time].
3896    ///
3897    /// # Example
3898    /// ```ignore,no_run
3899    /// # use google_cloud_securitycenter_v2::model::DataFlowEvent;
3900    /// use wkt::Timestamp;
3901    /// let x = DataFlowEvent::new().set_event_time(Timestamp::default()/* use setters */);
3902    /// ```
3903    pub fn set_event_time<T>(mut self, v: T) -> Self
3904    where
3905        T: std::convert::Into<wkt::Timestamp>,
3906    {
3907        self.event_time = std::option::Option::Some(v.into());
3908        self
3909    }
3910
3911    /// Sets or clears the value of [event_time][crate::model::DataFlowEvent::event_time].
3912    ///
3913    /// # Example
3914    /// ```ignore,no_run
3915    /// # use google_cloud_securitycenter_v2::model::DataFlowEvent;
3916    /// use wkt::Timestamp;
3917    /// let x = DataFlowEvent::new().set_or_clear_event_time(Some(Timestamp::default()/* use setters */));
3918    /// let x = DataFlowEvent::new().set_or_clear_event_time(None::<Timestamp>);
3919    /// ```
3920    pub fn set_or_clear_event_time<T>(mut self, v: std::option::Option<T>) -> Self
3921    where
3922        T: std::convert::Into<wkt::Timestamp>,
3923    {
3924        self.event_time = v.map(|x| x.into());
3925        self
3926    }
3927}
3928
3929impl wkt::message::Message for DataFlowEvent {
3930    fn typename() -> &'static str {
3931        "type.googleapis.com/google.cloud.securitycenter.v2.DataFlowEvent"
3932    }
3933}
3934
3935/// Defines additional types related to [DataFlowEvent].
3936pub mod data_flow_event {
3937    #[allow(unused_imports)]
3938    use super::*;
3939
3940    /// The operation of a data flow event.
3941    ///
3942    /// # Working with unknown values
3943    ///
3944    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3945    /// additional enum variants at any time. Adding new variants is not considered
3946    /// a breaking change. Applications should write their code in anticipation of:
3947    ///
3948    /// - New values appearing in future releases of the client library, **and**
3949    /// - New values received dynamically, without application changes.
3950    ///
3951    /// Please consult the [Working with enums] section in the user guide for some
3952    /// guidelines.
3953    ///
3954    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
3955    #[derive(Clone, Debug, PartialEq)]
3956    #[non_exhaustive]
3957    pub enum Operation {
3958        /// The operation is unspecified.
3959        Unspecified,
3960        /// Represents a read operation.
3961        Read,
3962        /// Represents a move operation.
3963        Move,
3964        /// Represents a copy operation.
3965        Copy,
3966        /// If set, the enum was initialized with an unknown value.
3967        ///
3968        /// Applications can examine the value using [Operation::value] or
3969        /// [Operation::name].
3970        UnknownValue(operation::UnknownValue),
3971    }
3972
3973    #[doc(hidden)]
3974    pub mod operation {
3975        #[allow(unused_imports)]
3976        use super::*;
3977        #[derive(Clone, Debug, PartialEq)]
3978        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3979    }
3980
3981    impl Operation {
3982        /// Gets the enum value.
3983        ///
3984        /// Returns `None` if the enum contains an unknown value deserialized from
3985        /// the string representation of enums.
3986        pub fn value(&self) -> std::option::Option<i32> {
3987            match self {
3988                Self::Unspecified => std::option::Option::Some(0),
3989                Self::Read => std::option::Option::Some(1),
3990                Self::Move => std::option::Option::Some(2),
3991                Self::Copy => std::option::Option::Some(3),
3992                Self::UnknownValue(u) => u.0.value(),
3993            }
3994        }
3995
3996        /// Gets the enum value as a string.
3997        ///
3998        /// Returns `None` if the enum contains an unknown value deserialized from
3999        /// the integer representation of enums.
4000        pub fn name(&self) -> std::option::Option<&str> {
4001            match self {
4002                Self::Unspecified => std::option::Option::Some("OPERATION_UNSPECIFIED"),
4003                Self::Read => std::option::Option::Some("READ"),
4004                Self::Move => std::option::Option::Some("MOVE"),
4005                Self::Copy => std::option::Option::Some("COPY"),
4006                Self::UnknownValue(u) => u.0.name(),
4007            }
4008        }
4009    }
4010
4011    impl std::default::Default for Operation {
4012        fn default() -> Self {
4013            use std::convert::From;
4014            Self::from(0)
4015        }
4016    }
4017
4018    impl std::fmt::Display for Operation {
4019        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4020            wkt::internal::display_enum(f, self.name(), self.value())
4021        }
4022    }
4023
4024    impl std::convert::From<i32> for Operation {
4025        fn from(value: i32) -> Self {
4026            match value {
4027                0 => Self::Unspecified,
4028                1 => Self::Read,
4029                2 => Self::Move,
4030                3 => Self::Copy,
4031                _ => Self::UnknownValue(operation::UnknownValue(
4032                    wkt::internal::UnknownEnumValue::Integer(value),
4033                )),
4034            }
4035        }
4036    }
4037
4038    impl std::convert::From<&str> for Operation {
4039        fn from(value: &str) -> Self {
4040            use std::string::ToString;
4041            match value {
4042                "OPERATION_UNSPECIFIED" => Self::Unspecified,
4043                "READ" => Self::Read,
4044                "MOVE" => Self::Move,
4045                "COPY" => Self::Copy,
4046                _ => Self::UnknownValue(operation::UnknownValue(
4047                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4048                )),
4049            }
4050        }
4051    }
4052
4053    impl serde::ser::Serialize for Operation {
4054        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4055        where
4056            S: serde::Serializer,
4057        {
4058            match self {
4059                Self::Unspecified => serializer.serialize_i32(0),
4060                Self::Read => serializer.serialize_i32(1),
4061                Self::Move => serializer.serialize_i32(2),
4062                Self::Copy => serializer.serialize_i32(3),
4063                Self::UnknownValue(u) => u.0.serialize(serializer),
4064            }
4065        }
4066    }
4067
4068    impl<'de> serde::de::Deserialize<'de> for Operation {
4069        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4070        where
4071            D: serde::Deserializer<'de>,
4072        {
4073            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Operation>::new(
4074                ".google.cloud.securitycenter.v2.DataFlowEvent.Operation",
4075            ))
4076        }
4077    }
4078}
4079
4080/// Details about data retention deletion violations, in which the data is
4081/// non-compliant based on their retention or deletion time, as defined in the
4082/// applicable data security policy. The Data Retention Deletion (DRD) control is
4083/// a control of the DSPM (Data Security Posture Management) suite that enables
4084/// organizations to manage data retention and deletion policies in compliance
4085/// with regulations, such as GDPR and CRPA. DRD supports two primary policy
4086/// types: maximum storage length (max TTL) and minimum storage length (min TTL).
4087/// Both are aimed at helping organizations meet regulatory and data management
4088/// commitments.
4089#[derive(Clone, Default, PartialEq)]
4090#[non_exhaustive]
4091pub struct DataRetentionDeletionEvent {
4092    /// Timestamp indicating when the event was detected.
4093    pub event_detection_time: std::option::Option<wkt::Timestamp>,
4094
4095    /// Number of objects that violated the policy for this resource. If the number
4096    /// is less than 1,000, then the value of this field is the exact number. If
4097    /// the number of objects that violated the policy is greater than or equal to
4098    /// 1,000, then the value of this field is 1000.
4099    pub data_object_count: i64,
4100
4101    /// Maximum duration of retention allowed from the DRD control. This comes
4102    /// from the DRD control where users set a max TTL for their data. For example,
4103    /// suppose that a user sets the max TTL for a Cloud Storage bucket to 90 days.
4104    /// However, an object in that bucket is 100 days old. In this case, a
4105    /// DataRetentionDeletionEvent will be generated for that Cloud Storage bucket,
4106    /// and the max_retention_allowed is 90 days.
4107    pub max_retention_allowed: std::option::Option<wkt::Duration>,
4108
4109    /// Type of the DRD event.
4110    pub event_type: crate::model::data_retention_deletion_event::EventType,
4111
4112    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4113}
4114
4115impl DataRetentionDeletionEvent {
4116    /// Creates a new default instance.
4117    pub fn new() -> Self {
4118        std::default::Default::default()
4119    }
4120
4121    /// Sets the value of [event_detection_time][crate::model::DataRetentionDeletionEvent::event_detection_time].
4122    ///
4123    /// # Example
4124    /// ```ignore,no_run
4125    /// # use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
4126    /// use wkt::Timestamp;
4127    /// let x = DataRetentionDeletionEvent::new().set_event_detection_time(Timestamp::default()/* use setters */);
4128    /// ```
4129    pub fn set_event_detection_time<T>(mut self, v: T) -> Self
4130    where
4131        T: std::convert::Into<wkt::Timestamp>,
4132    {
4133        self.event_detection_time = std::option::Option::Some(v.into());
4134        self
4135    }
4136
4137    /// Sets or clears the value of [event_detection_time][crate::model::DataRetentionDeletionEvent::event_detection_time].
4138    ///
4139    /// # Example
4140    /// ```ignore,no_run
4141    /// # use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
4142    /// use wkt::Timestamp;
4143    /// let x = DataRetentionDeletionEvent::new().set_or_clear_event_detection_time(Some(Timestamp::default()/* use setters */));
4144    /// let x = DataRetentionDeletionEvent::new().set_or_clear_event_detection_time(None::<Timestamp>);
4145    /// ```
4146    pub fn set_or_clear_event_detection_time<T>(mut self, v: std::option::Option<T>) -> Self
4147    where
4148        T: std::convert::Into<wkt::Timestamp>,
4149    {
4150        self.event_detection_time = v.map(|x| x.into());
4151        self
4152    }
4153
4154    /// Sets the value of [data_object_count][crate::model::DataRetentionDeletionEvent::data_object_count].
4155    ///
4156    /// # Example
4157    /// ```ignore,no_run
4158    /// # use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
4159    /// let x = DataRetentionDeletionEvent::new().set_data_object_count(42);
4160    /// ```
4161    pub fn set_data_object_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
4162        self.data_object_count = v.into();
4163        self
4164    }
4165
4166    /// Sets the value of [max_retention_allowed][crate::model::DataRetentionDeletionEvent::max_retention_allowed].
4167    ///
4168    /// # Example
4169    /// ```ignore,no_run
4170    /// # use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
4171    /// use wkt::Duration;
4172    /// let x = DataRetentionDeletionEvent::new().set_max_retention_allowed(Duration::default()/* use setters */);
4173    /// ```
4174    pub fn set_max_retention_allowed<T>(mut self, v: T) -> Self
4175    where
4176        T: std::convert::Into<wkt::Duration>,
4177    {
4178        self.max_retention_allowed = std::option::Option::Some(v.into());
4179        self
4180    }
4181
4182    /// Sets or clears the value of [max_retention_allowed][crate::model::DataRetentionDeletionEvent::max_retention_allowed].
4183    ///
4184    /// # Example
4185    /// ```ignore,no_run
4186    /// # use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
4187    /// use wkt::Duration;
4188    /// let x = DataRetentionDeletionEvent::new().set_or_clear_max_retention_allowed(Some(Duration::default()/* use setters */));
4189    /// let x = DataRetentionDeletionEvent::new().set_or_clear_max_retention_allowed(None::<Duration>);
4190    /// ```
4191    pub fn set_or_clear_max_retention_allowed<T>(mut self, v: std::option::Option<T>) -> Self
4192    where
4193        T: std::convert::Into<wkt::Duration>,
4194    {
4195        self.max_retention_allowed = v.map(|x| x.into());
4196        self
4197    }
4198
4199    /// Sets the value of [event_type][crate::model::DataRetentionDeletionEvent::event_type].
4200    ///
4201    /// # Example
4202    /// ```ignore,no_run
4203    /// # use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
4204    /// use google_cloud_securitycenter_v2::model::data_retention_deletion_event::EventType;
4205    /// let x0 = DataRetentionDeletionEvent::new().set_event_type(EventType::MaxTtlExceeded);
4206    /// ```
4207    pub fn set_event_type<
4208        T: std::convert::Into<crate::model::data_retention_deletion_event::EventType>,
4209    >(
4210        mut self,
4211        v: T,
4212    ) -> Self {
4213        self.event_type = v.into();
4214        self
4215    }
4216}
4217
4218impl wkt::message::Message for DataRetentionDeletionEvent {
4219    fn typename() -> &'static str {
4220        "type.googleapis.com/google.cloud.securitycenter.v2.DataRetentionDeletionEvent"
4221    }
4222}
4223
4224/// Defines additional types related to [DataRetentionDeletionEvent].
4225pub mod data_retention_deletion_event {
4226    #[allow(unused_imports)]
4227    use super::*;
4228
4229    /// Type of the DRD event.
4230    ///
4231    /// # Working with unknown values
4232    ///
4233    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4234    /// additional enum variants at any time. Adding new variants is not considered
4235    /// a breaking change. Applications should write their code in anticipation of:
4236    ///
4237    /// - New values appearing in future releases of the client library, **and**
4238    /// - New values received dynamically, without application changes.
4239    ///
4240    /// Please consult the [Working with enums] section in the user guide for some
4241    /// guidelines.
4242    ///
4243    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
4244    #[derive(Clone, Debug, PartialEq)]
4245    #[non_exhaustive]
4246    pub enum EventType {
4247        /// Unspecified event type.
4248        Unspecified,
4249        /// The maximum retention time has been exceeded.
4250        MaxTtlExceeded,
4251        /// If set, the enum was initialized with an unknown value.
4252        ///
4253        /// Applications can examine the value using [EventType::value] or
4254        /// [EventType::name].
4255        UnknownValue(event_type::UnknownValue),
4256    }
4257
4258    #[doc(hidden)]
4259    pub mod event_type {
4260        #[allow(unused_imports)]
4261        use super::*;
4262        #[derive(Clone, Debug, PartialEq)]
4263        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4264    }
4265
4266    impl EventType {
4267        /// Gets the enum value.
4268        ///
4269        /// Returns `None` if the enum contains an unknown value deserialized from
4270        /// the string representation of enums.
4271        pub fn value(&self) -> std::option::Option<i32> {
4272            match self {
4273                Self::Unspecified => std::option::Option::Some(0),
4274                Self::MaxTtlExceeded => std::option::Option::Some(1),
4275                Self::UnknownValue(u) => u.0.value(),
4276            }
4277        }
4278
4279        /// Gets the enum value as a string.
4280        ///
4281        /// Returns `None` if the enum contains an unknown value deserialized from
4282        /// the integer representation of enums.
4283        pub fn name(&self) -> std::option::Option<&str> {
4284            match self {
4285                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
4286                Self::MaxTtlExceeded => std::option::Option::Some("EVENT_TYPE_MAX_TTL_EXCEEDED"),
4287                Self::UnknownValue(u) => u.0.name(),
4288            }
4289        }
4290    }
4291
4292    impl std::default::Default for EventType {
4293        fn default() -> Self {
4294            use std::convert::From;
4295            Self::from(0)
4296        }
4297    }
4298
4299    impl std::fmt::Display for EventType {
4300        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4301            wkt::internal::display_enum(f, self.name(), self.value())
4302        }
4303    }
4304
4305    impl std::convert::From<i32> for EventType {
4306        fn from(value: i32) -> Self {
4307            match value {
4308                0 => Self::Unspecified,
4309                1 => Self::MaxTtlExceeded,
4310                _ => Self::UnknownValue(event_type::UnknownValue(
4311                    wkt::internal::UnknownEnumValue::Integer(value),
4312                )),
4313            }
4314        }
4315    }
4316
4317    impl std::convert::From<&str> for EventType {
4318        fn from(value: &str) -> Self {
4319            use std::string::ToString;
4320            match value {
4321                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
4322                "EVENT_TYPE_MAX_TTL_EXCEEDED" => Self::MaxTtlExceeded,
4323                _ => Self::UnknownValue(event_type::UnknownValue(
4324                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4325                )),
4326            }
4327        }
4328    }
4329
4330    impl serde::ser::Serialize for EventType {
4331        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4332        where
4333            S: serde::Serializer,
4334        {
4335            match self {
4336                Self::Unspecified => serializer.serialize_i32(0),
4337                Self::MaxTtlExceeded => serializer.serialize_i32(1),
4338                Self::UnknownValue(u) => u.0.serialize(serializer),
4339            }
4340        }
4341    }
4342
4343    impl<'de> serde::de::Deserialize<'de> for EventType {
4344        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4345        where
4346            D: serde::Deserializer<'de>,
4347        {
4348            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
4349                ".google.cloud.securitycenter.v2.DataRetentionDeletionEvent.EventType",
4350            ))
4351        }
4352    }
4353}
4354
4355/// Represents database access information, such as queries. A database may be a
4356/// sub-resource of an instance (as in the case of Cloud SQL instances or Cloud
4357/// Spanner instances), or the database instance itself. Some database resources
4358/// might not have the [full resource
4359/// name](https://google.aip.dev/122#full-resource-names) populated because these
4360/// resource types, such as Cloud SQL databases, are not yet supported by Cloud
4361/// Asset Inventory. In these cases only the display name is provided.
4362#[derive(Clone, Default, PartialEq)]
4363#[non_exhaustive]
4364pub struct Database {
4365    /// Some database resources may not have the [full resource
4366    /// name](https://google.aip.dev/122#full-resource-names) populated because
4367    /// these resource types are not yet supported by Cloud Asset Inventory (e.g.
4368    /// Cloud SQL databases). In these cases only the display name will be
4369    /// provided.
4370    /// The [full resource name](https://google.aip.dev/122#full-resource-names) of
4371    /// the database that the user connected to, if it is supported by Cloud Asset
4372    /// Inventory.
4373    pub name: std::string::String,
4374
4375    /// The human-readable name of the database that the user connected to.
4376    pub display_name: std::string::String,
4377
4378    /// The username used to connect to the database. The username might not be an
4379    /// IAM principal and does not have a set format.
4380    pub user_name: std::string::String,
4381
4382    /// The SQL statement that is associated with the database access.
4383    pub query: std::string::String,
4384
4385    /// The target usernames, roles, or groups of an SQL privilege grant, which is
4386    /// not an IAM policy change.
4387    pub grantees: std::vec::Vec<std::string::String>,
4388
4389    /// The version of the database, for example, POSTGRES_14.
4390    /// See [the complete
4391    /// list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).
4392    pub version: std::string::String,
4393
4394    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4395}
4396
4397impl Database {
4398    /// Creates a new default instance.
4399    pub fn new() -> Self {
4400        std::default::Default::default()
4401    }
4402
4403    /// Sets the value of [name][crate::model::Database::name].
4404    ///
4405    /// # Example
4406    /// ```ignore,no_run
4407    /// # use google_cloud_securitycenter_v2::model::Database;
4408    /// let x = Database::new().set_name("example");
4409    /// ```
4410    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4411        self.name = v.into();
4412        self
4413    }
4414
4415    /// Sets the value of [display_name][crate::model::Database::display_name].
4416    ///
4417    /// # Example
4418    /// ```ignore,no_run
4419    /// # use google_cloud_securitycenter_v2::model::Database;
4420    /// let x = Database::new().set_display_name("example");
4421    /// ```
4422    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4423        self.display_name = v.into();
4424        self
4425    }
4426
4427    /// Sets the value of [user_name][crate::model::Database::user_name].
4428    ///
4429    /// # Example
4430    /// ```ignore,no_run
4431    /// # use google_cloud_securitycenter_v2::model::Database;
4432    /// let x = Database::new().set_user_name("example");
4433    /// ```
4434    pub fn set_user_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4435        self.user_name = v.into();
4436        self
4437    }
4438
4439    /// Sets the value of [query][crate::model::Database::query].
4440    ///
4441    /// # Example
4442    /// ```ignore,no_run
4443    /// # use google_cloud_securitycenter_v2::model::Database;
4444    /// let x = Database::new().set_query("example");
4445    /// ```
4446    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4447        self.query = v.into();
4448        self
4449    }
4450
4451    /// Sets the value of [grantees][crate::model::Database::grantees].
4452    ///
4453    /// # Example
4454    /// ```ignore,no_run
4455    /// # use google_cloud_securitycenter_v2::model::Database;
4456    /// let x = Database::new().set_grantees(["a", "b", "c"]);
4457    /// ```
4458    pub fn set_grantees<T, V>(mut self, v: T) -> Self
4459    where
4460        T: std::iter::IntoIterator<Item = V>,
4461        V: std::convert::Into<std::string::String>,
4462    {
4463        use std::iter::Iterator;
4464        self.grantees = v.into_iter().map(|i| i.into()).collect();
4465        self
4466    }
4467
4468    /// Sets the value of [version][crate::model::Database::version].
4469    ///
4470    /// # Example
4471    /// ```ignore,no_run
4472    /// # use google_cloud_securitycenter_v2::model::Database;
4473    /// let x = Database::new().set_version("example");
4474    /// ```
4475    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4476        self.version = v.into();
4477        self
4478    }
4479}
4480
4481impl wkt::message::Message for Database {
4482    fn typename() -> &'static str {
4483        "type.googleapis.com/google.cloud.securitycenter.v2.Database"
4484    }
4485}
4486
4487/// Contains information about the disk associated with the finding.
4488#[derive(Clone, Default, PartialEq)]
4489#[non_exhaustive]
4490pub struct Disk {
4491    /// The name of the disk, for example,
4492    /// `https://www.googleapis.com/compute/v1/projects/{project-id}/zones/{zone-id}/disks/{disk-id}`.
4493    pub name: std::string::String,
4494
4495    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4496}
4497
4498impl Disk {
4499    /// Creates a new default instance.
4500    pub fn new() -> Self {
4501        std::default::Default::default()
4502    }
4503
4504    /// Sets the value of [name][crate::model::Disk::name].
4505    ///
4506    /// # Example
4507    /// ```ignore,no_run
4508    /// # use google_cloud_securitycenter_v2::model::Disk;
4509    /// let x = Disk::new().set_name("example");
4510    /// ```
4511    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4512        self.name = v.into();
4513        self
4514    }
4515}
4516
4517impl wkt::message::Message for Disk {
4518    fn typename() -> &'static str {
4519        "type.googleapis.com/google.cloud.securitycenter.v2.Disk"
4520    }
4521}
4522
4523/// Exfiltration represents a data exfiltration attempt from one or more sources
4524/// to one or more targets. The `sources` attribute lists the sources of the
4525/// exfiltrated data. The `targets` attribute lists the destinations the data was
4526/// copied to.
4527#[derive(Clone, Default, PartialEq)]
4528#[non_exhaustive]
4529pub struct Exfiltration {
4530    /// If there are multiple sources, then the data is considered "joined" between
4531    /// them. For instance, BigQuery can join multiple tables, and each
4532    /// table would be considered a source.
4533    pub sources: std::vec::Vec<crate::model::ExfilResource>,
4534
4535    /// If there are multiple targets, each target would get a complete copy of the
4536    /// "joined" source data.
4537    pub targets: std::vec::Vec<crate::model::ExfilResource>,
4538
4539    /// Total exfiltrated bytes processed for the entire job.
4540    pub total_exfiltrated_bytes: i64,
4541
4542    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4543}
4544
4545impl Exfiltration {
4546    /// Creates a new default instance.
4547    pub fn new() -> Self {
4548        std::default::Default::default()
4549    }
4550
4551    /// Sets the value of [sources][crate::model::Exfiltration::sources].
4552    ///
4553    /// # Example
4554    /// ```ignore,no_run
4555    /// # use google_cloud_securitycenter_v2::model::Exfiltration;
4556    /// use google_cloud_securitycenter_v2::model::ExfilResource;
4557    /// let x = Exfiltration::new()
4558    ///     .set_sources([
4559    ///         ExfilResource::default()/* use setters */,
4560    ///         ExfilResource::default()/* use (different) setters */,
4561    ///     ]);
4562    /// ```
4563    pub fn set_sources<T, V>(mut self, v: T) -> Self
4564    where
4565        T: std::iter::IntoIterator<Item = V>,
4566        V: std::convert::Into<crate::model::ExfilResource>,
4567    {
4568        use std::iter::Iterator;
4569        self.sources = v.into_iter().map(|i| i.into()).collect();
4570        self
4571    }
4572
4573    /// Sets the value of [targets][crate::model::Exfiltration::targets].
4574    ///
4575    /// # Example
4576    /// ```ignore,no_run
4577    /// # use google_cloud_securitycenter_v2::model::Exfiltration;
4578    /// use google_cloud_securitycenter_v2::model::ExfilResource;
4579    /// let x = Exfiltration::new()
4580    ///     .set_targets([
4581    ///         ExfilResource::default()/* use setters */,
4582    ///         ExfilResource::default()/* use (different) setters */,
4583    ///     ]);
4584    /// ```
4585    pub fn set_targets<T, V>(mut self, v: T) -> Self
4586    where
4587        T: std::iter::IntoIterator<Item = V>,
4588        V: std::convert::Into<crate::model::ExfilResource>,
4589    {
4590        use std::iter::Iterator;
4591        self.targets = v.into_iter().map(|i| i.into()).collect();
4592        self
4593    }
4594
4595    /// Sets the value of [total_exfiltrated_bytes][crate::model::Exfiltration::total_exfiltrated_bytes].
4596    ///
4597    /// # Example
4598    /// ```ignore,no_run
4599    /// # use google_cloud_securitycenter_v2::model::Exfiltration;
4600    /// let x = Exfiltration::new().set_total_exfiltrated_bytes(42);
4601    /// ```
4602    pub fn set_total_exfiltrated_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
4603        self.total_exfiltrated_bytes = v.into();
4604        self
4605    }
4606}
4607
4608impl wkt::message::Message for Exfiltration {
4609    fn typename() -> &'static str {
4610        "type.googleapis.com/google.cloud.securitycenter.v2.Exfiltration"
4611    }
4612}
4613
4614/// Resource where data was exfiltrated from or exfiltrated to.
4615#[derive(Clone, Default, PartialEq)]
4616#[non_exhaustive]
4617pub struct ExfilResource {
4618    /// The resource's [full resource
4619    /// name](https://cloud.google.com/apis/design/resource_names#full_resource_name).
4620    pub name: std::string::String,
4621
4622    /// Subcomponents of the asset that was exfiltrated, like URIs used during
4623    /// exfiltration, table names, databases, and filenames. For example, multiple
4624    /// tables might have been exfiltrated from the same Cloud SQL instance, or
4625    /// multiple files might have been exfiltrated from the same Cloud Storage
4626    /// bucket.
4627    pub components: std::vec::Vec<std::string::String>,
4628
4629    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4630}
4631
4632impl ExfilResource {
4633    /// Creates a new default instance.
4634    pub fn new() -> Self {
4635        std::default::Default::default()
4636    }
4637
4638    /// Sets the value of [name][crate::model::ExfilResource::name].
4639    ///
4640    /// # Example
4641    /// ```ignore,no_run
4642    /// # use google_cloud_securitycenter_v2::model::ExfilResource;
4643    /// let x = ExfilResource::new().set_name("example");
4644    /// ```
4645    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4646        self.name = v.into();
4647        self
4648    }
4649
4650    /// Sets the value of [components][crate::model::ExfilResource::components].
4651    ///
4652    /// # Example
4653    /// ```ignore,no_run
4654    /// # use google_cloud_securitycenter_v2::model::ExfilResource;
4655    /// let x = ExfilResource::new().set_components(["a", "b", "c"]);
4656    /// ```
4657    pub fn set_components<T, V>(mut self, v: T) -> Self
4658    where
4659        T: std::iter::IntoIterator<Item = V>,
4660        V: std::convert::Into<std::string::String>,
4661    {
4662        use std::iter::Iterator;
4663        self.components = v.into_iter().map(|i| i.into()).collect();
4664        self
4665    }
4666}
4667
4668impl wkt::message::Message for ExfilResource {
4669    fn typename() -> &'static str {
4670        "type.googleapis.com/google.cloud.securitycenter.v2.ExfilResource"
4671    }
4672}
4673
4674/// Representation of third party SIEM/SOAR fields within SCC.
4675#[derive(Clone, Default, PartialEq)]
4676#[non_exhaustive]
4677pub struct ExternalSystem {
4678    /// Full resource name of the external system. The following list
4679    /// shows some examples:
4680    ///
4681    /// + `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
4682    ///
4683    /// `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
4684    ///
4685    /// + `folders/1234/sources/5678/findings/123456/externalSystems/jira`
4686    ///
4687    /// `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
4688    ///
4689    /// + `projects/1234/sources/5678/findings/123456/externalSystems/jira`
4690    ///
4691    /// `projects/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
4692    pub name: std::string::String,
4693
4694    /// References primary/secondary etc assignees in the external system.
4695    pub assignees: std::vec::Vec<std::string::String>,
4696
4697    /// The identifier that's used to track the finding's corresponding case in the
4698    /// external system.
4699    pub external_uid: std::string::String,
4700
4701    /// The most recent status of the finding's corresponding case, as reported by
4702    /// the external system.
4703    pub status: std::string::String,
4704
4705    /// The time when the case was last updated, as reported by the external
4706    /// system.
4707    pub external_system_update_time: std::option::Option<wkt::Timestamp>,
4708
4709    /// The link to the finding's corresponding case in the external system.
4710    pub case_uri: std::string::String,
4711
4712    /// The priority of the finding's corresponding case in the external system.
4713    pub case_priority: std::string::String,
4714
4715    /// The SLA of the finding's corresponding case in the external system.
4716    pub case_sla: std::option::Option<wkt::Timestamp>,
4717
4718    /// The time when the case was created, as reported by the external system.
4719    pub case_create_time: std::option::Option<wkt::Timestamp>,
4720
4721    /// The time when the case was closed, as reported by the external system.
4722    pub case_close_time: std::option::Option<wkt::Timestamp>,
4723
4724    /// Information about the ticket, if any, that is being used to track the
4725    /// resolution of the issue that is identified by this finding.
4726    pub ticket_info: std::option::Option<crate::model::external_system::TicketInfo>,
4727
4728    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4729}
4730
4731impl ExternalSystem {
4732    /// Creates a new default instance.
4733    pub fn new() -> Self {
4734        std::default::Default::default()
4735    }
4736
4737    /// Sets the value of [name][crate::model::ExternalSystem::name].
4738    ///
4739    /// # Example
4740    /// ```ignore,no_run
4741    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4742    /// # let organization_id = "organization_id";
4743    /// # let source_id = "source_id";
4744    /// # let finding_id = "finding_id";
4745    /// # let externalsystem_id = "externalsystem_id";
4746    /// let x = ExternalSystem::new().set_name(format!("organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/externalSystems/{externalsystem_id}"));
4747    /// ```
4748    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4749        self.name = v.into();
4750        self
4751    }
4752
4753    /// Sets the value of [assignees][crate::model::ExternalSystem::assignees].
4754    ///
4755    /// # Example
4756    /// ```ignore,no_run
4757    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4758    /// let x = ExternalSystem::new().set_assignees(["a", "b", "c"]);
4759    /// ```
4760    pub fn set_assignees<T, V>(mut self, v: T) -> Self
4761    where
4762        T: std::iter::IntoIterator<Item = V>,
4763        V: std::convert::Into<std::string::String>,
4764    {
4765        use std::iter::Iterator;
4766        self.assignees = v.into_iter().map(|i| i.into()).collect();
4767        self
4768    }
4769
4770    /// Sets the value of [external_uid][crate::model::ExternalSystem::external_uid].
4771    ///
4772    /// # Example
4773    /// ```ignore,no_run
4774    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4775    /// let x = ExternalSystem::new().set_external_uid("example");
4776    /// ```
4777    pub fn set_external_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4778        self.external_uid = v.into();
4779        self
4780    }
4781
4782    /// Sets the value of [status][crate::model::ExternalSystem::status].
4783    ///
4784    /// # Example
4785    /// ```ignore,no_run
4786    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4787    /// let x = ExternalSystem::new().set_status("example");
4788    /// ```
4789    pub fn set_status<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4790        self.status = v.into();
4791        self
4792    }
4793
4794    /// Sets the value of [external_system_update_time][crate::model::ExternalSystem::external_system_update_time].
4795    ///
4796    /// # Example
4797    /// ```ignore,no_run
4798    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4799    /// use wkt::Timestamp;
4800    /// let x = ExternalSystem::new().set_external_system_update_time(Timestamp::default()/* use setters */);
4801    /// ```
4802    pub fn set_external_system_update_time<T>(mut self, v: T) -> Self
4803    where
4804        T: std::convert::Into<wkt::Timestamp>,
4805    {
4806        self.external_system_update_time = std::option::Option::Some(v.into());
4807        self
4808    }
4809
4810    /// Sets or clears the value of [external_system_update_time][crate::model::ExternalSystem::external_system_update_time].
4811    ///
4812    /// # Example
4813    /// ```ignore,no_run
4814    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4815    /// use wkt::Timestamp;
4816    /// let x = ExternalSystem::new().set_or_clear_external_system_update_time(Some(Timestamp::default()/* use setters */));
4817    /// let x = ExternalSystem::new().set_or_clear_external_system_update_time(None::<Timestamp>);
4818    /// ```
4819    pub fn set_or_clear_external_system_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4820    where
4821        T: std::convert::Into<wkt::Timestamp>,
4822    {
4823        self.external_system_update_time = v.map(|x| x.into());
4824        self
4825    }
4826
4827    /// Sets the value of [case_uri][crate::model::ExternalSystem::case_uri].
4828    ///
4829    /// # Example
4830    /// ```ignore,no_run
4831    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4832    /// let x = ExternalSystem::new().set_case_uri("example");
4833    /// ```
4834    pub fn set_case_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4835        self.case_uri = v.into();
4836        self
4837    }
4838
4839    /// Sets the value of [case_priority][crate::model::ExternalSystem::case_priority].
4840    ///
4841    /// # Example
4842    /// ```ignore,no_run
4843    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4844    /// let x = ExternalSystem::new().set_case_priority("example");
4845    /// ```
4846    pub fn set_case_priority<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4847        self.case_priority = v.into();
4848        self
4849    }
4850
4851    /// Sets the value of [case_sla][crate::model::ExternalSystem::case_sla].
4852    ///
4853    /// # Example
4854    /// ```ignore,no_run
4855    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4856    /// use wkt::Timestamp;
4857    /// let x = ExternalSystem::new().set_case_sla(Timestamp::default()/* use setters */);
4858    /// ```
4859    pub fn set_case_sla<T>(mut self, v: T) -> Self
4860    where
4861        T: std::convert::Into<wkt::Timestamp>,
4862    {
4863        self.case_sla = std::option::Option::Some(v.into());
4864        self
4865    }
4866
4867    /// Sets or clears the value of [case_sla][crate::model::ExternalSystem::case_sla].
4868    ///
4869    /// # Example
4870    /// ```ignore,no_run
4871    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4872    /// use wkt::Timestamp;
4873    /// let x = ExternalSystem::new().set_or_clear_case_sla(Some(Timestamp::default()/* use setters */));
4874    /// let x = ExternalSystem::new().set_or_clear_case_sla(None::<Timestamp>);
4875    /// ```
4876    pub fn set_or_clear_case_sla<T>(mut self, v: std::option::Option<T>) -> Self
4877    where
4878        T: std::convert::Into<wkt::Timestamp>,
4879    {
4880        self.case_sla = v.map(|x| x.into());
4881        self
4882    }
4883
4884    /// Sets the value of [case_create_time][crate::model::ExternalSystem::case_create_time].
4885    ///
4886    /// # Example
4887    /// ```ignore,no_run
4888    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4889    /// use wkt::Timestamp;
4890    /// let x = ExternalSystem::new().set_case_create_time(Timestamp::default()/* use setters */);
4891    /// ```
4892    pub fn set_case_create_time<T>(mut self, v: T) -> Self
4893    where
4894        T: std::convert::Into<wkt::Timestamp>,
4895    {
4896        self.case_create_time = std::option::Option::Some(v.into());
4897        self
4898    }
4899
4900    /// Sets or clears the value of [case_create_time][crate::model::ExternalSystem::case_create_time].
4901    ///
4902    /// # Example
4903    /// ```ignore,no_run
4904    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4905    /// use wkt::Timestamp;
4906    /// let x = ExternalSystem::new().set_or_clear_case_create_time(Some(Timestamp::default()/* use setters */));
4907    /// let x = ExternalSystem::new().set_or_clear_case_create_time(None::<Timestamp>);
4908    /// ```
4909    pub fn set_or_clear_case_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4910    where
4911        T: std::convert::Into<wkt::Timestamp>,
4912    {
4913        self.case_create_time = v.map(|x| x.into());
4914        self
4915    }
4916
4917    /// Sets the value of [case_close_time][crate::model::ExternalSystem::case_close_time].
4918    ///
4919    /// # Example
4920    /// ```ignore,no_run
4921    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4922    /// use wkt::Timestamp;
4923    /// let x = ExternalSystem::new().set_case_close_time(Timestamp::default()/* use setters */);
4924    /// ```
4925    pub fn set_case_close_time<T>(mut self, v: T) -> Self
4926    where
4927        T: std::convert::Into<wkt::Timestamp>,
4928    {
4929        self.case_close_time = std::option::Option::Some(v.into());
4930        self
4931    }
4932
4933    /// Sets or clears the value of [case_close_time][crate::model::ExternalSystem::case_close_time].
4934    ///
4935    /// # Example
4936    /// ```ignore,no_run
4937    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4938    /// use wkt::Timestamp;
4939    /// let x = ExternalSystem::new().set_or_clear_case_close_time(Some(Timestamp::default()/* use setters */));
4940    /// let x = ExternalSystem::new().set_or_clear_case_close_time(None::<Timestamp>);
4941    /// ```
4942    pub fn set_or_clear_case_close_time<T>(mut self, v: std::option::Option<T>) -> Self
4943    where
4944        T: std::convert::Into<wkt::Timestamp>,
4945    {
4946        self.case_close_time = v.map(|x| x.into());
4947        self
4948    }
4949
4950    /// Sets the value of [ticket_info][crate::model::ExternalSystem::ticket_info].
4951    ///
4952    /// # Example
4953    /// ```ignore,no_run
4954    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4955    /// use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
4956    /// let x = ExternalSystem::new().set_ticket_info(TicketInfo::default()/* use setters */);
4957    /// ```
4958    pub fn set_ticket_info<T>(mut self, v: T) -> Self
4959    where
4960        T: std::convert::Into<crate::model::external_system::TicketInfo>,
4961    {
4962        self.ticket_info = std::option::Option::Some(v.into());
4963        self
4964    }
4965
4966    /// Sets or clears the value of [ticket_info][crate::model::ExternalSystem::ticket_info].
4967    ///
4968    /// # Example
4969    /// ```ignore,no_run
4970    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4971    /// use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
4972    /// let x = ExternalSystem::new().set_or_clear_ticket_info(Some(TicketInfo::default()/* use setters */));
4973    /// let x = ExternalSystem::new().set_or_clear_ticket_info(None::<TicketInfo>);
4974    /// ```
4975    pub fn set_or_clear_ticket_info<T>(mut self, v: std::option::Option<T>) -> Self
4976    where
4977        T: std::convert::Into<crate::model::external_system::TicketInfo>,
4978    {
4979        self.ticket_info = v.map(|x| x.into());
4980        self
4981    }
4982}
4983
4984impl wkt::message::Message for ExternalSystem {
4985    fn typename() -> &'static str {
4986        "type.googleapis.com/google.cloud.securitycenter.v2.ExternalSystem"
4987    }
4988}
4989
4990/// Defines additional types related to [ExternalSystem].
4991pub mod external_system {
4992    #[allow(unused_imports)]
4993    use super::*;
4994
4995    /// Information about the ticket, if any, that is being used to track the
4996    /// resolution of the issue that is identified by this finding.
4997    #[derive(Clone, Default, PartialEq)]
4998    #[non_exhaustive]
4999    pub struct TicketInfo {
5000        /// The identifier of the ticket in the ticket system.
5001        pub id: std::string::String,
5002
5003        /// The assignee of the ticket in the ticket system.
5004        pub assignee: std::string::String,
5005
5006        /// The description of the ticket in the ticket system.
5007        pub description: std::string::String,
5008
5009        /// The link to the ticket in the ticket system.
5010        pub uri: std::string::String,
5011
5012        /// The latest status of the ticket, as reported by the ticket system.
5013        pub status: std::string::String,
5014
5015        /// The time when the ticket was last updated, as reported by the ticket
5016        /// system.
5017        pub update_time: std::option::Option<wkt::Timestamp>,
5018
5019        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5020    }
5021
5022    impl TicketInfo {
5023        /// Creates a new default instance.
5024        pub fn new() -> Self {
5025            std::default::Default::default()
5026        }
5027
5028        /// Sets the value of [id][crate::model::external_system::TicketInfo::id].
5029        ///
5030        /// # Example
5031        /// ```ignore,no_run
5032        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5033        /// let x = TicketInfo::new().set_id("example");
5034        /// ```
5035        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5036            self.id = v.into();
5037            self
5038        }
5039
5040        /// Sets the value of [assignee][crate::model::external_system::TicketInfo::assignee].
5041        ///
5042        /// # Example
5043        /// ```ignore,no_run
5044        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5045        /// let x = TicketInfo::new().set_assignee("example");
5046        /// ```
5047        pub fn set_assignee<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5048            self.assignee = v.into();
5049            self
5050        }
5051
5052        /// Sets the value of [description][crate::model::external_system::TicketInfo::description].
5053        ///
5054        /// # Example
5055        /// ```ignore,no_run
5056        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5057        /// let x = TicketInfo::new().set_description("example");
5058        /// ```
5059        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5060            self.description = v.into();
5061            self
5062        }
5063
5064        /// Sets the value of [uri][crate::model::external_system::TicketInfo::uri].
5065        ///
5066        /// # Example
5067        /// ```ignore,no_run
5068        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5069        /// let x = TicketInfo::new().set_uri("example");
5070        /// ```
5071        pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5072            self.uri = v.into();
5073            self
5074        }
5075
5076        /// Sets the value of [status][crate::model::external_system::TicketInfo::status].
5077        ///
5078        /// # Example
5079        /// ```ignore,no_run
5080        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5081        /// let x = TicketInfo::new().set_status("example");
5082        /// ```
5083        pub fn set_status<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5084            self.status = v.into();
5085            self
5086        }
5087
5088        /// Sets the value of [update_time][crate::model::external_system::TicketInfo::update_time].
5089        ///
5090        /// # Example
5091        /// ```ignore,no_run
5092        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5093        /// use wkt::Timestamp;
5094        /// let x = TicketInfo::new().set_update_time(Timestamp::default()/* use setters */);
5095        /// ```
5096        pub fn set_update_time<T>(mut self, v: T) -> Self
5097        where
5098            T: std::convert::Into<wkt::Timestamp>,
5099        {
5100            self.update_time = std::option::Option::Some(v.into());
5101            self
5102        }
5103
5104        /// Sets or clears the value of [update_time][crate::model::external_system::TicketInfo::update_time].
5105        ///
5106        /// # Example
5107        /// ```ignore,no_run
5108        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5109        /// use wkt::Timestamp;
5110        /// let x = TicketInfo::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
5111        /// let x = TicketInfo::new().set_or_clear_update_time(None::<Timestamp>);
5112        /// ```
5113        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
5114        where
5115            T: std::convert::Into<wkt::Timestamp>,
5116        {
5117            self.update_time = v.map(|x| x.into());
5118            self
5119        }
5120    }
5121
5122    impl wkt::message::Message for TicketInfo {
5123        fn typename() -> &'static str {
5124            "type.googleapis.com/google.cloud.securitycenter.v2.ExternalSystem.TicketInfo"
5125        }
5126    }
5127}
5128
5129/// File information about the related binary/library used by an executable, or
5130/// the script used by a script interpreter
5131#[derive(Clone, Default, PartialEq)]
5132#[non_exhaustive]
5133pub struct File {
5134    /// Absolute path of the file as a JSON encoded string.
5135    pub path: std::string::String,
5136
5137    /// Size of the file in bytes.
5138    pub size: i64,
5139
5140    /// SHA256 hash of the first hashed_size bytes of the file encoded as a
5141    /// hex string.  If hashed_size == size, sha256 represents the SHA256 hash
5142    /// of the entire file.
5143    pub sha256: std::string::String,
5144
5145    /// The length in bytes of the file prefix that was hashed.  If
5146    /// hashed_size == size, any hashes reported represent the entire
5147    /// file.
5148    pub hashed_size: i64,
5149
5150    /// True when the hash covers only a prefix of the file.
5151    pub partially_hashed: bool,
5152
5153    /// Prefix of the file contents as a JSON-encoded string.
5154    pub contents: std::string::String,
5155
5156    /// Path of the file in terms of underlying disk/partition identifiers.
5157    pub disk_path: std::option::Option<crate::model::file::DiskPath>,
5158
5159    /// Operation(s) performed on a file.
5160    pub operations: std::vec::Vec<crate::model::file::FileOperation>,
5161
5162    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5163}
5164
5165impl File {
5166    /// Creates a new default instance.
5167    pub fn new() -> Self {
5168        std::default::Default::default()
5169    }
5170
5171    /// Sets the value of [path][crate::model::File::path].
5172    ///
5173    /// # Example
5174    /// ```ignore,no_run
5175    /// # use google_cloud_securitycenter_v2::model::File;
5176    /// let x = File::new().set_path("example");
5177    /// ```
5178    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5179        self.path = v.into();
5180        self
5181    }
5182
5183    /// Sets the value of [size][crate::model::File::size].
5184    ///
5185    /// # Example
5186    /// ```ignore,no_run
5187    /// # use google_cloud_securitycenter_v2::model::File;
5188    /// let x = File::new().set_size(42);
5189    /// ```
5190    pub fn set_size<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5191        self.size = v.into();
5192        self
5193    }
5194
5195    /// Sets the value of [sha256][crate::model::File::sha256].
5196    ///
5197    /// # Example
5198    /// ```ignore,no_run
5199    /// # use google_cloud_securitycenter_v2::model::File;
5200    /// let x = File::new().set_sha256("example");
5201    /// ```
5202    pub fn set_sha256<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5203        self.sha256 = v.into();
5204        self
5205    }
5206
5207    /// Sets the value of [hashed_size][crate::model::File::hashed_size].
5208    ///
5209    /// # Example
5210    /// ```ignore,no_run
5211    /// # use google_cloud_securitycenter_v2::model::File;
5212    /// let x = File::new().set_hashed_size(42);
5213    /// ```
5214    pub fn set_hashed_size<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5215        self.hashed_size = v.into();
5216        self
5217    }
5218
5219    /// Sets the value of [partially_hashed][crate::model::File::partially_hashed].
5220    ///
5221    /// # Example
5222    /// ```ignore,no_run
5223    /// # use google_cloud_securitycenter_v2::model::File;
5224    /// let x = File::new().set_partially_hashed(true);
5225    /// ```
5226    pub fn set_partially_hashed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5227        self.partially_hashed = v.into();
5228        self
5229    }
5230
5231    /// Sets the value of [contents][crate::model::File::contents].
5232    ///
5233    /// # Example
5234    /// ```ignore,no_run
5235    /// # use google_cloud_securitycenter_v2::model::File;
5236    /// let x = File::new().set_contents("example");
5237    /// ```
5238    pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5239        self.contents = v.into();
5240        self
5241    }
5242
5243    /// Sets the value of [disk_path][crate::model::File::disk_path].
5244    ///
5245    /// # Example
5246    /// ```ignore,no_run
5247    /// # use google_cloud_securitycenter_v2::model::File;
5248    /// use google_cloud_securitycenter_v2::model::file::DiskPath;
5249    /// let x = File::new().set_disk_path(DiskPath::default()/* use setters */);
5250    /// ```
5251    pub fn set_disk_path<T>(mut self, v: T) -> Self
5252    where
5253        T: std::convert::Into<crate::model::file::DiskPath>,
5254    {
5255        self.disk_path = std::option::Option::Some(v.into());
5256        self
5257    }
5258
5259    /// Sets or clears the value of [disk_path][crate::model::File::disk_path].
5260    ///
5261    /// # Example
5262    /// ```ignore,no_run
5263    /// # use google_cloud_securitycenter_v2::model::File;
5264    /// use google_cloud_securitycenter_v2::model::file::DiskPath;
5265    /// let x = File::new().set_or_clear_disk_path(Some(DiskPath::default()/* use setters */));
5266    /// let x = File::new().set_or_clear_disk_path(None::<DiskPath>);
5267    /// ```
5268    pub fn set_or_clear_disk_path<T>(mut self, v: std::option::Option<T>) -> Self
5269    where
5270        T: std::convert::Into<crate::model::file::DiskPath>,
5271    {
5272        self.disk_path = v.map(|x| x.into());
5273        self
5274    }
5275
5276    /// Sets the value of [operations][crate::model::File::operations].
5277    ///
5278    /// # Example
5279    /// ```ignore,no_run
5280    /// # use google_cloud_securitycenter_v2::model::File;
5281    /// use google_cloud_securitycenter_v2::model::file::FileOperation;
5282    /// let x = File::new()
5283    ///     .set_operations([
5284    ///         FileOperation::default()/* use setters */,
5285    ///         FileOperation::default()/* use (different) setters */,
5286    ///     ]);
5287    /// ```
5288    pub fn set_operations<T, V>(mut self, v: T) -> Self
5289    where
5290        T: std::iter::IntoIterator<Item = V>,
5291        V: std::convert::Into<crate::model::file::FileOperation>,
5292    {
5293        use std::iter::Iterator;
5294        self.operations = v.into_iter().map(|i| i.into()).collect();
5295        self
5296    }
5297}
5298
5299impl wkt::message::Message for File {
5300    fn typename() -> &'static str {
5301        "type.googleapis.com/google.cloud.securitycenter.v2.File"
5302    }
5303}
5304
5305/// Defines additional types related to [File].
5306pub mod file {
5307    #[allow(unused_imports)]
5308    use super::*;
5309
5310    /// Path of the file in terms of underlying disk/partition identifiers.
5311    #[derive(Clone, Default, PartialEq)]
5312    #[non_exhaustive]
5313    pub struct DiskPath {
5314        /// UUID of the partition (format
5315        /// <https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid>)
5316        pub partition_uuid: std::string::String,
5317
5318        /// Relative path of the file in the partition as a JSON encoded string.
5319        /// Example: /home/user1/executable_file.sh
5320        pub relative_path: std::string::String,
5321
5322        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5323    }
5324
5325    impl DiskPath {
5326        /// Creates a new default instance.
5327        pub fn new() -> Self {
5328            std::default::Default::default()
5329        }
5330
5331        /// Sets the value of [partition_uuid][crate::model::file::DiskPath::partition_uuid].
5332        ///
5333        /// # Example
5334        /// ```ignore,no_run
5335        /// # use google_cloud_securitycenter_v2::model::file::DiskPath;
5336        /// let x = DiskPath::new().set_partition_uuid("example");
5337        /// ```
5338        pub fn set_partition_uuid<T: std::convert::Into<std::string::String>>(
5339            mut self,
5340            v: T,
5341        ) -> Self {
5342            self.partition_uuid = v.into();
5343            self
5344        }
5345
5346        /// Sets the value of [relative_path][crate::model::file::DiskPath::relative_path].
5347        ///
5348        /// # Example
5349        /// ```ignore,no_run
5350        /// # use google_cloud_securitycenter_v2::model::file::DiskPath;
5351        /// let x = DiskPath::new().set_relative_path("example");
5352        /// ```
5353        pub fn set_relative_path<T: std::convert::Into<std::string::String>>(
5354            mut self,
5355            v: T,
5356        ) -> Self {
5357            self.relative_path = v.into();
5358            self
5359        }
5360    }
5361
5362    impl wkt::message::Message for DiskPath {
5363        fn typename() -> &'static str {
5364            "type.googleapis.com/google.cloud.securitycenter.v2.File.DiskPath"
5365        }
5366    }
5367
5368    /// Operation(s) performed on a file.
5369    #[derive(Clone, Default, PartialEq)]
5370    #[non_exhaustive]
5371    pub struct FileOperation {
5372        /// The type of the operation
5373        pub r#type: crate::model::file::file_operation::OperationType,
5374
5375        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5376    }
5377
5378    impl FileOperation {
5379        /// Creates a new default instance.
5380        pub fn new() -> Self {
5381            std::default::Default::default()
5382        }
5383
5384        /// Sets the value of [r#type][crate::model::file::FileOperation::type].
5385        ///
5386        /// # Example
5387        /// ```ignore,no_run
5388        /// # use google_cloud_securitycenter_v2::model::file::FileOperation;
5389        /// use google_cloud_securitycenter_v2::model::file::file_operation::OperationType;
5390        /// let x0 = FileOperation::new().set_type(OperationType::Open);
5391        /// let x1 = FileOperation::new().set_type(OperationType::Read);
5392        /// let x2 = FileOperation::new().set_type(OperationType::Rename);
5393        /// ```
5394        pub fn set_type<
5395            T: std::convert::Into<crate::model::file::file_operation::OperationType>,
5396        >(
5397            mut self,
5398            v: T,
5399        ) -> Self {
5400            self.r#type = v.into();
5401            self
5402        }
5403    }
5404
5405    impl wkt::message::Message for FileOperation {
5406        fn typename() -> &'static str {
5407            "type.googleapis.com/google.cloud.securitycenter.v2.File.FileOperation"
5408        }
5409    }
5410
5411    /// Defines additional types related to [FileOperation].
5412    pub mod file_operation {
5413        #[allow(unused_imports)]
5414        use super::*;
5415
5416        /// The type of the operation
5417        ///
5418        /// # Working with unknown values
5419        ///
5420        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5421        /// additional enum variants at any time. Adding new variants is not considered
5422        /// a breaking change. Applications should write their code in anticipation of:
5423        ///
5424        /// - New values appearing in future releases of the client library, **and**
5425        /// - New values received dynamically, without application changes.
5426        ///
5427        /// Please consult the [Working with enums] section in the user guide for some
5428        /// guidelines.
5429        ///
5430        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
5431        #[derive(Clone, Debug, PartialEq)]
5432        #[non_exhaustive]
5433        pub enum OperationType {
5434            /// The operation is unspecified.
5435            Unspecified,
5436            /// Represents an open operation.
5437            Open,
5438            /// Represents a read operation.
5439            Read,
5440            /// Represents a rename operation.
5441            Rename,
5442            /// Represents a write operation.
5443            Write,
5444            /// Represents an execute operation.
5445            Execute,
5446            /// If set, the enum was initialized with an unknown value.
5447            ///
5448            /// Applications can examine the value using [OperationType::value] or
5449            /// [OperationType::name].
5450            UnknownValue(operation_type::UnknownValue),
5451        }
5452
5453        #[doc(hidden)]
5454        pub mod operation_type {
5455            #[allow(unused_imports)]
5456            use super::*;
5457            #[derive(Clone, Debug, PartialEq)]
5458            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5459        }
5460
5461        impl OperationType {
5462            /// Gets the enum value.
5463            ///
5464            /// Returns `None` if the enum contains an unknown value deserialized from
5465            /// the string representation of enums.
5466            pub fn value(&self) -> std::option::Option<i32> {
5467                match self {
5468                    Self::Unspecified => std::option::Option::Some(0),
5469                    Self::Open => std::option::Option::Some(1),
5470                    Self::Read => std::option::Option::Some(2),
5471                    Self::Rename => std::option::Option::Some(3),
5472                    Self::Write => std::option::Option::Some(4),
5473                    Self::Execute => std::option::Option::Some(5),
5474                    Self::UnknownValue(u) => u.0.value(),
5475                }
5476            }
5477
5478            /// Gets the enum value as a string.
5479            ///
5480            /// Returns `None` if the enum contains an unknown value deserialized from
5481            /// the integer representation of enums.
5482            pub fn name(&self) -> std::option::Option<&str> {
5483                match self {
5484                    Self::Unspecified => std::option::Option::Some("OPERATION_TYPE_UNSPECIFIED"),
5485                    Self::Open => std::option::Option::Some("OPEN"),
5486                    Self::Read => std::option::Option::Some("READ"),
5487                    Self::Rename => std::option::Option::Some("RENAME"),
5488                    Self::Write => std::option::Option::Some("WRITE"),
5489                    Self::Execute => std::option::Option::Some("EXECUTE"),
5490                    Self::UnknownValue(u) => u.0.name(),
5491                }
5492            }
5493        }
5494
5495        impl std::default::Default for OperationType {
5496            fn default() -> Self {
5497                use std::convert::From;
5498                Self::from(0)
5499            }
5500        }
5501
5502        impl std::fmt::Display for OperationType {
5503            fn fmt(
5504                &self,
5505                f: &mut std::fmt::Formatter<'_>,
5506            ) -> std::result::Result<(), std::fmt::Error> {
5507                wkt::internal::display_enum(f, self.name(), self.value())
5508            }
5509        }
5510
5511        impl std::convert::From<i32> for OperationType {
5512            fn from(value: i32) -> Self {
5513                match value {
5514                    0 => Self::Unspecified,
5515                    1 => Self::Open,
5516                    2 => Self::Read,
5517                    3 => Self::Rename,
5518                    4 => Self::Write,
5519                    5 => Self::Execute,
5520                    _ => Self::UnknownValue(operation_type::UnknownValue(
5521                        wkt::internal::UnknownEnumValue::Integer(value),
5522                    )),
5523                }
5524            }
5525        }
5526
5527        impl std::convert::From<&str> for OperationType {
5528            fn from(value: &str) -> Self {
5529                use std::string::ToString;
5530                match value {
5531                    "OPERATION_TYPE_UNSPECIFIED" => Self::Unspecified,
5532                    "OPEN" => Self::Open,
5533                    "READ" => Self::Read,
5534                    "RENAME" => Self::Rename,
5535                    "WRITE" => Self::Write,
5536                    "EXECUTE" => Self::Execute,
5537                    _ => Self::UnknownValue(operation_type::UnknownValue(
5538                        wkt::internal::UnknownEnumValue::String(value.to_string()),
5539                    )),
5540                }
5541            }
5542        }
5543
5544        impl serde::ser::Serialize for OperationType {
5545            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5546            where
5547                S: serde::Serializer,
5548            {
5549                match self {
5550                    Self::Unspecified => serializer.serialize_i32(0),
5551                    Self::Open => serializer.serialize_i32(1),
5552                    Self::Read => serializer.serialize_i32(2),
5553                    Self::Rename => serializer.serialize_i32(3),
5554                    Self::Write => serializer.serialize_i32(4),
5555                    Self::Execute => serializer.serialize_i32(5),
5556                    Self::UnknownValue(u) => u.0.serialize(serializer),
5557                }
5558            }
5559        }
5560
5561        impl<'de> serde::de::Deserialize<'de> for OperationType {
5562            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5563            where
5564                D: serde::Deserializer<'de>,
5565            {
5566                deserializer.deserialize_any(wkt::internal::EnumVisitor::<OperationType>::new(
5567                    ".google.cloud.securitycenter.v2.File.FileOperation.OperationType",
5568                ))
5569            }
5570        }
5571    }
5572}
5573
5574/// Security Command Center finding.
5575///
5576/// A finding is a record of assessment data like security, risk, health, or
5577/// privacy, that is ingested into Security Command Center for presentation,
5578/// notification, analysis, policy testing, and enforcement. For example, a
5579/// cross-site scripting (XSS) vulnerability in an App Engine application is a
5580/// finding.
5581#[derive(Clone, Default, PartialEq)]
5582#[non_exhaustive]
5583pub struct Finding {
5584    /// Identifier. The [relative resource
5585    /// name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
5586    /// of the finding. The following list shows some examples:
5587    ///
5588    ///
5589    /// `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
5590    /// +
5591    /// `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
5592    ///
5593    /// + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
5594    ///
5595    /// `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
5596    ///
5597    /// + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
5598    ///
5599    /// `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
5600    pub name: std::string::String,
5601
5602    /// Output only. The canonical name of the finding. The following list shows
5603    /// some examples:
5604    ///
5605    ///
5606    /// `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
5607    /// +
5608    /// `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
5609    ///
5610    /// + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
5611    ///
5612    /// `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
5613    ///
5614    /// + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
5615    ///
5616    /// `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
5617    ///
5618    /// The prefix is the closest CRM ancestor of the resource associated with the
5619    /// finding.
5620    pub canonical_name: std::string::String,
5621
5622    /// The relative resource name of the source and location the finding belongs
5623    /// to. See:
5624    /// <https://cloud.google.com/apis/design/resource_names#relative_resource_name>
5625    /// This field is immutable after creation time. The following list shows some
5626    /// examples:
5627    ///
5628    /// + `organizations/{organization_id}/sources/{source_id}`
5629    /// + `folders/{folders_id}/sources/{source_id}`
5630    /// + `projects/{projects_id}/sources/{source_id}`
5631    ///
5632    /// `organizations/{organization_id}/sources/{source_id}/locations/{location_id}`
5633    ///
5634    /// + `folders/{folders_id}/sources/{source_id}/locations/{location_id}`
5635    /// + `projects/{projects_id}/sources/{source_id}/locations/{location_id}`
5636    pub parent: std::string::String,
5637
5638    /// Immutable. For findings on Google Cloud resources, the full resource
5639    /// name of the Google Cloud resource this finding is for. See:
5640    /// <https://cloud.google.com/apis/design/resource_names#full_resource_name>
5641    /// When the finding is for a non-Google Cloud resource, the resourceName can
5642    /// be a customer or partner defined string.
5643    pub resource_name: std::string::String,
5644
5645    /// Output only. The state of the finding.
5646    pub state: crate::model::finding::State,
5647
5648    /// Immutable. The additional taxonomy group within findings from a given
5649    /// source. Example: "XSS_FLASH_INJECTION"
5650    pub category: std::string::String,
5651
5652    /// The URI that, if available, points to a web page outside of Security
5653    /// Command Center where additional information about the finding can be found.
5654    /// This field is guaranteed to be either empty or a well formed URL.
5655    pub external_uri: std::string::String,
5656
5657    /// Source specific properties. These properties are managed by the source
5658    /// that writes the finding. The key names in the source_properties map must be
5659    /// between 1 and 255 characters, and must start with a letter and contain
5660    /// alphanumeric characters or underscores only.
5661    pub source_properties: std::collections::HashMap<std::string::String, wkt::Value>,
5662
5663    /// Output only. User specified security marks. These marks are entirely
5664    /// managed by the user and come from the SecurityMarks resource that belongs
5665    /// to the finding.
5666    pub security_marks: std::option::Option<crate::model::SecurityMarks>,
5667
5668    /// The time the finding was first detected. If an existing finding is updated,
5669    /// then this is the time the update occurred.
5670    /// For example, if the finding represents an open firewall, this property
5671    /// captures the time the detector believes the firewall became open. The
5672    /// accuracy is determined by the detector. If the finding is later resolved,
5673    /// then this time reflects when the finding was resolved. This must not
5674    /// be set to a value greater than the current timestamp.
5675    pub event_time: std::option::Option<wkt::Timestamp>,
5676
5677    /// Output only. The time at which the finding was created in Security Command
5678    /// Center.
5679    pub create_time: std::option::Option<wkt::Timestamp>,
5680
5681    /// The severity of the finding. This field is managed by the source that
5682    /// writes the finding.
5683    pub severity: crate::model::finding::Severity,
5684
5685    /// Indicates the mute state of a finding (either muted, unmuted
5686    /// or undefined). Unlike other attributes of a finding, a finding provider
5687    /// shouldn't set the value of mute.
5688    pub mute: crate::model::finding::Mute,
5689
5690    /// Output only. The mute information regarding this finding.
5691    pub mute_info: std::option::Option<crate::model::finding::MuteInfo>,
5692
5693    /// The class of the finding.
5694    pub finding_class: crate::model::finding::FindingClass,
5695
5696    /// Represents what's commonly known as an *indicator of compromise* (IoC) in
5697    /// computer forensics. This is an artifact observed on a network or in an
5698    /// operating system that, with high confidence, indicates a computer
5699    /// intrusion. For more information, see [Indicator of
5700    /// compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
5701    pub indicator: std::option::Option<crate::model::Indicator>,
5702
5703    /// Represents vulnerability-specific fields like CVE and CVSS scores.
5704    /// CVE stands for Common Vulnerabilities and Exposures
5705    /// (<https://cve.mitre.org/about/>)
5706    pub vulnerability: std::option::Option<crate::model::Vulnerability>,
5707
5708    /// Output only. The most recent time this finding was muted or unmuted.
5709    pub mute_update_time: std::option::Option<wkt::Timestamp>,
5710
5711    /// Output only. Third party SIEM/SOAR fields within SCC, contains external
5712    /// system information and external system finding fields.
5713    pub external_systems:
5714        std::collections::HashMap<std::string::String, crate::model::ExternalSystem>,
5715
5716    /// MITRE ATT&CK tactics and techniques related to this finding.
5717    /// See: <https://attack.mitre.org>
5718    pub mitre_attack: std::option::Option<crate::model::MitreAttack>,
5719
5720    /// Access details associated with the finding, such as more information on the
5721    /// caller, which method was accessed, and from where.
5722    pub access: std::option::Option<crate::model::Access>,
5723
5724    /// Contains information about the IP connection associated with the finding.
5725    pub connections: std::vec::Vec<crate::model::Connection>,
5726
5727    /// Records additional information about the mute operation, for example, the
5728    /// [mute
5729    /// configuration](https://cloud.google.com/security-command-center/docs/how-to-mute-findings)
5730    /// that muted the finding and the user who muted the finding.
5731    pub mute_initiator: std::string::String,
5732
5733    /// Represents operating system processes associated with the Finding.
5734    pub processes: std::vec::Vec<crate::model::Process>,
5735
5736    /// Output only. Map containing the points of contact for the given finding.
5737    /// The key represents the type of contact, while the value contains a list of
5738    /// all the contacts that pertain. Please refer to:
5739    /// <https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories>
5740    ///
5741    /// ```norust
5742    /// {
5743    ///   "security": {
5744    ///     "contacts": [
5745    ///       {
5746    ///         "email": "person1@company.com"
5747    ///       },
5748    ///       {
5749    ///         "email": "person2@company.com"
5750    ///       }
5751    ///     ]
5752    ///   }
5753    /// }
5754    /// ```
5755    pub contacts: std::collections::HashMap<std::string::String, crate::model::ContactDetails>,
5756
5757    /// Contains compliance information for security standards associated to the
5758    /// finding.
5759    pub compliances: std::vec::Vec<crate::model::Compliance>,
5760
5761    /// Output only. The human readable display name of the finding source such as
5762    /// "Event Threat Detection" or "Security Health Analytics".
5763    pub parent_display_name: std::string::String,
5764
5765    /// Contains more details about the finding.
5766    pub description: std::string::String,
5767
5768    /// Represents exfiltrations associated with the finding.
5769    pub exfiltration: std::option::Option<crate::model::Exfiltration>,
5770
5771    /// Represents IAM bindings associated with the finding.
5772    pub iam_bindings: std::vec::Vec<crate::model::IamBinding>,
5773
5774    /// Steps to address the finding.
5775    pub next_steps: std::string::String,
5776
5777    /// Unique identifier of the module which generated the finding.
5778    /// Example:
5779    /// folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885
5780    pub module_name: std::string::String,
5781
5782    /// Containers associated with the finding. This field provides information for
5783    /// both Kubernetes and non-Kubernetes containers.
5784    pub containers: std::vec::Vec<crate::model::Container>,
5785
5786    /// Kubernetes resources associated with the finding.
5787    pub kubernetes: std::option::Option<crate::model::Kubernetes>,
5788
5789    /// Database associated with the finding.
5790    pub database: std::option::Option<crate::model::Database>,
5791
5792    /// The results of an attack path simulation relevant to this finding.
5793    pub attack_exposure: std::option::Option<crate::model::AttackExposure>,
5794
5795    /// File associated with the finding.
5796    pub files: std::vec::Vec<crate::model::File>,
5797
5798    /// Cloud Data Loss Prevention (Cloud DLP) inspection results that are
5799    /// associated with the finding.
5800    pub cloud_dlp_inspection: std::option::Option<crate::model::CloudDlpInspection>,
5801
5802    /// Cloud DLP data profile that is associated with the finding.
5803    pub cloud_dlp_data_profile: std::option::Option<crate::model::CloudDlpDataProfile>,
5804
5805    /// Signature of the kernel rootkit.
5806    pub kernel_rootkit: std::option::Option<crate::model::KernelRootkit>,
5807
5808    /// Contains information about the org policies associated with the finding.
5809    pub org_policies: std::vec::Vec<crate::model::OrgPolicy>,
5810
5811    /// Job associated with the finding.
5812    pub job: std::option::Option<crate::model::Job>,
5813
5814    /// Represents an application associated with the finding.
5815    pub application: std::option::Option<crate::model::Application>,
5816
5817    /// IP rules associated with the finding.
5818    pub ip_rules: std::option::Option<crate::model::IpRules>,
5819
5820    /// Fields related to Backup and DR findings.
5821    pub backup_disaster_recovery: std::option::Option<crate::model::BackupDisasterRecovery>,
5822
5823    /// The security posture associated with the finding.
5824    pub security_posture: std::option::Option<crate::model::SecurityPosture>,
5825
5826    /// Log entries that are relevant to the finding.
5827    pub log_entries: std::vec::Vec<crate::model::LogEntry>,
5828
5829    /// The load balancers associated with the finding.
5830    pub load_balancers: std::vec::Vec<crate::model::LoadBalancer>,
5831
5832    /// Fields related to Cloud Armor findings.
5833    pub cloud_armor: std::option::Option<crate::model::CloudArmor>,
5834
5835    /// Notebook associated with the finding.
5836    pub notebook: std::option::Option<crate::model::Notebook>,
5837
5838    /// Contains details about a group of security issues that, when the issues
5839    /// occur together, represent a greater risk than when the issues occur
5840    /// independently. A group of such issues is referred to as a toxic
5841    /// combination.
5842    /// This field cannot be updated. Its value is ignored in all update requests.
5843    pub toxic_combination: std::option::Option<crate::model::ToxicCombination>,
5844
5845    /// Contains details about groups of which this finding is a member. A group is
5846    /// a collection of findings that are related in some way.
5847    /// This field cannot be updated. Its value is ignored in all update requests.
5848    pub group_memberships: std::vec::Vec<crate::model::GroupMembership>,
5849
5850    /// Disk associated with the finding.
5851    pub disk: std::option::Option<crate::model::Disk>,
5852
5853    /// Data access events associated with the finding.
5854    pub data_access_events: std::vec::Vec<crate::model::DataAccessEvent>,
5855
5856    /// Data flow events associated with the finding.
5857    pub data_flow_events: std::vec::Vec<crate::model::DataFlowEvent>,
5858
5859    /// Represents the VPC networks that the resource is attached to.
5860    pub networks: std::vec::Vec<crate::model::Network>,
5861
5862    /// Data retention deletion events associated with the finding.
5863    pub data_retention_deletion_events: std::vec::Vec<crate::model::DataRetentionDeletionEvent>,
5864
5865    /// AffectedResources associated with the finding.
5866    pub affected_resources: std::option::Option<crate::model::AffectedResources>,
5867
5868    /// The AI model associated with the finding.
5869    pub ai_model: std::option::Option<crate::model::AiModel>,
5870
5871    /// Contains details about a chokepoint, which is a resource or resource group
5872    /// where high-risk attack paths converge, based on [attack path simulations]
5873    /// (<https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations>).
5874    /// This field cannot be updated. Its value is ignored in all update requests.
5875    pub chokepoint: std::option::Option<crate::model::Chokepoint>,
5876
5877    /// VertexAi associated with the finding.
5878    pub vertex_ai: std::option::Option<crate::model::VertexAi>,
5879
5880    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5881}
5882
5883impl Finding {
5884    /// Creates a new default instance.
5885    pub fn new() -> Self {
5886        std::default::Default::default()
5887    }
5888
5889    /// Sets the value of [name][crate::model::Finding::name].
5890    ///
5891    /// # Example
5892    /// ```ignore,no_run
5893    /// # use google_cloud_securitycenter_v2::model::Finding;
5894    /// # let organization_id = "organization_id";
5895    /// # let source_id = "source_id";
5896    /// # let finding_id = "finding_id";
5897    /// let x = Finding::new().set_name(format!("organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"));
5898    /// ```
5899    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5900        self.name = v.into();
5901        self
5902    }
5903
5904    /// Sets the value of [canonical_name][crate::model::Finding::canonical_name].
5905    ///
5906    /// # Example
5907    /// ```ignore,no_run
5908    /// # use google_cloud_securitycenter_v2::model::Finding;
5909    /// let x = Finding::new().set_canonical_name("example");
5910    /// ```
5911    pub fn set_canonical_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5912        self.canonical_name = v.into();
5913        self
5914    }
5915
5916    /// Sets the value of [parent][crate::model::Finding::parent].
5917    ///
5918    /// # Example
5919    /// ```ignore,no_run
5920    /// # use google_cloud_securitycenter_v2::model::Finding;
5921    /// let x = Finding::new().set_parent("example");
5922    /// ```
5923    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5924        self.parent = v.into();
5925        self
5926    }
5927
5928    /// Sets the value of [resource_name][crate::model::Finding::resource_name].
5929    ///
5930    /// # Example
5931    /// ```ignore,no_run
5932    /// # use google_cloud_securitycenter_v2::model::Finding;
5933    /// let x = Finding::new().set_resource_name("example");
5934    /// ```
5935    pub fn set_resource_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5936        self.resource_name = v.into();
5937        self
5938    }
5939
5940    /// Sets the value of [state][crate::model::Finding::state].
5941    ///
5942    /// # Example
5943    /// ```ignore,no_run
5944    /// # use google_cloud_securitycenter_v2::model::Finding;
5945    /// use google_cloud_securitycenter_v2::model::finding::State;
5946    /// let x0 = Finding::new().set_state(State::Active);
5947    /// let x1 = Finding::new().set_state(State::Inactive);
5948    /// ```
5949    pub fn set_state<T: std::convert::Into<crate::model::finding::State>>(mut self, v: T) -> Self {
5950        self.state = v.into();
5951        self
5952    }
5953
5954    /// Sets the value of [category][crate::model::Finding::category].
5955    ///
5956    /// # Example
5957    /// ```ignore,no_run
5958    /// # use google_cloud_securitycenter_v2::model::Finding;
5959    /// let x = Finding::new().set_category("example");
5960    /// ```
5961    pub fn set_category<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5962        self.category = v.into();
5963        self
5964    }
5965
5966    /// Sets the value of [external_uri][crate::model::Finding::external_uri].
5967    ///
5968    /// # Example
5969    /// ```ignore,no_run
5970    /// # use google_cloud_securitycenter_v2::model::Finding;
5971    /// let x = Finding::new().set_external_uri("example");
5972    /// ```
5973    pub fn set_external_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5974        self.external_uri = v.into();
5975        self
5976    }
5977
5978    /// Sets the value of [source_properties][crate::model::Finding::source_properties].
5979    ///
5980    /// # Example
5981    /// ```ignore,no_run
5982    /// # use google_cloud_securitycenter_v2::model::Finding;
5983    /// use wkt::Value;
5984    /// let x = Finding::new().set_source_properties([
5985    ///     ("key0", Value::default()/* use setters */),
5986    ///     ("key1", Value::default()/* use (different) setters */),
5987    /// ]);
5988    /// ```
5989    pub fn set_source_properties<T, K, V>(mut self, v: T) -> Self
5990    where
5991        T: std::iter::IntoIterator<Item = (K, V)>,
5992        K: std::convert::Into<std::string::String>,
5993        V: std::convert::Into<wkt::Value>,
5994    {
5995        use std::iter::Iterator;
5996        self.source_properties = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5997        self
5998    }
5999
6000    /// Sets the value of [security_marks][crate::model::Finding::security_marks].
6001    ///
6002    /// # Example
6003    /// ```ignore,no_run
6004    /// # use google_cloud_securitycenter_v2::model::Finding;
6005    /// use google_cloud_securitycenter_v2::model::SecurityMarks;
6006    /// let x = Finding::new().set_security_marks(SecurityMarks::default()/* use setters */);
6007    /// ```
6008    pub fn set_security_marks<T>(mut self, v: T) -> Self
6009    where
6010        T: std::convert::Into<crate::model::SecurityMarks>,
6011    {
6012        self.security_marks = std::option::Option::Some(v.into());
6013        self
6014    }
6015
6016    /// Sets or clears the value of [security_marks][crate::model::Finding::security_marks].
6017    ///
6018    /// # Example
6019    /// ```ignore,no_run
6020    /// # use google_cloud_securitycenter_v2::model::Finding;
6021    /// use google_cloud_securitycenter_v2::model::SecurityMarks;
6022    /// let x = Finding::new().set_or_clear_security_marks(Some(SecurityMarks::default()/* use setters */));
6023    /// let x = Finding::new().set_or_clear_security_marks(None::<SecurityMarks>);
6024    /// ```
6025    pub fn set_or_clear_security_marks<T>(mut self, v: std::option::Option<T>) -> Self
6026    where
6027        T: std::convert::Into<crate::model::SecurityMarks>,
6028    {
6029        self.security_marks = v.map(|x| x.into());
6030        self
6031    }
6032
6033    /// Sets the value of [event_time][crate::model::Finding::event_time].
6034    ///
6035    /// # Example
6036    /// ```ignore,no_run
6037    /// # use google_cloud_securitycenter_v2::model::Finding;
6038    /// use wkt::Timestamp;
6039    /// let x = Finding::new().set_event_time(Timestamp::default()/* use setters */);
6040    /// ```
6041    pub fn set_event_time<T>(mut self, v: T) -> Self
6042    where
6043        T: std::convert::Into<wkt::Timestamp>,
6044    {
6045        self.event_time = std::option::Option::Some(v.into());
6046        self
6047    }
6048
6049    /// Sets or clears the value of [event_time][crate::model::Finding::event_time].
6050    ///
6051    /// # Example
6052    /// ```ignore,no_run
6053    /// # use google_cloud_securitycenter_v2::model::Finding;
6054    /// use wkt::Timestamp;
6055    /// let x = Finding::new().set_or_clear_event_time(Some(Timestamp::default()/* use setters */));
6056    /// let x = Finding::new().set_or_clear_event_time(None::<Timestamp>);
6057    /// ```
6058    pub fn set_or_clear_event_time<T>(mut self, v: std::option::Option<T>) -> Self
6059    where
6060        T: std::convert::Into<wkt::Timestamp>,
6061    {
6062        self.event_time = v.map(|x| x.into());
6063        self
6064    }
6065
6066    /// Sets the value of [create_time][crate::model::Finding::create_time].
6067    ///
6068    /// # Example
6069    /// ```ignore,no_run
6070    /// # use google_cloud_securitycenter_v2::model::Finding;
6071    /// use wkt::Timestamp;
6072    /// let x = Finding::new().set_create_time(Timestamp::default()/* use setters */);
6073    /// ```
6074    pub fn set_create_time<T>(mut self, v: T) -> Self
6075    where
6076        T: std::convert::Into<wkt::Timestamp>,
6077    {
6078        self.create_time = std::option::Option::Some(v.into());
6079        self
6080    }
6081
6082    /// Sets or clears the value of [create_time][crate::model::Finding::create_time].
6083    ///
6084    /// # Example
6085    /// ```ignore,no_run
6086    /// # use google_cloud_securitycenter_v2::model::Finding;
6087    /// use wkt::Timestamp;
6088    /// let x = Finding::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
6089    /// let x = Finding::new().set_or_clear_create_time(None::<Timestamp>);
6090    /// ```
6091    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6092    where
6093        T: std::convert::Into<wkt::Timestamp>,
6094    {
6095        self.create_time = v.map(|x| x.into());
6096        self
6097    }
6098
6099    /// Sets the value of [severity][crate::model::Finding::severity].
6100    ///
6101    /// # Example
6102    /// ```ignore,no_run
6103    /// # use google_cloud_securitycenter_v2::model::Finding;
6104    /// use google_cloud_securitycenter_v2::model::finding::Severity;
6105    /// let x0 = Finding::new().set_severity(Severity::Critical);
6106    /// let x1 = Finding::new().set_severity(Severity::High);
6107    /// let x2 = Finding::new().set_severity(Severity::Medium);
6108    /// ```
6109    pub fn set_severity<T: std::convert::Into<crate::model::finding::Severity>>(
6110        mut self,
6111        v: T,
6112    ) -> Self {
6113        self.severity = v.into();
6114        self
6115    }
6116
6117    /// Sets the value of [mute][crate::model::Finding::mute].
6118    ///
6119    /// # Example
6120    /// ```ignore,no_run
6121    /// # use google_cloud_securitycenter_v2::model::Finding;
6122    /// use google_cloud_securitycenter_v2::model::finding::Mute;
6123    /// let x0 = Finding::new().set_mute(Mute::Muted);
6124    /// let x1 = Finding::new().set_mute(Mute::Unmuted);
6125    /// let x2 = Finding::new().set_mute(Mute::Undefined);
6126    /// ```
6127    pub fn set_mute<T: std::convert::Into<crate::model::finding::Mute>>(mut self, v: T) -> Self {
6128        self.mute = v.into();
6129        self
6130    }
6131
6132    /// Sets the value of [mute_info][crate::model::Finding::mute_info].
6133    ///
6134    /// # Example
6135    /// ```ignore,no_run
6136    /// # use google_cloud_securitycenter_v2::model::Finding;
6137    /// use google_cloud_securitycenter_v2::model::finding::MuteInfo;
6138    /// let x = Finding::new().set_mute_info(MuteInfo::default()/* use setters */);
6139    /// ```
6140    pub fn set_mute_info<T>(mut self, v: T) -> Self
6141    where
6142        T: std::convert::Into<crate::model::finding::MuteInfo>,
6143    {
6144        self.mute_info = std::option::Option::Some(v.into());
6145        self
6146    }
6147
6148    /// Sets or clears the value of [mute_info][crate::model::Finding::mute_info].
6149    ///
6150    /// # Example
6151    /// ```ignore,no_run
6152    /// # use google_cloud_securitycenter_v2::model::Finding;
6153    /// use google_cloud_securitycenter_v2::model::finding::MuteInfo;
6154    /// let x = Finding::new().set_or_clear_mute_info(Some(MuteInfo::default()/* use setters */));
6155    /// let x = Finding::new().set_or_clear_mute_info(None::<MuteInfo>);
6156    /// ```
6157    pub fn set_or_clear_mute_info<T>(mut self, v: std::option::Option<T>) -> Self
6158    where
6159        T: std::convert::Into<crate::model::finding::MuteInfo>,
6160    {
6161        self.mute_info = v.map(|x| x.into());
6162        self
6163    }
6164
6165    /// Sets the value of [finding_class][crate::model::Finding::finding_class].
6166    ///
6167    /// # Example
6168    /// ```ignore,no_run
6169    /// # use google_cloud_securitycenter_v2::model::Finding;
6170    /// use google_cloud_securitycenter_v2::model::finding::FindingClass;
6171    /// let x0 = Finding::new().set_finding_class(FindingClass::Threat);
6172    /// let x1 = Finding::new().set_finding_class(FindingClass::Vulnerability);
6173    /// let x2 = Finding::new().set_finding_class(FindingClass::Misconfiguration);
6174    /// ```
6175    pub fn set_finding_class<T: std::convert::Into<crate::model::finding::FindingClass>>(
6176        mut self,
6177        v: T,
6178    ) -> Self {
6179        self.finding_class = v.into();
6180        self
6181    }
6182
6183    /// Sets the value of [indicator][crate::model::Finding::indicator].
6184    ///
6185    /// # Example
6186    /// ```ignore,no_run
6187    /// # use google_cloud_securitycenter_v2::model::Finding;
6188    /// use google_cloud_securitycenter_v2::model::Indicator;
6189    /// let x = Finding::new().set_indicator(Indicator::default()/* use setters */);
6190    /// ```
6191    pub fn set_indicator<T>(mut self, v: T) -> Self
6192    where
6193        T: std::convert::Into<crate::model::Indicator>,
6194    {
6195        self.indicator = std::option::Option::Some(v.into());
6196        self
6197    }
6198
6199    /// Sets or clears the value of [indicator][crate::model::Finding::indicator].
6200    ///
6201    /// # Example
6202    /// ```ignore,no_run
6203    /// # use google_cloud_securitycenter_v2::model::Finding;
6204    /// use google_cloud_securitycenter_v2::model::Indicator;
6205    /// let x = Finding::new().set_or_clear_indicator(Some(Indicator::default()/* use setters */));
6206    /// let x = Finding::new().set_or_clear_indicator(None::<Indicator>);
6207    /// ```
6208    pub fn set_or_clear_indicator<T>(mut self, v: std::option::Option<T>) -> Self
6209    where
6210        T: std::convert::Into<crate::model::Indicator>,
6211    {
6212        self.indicator = v.map(|x| x.into());
6213        self
6214    }
6215
6216    /// Sets the value of [vulnerability][crate::model::Finding::vulnerability].
6217    ///
6218    /// # Example
6219    /// ```ignore,no_run
6220    /// # use google_cloud_securitycenter_v2::model::Finding;
6221    /// use google_cloud_securitycenter_v2::model::Vulnerability;
6222    /// let x = Finding::new().set_vulnerability(Vulnerability::default()/* use setters */);
6223    /// ```
6224    pub fn set_vulnerability<T>(mut self, v: T) -> Self
6225    where
6226        T: std::convert::Into<crate::model::Vulnerability>,
6227    {
6228        self.vulnerability = std::option::Option::Some(v.into());
6229        self
6230    }
6231
6232    /// Sets or clears the value of [vulnerability][crate::model::Finding::vulnerability].
6233    ///
6234    /// # Example
6235    /// ```ignore,no_run
6236    /// # use google_cloud_securitycenter_v2::model::Finding;
6237    /// use google_cloud_securitycenter_v2::model::Vulnerability;
6238    /// let x = Finding::new().set_or_clear_vulnerability(Some(Vulnerability::default()/* use setters */));
6239    /// let x = Finding::new().set_or_clear_vulnerability(None::<Vulnerability>);
6240    /// ```
6241    pub fn set_or_clear_vulnerability<T>(mut self, v: std::option::Option<T>) -> Self
6242    where
6243        T: std::convert::Into<crate::model::Vulnerability>,
6244    {
6245        self.vulnerability = v.map(|x| x.into());
6246        self
6247    }
6248
6249    /// Sets the value of [mute_update_time][crate::model::Finding::mute_update_time].
6250    ///
6251    /// # Example
6252    /// ```ignore,no_run
6253    /// # use google_cloud_securitycenter_v2::model::Finding;
6254    /// use wkt::Timestamp;
6255    /// let x = Finding::new().set_mute_update_time(Timestamp::default()/* use setters */);
6256    /// ```
6257    pub fn set_mute_update_time<T>(mut self, v: T) -> Self
6258    where
6259        T: std::convert::Into<wkt::Timestamp>,
6260    {
6261        self.mute_update_time = std::option::Option::Some(v.into());
6262        self
6263    }
6264
6265    /// Sets or clears the value of [mute_update_time][crate::model::Finding::mute_update_time].
6266    ///
6267    /// # Example
6268    /// ```ignore,no_run
6269    /// # use google_cloud_securitycenter_v2::model::Finding;
6270    /// use wkt::Timestamp;
6271    /// let x = Finding::new().set_or_clear_mute_update_time(Some(Timestamp::default()/* use setters */));
6272    /// let x = Finding::new().set_or_clear_mute_update_time(None::<Timestamp>);
6273    /// ```
6274    pub fn set_or_clear_mute_update_time<T>(mut self, v: std::option::Option<T>) -> Self
6275    where
6276        T: std::convert::Into<wkt::Timestamp>,
6277    {
6278        self.mute_update_time = v.map(|x| x.into());
6279        self
6280    }
6281
6282    /// Sets the value of [external_systems][crate::model::Finding::external_systems].
6283    ///
6284    /// # Example
6285    /// ```ignore,no_run
6286    /// # use google_cloud_securitycenter_v2::model::Finding;
6287    /// use google_cloud_securitycenter_v2::model::ExternalSystem;
6288    /// let x = Finding::new().set_external_systems([
6289    ///     ("key0", ExternalSystem::default()/* use setters */),
6290    ///     ("key1", ExternalSystem::default()/* use (different) setters */),
6291    /// ]);
6292    /// ```
6293    pub fn set_external_systems<T, K, V>(mut self, v: T) -> Self
6294    where
6295        T: std::iter::IntoIterator<Item = (K, V)>,
6296        K: std::convert::Into<std::string::String>,
6297        V: std::convert::Into<crate::model::ExternalSystem>,
6298    {
6299        use std::iter::Iterator;
6300        self.external_systems = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6301        self
6302    }
6303
6304    /// Sets the value of [mitre_attack][crate::model::Finding::mitre_attack].
6305    ///
6306    /// # Example
6307    /// ```ignore,no_run
6308    /// # use google_cloud_securitycenter_v2::model::Finding;
6309    /// use google_cloud_securitycenter_v2::model::MitreAttack;
6310    /// let x = Finding::new().set_mitre_attack(MitreAttack::default()/* use setters */);
6311    /// ```
6312    pub fn set_mitre_attack<T>(mut self, v: T) -> Self
6313    where
6314        T: std::convert::Into<crate::model::MitreAttack>,
6315    {
6316        self.mitre_attack = std::option::Option::Some(v.into());
6317        self
6318    }
6319
6320    /// Sets or clears the value of [mitre_attack][crate::model::Finding::mitre_attack].
6321    ///
6322    /// # Example
6323    /// ```ignore,no_run
6324    /// # use google_cloud_securitycenter_v2::model::Finding;
6325    /// use google_cloud_securitycenter_v2::model::MitreAttack;
6326    /// let x = Finding::new().set_or_clear_mitre_attack(Some(MitreAttack::default()/* use setters */));
6327    /// let x = Finding::new().set_or_clear_mitre_attack(None::<MitreAttack>);
6328    /// ```
6329    pub fn set_or_clear_mitre_attack<T>(mut self, v: std::option::Option<T>) -> Self
6330    where
6331        T: std::convert::Into<crate::model::MitreAttack>,
6332    {
6333        self.mitre_attack = v.map(|x| x.into());
6334        self
6335    }
6336
6337    /// Sets the value of [access][crate::model::Finding::access].
6338    ///
6339    /// # Example
6340    /// ```ignore,no_run
6341    /// # use google_cloud_securitycenter_v2::model::Finding;
6342    /// use google_cloud_securitycenter_v2::model::Access;
6343    /// let x = Finding::new().set_access(Access::default()/* use setters */);
6344    /// ```
6345    pub fn set_access<T>(mut self, v: T) -> Self
6346    where
6347        T: std::convert::Into<crate::model::Access>,
6348    {
6349        self.access = std::option::Option::Some(v.into());
6350        self
6351    }
6352
6353    /// Sets or clears the value of [access][crate::model::Finding::access].
6354    ///
6355    /// # Example
6356    /// ```ignore,no_run
6357    /// # use google_cloud_securitycenter_v2::model::Finding;
6358    /// use google_cloud_securitycenter_v2::model::Access;
6359    /// let x = Finding::new().set_or_clear_access(Some(Access::default()/* use setters */));
6360    /// let x = Finding::new().set_or_clear_access(None::<Access>);
6361    /// ```
6362    pub fn set_or_clear_access<T>(mut self, v: std::option::Option<T>) -> Self
6363    where
6364        T: std::convert::Into<crate::model::Access>,
6365    {
6366        self.access = v.map(|x| x.into());
6367        self
6368    }
6369
6370    /// Sets the value of [connections][crate::model::Finding::connections].
6371    ///
6372    /// # Example
6373    /// ```ignore,no_run
6374    /// # use google_cloud_securitycenter_v2::model::Finding;
6375    /// use google_cloud_securitycenter_v2::model::Connection;
6376    /// let x = Finding::new()
6377    ///     .set_connections([
6378    ///         Connection::default()/* use setters */,
6379    ///         Connection::default()/* use (different) setters */,
6380    ///     ]);
6381    /// ```
6382    pub fn set_connections<T, V>(mut self, v: T) -> Self
6383    where
6384        T: std::iter::IntoIterator<Item = V>,
6385        V: std::convert::Into<crate::model::Connection>,
6386    {
6387        use std::iter::Iterator;
6388        self.connections = v.into_iter().map(|i| i.into()).collect();
6389        self
6390    }
6391
6392    /// Sets the value of [mute_initiator][crate::model::Finding::mute_initiator].
6393    ///
6394    /// # Example
6395    /// ```ignore,no_run
6396    /// # use google_cloud_securitycenter_v2::model::Finding;
6397    /// let x = Finding::new().set_mute_initiator("example");
6398    /// ```
6399    pub fn set_mute_initiator<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6400        self.mute_initiator = v.into();
6401        self
6402    }
6403
6404    /// Sets the value of [processes][crate::model::Finding::processes].
6405    ///
6406    /// # Example
6407    /// ```ignore,no_run
6408    /// # use google_cloud_securitycenter_v2::model::Finding;
6409    /// use google_cloud_securitycenter_v2::model::Process;
6410    /// let x = Finding::new()
6411    ///     .set_processes([
6412    ///         Process::default()/* use setters */,
6413    ///         Process::default()/* use (different) setters */,
6414    ///     ]);
6415    /// ```
6416    pub fn set_processes<T, V>(mut self, v: T) -> Self
6417    where
6418        T: std::iter::IntoIterator<Item = V>,
6419        V: std::convert::Into<crate::model::Process>,
6420    {
6421        use std::iter::Iterator;
6422        self.processes = v.into_iter().map(|i| i.into()).collect();
6423        self
6424    }
6425
6426    /// Sets the value of [contacts][crate::model::Finding::contacts].
6427    ///
6428    /// # Example
6429    /// ```ignore,no_run
6430    /// # use google_cloud_securitycenter_v2::model::Finding;
6431    /// use google_cloud_securitycenter_v2::model::ContactDetails;
6432    /// let x = Finding::new().set_contacts([
6433    ///     ("key0", ContactDetails::default()/* use setters */),
6434    ///     ("key1", ContactDetails::default()/* use (different) setters */),
6435    /// ]);
6436    /// ```
6437    pub fn set_contacts<T, K, V>(mut self, v: T) -> Self
6438    where
6439        T: std::iter::IntoIterator<Item = (K, V)>,
6440        K: std::convert::Into<std::string::String>,
6441        V: std::convert::Into<crate::model::ContactDetails>,
6442    {
6443        use std::iter::Iterator;
6444        self.contacts = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6445        self
6446    }
6447
6448    /// Sets the value of [compliances][crate::model::Finding::compliances].
6449    ///
6450    /// # Example
6451    /// ```ignore,no_run
6452    /// # use google_cloud_securitycenter_v2::model::Finding;
6453    /// use google_cloud_securitycenter_v2::model::Compliance;
6454    /// let x = Finding::new()
6455    ///     .set_compliances([
6456    ///         Compliance::default()/* use setters */,
6457    ///         Compliance::default()/* use (different) setters */,
6458    ///     ]);
6459    /// ```
6460    pub fn set_compliances<T, V>(mut self, v: T) -> Self
6461    where
6462        T: std::iter::IntoIterator<Item = V>,
6463        V: std::convert::Into<crate::model::Compliance>,
6464    {
6465        use std::iter::Iterator;
6466        self.compliances = v.into_iter().map(|i| i.into()).collect();
6467        self
6468    }
6469
6470    /// Sets the value of [parent_display_name][crate::model::Finding::parent_display_name].
6471    ///
6472    /// # Example
6473    /// ```ignore,no_run
6474    /// # use google_cloud_securitycenter_v2::model::Finding;
6475    /// let x = Finding::new().set_parent_display_name("example");
6476    /// ```
6477    pub fn set_parent_display_name<T: std::convert::Into<std::string::String>>(
6478        mut self,
6479        v: T,
6480    ) -> Self {
6481        self.parent_display_name = v.into();
6482        self
6483    }
6484
6485    /// Sets the value of [description][crate::model::Finding::description].
6486    ///
6487    /// # Example
6488    /// ```ignore,no_run
6489    /// # use google_cloud_securitycenter_v2::model::Finding;
6490    /// let x = Finding::new().set_description("example");
6491    /// ```
6492    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6493        self.description = v.into();
6494        self
6495    }
6496
6497    /// Sets the value of [exfiltration][crate::model::Finding::exfiltration].
6498    ///
6499    /// # Example
6500    /// ```ignore,no_run
6501    /// # use google_cloud_securitycenter_v2::model::Finding;
6502    /// use google_cloud_securitycenter_v2::model::Exfiltration;
6503    /// let x = Finding::new().set_exfiltration(Exfiltration::default()/* use setters */);
6504    /// ```
6505    pub fn set_exfiltration<T>(mut self, v: T) -> Self
6506    where
6507        T: std::convert::Into<crate::model::Exfiltration>,
6508    {
6509        self.exfiltration = std::option::Option::Some(v.into());
6510        self
6511    }
6512
6513    /// Sets or clears the value of [exfiltration][crate::model::Finding::exfiltration].
6514    ///
6515    /// # Example
6516    /// ```ignore,no_run
6517    /// # use google_cloud_securitycenter_v2::model::Finding;
6518    /// use google_cloud_securitycenter_v2::model::Exfiltration;
6519    /// let x = Finding::new().set_or_clear_exfiltration(Some(Exfiltration::default()/* use setters */));
6520    /// let x = Finding::new().set_or_clear_exfiltration(None::<Exfiltration>);
6521    /// ```
6522    pub fn set_or_clear_exfiltration<T>(mut self, v: std::option::Option<T>) -> Self
6523    where
6524        T: std::convert::Into<crate::model::Exfiltration>,
6525    {
6526        self.exfiltration = v.map(|x| x.into());
6527        self
6528    }
6529
6530    /// Sets the value of [iam_bindings][crate::model::Finding::iam_bindings].
6531    ///
6532    /// # Example
6533    /// ```ignore,no_run
6534    /// # use google_cloud_securitycenter_v2::model::Finding;
6535    /// use google_cloud_securitycenter_v2::model::IamBinding;
6536    /// let x = Finding::new()
6537    ///     .set_iam_bindings([
6538    ///         IamBinding::default()/* use setters */,
6539    ///         IamBinding::default()/* use (different) setters */,
6540    ///     ]);
6541    /// ```
6542    pub fn set_iam_bindings<T, V>(mut self, v: T) -> Self
6543    where
6544        T: std::iter::IntoIterator<Item = V>,
6545        V: std::convert::Into<crate::model::IamBinding>,
6546    {
6547        use std::iter::Iterator;
6548        self.iam_bindings = v.into_iter().map(|i| i.into()).collect();
6549        self
6550    }
6551
6552    /// Sets the value of [next_steps][crate::model::Finding::next_steps].
6553    ///
6554    /// # Example
6555    /// ```ignore,no_run
6556    /// # use google_cloud_securitycenter_v2::model::Finding;
6557    /// let x = Finding::new().set_next_steps("example");
6558    /// ```
6559    pub fn set_next_steps<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6560        self.next_steps = v.into();
6561        self
6562    }
6563
6564    /// Sets the value of [module_name][crate::model::Finding::module_name].
6565    ///
6566    /// # Example
6567    /// ```ignore,no_run
6568    /// # use google_cloud_securitycenter_v2::model::Finding;
6569    /// let x = Finding::new().set_module_name("example");
6570    /// ```
6571    pub fn set_module_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6572        self.module_name = v.into();
6573        self
6574    }
6575
6576    /// Sets the value of [containers][crate::model::Finding::containers].
6577    ///
6578    /// # Example
6579    /// ```ignore,no_run
6580    /// # use google_cloud_securitycenter_v2::model::Finding;
6581    /// use google_cloud_securitycenter_v2::model::Container;
6582    /// let x = Finding::new()
6583    ///     .set_containers([
6584    ///         Container::default()/* use setters */,
6585    ///         Container::default()/* use (different) setters */,
6586    ///     ]);
6587    /// ```
6588    pub fn set_containers<T, V>(mut self, v: T) -> Self
6589    where
6590        T: std::iter::IntoIterator<Item = V>,
6591        V: std::convert::Into<crate::model::Container>,
6592    {
6593        use std::iter::Iterator;
6594        self.containers = v.into_iter().map(|i| i.into()).collect();
6595        self
6596    }
6597
6598    /// Sets the value of [kubernetes][crate::model::Finding::kubernetes].
6599    ///
6600    /// # Example
6601    /// ```ignore,no_run
6602    /// # use google_cloud_securitycenter_v2::model::Finding;
6603    /// use google_cloud_securitycenter_v2::model::Kubernetes;
6604    /// let x = Finding::new().set_kubernetes(Kubernetes::default()/* use setters */);
6605    /// ```
6606    pub fn set_kubernetes<T>(mut self, v: T) -> Self
6607    where
6608        T: std::convert::Into<crate::model::Kubernetes>,
6609    {
6610        self.kubernetes = std::option::Option::Some(v.into());
6611        self
6612    }
6613
6614    /// Sets or clears the value of [kubernetes][crate::model::Finding::kubernetes].
6615    ///
6616    /// # Example
6617    /// ```ignore,no_run
6618    /// # use google_cloud_securitycenter_v2::model::Finding;
6619    /// use google_cloud_securitycenter_v2::model::Kubernetes;
6620    /// let x = Finding::new().set_or_clear_kubernetes(Some(Kubernetes::default()/* use setters */));
6621    /// let x = Finding::new().set_or_clear_kubernetes(None::<Kubernetes>);
6622    /// ```
6623    pub fn set_or_clear_kubernetes<T>(mut self, v: std::option::Option<T>) -> Self
6624    where
6625        T: std::convert::Into<crate::model::Kubernetes>,
6626    {
6627        self.kubernetes = v.map(|x| x.into());
6628        self
6629    }
6630
6631    /// Sets the value of [database][crate::model::Finding::database].
6632    ///
6633    /// # Example
6634    /// ```ignore,no_run
6635    /// # use google_cloud_securitycenter_v2::model::Finding;
6636    /// use google_cloud_securitycenter_v2::model::Database;
6637    /// let x = Finding::new().set_database(Database::default()/* use setters */);
6638    /// ```
6639    pub fn set_database<T>(mut self, v: T) -> Self
6640    where
6641        T: std::convert::Into<crate::model::Database>,
6642    {
6643        self.database = std::option::Option::Some(v.into());
6644        self
6645    }
6646
6647    /// Sets or clears the value of [database][crate::model::Finding::database].
6648    ///
6649    /// # Example
6650    /// ```ignore,no_run
6651    /// # use google_cloud_securitycenter_v2::model::Finding;
6652    /// use google_cloud_securitycenter_v2::model::Database;
6653    /// let x = Finding::new().set_or_clear_database(Some(Database::default()/* use setters */));
6654    /// let x = Finding::new().set_or_clear_database(None::<Database>);
6655    /// ```
6656    pub fn set_or_clear_database<T>(mut self, v: std::option::Option<T>) -> Self
6657    where
6658        T: std::convert::Into<crate::model::Database>,
6659    {
6660        self.database = v.map(|x| x.into());
6661        self
6662    }
6663
6664    /// Sets the value of [attack_exposure][crate::model::Finding::attack_exposure].
6665    ///
6666    /// # Example
6667    /// ```ignore,no_run
6668    /// # use google_cloud_securitycenter_v2::model::Finding;
6669    /// use google_cloud_securitycenter_v2::model::AttackExposure;
6670    /// let x = Finding::new().set_attack_exposure(AttackExposure::default()/* use setters */);
6671    /// ```
6672    pub fn set_attack_exposure<T>(mut self, v: T) -> Self
6673    where
6674        T: std::convert::Into<crate::model::AttackExposure>,
6675    {
6676        self.attack_exposure = std::option::Option::Some(v.into());
6677        self
6678    }
6679
6680    /// Sets or clears the value of [attack_exposure][crate::model::Finding::attack_exposure].
6681    ///
6682    /// # Example
6683    /// ```ignore,no_run
6684    /// # use google_cloud_securitycenter_v2::model::Finding;
6685    /// use google_cloud_securitycenter_v2::model::AttackExposure;
6686    /// let x = Finding::new().set_or_clear_attack_exposure(Some(AttackExposure::default()/* use setters */));
6687    /// let x = Finding::new().set_or_clear_attack_exposure(None::<AttackExposure>);
6688    /// ```
6689    pub fn set_or_clear_attack_exposure<T>(mut self, v: std::option::Option<T>) -> Self
6690    where
6691        T: std::convert::Into<crate::model::AttackExposure>,
6692    {
6693        self.attack_exposure = v.map(|x| x.into());
6694        self
6695    }
6696
6697    /// Sets the value of [files][crate::model::Finding::files].
6698    ///
6699    /// # Example
6700    /// ```ignore,no_run
6701    /// # use google_cloud_securitycenter_v2::model::Finding;
6702    /// use google_cloud_securitycenter_v2::model::File;
6703    /// let x = Finding::new()
6704    ///     .set_files([
6705    ///         File::default()/* use setters */,
6706    ///         File::default()/* use (different) setters */,
6707    ///     ]);
6708    /// ```
6709    pub fn set_files<T, V>(mut self, v: T) -> Self
6710    where
6711        T: std::iter::IntoIterator<Item = V>,
6712        V: std::convert::Into<crate::model::File>,
6713    {
6714        use std::iter::Iterator;
6715        self.files = v.into_iter().map(|i| i.into()).collect();
6716        self
6717    }
6718
6719    /// Sets the value of [cloud_dlp_inspection][crate::model::Finding::cloud_dlp_inspection].
6720    ///
6721    /// # Example
6722    /// ```ignore,no_run
6723    /// # use google_cloud_securitycenter_v2::model::Finding;
6724    /// use google_cloud_securitycenter_v2::model::CloudDlpInspection;
6725    /// let x = Finding::new().set_cloud_dlp_inspection(CloudDlpInspection::default()/* use setters */);
6726    /// ```
6727    pub fn set_cloud_dlp_inspection<T>(mut self, v: T) -> Self
6728    where
6729        T: std::convert::Into<crate::model::CloudDlpInspection>,
6730    {
6731        self.cloud_dlp_inspection = std::option::Option::Some(v.into());
6732        self
6733    }
6734
6735    /// Sets or clears the value of [cloud_dlp_inspection][crate::model::Finding::cloud_dlp_inspection].
6736    ///
6737    /// # Example
6738    /// ```ignore,no_run
6739    /// # use google_cloud_securitycenter_v2::model::Finding;
6740    /// use google_cloud_securitycenter_v2::model::CloudDlpInspection;
6741    /// let x = Finding::new().set_or_clear_cloud_dlp_inspection(Some(CloudDlpInspection::default()/* use setters */));
6742    /// let x = Finding::new().set_or_clear_cloud_dlp_inspection(None::<CloudDlpInspection>);
6743    /// ```
6744    pub fn set_or_clear_cloud_dlp_inspection<T>(mut self, v: std::option::Option<T>) -> Self
6745    where
6746        T: std::convert::Into<crate::model::CloudDlpInspection>,
6747    {
6748        self.cloud_dlp_inspection = v.map(|x| x.into());
6749        self
6750    }
6751
6752    /// Sets the value of [cloud_dlp_data_profile][crate::model::Finding::cloud_dlp_data_profile].
6753    ///
6754    /// # Example
6755    /// ```ignore,no_run
6756    /// # use google_cloud_securitycenter_v2::model::Finding;
6757    /// use google_cloud_securitycenter_v2::model::CloudDlpDataProfile;
6758    /// let x = Finding::new().set_cloud_dlp_data_profile(CloudDlpDataProfile::default()/* use setters */);
6759    /// ```
6760    pub fn set_cloud_dlp_data_profile<T>(mut self, v: T) -> Self
6761    where
6762        T: std::convert::Into<crate::model::CloudDlpDataProfile>,
6763    {
6764        self.cloud_dlp_data_profile = std::option::Option::Some(v.into());
6765        self
6766    }
6767
6768    /// Sets or clears the value of [cloud_dlp_data_profile][crate::model::Finding::cloud_dlp_data_profile].
6769    ///
6770    /// # Example
6771    /// ```ignore,no_run
6772    /// # use google_cloud_securitycenter_v2::model::Finding;
6773    /// use google_cloud_securitycenter_v2::model::CloudDlpDataProfile;
6774    /// let x = Finding::new().set_or_clear_cloud_dlp_data_profile(Some(CloudDlpDataProfile::default()/* use setters */));
6775    /// let x = Finding::new().set_or_clear_cloud_dlp_data_profile(None::<CloudDlpDataProfile>);
6776    /// ```
6777    pub fn set_or_clear_cloud_dlp_data_profile<T>(mut self, v: std::option::Option<T>) -> Self
6778    where
6779        T: std::convert::Into<crate::model::CloudDlpDataProfile>,
6780    {
6781        self.cloud_dlp_data_profile = v.map(|x| x.into());
6782        self
6783    }
6784
6785    /// Sets the value of [kernel_rootkit][crate::model::Finding::kernel_rootkit].
6786    ///
6787    /// # Example
6788    /// ```ignore,no_run
6789    /// # use google_cloud_securitycenter_v2::model::Finding;
6790    /// use google_cloud_securitycenter_v2::model::KernelRootkit;
6791    /// let x = Finding::new().set_kernel_rootkit(KernelRootkit::default()/* use setters */);
6792    /// ```
6793    pub fn set_kernel_rootkit<T>(mut self, v: T) -> Self
6794    where
6795        T: std::convert::Into<crate::model::KernelRootkit>,
6796    {
6797        self.kernel_rootkit = std::option::Option::Some(v.into());
6798        self
6799    }
6800
6801    /// Sets or clears the value of [kernel_rootkit][crate::model::Finding::kernel_rootkit].
6802    ///
6803    /// # Example
6804    /// ```ignore,no_run
6805    /// # use google_cloud_securitycenter_v2::model::Finding;
6806    /// use google_cloud_securitycenter_v2::model::KernelRootkit;
6807    /// let x = Finding::new().set_or_clear_kernel_rootkit(Some(KernelRootkit::default()/* use setters */));
6808    /// let x = Finding::new().set_or_clear_kernel_rootkit(None::<KernelRootkit>);
6809    /// ```
6810    pub fn set_or_clear_kernel_rootkit<T>(mut self, v: std::option::Option<T>) -> Self
6811    where
6812        T: std::convert::Into<crate::model::KernelRootkit>,
6813    {
6814        self.kernel_rootkit = v.map(|x| x.into());
6815        self
6816    }
6817
6818    /// Sets the value of [org_policies][crate::model::Finding::org_policies].
6819    ///
6820    /// # Example
6821    /// ```ignore,no_run
6822    /// # use google_cloud_securitycenter_v2::model::Finding;
6823    /// use google_cloud_securitycenter_v2::model::OrgPolicy;
6824    /// let x = Finding::new()
6825    ///     .set_org_policies([
6826    ///         OrgPolicy::default()/* use setters */,
6827    ///         OrgPolicy::default()/* use (different) setters */,
6828    ///     ]);
6829    /// ```
6830    pub fn set_org_policies<T, V>(mut self, v: T) -> Self
6831    where
6832        T: std::iter::IntoIterator<Item = V>,
6833        V: std::convert::Into<crate::model::OrgPolicy>,
6834    {
6835        use std::iter::Iterator;
6836        self.org_policies = v.into_iter().map(|i| i.into()).collect();
6837        self
6838    }
6839
6840    /// Sets the value of [job][crate::model::Finding::job].
6841    ///
6842    /// # Example
6843    /// ```ignore,no_run
6844    /// # use google_cloud_securitycenter_v2::model::Finding;
6845    /// use google_cloud_securitycenter_v2::model::Job;
6846    /// let x = Finding::new().set_job(Job::default()/* use setters */);
6847    /// ```
6848    pub fn set_job<T>(mut self, v: T) -> Self
6849    where
6850        T: std::convert::Into<crate::model::Job>,
6851    {
6852        self.job = std::option::Option::Some(v.into());
6853        self
6854    }
6855
6856    /// Sets or clears the value of [job][crate::model::Finding::job].
6857    ///
6858    /// # Example
6859    /// ```ignore,no_run
6860    /// # use google_cloud_securitycenter_v2::model::Finding;
6861    /// use google_cloud_securitycenter_v2::model::Job;
6862    /// let x = Finding::new().set_or_clear_job(Some(Job::default()/* use setters */));
6863    /// let x = Finding::new().set_or_clear_job(None::<Job>);
6864    /// ```
6865    pub fn set_or_clear_job<T>(mut self, v: std::option::Option<T>) -> Self
6866    where
6867        T: std::convert::Into<crate::model::Job>,
6868    {
6869        self.job = v.map(|x| x.into());
6870        self
6871    }
6872
6873    /// Sets the value of [application][crate::model::Finding::application].
6874    ///
6875    /// # Example
6876    /// ```ignore,no_run
6877    /// # use google_cloud_securitycenter_v2::model::Finding;
6878    /// use google_cloud_securitycenter_v2::model::Application;
6879    /// let x = Finding::new().set_application(Application::default()/* use setters */);
6880    /// ```
6881    pub fn set_application<T>(mut self, v: T) -> Self
6882    where
6883        T: std::convert::Into<crate::model::Application>,
6884    {
6885        self.application = std::option::Option::Some(v.into());
6886        self
6887    }
6888
6889    /// Sets or clears the value of [application][crate::model::Finding::application].
6890    ///
6891    /// # Example
6892    /// ```ignore,no_run
6893    /// # use google_cloud_securitycenter_v2::model::Finding;
6894    /// use google_cloud_securitycenter_v2::model::Application;
6895    /// let x = Finding::new().set_or_clear_application(Some(Application::default()/* use setters */));
6896    /// let x = Finding::new().set_or_clear_application(None::<Application>);
6897    /// ```
6898    pub fn set_or_clear_application<T>(mut self, v: std::option::Option<T>) -> Self
6899    where
6900        T: std::convert::Into<crate::model::Application>,
6901    {
6902        self.application = v.map(|x| x.into());
6903        self
6904    }
6905
6906    /// Sets the value of [ip_rules][crate::model::Finding::ip_rules].
6907    ///
6908    /// # Example
6909    /// ```ignore,no_run
6910    /// # use google_cloud_securitycenter_v2::model::Finding;
6911    /// use google_cloud_securitycenter_v2::model::IpRules;
6912    /// let x = Finding::new().set_ip_rules(IpRules::default()/* use setters */);
6913    /// ```
6914    pub fn set_ip_rules<T>(mut self, v: T) -> Self
6915    where
6916        T: std::convert::Into<crate::model::IpRules>,
6917    {
6918        self.ip_rules = std::option::Option::Some(v.into());
6919        self
6920    }
6921
6922    /// Sets or clears the value of [ip_rules][crate::model::Finding::ip_rules].
6923    ///
6924    /// # Example
6925    /// ```ignore,no_run
6926    /// # use google_cloud_securitycenter_v2::model::Finding;
6927    /// use google_cloud_securitycenter_v2::model::IpRules;
6928    /// let x = Finding::new().set_or_clear_ip_rules(Some(IpRules::default()/* use setters */));
6929    /// let x = Finding::new().set_or_clear_ip_rules(None::<IpRules>);
6930    /// ```
6931    pub fn set_or_clear_ip_rules<T>(mut self, v: std::option::Option<T>) -> Self
6932    where
6933        T: std::convert::Into<crate::model::IpRules>,
6934    {
6935        self.ip_rules = v.map(|x| x.into());
6936        self
6937    }
6938
6939    /// Sets the value of [backup_disaster_recovery][crate::model::Finding::backup_disaster_recovery].
6940    ///
6941    /// # Example
6942    /// ```ignore,no_run
6943    /// # use google_cloud_securitycenter_v2::model::Finding;
6944    /// use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
6945    /// let x = Finding::new().set_backup_disaster_recovery(BackupDisasterRecovery::default()/* use setters */);
6946    /// ```
6947    pub fn set_backup_disaster_recovery<T>(mut self, v: T) -> Self
6948    where
6949        T: std::convert::Into<crate::model::BackupDisasterRecovery>,
6950    {
6951        self.backup_disaster_recovery = std::option::Option::Some(v.into());
6952        self
6953    }
6954
6955    /// Sets or clears the value of [backup_disaster_recovery][crate::model::Finding::backup_disaster_recovery].
6956    ///
6957    /// # Example
6958    /// ```ignore,no_run
6959    /// # use google_cloud_securitycenter_v2::model::Finding;
6960    /// use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
6961    /// let x = Finding::new().set_or_clear_backup_disaster_recovery(Some(BackupDisasterRecovery::default()/* use setters */));
6962    /// let x = Finding::new().set_or_clear_backup_disaster_recovery(None::<BackupDisasterRecovery>);
6963    /// ```
6964    pub fn set_or_clear_backup_disaster_recovery<T>(mut self, v: std::option::Option<T>) -> Self
6965    where
6966        T: std::convert::Into<crate::model::BackupDisasterRecovery>,
6967    {
6968        self.backup_disaster_recovery = v.map(|x| x.into());
6969        self
6970    }
6971
6972    /// Sets the value of [security_posture][crate::model::Finding::security_posture].
6973    ///
6974    /// # Example
6975    /// ```ignore,no_run
6976    /// # use google_cloud_securitycenter_v2::model::Finding;
6977    /// use google_cloud_securitycenter_v2::model::SecurityPosture;
6978    /// let x = Finding::new().set_security_posture(SecurityPosture::default()/* use setters */);
6979    /// ```
6980    pub fn set_security_posture<T>(mut self, v: T) -> Self
6981    where
6982        T: std::convert::Into<crate::model::SecurityPosture>,
6983    {
6984        self.security_posture = std::option::Option::Some(v.into());
6985        self
6986    }
6987
6988    /// Sets or clears the value of [security_posture][crate::model::Finding::security_posture].
6989    ///
6990    /// # Example
6991    /// ```ignore,no_run
6992    /// # use google_cloud_securitycenter_v2::model::Finding;
6993    /// use google_cloud_securitycenter_v2::model::SecurityPosture;
6994    /// let x = Finding::new().set_or_clear_security_posture(Some(SecurityPosture::default()/* use setters */));
6995    /// let x = Finding::new().set_or_clear_security_posture(None::<SecurityPosture>);
6996    /// ```
6997    pub fn set_or_clear_security_posture<T>(mut self, v: std::option::Option<T>) -> Self
6998    where
6999        T: std::convert::Into<crate::model::SecurityPosture>,
7000    {
7001        self.security_posture = v.map(|x| x.into());
7002        self
7003    }
7004
7005    /// Sets the value of [log_entries][crate::model::Finding::log_entries].
7006    ///
7007    /// # Example
7008    /// ```ignore,no_run
7009    /// # use google_cloud_securitycenter_v2::model::Finding;
7010    /// use google_cloud_securitycenter_v2::model::LogEntry;
7011    /// let x = Finding::new()
7012    ///     .set_log_entries([
7013    ///         LogEntry::default()/* use setters */,
7014    ///         LogEntry::default()/* use (different) setters */,
7015    ///     ]);
7016    /// ```
7017    pub fn set_log_entries<T, V>(mut self, v: T) -> Self
7018    where
7019        T: std::iter::IntoIterator<Item = V>,
7020        V: std::convert::Into<crate::model::LogEntry>,
7021    {
7022        use std::iter::Iterator;
7023        self.log_entries = v.into_iter().map(|i| i.into()).collect();
7024        self
7025    }
7026
7027    /// Sets the value of [load_balancers][crate::model::Finding::load_balancers].
7028    ///
7029    /// # Example
7030    /// ```ignore,no_run
7031    /// # use google_cloud_securitycenter_v2::model::Finding;
7032    /// use google_cloud_securitycenter_v2::model::LoadBalancer;
7033    /// let x = Finding::new()
7034    ///     .set_load_balancers([
7035    ///         LoadBalancer::default()/* use setters */,
7036    ///         LoadBalancer::default()/* use (different) setters */,
7037    ///     ]);
7038    /// ```
7039    pub fn set_load_balancers<T, V>(mut self, v: T) -> Self
7040    where
7041        T: std::iter::IntoIterator<Item = V>,
7042        V: std::convert::Into<crate::model::LoadBalancer>,
7043    {
7044        use std::iter::Iterator;
7045        self.load_balancers = v.into_iter().map(|i| i.into()).collect();
7046        self
7047    }
7048
7049    /// Sets the value of [cloud_armor][crate::model::Finding::cloud_armor].
7050    ///
7051    /// # Example
7052    /// ```ignore,no_run
7053    /// # use google_cloud_securitycenter_v2::model::Finding;
7054    /// use google_cloud_securitycenter_v2::model::CloudArmor;
7055    /// let x = Finding::new().set_cloud_armor(CloudArmor::default()/* use setters */);
7056    /// ```
7057    pub fn set_cloud_armor<T>(mut self, v: T) -> Self
7058    where
7059        T: std::convert::Into<crate::model::CloudArmor>,
7060    {
7061        self.cloud_armor = std::option::Option::Some(v.into());
7062        self
7063    }
7064
7065    /// Sets or clears the value of [cloud_armor][crate::model::Finding::cloud_armor].
7066    ///
7067    /// # Example
7068    /// ```ignore,no_run
7069    /// # use google_cloud_securitycenter_v2::model::Finding;
7070    /// use google_cloud_securitycenter_v2::model::CloudArmor;
7071    /// let x = Finding::new().set_or_clear_cloud_armor(Some(CloudArmor::default()/* use setters */));
7072    /// let x = Finding::new().set_or_clear_cloud_armor(None::<CloudArmor>);
7073    /// ```
7074    pub fn set_or_clear_cloud_armor<T>(mut self, v: std::option::Option<T>) -> Self
7075    where
7076        T: std::convert::Into<crate::model::CloudArmor>,
7077    {
7078        self.cloud_armor = v.map(|x| x.into());
7079        self
7080    }
7081
7082    /// Sets the value of [notebook][crate::model::Finding::notebook].
7083    ///
7084    /// # Example
7085    /// ```ignore,no_run
7086    /// # use google_cloud_securitycenter_v2::model::Finding;
7087    /// use google_cloud_securitycenter_v2::model::Notebook;
7088    /// let x = Finding::new().set_notebook(Notebook::default()/* use setters */);
7089    /// ```
7090    pub fn set_notebook<T>(mut self, v: T) -> Self
7091    where
7092        T: std::convert::Into<crate::model::Notebook>,
7093    {
7094        self.notebook = std::option::Option::Some(v.into());
7095        self
7096    }
7097
7098    /// Sets or clears the value of [notebook][crate::model::Finding::notebook].
7099    ///
7100    /// # Example
7101    /// ```ignore,no_run
7102    /// # use google_cloud_securitycenter_v2::model::Finding;
7103    /// use google_cloud_securitycenter_v2::model::Notebook;
7104    /// let x = Finding::new().set_or_clear_notebook(Some(Notebook::default()/* use setters */));
7105    /// let x = Finding::new().set_or_clear_notebook(None::<Notebook>);
7106    /// ```
7107    pub fn set_or_clear_notebook<T>(mut self, v: std::option::Option<T>) -> Self
7108    where
7109        T: std::convert::Into<crate::model::Notebook>,
7110    {
7111        self.notebook = v.map(|x| x.into());
7112        self
7113    }
7114
7115    /// Sets the value of [toxic_combination][crate::model::Finding::toxic_combination].
7116    ///
7117    /// # Example
7118    /// ```ignore,no_run
7119    /// # use google_cloud_securitycenter_v2::model::Finding;
7120    /// use google_cloud_securitycenter_v2::model::ToxicCombination;
7121    /// let x = Finding::new().set_toxic_combination(ToxicCombination::default()/* use setters */);
7122    /// ```
7123    pub fn set_toxic_combination<T>(mut self, v: T) -> Self
7124    where
7125        T: std::convert::Into<crate::model::ToxicCombination>,
7126    {
7127        self.toxic_combination = std::option::Option::Some(v.into());
7128        self
7129    }
7130
7131    /// Sets or clears the value of [toxic_combination][crate::model::Finding::toxic_combination].
7132    ///
7133    /// # Example
7134    /// ```ignore,no_run
7135    /// # use google_cloud_securitycenter_v2::model::Finding;
7136    /// use google_cloud_securitycenter_v2::model::ToxicCombination;
7137    /// let x = Finding::new().set_or_clear_toxic_combination(Some(ToxicCombination::default()/* use setters */));
7138    /// let x = Finding::new().set_or_clear_toxic_combination(None::<ToxicCombination>);
7139    /// ```
7140    pub fn set_or_clear_toxic_combination<T>(mut self, v: std::option::Option<T>) -> Self
7141    where
7142        T: std::convert::Into<crate::model::ToxicCombination>,
7143    {
7144        self.toxic_combination = v.map(|x| x.into());
7145        self
7146    }
7147
7148    /// Sets the value of [group_memberships][crate::model::Finding::group_memberships].
7149    ///
7150    /// # Example
7151    /// ```ignore,no_run
7152    /// # use google_cloud_securitycenter_v2::model::Finding;
7153    /// use google_cloud_securitycenter_v2::model::GroupMembership;
7154    /// let x = Finding::new()
7155    ///     .set_group_memberships([
7156    ///         GroupMembership::default()/* use setters */,
7157    ///         GroupMembership::default()/* use (different) setters */,
7158    ///     ]);
7159    /// ```
7160    pub fn set_group_memberships<T, V>(mut self, v: T) -> Self
7161    where
7162        T: std::iter::IntoIterator<Item = V>,
7163        V: std::convert::Into<crate::model::GroupMembership>,
7164    {
7165        use std::iter::Iterator;
7166        self.group_memberships = v.into_iter().map(|i| i.into()).collect();
7167        self
7168    }
7169
7170    /// Sets the value of [disk][crate::model::Finding::disk].
7171    ///
7172    /// # Example
7173    /// ```ignore,no_run
7174    /// # use google_cloud_securitycenter_v2::model::Finding;
7175    /// use google_cloud_securitycenter_v2::model::Disk;
7176    /// let x = Finding::new().set_disk(Disk::default()/* use setters */);
7177    /// ```
7178    pub fn set_disk<T>(mut self, v: T) -> Self
7179    where
7180        T: std::convert::Into<crate::model::Disk>,
7181    {
7182        self.disk = std::option::Option::Some(v.into());
7183        self
7184    }
7185
7186    /// Sets or clears the value of [disk][crate::model::Finding::disk].
7187    ///
7188    /// # Example
7189    /// ```ignore,no_run
7190    /// # use google_cloud_securitycenter_v2::model::Finding;
7191    /// use google_cloud_securitycenter_v2::model::Disk;
7192    /// let x = Finding::new().set_or_clear_disk(Some(Disk::default()/* use setters */));
7193    /// let x = Finding::new().set_or_clear_disk(None::<Disk>);
7194    /// ```
7195    pub fn set_or_clear_disk<T>(mut self, v: std::option::Option<T>) -> Self
7196    where
7197        T: std::convert::Into<crate::model::Disk>,
7198    {
7199        self.disk = v.map(|x| x.into());
7200        self
7201    }
7202
7203    /// Sets the value of [data_access_events][crate::model::Finding::data_access_events].
7204    ///
7205    /// # Example
7206    /// ```ignore,no_run
7207    /// # use google_cloud_securitycenter_v2::model::Finding;
7208    /// use google_cloud_securitycenter_v2::model::DataAccessEvent;
7209    /// let x = Finding::new()
7210    ///     .set_data_access_events([
7211    ///         DataAccessEvent::default()/* use setters */,
7212    ///         DataAccessEvent::default()/* use (different) setters */,
7213    ///     ]);
7214    /// ```
7215    pub fn set_data_access_events<T, V>(mut self, v: T) -> Self
7216    where
7217        T: std::iter::IntoIterator<Item = V>,
7218        V: std::convert::Into<crate::model::DataAccessEvent>,
7219    {
7220        use std::iter::Iterator;
7221        self.data_access_events = v.into_iter().map(|i| i.into()).collect();
7222        self
7223    }
7224
7225    /// Sets the value of [data_flow_events][crate::model::Finding::data_flow_events].
7226    ///
7227    /// # Example
7228    /// ```ignore,no_run
7229    /// # use google_cloud_securitycenter_v2::model::Finding;
7230    /// use google_cloud_securitycenter_v2::model::DataFlowEvent;
7231    /// let x = Finding::new()
7232    ///     .set_data_flow_events([
7233    ///         DataFlowEvent::default()/* use setters */,
7234    ///         DataFlowEvent::default()/* use (different) setters */,
7235    ///     ]);
7236    /// ```
7237    pub fn set_data_flow_events<T, V>(mut self, v: T) -> Self
7238    where
7239        T: std::iter::IntoIterator<Item = V>,
7240        V: std::convert::Into<crate::model::DataFlowEvent>,
7241    {
7242        use std::iter::Iterator;
7243        self.data_flow_events = v.into_iter().map(|i| i.into()).collect();
7244        self
7245    }
7246
7247    /// Sets the value of [networks][crate::model::Finding::networks].
7248    ///
7249    /// # Example
7250    /// ```ignore,no_run
7251    /// # use google_cloud_securitycenter_v2::model::Finding;
7252    /// use google_cloud_securitycenter_v2::model::Network;
7253    /// let x = Finding::new()
7254    ///     .set_networks([
7255    ///         Network::default()/* use setters */,
7256    ///         Network::default()/* use (different) setters */,
7257    ///     ]);
7258    /// ```
7259    pub fn set_networks<T, V>(mut self, v: T) -> Self
7260    where
7261        T: std::iter::IntoIterator<Item = V>,
7262        V: std::convert::Into<crate::model::Network>,
7263    {
7264        use std::iter::Iterator;
7265        self.networks = v.into_iter().map(|i| i.into()).collect();
7266        self
7267    }
7268
7269    /// Sets the value of [data_retention_deletion_events][crate::model::Finding::data_retention_deletion_events].
7270    ///
7271    /// # Example
7272    /// ```ignore,no_run
7273    /// # use google_cloud_securitycenter_v2::model::Finding;
7274    /// use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
7275    /// let x = Finding::new()
7276    ///     .set_data_retention_deletion_events([
7277    ///         DataRetentionDeletionEvent::default()/* use setters */,
7278    ///         DataRetentionDeletionEvent::default()/* use (different) setters */,
7279    ///     ]);
7280    /// ```
7281    pub fn set_data_retention_deletion_events<T, V>(mut self, v: T) -> Self
7282    where
7283        T: std::iter::IntoIterator<Item = V>,
7284        V: std::convert::Into<crate::model::DataRetentionDeletionEvent>,
7285    {
7286        use std::iter::Iterator;
7287        self.data_retention_deletion_events = v.into_iter().map(|i| i.into()).collect();
7288        self
7289    }
7290
7291    /// Sets the value of [affected_resources][crate::model::Finding::affected_resources].
7292    ///
7293    /// # Example
7294    /// ```ignore,no_run
7295    /// # use google_cloud_securitycenter_v2::model::Finding;
7296    /// use google_cloud_securitycenter_v2::model::AffectedResources;
7297    /// let x = Finding::new().set_affected_resources(AffectedResources::default()/* use setters */);
7298    /// ```
7299    pub fn set_affected_resources<T>(mut self, v: T) -> Self
7300    where
7301        T: std::convert::Into<crate::model::AffectedResources>,
7302    {
7303        self.affected_resources = std::option::Option::Some(v.into());
7304        self
7305    }
7306
7307    /// Sets or clears the value of [affected_resources][crate::model::Finding::affected_resources].
7308    ///
7309    /// # Example
7310    /// ```ignore,no_run
7311    /// # use google_cloud_securitycenter_v2::model::Finding;
7312    /// use google_cloud_securitycenter_v2::model::AffectedResources;
7313    /// let x = Finding::new().set_or_clear_affected_resources(Some(AffectedResources::default()/* use setters */));
7314    /// let x = Finding::new().set_or_clear_affected_resources(None::<AffectedResources>);
7315    /// ```
7316    pub fn set_or_clear_affected_resources<T>(mut self, v: std::option::Option<T>) -> Self
7317    where
7318        T: std::convert::Into<crate::model::AffectedResources>,
7319    {
7320        self.affected_resources = v.map(|x| x.into());
7321        self
7322    }
7323
7324    /// Sets the value of [ai_model][crate::model::Finding::ai_model].
7325    ///
7326    /// # Example
7327    /// ```ignore,no_run
7328    /// # use google_cloud_securitycenter_v2::model::Finding;
7329    /// use google_cloud_securitycenter_v2::model::AiModel;
7330    /// let x = Finding::new().set_ai_model(AiModel::default()/* use setters */);
7331    /// ```
7332    pub fn set_ai_model<T>(mut self, v: T) -> Self
7333    where
7334        T: std::convert::Into<crate::model::AiModel>,
7335    {
7336        self.ai_model = std::option::Option::Some(v.into());
7337        self
7338    }
7339
7340    /// Sets or clears the value of [ai_model][crate::model::Finding::ai_model].
7341    ///
7342    /// # Example
7343    /// ```ignore,no_run
7344    /// # use google_cloud_securitycenter_v2::model::Finding;
7345    /// use google_cloud_securitycenter_v2::model::AiModel;
7346    /// let x = Finding::new().set_or_clear_ai_model(Some(AiModel::default()/* use setters */));
7347    /// let x = Finding::new().set_or_clear_ai_model(None::<AiModel>);
7348    /// ```
7349    pub fn set_or_clear_ai_model<T>(mut self, v: std::option::Option<T>) -> Self
7350    where
7351        T: std::convert::Into<crate::model::AiModel>,
7352    {
7353        self.ai_model = v.map(|x| x.into());
7354        self
7355    }
7356
7357    /// Sets the value of [chokepoint][crate::model::Finding::chokepoint].
7358    ///
7359    /// # Example
7360    /// ```ignore,no_run
7361    /// # use google_cloud_securitycenter_v2::model::Finding;
7362    /// use google_cloud_securitycenter_v2::model::Chokepoint;
7363    /// let x = Finding::new().set_chokepoint(Chokepoint::default()/* use setters */);
7364    /// ```
7365    pub fn set_chokepoint<T>(mut self, v: T) -> Self
7366    where
7367        T: std::convert::Into<crate::model::Chokepoint>,
7368    {
7369        self.chokepoint = std::option::Option::Some(v.into());
7370        self
7371    }
7372
7373    /// Sets or clears the value of [chokepoint][crate::model::Finding::chokepoint].
7374    ///
7375    /// # Example
7376    /// ```ignore,no_run
7377    /// # use google_cloud_securitycenter_v2::model::Finding;
7378    /// use google_cloud_securitycenter_v2::model::Chokepoint;
7379    /// let x = Finding::new().set_or_clear_chokepoint(Some(Chokepoint::default()/* use setters */));
7380    /// let x = Finding::new().set_or_clear_chokepoint(None::<Chokepoint>);
7381    /// ```
7382    pub fn set_or_clear_chokepoint<T>(mut self, v: std::option::Option<T>) -> Self
7383    where
7384        T: std::convert::Into<crate::model::Chokepoint>,
7385    {
7386        self.chokepoint = v.map(|x| x.into());
7387        self
7388    }
7389
7390    /// Sets the value of [vertex_ai][crate::model::Finding::vertex_ai].
7391    ///
7392    /// # Example
7393    /// ```ignore,no_run
7394    /// # use google_cloud_securitycenter_v2::model::Finding;
7395    /// use google_cloud_securitycenter_v2::model::VertexAi;
7396    /// let x = Finding::new().set_vertex_ai(VertexAi::default()/* use setters */);
7397    /// ```
7398    pub fn set_vertex_ai<T>(mut self, v: T) -> Self
7399    where
7400        T: std::convert::Into<crate::model::VertexAi>,
7401    {
7402        self.vertex_ai = std::option::Option::Some(v.into());
7403        self
7404    }
7405
7406    /// Sets or clears the value of [vertex_ai][crate::model::Finding::vertex_ai].
7407    ///
7408    /// # Example
7409    /// ```ignore,no_run
7410    /// # use google_cloud_securitycenter_v2::model::Finding;
7411    /// use google_cloud_securitycenter_v2::model::VertexAi;
7412    /// let x = Finding::new().set_or_clear_vertex_ai(Some(VertexAi::default()/* use setters */));
7413    /// let x = Finding::new().set_or_clear_vertex_ai(None::<VertexAi>);
7414    /// ```
7415    pub fn set_or_clear_vertex_ai<T>(mut self, v: std::option::Option<T>) -> Self
7416    where
7417        T: std::convert::Into<crate::model::VertexAi>,
7418    {
7419        self.vertex_ai = v.map(|x| x.into());
7420        self
7421    }
7422}
7423
7424impl wkt::message::Message for Finding {
7425    fn typename() -> &'static str {
7426        "type.googleapis.com/google.cloud.securitycenter.v2.Finding"
7427    }
7428}
7429
7430/// Defines additional types related to [Finding].
7431pub mod finding {
7432    #[allow(unused_imports)]
7433    use super::*;
7434
7435    /// Mute information about the finding, including whether the finding has a
7436    /// static mute or any matching dynamic mute rules.
7437    #[derive(Clone, Default, PartialEq)]
7438    #[non_exhaustive]
7439    pub struct MuteInfo {
7440        /// If set, the static mute applied to this finding. Static mutes override
7441        /// dynamic mutes. If unset, there is no static mute.
7442        pub static_mute: std::option::Option<crate::model::finding::mute_info::StaticMute>,
7443
7444        /// The list of dynamic mute rules that currently match the finding.
7445        pub dynamic_mute_records:
7446            std::vec::Vec<crate::model::finding::mute_info::DynamicMuteRecord>,
7447
7448        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7449    }
7450
7451    impl MuteInfo {
7452        /// Creates a new default instance.
7453        pub fn new() -> Self {
7454            std::default::Default::default()
7455        }
7456
7457        /// Sets the value of [static_mute][crate::model::finding::MuteInfo::static_mute].
7458        ///
7459        /// # Example
7460        /// ```ignore,no_run
7461        /// # use google_cloud_securitycenter_v2::model::finding::MuteInfo;
7462        /// use google_cloud_securitycenter_v2::model::finding::mute_info::StaticMute;
7463        /// let x = MuteInfo::new().set_static_mute(StaticMute::default()/* use setters */);
7464        /// ```
7465        pub fn set_static_mute<T>(mut self, v: T) -> Self
7466        where
7467            T: std::convert::Into<crate::model::finding::mute_info::StaticMute>,
7468        {
7469            self.static_mute = std::option::Option::Some(v.into());
7470            self
7471        }
7472
7473        /// Sets or clears the value of [static_mute][crate::model::finding::MuteInfo::static_mute].
7474        ///
7475        /// # Example
7476        /// ```ignore,no_run
7477        /// # use google_cloud_securitycenter_v2::model::finding::MuteInfo;
7478        /// use google_cloud_securitycenter_v2::model::finding::mute_info::StaticMute;
7479        /// let x = MuteInfo::new().set_or_clear_static_mute(Some(StaticMute::default()/* use setters */));
7480        /// let x = MuteInfo::new().set_or_clear_static_mute(None::<StaticMute>);
7481        /// ```
7482        pub fn set_or_clear_static_mute<T>(mut self, v: std::option::Option<T>) -> Self
7483        where
7484            T: std::convert::Into<crate::model::finding::mute_info::StaticMute>,
7485        {
7486            self.static_mute = v.map(|x| x.into());
7487            self
7488        }
7489
7490        /// Sets the value of [dynamic_mute_records][crate::model::finding::MuteInfo::dynamic_mute_records].
7491        ///
7492        /// # Example
7493        /// ```ignore,no_run
7494        /// # use google_cloud_securitycenter_v2::model::finding::MuteInfo;
7495        /// use google_cloud_securitycenter_v2::model::finding::mute_info::DynamicMuteRecord;
7496        /// let x = MuteInfo::new()
7497        ///     .set_dynamic_mute_records([
7498        ///         DynamicMuteRecord::default()/* use setters */,
7499        ///         DynamicMuteRecord::default()/* use (different) setters */,
7500        ///     ]);
7501        /// ```
7502        pub fn set_dynamic_mute_records<T, V>(mut self, v: T) -> Self
7503        where
7504            T: std::iter::IntoIterator<Item = V>,
7505            V: std::convert::Into<crate::model::finding::mute_info::DynamicMuteRecord>,
7506        {
7507            use std::iter::Iterator;
7508            self.dynamic_mute_records = v.into_iter().map(|i| i.into()).collect();
7509            self
7510        }
7511    }
7512
7513    impl wkt::message::Message for MuteInfo {
7514        fn typename() -> &'static str {
7515            "type.googleapis.com/google.cloud.securitycenter.v2.Finding.MuteInfo"
7516        }
7517    }
7518
7519    /// Defines additional types related to [MuteInfo].
7520    pub mod mute_info {
7521        #[allow(unused_imports)]
7522        use super::*;
7523
7524        /// Information about the static mute state. A static mute state overrides
7525        /// any dynamic mute rules that apply to this finding. The static mute state
7526        /// can be set by a static mute rule or by muting the finding directly.
7527        #[derive(Clone, Default, PartialEq)]
7528        #[non_exhaustive]
7529        pub struct StaticMute {
7530            /// The static mute state. If the value is `MUTED` or `UNMUTED`, then the
7531            /// finding's overall mute state will have the same value.
7532            pub state: crate::model::finding::Mute,
7533
7534            /// When the static mute was applied.
7535            pub apply_time: std::option::Option<wkt::Timestamp>,
7536
7537            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7538        }
7539
7540        impl StaticMute {
7541            /// Creates a new default instance.
7542            pub fn new() -> Self {
7543                std::default::Default::default()
7544            }
7545
7546            /// Sets the value of [state][crate::model::finding::mute_info::StaticMute::state].
7547            ///
7548            /// # Example
7549            /// ```ignore,no_run
7550            /// # use google_cloud_securitycenter_v2::model::finding::mute_info::StaticMute;
7551            /// use google_cloud_securitycenter_v2::model::finding::Mute;
7552            /// let x0 = StaticMute::new().set_state(Mute::Muted);
7553            /// let x1 = StaticMute::new().set_state(Mute::Unmuted);
7554            /// let x2 = StaticMute::new().set_state(Mute::Undefined);
7555            /// ```
7556            pub fn set_state<T: std::convert::Into<crate::model::finding::Mute>>(
7557                mut self,
7558                v: T,
7559            ) -> Self {
7560                self.state = v.into();
7561                self
7562            }
7563
7564            /// Sets the value of [apply_time][crate::model::finding::mute_info::StaticMute::apply_time].
7565            ///
7566            /// # Example
7567            /// ```ignore,no_run
7568            /// # use google_cloud_securitycenter_v2::model::finding::mute_info::StaticMute;
7569            /// use wkt::Timestamp;
7570            /// let x = StaticMute::new().set_apply_time(Timestamp::default()/* use setters */);
7571            /// ```
7572            pub fn set_apply_time<T>(mut self, v: T) -> Self
7573            where
7574                T: std::convert::Into<wkt::Timestamp>,
7575            {
7576                self.apply_time = std::option::Option::Some(v.into());
7577                self
7578            }
7579
7580            /// Sets or clears the value of [apply_time][crate::model::finding::mute_info::StaticMute::apply_time].
7581            ///
7582            /// # Example
7583            /// ```ignore,no_run
7584            /// # use google_cloud_securitycenter_v2::model::finding::mute_info::StaticMute;
7585            /// use wkt::Timestamp;
7586            /// let x = StaticMute::new().set_or_clear_apply_time(Some(Timestamp::default()/* use setters */));
7587            /// let x = StaticMute::new().set_or_clear_apply_time(None::<Timestamp>);
7588            /// ```
7589            pub fn set_or_clear_apply_time<T>(mut self, v: std::option::Option<T>) -> Self
7590            where
7591                T: std::convert::Into<wkt::Timestamp>,
7592            {
7593                self.apply_time = v.map(|x| x.into());
7594                self
7595            }
7596        }
7597
7598        impl wkt::message::Message for StaticMute {
7599            fn typename() -> &'static str {
7600                "type.googleapis.com/google.cloud.securitycenter.v2.Finding.MuteInfo.StaticMute"
7601            }
7602        }
7603
7604        /// The record of a dynamic mute rule that matches the finding.
7605        #[derive(Clone, Default, PartialEq)]
7606        #[non_exhaustive]
7607        pub struct DynamicMuteRecord {
7608            /// The relative resource name of the mute rule, represented by a mute
7609            /// config, that created this record, for example
7610            /// `organizations/123/muteConfigs/mymuteconfig` or
7611            /// `organizations/123/locations/global/muteConfigs/mymuteconfig`.
7612            pub mute_config: std::string::String,
7613
7614            /// When the dynamic mute rule first matched the finding.
7615            pub match_time: std::option::Option<wkt::Timestamp>,
7616
7617            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7618        }
7619
7620        impl DynamicMuteRecord {
7621            /// Creates a new default instance.
7622            pub fn new() -> Self {
7623                std::default::Default::default()
7624            }
7625
7626            /// Sets the value of [mute_config][crate::model::finding::mute_info::DynamicMuteRecord::mute_config].
7627            ///
7628            /// # Example
7629            /// ```ignore,no_run
7630            /// # use google_cloud_securitycenter_v2::model::finding::mute_info::DynamicMuteRecord;
7631            /// let x = DynamicMuteRecord::new().set_mute_config("example");
7632            /// ```
7633            pub fn set_mute_config<T: std::convert::Into<std::string::String>>(
7634                mut self,
7635                v: T,
7636            ) -> Self {
7637                self.mute_config = v.into();
7638                self
7639            }
7640
7641            /// Sets the value of [match_time][crate::model::finding::mute_info::DynamicMuteRecord::match_time].
7642            ///
7643            /// # Example
7644            /// ```ignore,no_run
7645            /// # use google_cloud_securitycenter_v2::model::finding::mute_info::DynamicMuteRecord;
7646            /// use wkt::Timestamp;
7647            /// let x = DynamicMuteRecord::new().set_match_time(Timestamp::default()/* use setters */);
7648            /// ```
7649            pub fn set_match_time<T>(mut self, v: T) -> Self
7650            where
7651                T: std::convert::Into<wkt::Timestamp>,
7652            {
7653                self.match_time = std::option::Option::Some(v.into());
7654                self
7655            }
7656
7657            /// Sets or clears the value of [match_time][crate::model::finding::mute_info::DynamicMuteRecord::match_time].
7658            ///
7659            /// # Example
7660            /// ```ignore,no_run
7661            /// # use google_cloud_securitycenter_v2::model::finding::mute_info::DynamicMuteRecord;
7662            /// use wkt::Timestamp;
7663            /// let x = DynamicMuteRecord::new().set_or_clear_match_time(Some(Timestamp::default()/* use setters */));
7664            /// let x = DynamicMuteRecord::new().set_or_clear_match_time(None::<Timestamp>);
7665            /// ```
7666            pub fn set_or_clear_match_time<T>(mut self, v: std::option::Option<T>) -> Self
7667            where
7668                T: std::convert::Into<wkt::Timestamp>,
7669            {
7670                self.match_time = v.map(|x| x.into());
7671                self
7672            }
7673        }
7674
7675        impl wkt::message::Message for DynamicMuteRecord {
7676            fn typename() -> &'static str {
7677                "type.googleapis.com/google.cloud.securitycenter.v2.Finding.MuteInfo.DynamicMuteRecord"
7678            }
7679        }
7680    }
7681
7682    /// The state of the finding.
7683    ///
7684    /// # Working with unknown values
7685    ///
7686    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7687    /// additional enum variants at any time. Adding new variants is not considered
7688    /// a breaking change. Applications should write their code in anticipation of:
7689    ///
7690    /// - New values appearing in future releases of the client library, **and**
7691    /// - New values received dynamically, without application changes.
7692    ///
7693    /// Please consult the [Working with enums] section in the user guide for some
7694    /// guidelines.
7695    ///
7696    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
7697    #[derive(Clone, Debug, PartialEq)]
7698    #[non_exhaustive]
7699    pub enum State {
7700        /// Unspecified state.
7701        Unspecified,
7702        /// The finding requires attention and has not been addressed yet.
7703        Active,
7704        /// The finding has been fixed, triaged as a non-issue or otherwise addressed
7705        /// and is no longer active.
7706        Inactive,
7707        /// If set, the enum was initialized with an unknown value.
7708        ///
7709        /// Applications can examine the value using [State::value] or
7710        /// [State::name].
7711        UnknownValue(state::UnknownValue),
7712    }
7713
7714    #[doc(hidden)]
7715    pub mod state {
7716        #[allow(unused_imports)]
7717        use super::*;
7718        #[derive(Clone, Debug, PartialEq)]
7719        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7720    }
7721
7722    impl State {
7723        /// Gets the enum value.
7724        ///
7725        /// Returns `None` if the enum contains an unknown value deserialized from
7726        /// the string representation of enums.
7727        pub fn value(&self) -> std::option::Option<i32> {
7728            match self {
7729                Self::Unspecified => std::option::Option::Some(0),
7730                Self::Active => std::option::Option::Some(1),
7731                Self::Inactive => std::option::Option::Some(2),
7732                Self::UnknownValue(u) => u.0.value(),
7733            }
7734        }
7735
7736        /// Gets the enum value as a string.
7737        ///
7738        /// Returns `None` if the enum contains an unknown value deserialized from
7739        /// the integer representation of enums.
7740        pub fn name(&self) -> std::option::Option<&str> {
7741            match self {
7742                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
7743                Self::Active => std::option::Option::Some("ACTIVE"),
7744                Self::Inactive => std::option::Option::Some("INACTIVE"),
7745                Self::UnknownValue(u) => u.0.name(),
7746            }
7747        }
7748    }
7749
7750    impl std::default::Default for State {
7751        fn default() -> Self {
7752            use std::convert::From;
7753            Self::from(0)
7754        }
7755    }
7756
7757    impl std::fmt::Display for State {
7758        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7759            wkt::internal::display_enum(f, self.name(), self.value())
7760        }
7761    }
7762
7763    impl std::convert::From<i32> for State {
7764        fn from(value: i32) -> Self {
7765            match value {
7766                0 => Self::Unspecified,
7767                1 => Self::Active,
7768                2 => Self::Inactive,
7769                _ => Self::UnknownValue(state::UnknownValue(
7770                    wkt::internal::UnknownEnumValue::Integer(value),
7771                )),
7772            }
7773        }
7774    }
7775
7776    impl std::convert::From<&str> for State {
7777        fn from(value: &str) -> Self {
7778            use std::string::ToString;
7779            match value {
7780                "STATE_UNSPECIFIED" => Self::Unspecified,
7781                "ACTIVE" => Self::Active,
7782                "INACTIVE" => Self::Inactive,
7783                _ => Self::UnknownValue(state::UnknownValue(
7784                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7785                )),
7786            }
7787        }
7788    }
7789
7790    impl serde::ser::Serialize for State {
7791        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7792        where
7793            S: serde::Serializer,
7794        {
7795            match self {
7796                Self::Unspecified => serializer.serialize_i32(0),
7797                Self::Active => serializer.serialize_i32(1),
7798                Self::Inactive => serializer.serialize_i32(2),
7799                Self::UnknownValue(u) => u.0.serialize(serializer),
7800            }
7801        }
7802    }
7803
7804    impl<'de> serde::de::Deserialize<'de> for State {
7805        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7806        where
7807            D: serde::Deserializer<'de>,
7808        {
7809            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
7810                ".google.cloud.securitycenter.v2.Finding.State",
7811            ))
7812        }
7813    }
7814
7815    /// The severity of the finding.
7816    ///
7817    /// # Working with unknown values
7818    ///
7819    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7820    /// additional enum variants at any time. Adding new variants is not considered
7821    /// a breaking change. Applications should write their code in anticipation of:
7822    ///
7823    /// - New values appearing in future releases of the client library, **and**
7824    /// - New values received dynamically, without application changes.
7825    ///
7826    /// Please consult the [Working with enums] section in the user guide for some
7827    /// guidelines.
7828    ///
7829    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
7830    #[derive(Clone, Debug, PartialEq)]
7831    #[non_exhaustive]
7832    pub enum Severity {
7833        /// This value is used for findings when a source doesn't write a severity
7834        /// value.
7835        Unspecified,
7836        /// Vulnerability:
7837        /// A critical vulnerability is easily discoverable by an external actor,
7838        /// exploitable, and results in the direct ability to execute arbitrary code,
7839        /// exfiltrate data, and otherwise gain additional access and privileges to
7840        /// cloud resources and workloads. Examples include publicly accessible
7841        /// unprotected user data and public SSH access with weak or no
7842        /// passwords.
7843        ///
7844        /// Threat:
7845        /// Indicates a threat that is able to access, modify, or delete data or
7846        /// execute unauthorized code within existing resources.
7847        Critical,
7848        /// Vulnerability:
7849        /// A high risk vulnerability can be easily discovered and exploited in
7850        /// combination with other vulnerabilities in order to gain direct access and
7851        /// the ability to execute arbitrary code, exfiltrate data, and otherwise
7852        /// gain additional access and privileges to cloud resources and workloads.
7853        /// An example is a database with weak or no passwords that is only
7854        /// accessible internally. This database could easily be compromised by an
7855        /// actor that had access to the internal network.
7856        ///
7857        /// Threat:
7858        /// Indicates a threat that is able to create new computational resources in
7859        /// an environment but not able to access data or execute code in existing
7860        /// resources.
7861        High,
7862        /// Vulnerability:
7863        /// A medium risk vulnerability could be used by an actor to gain access to
7864        /// resources or privileges that enable them to eventually (through multiple
7865        /// steps or a complex exploit) gain access and the ability to execute
7866        /// arbitrary code or exfiltrate data. An example is a service account with
7867        /// access to more projects than it should have. If an actor gains access to
7868        /// the service account, they could potentially use that access to manipulate
7869        /// a project the service account was not intended to.
7870        ///
7871        /// Threat:
7872        /// Indicates a threat that is able to cause operational impact but may not
7873        /// access data or execute unauthorized code.
7874        Medium,
7875        /// Vulnerability:
7876        /// A low risk vulnerability hampers a security organization's ability to
7877        /// detect vulnerabilities or active threats in their deployment, or prevents
7878        /// the root cause investigation of security issues. An example is monitoring
7879        /// and logs being disabled for resource configurations and access.
7880        ///
7881        /// Threat:
7882        /// Indicates a threat that has obtained minimal access to an environment but
7883        /// is not able to access data, execute code, or create resources.
7884        Low,
7885        /// If set, the enum was initialized with an unknown value.
7886        ///
7887        /// Applications can examine the value using [Severity::value] or
7888        /// [Severity::name].
7889        UnknownValue(severity::UnknownValue),
7890    }
7891
7892    #[doc(hidden)]
7893    pub mod severity {
7894        #[allow(unused_imports)]
7895        use super::*;
7896        #[derive(Clone, Debug, PartialEq)]
7897        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7898    }
7899
7900    impl Severity {
7901        /// Gets the enum value.
7902        ///
7903        /// Returns `None` if the enum contains an unknown value deserialized from
7904        /// the string representation of enums.
7905        pub fn value(&self) -> std::option::Option<i32> {
7906            match self {
7907                Self::Unspecified => std::option::Option::Some(0),
7908                Self::Critical => std::option::Option::Some(1),
7909                Self::High => std::option::Option::Some(2),
7910                Self::Medium => std::option::Option::Some(3),
7911                Self::Low => std::option::Option::Some(4),
7912                Self::UnknownValue(u) => u.0.value(),
7913            }
7914        }
7915
7916        /// Gets the enum value as a string.
7917        ///
7918        /// Returns `None` if the enum contains an unknown value deserialized from
7919        /// the integer representation of enums.
7920        pub fn name(&self) -> std::option::Option<&str> {
7921            match self {
7922                Self::Unspecified => std::option::Option::Some("SEVERITY_UNSPECIFIED"),
7923                Self::Critical => std::option::Option::Some("CRITICAL"),
7924                Self::High => std::option::Option::Some("HIGH"),
7925                Self::Medium => std::option::Option::Some("MEDIUM"),
7926                Self::Low => std::option::Option::Some("LOW"),
7927                Self::UnknownValue(u) => u.0.name(),
7928            }
7929        }
7930    }
7931
7932    impl std::default::Default for Severity {
7933        fn default() -> Self {
7934            use std::convert::From;
7935            Self::from(0)
7936        }
7937    }
7938
7939    impl std::fmt::Display for Severity {
7940        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7941            wkt::internal::display_enum(f, self.name(), self.value())
7942        }
7943    }
7944
7945    impl std::convert::From<i32> for Severity {
7946        fn from(value: i32) -> Self {
7947            match value {
7948                0 => Self::Unspecified,
7949                1 => Self::Critical,
7950                2 => Self::High,
7951                3 => Self::Medium,
7952                4 => Self::Low,
7953                _ => Self::UnknownValue(severity::UnknownValue(
7954                    wkt::internal::UnknownEnumValue::Integer(value),
7955                )),
7956            }
7957        }
7958    }
7959
7960    impl std::convert::From<&str> for Severity {
7961        fn from(value: &str) -> Self {
7962            use std::string::ToString;
7963            match value {
7964                "SEVERITY_UNSPECIFIED" => Self::Unspecified,
7965                "CRITICAL" => Self::Critical,
7966                "HIGH" => Self::High,
7967                "MEDIUM" => Self::Medium,
7968                "LOW" => Self::Low,
7969                _ => Self::UnknownValue(severity::UnknownValue(
7970                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7971                )),
7972            }
7973        }
7974    }
7975
7976    impl serde::ser::Serialize for Severity {
7977        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7978        where
7979            S: serde::Serializer,
7980        {
7981            match self {
7982                Self::Unspecified => serializer.serialize_i32(0),
7983                Self::Critical => serializer.serialize_i32(1),
7984                Self::High => serializer.serialize_i32(2),
7985                Self::Medium => serializer.serialize_i32(3),
7986                Self::Low => serializer.serialize_i32(4),
7987                Self::UnknownValue(u) => u.0.serialize(serializer),
7988            }
7989        }
7990    }
7991
7992    impl<'de> serde::de::Deserialize<'de> for Severity {
7993        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7994        where
7995            D: serde::Deserializer<'de>,
7996        {
7997            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Severity>::new(
7998                ".google.cloud.securitycenter.v2.Finding.Severity",
7999            ))
8000        }
8001    }
8002
8003    /// Mute state a finding can be in.
8004    ///
8005    /// # Working with unknown values
8006    ///
8007    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8008    /// additional enum variants at any time. Adding new variants is not considered
8009    /// a breaking change. Applications should write their code in anticipation of:
8010    ///
8011    /// - New values appearing in future releases of the client library, **and**
8012    /// - New values received dynamically, without application changes.
8013    ///
8014    /// Please consult the [Working with enums] section in the user guide for some
8015    /// guidelines.
8016    ///
8017    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
8018    #[derive(Clone, Debug, PartialEq)]
8019    #[non_exhaustive]
8020    pub enum Mute {
8021        /// Unspecified.
8022        Unspecified,
8023        /// Finding has been muted.
8024        Muted,
8025        /// Finding has been unmuted.
8026        Unmuted,
8027        /// Finding has never been muted/unmuted.
8028        Undefined,
8029        /// If set, the enum was initialized with an unknown value.
8030        ///
8031        /// Applications can examine the value using [Mute::value] or
8032        /// [Mute::name].
8033        UnknownValue(mute::UnknownValue),
8034    }
8035
8036    #[doc(hidden)]
8037    pub mod mute {
8038        #[allow(unused_imports)]
8039        use super::*;
8040        #[derive(Clone, Debug, PartialEq)]
8041        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8042    }
8043
8044    impl Mute {
8045        /// Gets the enum value.
8046        ///
8047        /// Returns `None` if the enum contains an unknown value deserialized from
8048        /// the string representation of enums.
8049        pub fn value(&self) -> std::option::Option<i32> {
8050            match self {
8051                Self::Unspecified => std::option::Option::Some(0),
8052                Self::Muted => std::option::Option::Some(1),
8053                Self::Unmuted => std::option::Option::Some(2),
8054                Self::Undefined => std::option::Option::Some(3),
8055                Self::UnknownValue(u) => u.0.value(),
8056            }
8057        }
8058
8059        /// Gets the enum value as a string.
8060        ///
8061        /// Returns `None` if the enum contains an unknown value deserialized from
8062        /// the integer representation of enums.
8063        pub fn name(&self) -> std::option::Option<&str> {
8064            match self {
8065                Self::Unspecified => std::option::Option::Some("MUTE_UNSPECIFIED"),
8066                Self::Muted => std::option::Option::Some("MUTED"),
8067                Self::Unmuted => std::option::Option::Some("UNMUTED"),
8068                Self::Undefined => std::option::Option::Some("UNDEFINED"),
8069                Self::UnknownValue(u) => u.0.name(),
8070            }
8071        }
8072    }
8073
8074    impl std::default::Default for Mute {
8075        fn default() -> Self {
8076            use std::convert::From;
8077            Self::from(0)
8078        }
8079    }
8080
8081    impl std::fmt::Display for Mute {
8082        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8083            wkt::internal::display_enum(f, self.name(), self.value())
8084        }
8085    }
8086
8087    impl std::convert::From<i32> for Mute {
8088        fn from(value: i32) -> Self {
8089            match value {
8090                0 => Self::Unspecified,
8091                1 => Self::Muted,
8092                2 => Self::Unmuted,
8093                3 => Self::Undefined,
8094                _ => Self::UnknownValue(mute::UnknownValue(
8095                    wkt::internal::UnknownEnumValue::Integer(value),
8096                )),
8097            }
8098        }
8099    }
8100
8101    impl std::convert::From<&str> for Mute {
8102        fn from(value: &str) -> Self {
8103            use std::string::ToString;
8104            match value {
8105                "MUTE_UNSPECIFIED" => Self::Unspecified,
8106                "MUTED" => Self::Muted,
8107                "UNMUTED" => Self::Unmuted,
8108                "UNDEFINED" => Self::Undefined,
8109                _ => Self::UnknownValue(mute::UnknownValue(
8110                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8111                )),
8112            }
8113        }
8114    }
8115
8116    impl serde::ser::Serialize for Mute {
8117        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8118        where
8119            S: serde::Serializer,
8120        {
8121            match self {
8122                Self::Unspecified => serializer.serialize_i32(0),
8123                Self::Muted => serializer.serialize_i32(1),
8124                Self::Unmuted => serializer.serialize_i32(2),
8125                Self::Undefined => serializer.serialize_i32(3),
8126                Self::UnknownValue(u) => u.0.serialize(serializer),
8127            }
8128        }
8129    }
8130
8131    impl<'de> serde::de::Deserialize<'de> for Mute {
8132        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8133        where
8134            D: serde::Deserializer<'de>,
8135        {
8136            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mute>::new(
8137                ".google.cloud.securitycenter.v2.Finding.Mute",
8138            ))
8139        }
8140    }
8141
8142    /// Represents what kind of Finding it is.
8143    ///
8144    /// # Working with unknown values
8145    ///
8146    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8147    /// additional enum variants at any time. Adding new variants is not considered
8148    /// a breaking change. Applications should write their code in anticipation of:
8149    ///
8150    /// - New values appearing in future releases of the client library, **and**
8151    /// - New values received dynamically, without application changes.
8152    ///
8153    /// Please consult the [Working with enums] section in the user guide for some
8154    /// guidelines.
8155    ///
8156    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
8157    #[derive(Clone, Debug, PartialEq)]
8158    #[non_exhaustive]
8159    pub enum FindingClass {
8160        /// Unspecified finding class.
8161        Unspecified,
8162        /// Describes unwanted or malicious activity.
8163        Threat,
8164        /// Describes a potential weakness in software that increases risk to
8165        /// Confidentiality & Integrity & Availability.
8166        Vulnerability,
8167        /// Describes a potential weakness in cloud resource/asset configuration that
8168        /// increases risk.
8169        Misconfiguration,
8170        /// Describes a security observation that is for informational purposes.
8171        Observation,
8172        /// Describes an error that prevents some SCC functionality.
8173        SccError,
8174        /// Describes a potential security risk due to a change in the security
8175        /// posture.
8176        PostureViolation,
8177        /// Describes a combination of security issues that represent a more severe
8178        /// security problem when taken together.
8179        ToxicCombination,
8180        /// Describes a potential security risk to data assets that contain sensitive
8181        /// data.
8182        SensitiveDataRisk,
8183        /// Describes a resource or resource group where high risk attack paths
8184        /// converge, based on attack path simulations (APS).
8185        Chokepoint,
8186        /// If set, the enum was initialized with an unknown value.
8187        ///
8188        /// Applications can examine the value using [FindingClass::value] or
8189        /// [FindingClass::name].
8190        UnknownValue(finding_class::UnknownValue),
8191    }
8192
8193    #[doc(hidden)]
8194    pub mod finding_class {
8195        #[allow(unused_imports)]
8196        use super::*;
8197        #[derive(Clone, Debug, PartialEq)]
8198        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8199    }
8200
8201    impl FindingClass {
8202        /// Gets the enum value.
8203        ///
8204        /// Returns `None` if the enum contains an unknown value deserialized from
8205        /// the string representation of enums.
8206        pub fn value(&self) -> std::option::Option<i32> {
8207            match self {
8208                Self::Unspecified => std::option::Option::Some(0),
8209                Self::Threat => std::option::Option::Some(1),
8210                Self::Vulnerability => std::option::Option::Some(2),
8211                Self::Misconfiguration => std::option::Option::Some(3),
8212                Self::Observation => std::option::Option::Some(4),
8213                Self::SccError => std::option::Option::Some(5),
8214                Self::PostureViolation => std::option::Option::Some(6),
8215                Self::ToxicCombination => std::option::Option::Some(7),
8216                Self::SensitiveDataRisk => std::option::Option::Some(8),
8217                Self::Chokepoint => std::option::Option::Some(9),
8218                Self::UnknownValue(u) => u.0.value(),
8219            }
8220        }
8221
8222        /// Gets the enum value as a string.
8223        ///
8224        /// Returns `None` if the enum contains an unknown value deserialized from
8225        /// the integer representation of enums.
8226        pub fn name(&self) -> std::option::Option<&str> {
8227            match self {
8228                Self::Unspecified => std::option::Option::Some("FINDING_CLASS_UNSPECIFIED"),
8229                Self::Threat => std::option::Option::Some("THREAT"),
8230                Self::Vulnerability => std::option::Option::Some("VULNERABILITY"),
8231                Self::Misconfiguration => std::option::Option::Some("MISCONFIGURATION"),
8232                Self::Observation => std::option::Option::Some("OBSERVATION"),
8233                Self::SccError => std::option::Option::Some("SCC_ERROR"),
8234                Self::PostureViolation => std::option::Option::Some("POSTURE_VIOLATION"),
8235                Self::ToxicCombination => std::option::Option::Some("TOXIC_COMBINATION"),
8236                Self::SensitiveDataRisk => std::option::Option::Some("SENSITIVE_DATA_RISK"),
8237                Self::Chokepoint => std::option::Option::Some("CHOKEPOINT"),
8238                Self::UnknownValue(u) => u.0.name(),
8239            }
8240        }
8241    }
8242
8243    impl std::default::Default for FindingClass {
8244        fn default() -> Self {
8245            use std::convert::From;
8246            Self::from(0)
8247        }
8248    }
8249
8250    impl std::fmt::Display for FindingClass {
8251        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8252            wkt::internal::display_enum(f, self.name(), self.value())
8253        }
8254    }
8255
8256    impl std::convert::From<i32> for FindingClass {
8257        fn from(value: i32) -> Self {
8258            match value {
8259                0 => Self::Unspecified,
8260                1 => Self::Threat,
8261                2 => Self::Vulnerability,
8262                3 => Self::Misconfiguration,
8263                4 => Self::Observation,
8264                5 => Self::SccError,
8265                6 => Self::PostureViolation,
8266                7 => Self::ToxicCombination,
8267                8 => Self::SensitiveDataRisk,
8268                9 => Self::Chokepoint,
8269                _ => Self::UnknownValue(finding_class::UnknownValue(
8270                    wkt::internal::UnknownEnumValue::Integer(value),
8271                )),
8272            }
8273        }
8274    }
8275
8276    impl std::convert::From<&str> for FindingClass {
8277        fn from(value: &str) -> Self {
8278            use std::string::ToString;
8279            match value {
8280                "FINDING_CLASS_UNSPECIFIED" => Self::Unspecified,
8281                "THREAT" => Self::Threat,
8282                "VULNERABILITY" => Self::Vulnerability,
8283                "MISCONFIGURATION" => Self::Misconfiguration,
8284                "OBSERVATION" => Self::Observation,
8285                "SCC_ERROR" => Self::SccError,
8286                "POSTURE_VIOLATION" => Self::PostureViolation,
8287                "TOXIC_COMBINATION" => Self::ToxicCombination,
8288                "SENSITIVE_DATA_RISK" => Self::SensitiveDataRisk,
8289                "CHOKEPOINT" => Self::Chokepoint,
8290                _ => Self::UnknownValue(finding_class::UnknownValue(
8291                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8292                )),
8293            }
8294        }
8295    }
8296
8297    impl serde::ser::Serialize for FindingClass {
8298        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8299        where
8300            S: serde::Serializer,
8301        {
8302            match self {
8303                Self::Unspecified => serializer.serialize_i32(0),
8304                Self::Threat => serializer.serialize_i32(1),
8305                Self::Vulnerability => serializer.serialize_i32(2),
8306                Self::Misconfiguration => serializer.serialize_i32(3),
8307                Self::Observation => serializer.serialize_i32(4),
8308                Self::SccError => serializer.serialize_i32(5),
8309                Self::PostureViolation => serializer.serialize_i32(6),
8310                Self::ToxicCombination => serializer.serialize_i32(7),
8311                Self::SensitiveDataRisk => serializer.serialize_i32(8),
8312                Self::Chokepoint => serializer.serialize_i32(9),
8313                Self::UnknownValue(u) => u.0.serialize(serializer),
8314            }
8315        }
8316    }
8317
8318    impl<'de> serde::de::Deserialize<'de> for FindingClass {
8319        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8320        where
8321            D: serde::Deserializer<'de>,
8322        {
8323            deserializer.deserialize_any(wkt::internal::EnumVisitor::<FindingClass>::new(
8324                ".google.cloud.securitycenter.v2.Finding.FindingClass",
8325            ))
8326        }
8327    }
8328}
8329
8330/// Message that contains the resource name and display name of a folder
8331/// resource.
8332#[derive(Clone, Default, PartialEq)]
8333#[non_exhaustive]
8334pub struct Folder {
8335    /// Full resource name of this folder. See:
8336    /// <https://cloud.google.com/apis/design/resource_names#full_resource_name>
8337    pub resource_folder: std::string::String,
8338
8339    /// The user defined display name for this folder.
8340    pub resource_folder_display_name: std::string::String,
8341
8342    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8343}
8344
8345impl Folder {
8346    /// Creates a new default instance.
8347    pub fn new() -> Self {
8348        std::default::Default::default()
8349    }
8350
8351    /// Sets the value of [resource_folder][crate::model::Folder::resource_folder].
8352    ///
8353    /// # Example
8354    /// ```ignore,no_run
8355    /// # use google_cloud_securitycenter_v2::model::Folder;
8356    /// let x = Folder::new().set_resource_folder("example");
8357    /// ```
8358    pub fn set_resource_folder<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8359        self.resource_folder = v.into();
8360        self
8361    }
8362
8363    /// Sets the value of [resource_folder_display_name][crate::model::Folder::resource_folder_display_name].
8364    ///
8365    /// # Example
8366    /// ```ignore,no_run
8367    /// # use google_cloud_securitycenter_v2::model::Folder;
8368    /// let x = Folder::new().set_resource_folder_display_name("example");
8369    /// ```
8370    pub fn set_resource_folder_display_name<T: std::convert::Into<std::string::String>>(
8371        mut self,
8372        v: T,
8373    ) -> Self {
8374        self.resource_folder_display_name = v.into();
8375        self
8376    }
8377}
8378
8379impl wkt::message::Message for Folder {
8380    fn typename() -> &'static str {
8381        "type.googleapis.com/google.cloud.securitycenter.v2.Folder"
8382    }
8383}
8384
8385/// Contains details about groups of which this finding is a member. A group is a
8386/// collection of findings that are related in some way.
8387#[derive(Clone, Default, PartialEq)]
8388#[non_exhaustive]
8389pub struct GroupMembership {
8390    /// Type of group.
8391    pub group_type: crate::model::group_membership::GroupType,
8392
8393    /// ID of the group.
8394    pub group_id: std::string::String,
8395
8396    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8397}
8398
8399impl GroupMembership {
8400    /// Creates a new default instance.
8401    pub fn new() -> Self {
8402        std::default::Default::default()
8403    }
8404
8405    /// Sets the value of [group_type][crate::model::GroupMembership::group_type].
8406    ///
8407    /// # Example
8408    /// ```ignore,no_run
8409    /// # use google_cloud_securitycenter_v2::model::GroupMembership;
8410    /// use google_cloud_securitycenter_v2::model::group_membership::GroupType;
8411    /// let x0 = GroupMembership::new().set_group_type(GroupType::ToxicCombination);
8412    /// let x1 = GroupMembership::new().set_group_type(GroupType::Chokepoint);
8413    /// ```
8414    pub fn set_group_type<T: std::convert::Into<crate::model::group_membership::GroupType>>(
8415        mut self,
8416        v: T,
8417    ) -> Self {
8418        self.group_type = v.into();
8419        self
8420    }
8421
8422    /// Sets the value of [group_id][crate::model::GroupMembership::group_id].
8423    ///
8424    /// # Example
8425    /// ```ignore,no_run
8426    /// # use google_cloud_securitycenter_v2::model::GroupMembership;
8427    /// let x = GroupMembership::new().set_group_id("example");
8428    /// ```
8429    pub fn set_group_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8430        self.group_id = v.into();
8431        self
8432    }
8433}
8434
8435impl wkt::message::Message for GroupMembership {
8436    fn typename() -> &'static str {
8437        "type.googleapis.com/google.cloud.securitycenter.v2.GroupMembership"
8438    }
8439}
8440
8441/// Defines additional types related to [GroupMembership].
8442pub mod group_membership {
8443    #[allow(unused_imports)]
8444    use super::*;
8445
8446    /// Possible types of groups.
8447    ///
8448    /// # Working with unknown values
8449    ///
8450    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8451    /// additional enum variants at any time. Adding new variants is not considered
8452    /// a breaking change. Applications should write their code in anticipation of:
8453    ///
8454    /// - New values appearing in future releases of the client library, **and**
8455    /// - New values received dynamically, without application changes.
8456    ///
8457    /// Please consult the [Working with enums] section in the user guide for some
8458    /// guidelines.
8459    ///
8460    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
8461    #[derive(Clone, Debug, PartialEq)]
8462    #[non_exhaustive]
8463    pub enum GroupType {
8464        /// Default value.
8465        Unspecified,
8466        /// Group represents a toxic combination.
8467        ToxicCombination,
8468        /// Group represents a chokepoint.
8469        Chokepoint,
8470        /// If set, the enum was initialized with an unknown value.
8471        ///
8472        /// Applications can examine the value using [GroupType::value] or
8473        /// [GroupType::name].
8474        UnknownValue(group_type::UnknownValue),
8475    }
8476
8477    #[doc(hidden)]
8478    pub mod group_type {
8479        #[allow(unused_imports)]
8480        use super::*;
8481        #[derive(Clone, Debug, PartialEq)]
8482        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8483    }
8484
8485    impl GroupType {
8486        /// Gets the enum value.
8487        ///
8488        /// Returns `None` if the enum contains an unknown value deserialized from
8489        /// the string representation of enums.
8490        pub fn value(&self) -> std::option::Option<i32> {
8491            match self {
8492                Self::Unspecified => std::option::Option::Some(0),
8493                Self::ToxicCombination => std::option::Option::Some(1),
8494                Self::Chokepoint => std::option::Option::Some(3),
8495                Self::UnknownValue(u) => u.0.value(),
8496            }
8497        }
8498
8499        /// Gets the enum value as a string.
8500        ///
8501        /// Returns `None` if the enum contains an unknown value deserialized from
8502        /// the integer representation of enums.
8503        pub fn name(&self) -> std::option::Option<&str> {
8504            match self {
8505                Self::Unspecified => std::option::Option::Some("GROUP_TYPE_UNSPECIFIED"),
8506                Self::ToxicCombination => std::option::Option::Some("GROUP_TYPE_TOXIC_COMBINATION"),
8507                Self::Chokepoint => std::option::Option::Some("GROUP_TYPE_CHOKEPOINT"),
8508                Self::UnknownValue(u) => u.0.name(),
8509            }
8510        }
8511    }
8512
8513    impl std::default::Default for GroupType {
8514        fn default() -> Self {
8515            use std::convert::From;
8516            Self::from(0)
8517        }
8518    }
8519
8520    impl std::fmt::Display for GroupType {
8521        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8522            wkt::internal::display_enum(f, self.name(), self.value())
8523        }
8524    }
8525
8526    impl std::convert::From<i32> for GroupType {
8527        fn from(value: i32) -> Self {
8528            match value {
8529                0 => Self::Unspecified,
8530                1 => Self::ToxicCombination,
8531                3 => Self::Chokepoint,
8532                _ => Self::UnknownValue(group_type::UnknownValue(
8533                    wkt::internal::UnknownEnumValue::Integer(value),
8534                )),
8535            }
8536        }
8537    }
8538
8539    impl std::convert::From<&str> for GroupType {
8540        fn from(value: &str) -> Self {
8541            use std::string::ToString;
8542            match value {
8543                "GROUP_TYPE_UNSPECIFIED" => Self::Unspecified,
8544                "GROUP_TYPE_TOXIC_COMBINATION" => Self::ToxicCombination,
8545                "GROUP_TYPE_CHOKEPOINT" => Self::Chokepoint,
8546                _ => Self::UnknownValue(group_type::UnknownValue(
8547                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8548                )),
8549            }
8550        }
8551    }
8552
8553    impl serde::ser::Serialize for GroupType {
8554        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8555        where
8556            S: serde::Serializer,
8557        {
8558            match self {
8559                Self::Unspecified => serializer.serialize_i32(0),
8560                Self::ToxicCombination => serializer.serialize_i32(1),
8561                Self::Chokepoint => serializer.serialize_i32(3),
8562                Self::UnknownValue(u) => u.0.serialize(serializer),
8563            }
8564        }
8565    }
8566
8567    impl<'de> serde::de::Deserialize<'de> for GroupType {
8568        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8569        where
8570            D: serde::Deserializer<'de>,
8571        {
8572            deserializer.deserialize_any(wkt::internal::EnumVisitor::<GroupType>::new(
8573                ".google.cloud.securitycenter.v2.GroupMembership.GroupType",
8574            ))
8575        }
8576    }
8577}
8578
8579/// Represents a particular IAM binding, which captures a member's role addition,
8580/// removal, or state.
8581#[derive(Clone, Default, PartialEq)]
8582#[non_exhaustive]
8583pub struct IamBinding {
8584    /// The action that was performed on a Binding.
8585    pub action: crate::model::iam_binding::Action,
8586
8587    /// Role that is assigned to "members".
8588    /// For example, "roles/viewer", "roles/editor", or "roles/owner".
8589    pub role: std::string::String,
8590
8591    /// A single identity requesting access for a Cloud Platform resource, for
8592    /// example, "foo@google.com".
8593    pub member: std::string::String,
8594
8595    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8596}
8597
8598impl IamBinding {
8599    /// Creates a new default instance.
8600    pub fn new() -> Self {
8601        std::default::Default::default()
8602    }
8603
8604    /// Sets the value of [action][crate::model::IamBinding::action].
8605    ///
8606    /// # Example
8607    /// ```ignore,no_run
8608    /// # use google_cloud_securitycenter_v2::model::IamBinding;
8609    /// use google_cloud_securitycenter_v2::model::iam_binding::Action;
8610    /// let x0 = IamBinding::new().set_action(Action::Add);
8611    /// let x1 = IamBinding::new().set_action(Action::Remove);
8612    /// ```
8613    pub fn set_action<T: std::convert::Into<crate::model::iam_binding::Action>>(
8614        mut self,
8615        v: T,
8616    ) -> Self {
8617        self.action = v.into();
8618        self
8619    }
8620
8621    /// Sets the value of [role][crate::model::IamBinding::role].
8622    ///
8623    /// # Example
8624    /// ```ignore,no_run
8625    /// # use google_cloud_securitycenter_v2::model::IamBinding;
8626    /// let x = IamBinding::new().set_role("example");
8627    /// ```
8628    pub fn set_role<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8629        self.role = v.into();
8630        self
8631    }
8632
8633    /// Sets the value of [member][crate::model::IamBinding::member].
8634    ///
8635    /// # Example
8636    /// ```ignore,no_run
8637    /// # use google_cloud_securitycenter_v2::model::IamBinding;
8638    /// let x = IamBinding::new().set_member("example");
8639    /// ```
8640    pub fn set_member<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8641        self.member = v.into();
8642        self
8643    }
8644}
8645
8646impl wkt::message::Message for IamBinding {
8647    fn typename() -> &'static str {
8648        "type.googleapis.com/google.cloud.securitycenter.v2.IamBinding"
8649    }
8650}
8651
8652/// Defines additional types related to [IamBinding].
8653pub mod iam_binding {
8654    #[allow(unused_imports)]
8655    use super::*;
8656
8657    /// The type of action performed on a Binding in a policy.
8658    ///
8659    /// # Working with unknown values
8660    ///
8661    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8662    /// additional enum variants at any time. Adding new variants is not considered
8663    /// a breaking change. Applications should write their code in anticipation of:
8664    ///
8665    /// - New values appearing in future releases of the client library, **and**
8666    /// - New values received dynamically, without application changes.
8667    ///
8668    /// Please consult the [Working with enums] section in the user guide for some
8669    /// guidelines.
8670    ///
8671    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
8672    #[derive(Clone, Debug, PartialEq)]
8673    #[non_exhaustive]
8674    pub enum Action {
8675        /// Unspecified.
8676        Unspecified,
8677        /// Addition of a Binding.
8678        Add,
8679        /// Removal of a Binding.
8680        Remove,
8681        /// If set, the enum was initialized with an unknown value.
8682        ///
8683        /// Applications can examine the value using [Action::value] or
8684        /// [Action::name].
8685        UnknownValue(action::UnknownValue),
8686    }
8687
8688    #[doc(hidden)]
8689    pub mod action {
8690        #[allow(unused_imports)]
8691        use super::*;
8692        #[derive(Clone, Debug, PartialEq)]
8693        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8694    }
8695
8696    impl Action {
8697        /// Gets the enum value.
8698        ///
8699        /// Returns `None` if the enum contains an unknown value deserialized from
8700        /// the string representation of enums.
8701        pub fn value(&self) -> std::option::Option<i32> {
8702            match self {
8703                Self::Unspecified => std::option::Option::Some(0),
8704                Self::Add => std::option::Option::Some(1),
8705                Self::Remove => std::option::Option::Some(2),
8706                Self::UnknownValue(u) => u.0.value(),
8707            }
8708        }
8709
8710        /// Gets the enum value as a string.
8711        ///
8712        /// Returns `None` if the enum contains an unknown value deserialized from
8713        /// the integer representation of enums.
8714        pub fn name(&self) -> std::option::Option<&str> {
8715            match self {
8716                Self::Unspecified => std::option::Option::Some("ACTION_UNSPECIFIED"),
8717                Self::Add => std::option::Option::Some("ADD"),
8718                Self::Remove => std::option::Option::Some("REMOVE"),
8719                Self::UnknownValue(u) => u.0.name(),
8720            }
8721        }
8722    }
8723
8724    impl std::default::Default for Action {
8725        fn default() -> Self {
8726            use std::convert::From;
8727            Self::from(0)
8728        }
8729    }
8730
8731    impl std::fmt::Display for Action {
8732        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8733            wkt::internal::display_enum(f, self.name(), self.value())
8734        }
8735    }
8736
8737    impl std::convert::From<i32> for Action {
8738        fn from(value: i32) -> Self {
8739            match value {
8740                0 => Self::Unspecified,
8741                1 => Self::Add,
8742                2 => Self::Remove,
8743                _ => Self::UnknownValue(action::UnknownValue(
8744                    wkt::internal::UnknownEnumValue::Integer(value),
8745                )),
8746            }
8747        }
8748    }
8749
8750    impl std::convert::From<&str> for Action {
8751        fn from(value: &str) -> Self {
8752            use std::string::ToString;
8753            match value {
8754                "ACTION_UNSPECIFIED" => Self::Unspecified,
8755                "ADD" => Self::Add,
8756                "REMOVE" => Self::Remove,
8757                _ => Self::UnknownValue(action::UnknownValue(
8758                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8759                )),
8760            }
8761        }
8762    }
8763
8764    impl serde::ser::Serialize for Action {
8765        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8766        where
8767            S: serde::Serializer,
8768        {
8769            match self {
8770                Self::Unspecified => serializer.serialize_i32(0),
8771                Self::Add => serializer.serialize_i32(1),
8772                Self::Remove => serializer.serialize_i32(2),
8773                Self::UnknownValue(u) => u.0.serialize(serializer),
8774            }
8775        }
8776    }
8777
8778    impl<'de> serde::de::Deserialize<'de> for Action {
8779        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8780        where
8781            D: serde::Deserializer<'de>,
8782        {
8783            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Action>::new(
8784                ".google.cloud.securitycenter.v2.IamBinding.Action",
8785            ))
8786        }
8787    }
8788}
8789
8790/// Represents what's commonly known as an _indicator of compromise_ (IoC) in
8791/// computer forensics. This is an artifact observed on a network or in an
8792/// operating system that, with high confidence, indicates a computer intrusion.
8793/// For more information, see [Indicator of
8794/// compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
8795#[derive(Clone, Default, PartialEq)]
8796#[non_exhaustive]
8797pub struct Indicator {
8798    /// The list of IP addresses that are associated with the finding.
8799    pub ip_addresses: std::vec::Vec<std::string::String>,
8800
8801    /// List of domains associated to the Finding.
8802    pub domains: std::vec::Vec<std::string::String>,
8803
8804    /// The list of matched signatures indicating that the given
8805    /// process is present in the environment.
8806    pub signatures: std::vec::Vec<crate::model::indicator::ProcessSignature>,
8807
8808    /// The list of URIs associated to the Findings.
8809    pub uris: std::vec::Vec<std::string::String>,
8810
8811    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8812}
8813
8814impl Indicator {
8815    /// Creates a new default instance.
8816    pub fn new() -> Self {
8817        std::default::Default::default()
8818    }
8819
8820    /// Sets the value of [ip_addresses][crate::model::Indicator::ip_addresses].
8821    ///
8822    /// # Example
8823    /// ```ignore,no_run
8824    /// # use google_cloud_securitycenter_v2::model::Indicator;
8825    /// let x = Indicator::new().set_ip_addresses(["a", "b", "c"]);
8826    /// ```
8827    pub fn set_ip_addresses<T, V>(mut self, v: T) -> Self
8828    where
8829        T: std::iter::IntoIterator<Item = V>,
8830        V: std::convert::Into<std::string::String>,
8831    {
8832        use std::iter::Iterator;
8833        self.ip_addresses = v.into_iter().map(|i| i.into()).collect();
8834        self
8835    }
8836
8837    /// Sets the value of [domains][crate::model::Indicator::domains].
8838    ///
8839    /// # Example
8840    /// ```ignore,no_run
8841    /// # use google_cloud_securitycenter_v2::model::Indicator;
8842    /// let x = Indicator::new().set_domains(["a", "b", "c"]);
8843    /// ```
8844    pub fn set_domains<T, V>(mut self, v: T) -> Self
8845    where
8846        T: std::iter::IntoIterator<Item = V>,
8847        V: std::convert::Into<std::string::String>,
8848    {
8849        use std::iter::Iterator;
8850        self.domains = v.into_iter().map(|i| i.into()).collect();
8851        self
8852    }
8853
8854    /// Sets the value of [signatures][crate::model::Indicator::signatures].
8855    ///
8856    /// # Example
8857    /// ```ignore,no_run
8858    /// # use google_cloud_securitycenter_v2::model::Indicator;
8859    /// use google_cloud_securitycenter_v2::model::indicator::ProcessSignature;
8860    /// let x = Indicator::new()
8861    ///     .set_signatures([
8862    ///         ProcessSignature::default()/* use setters */,
8863    ///         ProcessSignature::default()/* use (different) setters */,
8864    ///     ]);
8865    /// ```
8866    pub fn set_signatures<T, V>(mut self, v: T) -> Self
8867    where
8868        T: std::iter::IntoIterator<Item = V>,
8869        V: std::convert::Into<crate::model::indicator::ProcessSignature>,
8870    {
8871        use std::iter::Iterator;
8872        self.signatures = v.into_iter().map(|i| i.into()).collect();
8873        self
8874    }
8875
8876    /// Sets the value of [uris][crate::model::Indicator::uris].
8877    ///
8878    /// # Example
8879    /// ```ignore,no_run
8880    /// # use google_cloud_securitycenter_v2::model::Indicator;
8881    /// let x = Indicator::new().set_uris(["a", "b", "c"]);
8882    /// ```
8883    pub fn set_uris<T, V>(mut self, v: T) -> Self
8884    where
8885        T: std::iter::IntoIterator<Item = V>,
8886        V: std::convert::Into<std::string::String>,
8887    {
8888        use std::iter::Iterator;
8889        self.uris = v.into_iter().map(|i| i.into()).collect();
8890        self
8891    }
8892}
8893
8894impl wkt::message::Message for Indicator {
8895    fn typename() -> &'static str {
8896        "type.googleapis.com/google.cloud.securitycenter.v2.Indicator"
8897    }
8898}
8899
8900/// Defines additional types related to [Indicator].
8901pub mod indicator {
8902    #[allow(unused_imports)]
8903    use super::*;
8904
8905    /// Indicates what signature matched this process.
8906    #[derive(Clone, Default, PartialEq)]
8907    #[non_exhaustive]
8908    pub struct ProcessSignature {
8909        /// Describes the type of resource associated with the signature.
8910        pub signature_type: crate::model::indicator::process_signature::SignatureType,
8911
8912        /// The signature.
8913        pub signature: std::option::Option<crate::model::indicator::process_signature::Signature>,
8914
8915        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8916    }
8917
8918    impl ProcessSignature {
8919        /// Creates a new default instance.
8920        pub fn new() -> Self {
8921            std::default::Default::default()
8922        }
8923
8924        /// Sets the value of [signature_type][crate::model::indicator::ProcessSignature::signature_type].
8925        ///
8926        /// # Example
8927        /// ```ignore,no_run
8928        /// # use google_cloud_securitycenter_v2::model::indicator::ProcessSignature;
8929        /// use google_cloud_securitycenter_v2::model::indicator::process_signature::SignatureType;
8930        /// let x0 = ProcessSignature::new().set_signature_type(SignatureType::Process);
8931        /// let x1 = ProcessSignature::new().set_signature_type(SignatureType::File);
8932        /// ```
8933        pub fn set_signature_type<
8934            T: std::convert::Into<crate::model::indicator::process_signature::SignatureType>,
8935        >(
8936            mut self,
8937            v: T,
8938        ) -> Self {
8939            self.signature_type = v.into();
8940            self
8941        }
8942
8943        /// Sets the value of [signature][crate::model::indicator::ProcessSignature::signature].
8944        ///
8945        /// Note that all the setters affecting `signature` are mutually
8946        /// exclusive.
8947        ///
8948        /// # Example
8949        /// ```ignore,no_run
8950        /// # use google_cloud_securitycenter_v2::model::indicator::ProcessSignature;
8951        /// use google_cloud_securitycenter_v2::model::indicator::process_signature::MemoryHashSignature;
8952        /// let x = ProcessSignature::new().set_signature(Some(
8953        ///     google_cloud_securitycenter_v2::model::indicator::process_signature::Signature::MemoryHashSignature(MemoryHashSignature::default().into())));
8954        /// ```
8955        pub fn set_signature<
8956            T: std::convert::Into<
8957                    std::option::Option<crate::model::indicator::process_signature::Signature>,
8958                >,
8959        >(
8960            mut self,
8961            v: T,
8962        ) -> Self {
8963            self.signature = v.into();
8964            self
8965        }
8966
8967        /// The value of [signature][crate::model::indicator::ProcessSignature::signature]
8968        /// if it holds a `MemoryHashSignature`, `None` if the field is not set or
8969        /// holds a different branch.
8970        pub fn memory_hash_signature(
8971            &self,
8972        ) -> std::option::Option<
8973            &std::boxed::Box<crate::model::indicator::process_signature::MemoryHashSignature>,
8974        > {
8975            #[allow(unreachable_patterns)]
8976            self.signature.as_ref().and_then(|v| match v {
8977                crate::model::indicator::process_signature::Signature::MemoryHashSignature(v) => {
8978                    std::option::Option::Some(v)
8979                }
8980                _ => std::option::Option::None,
8981            })
8982        }
8983
8984        /// Sets the value of [signature][crate::model::indicator::ProcessSignature::signature]
8985        /// to hold a `MemoryHashSignature`.
8986        ///
8987        /// Note that all the setters affecting `signature` are
8988        /// mutually exclusive.
8989        ///
8990        /// # Example
8991        /// ```ignore,no_run
8992        /// # use google_cloud_securitycenter_v2::model::indicator::ProcessSignature;
8993        /// use google_cloud_securitycenter_v2::model::indicator::process_signature::MemoryHashSignature;
8994        /// let x = ProcessSignature::new().set_memory_hash_signature(MemoryHashSignature::default()/* use setters */);
8995        /// assert!(x.memory_hash_signature().is_some());
8996        /// assert!(x.yara_rule_signature().is_none());
8997        /// ```
8998        pub fn set_memory_hash_signature<
8999            T: std::convert::Into<
9000                    std::boxed::Box<
9001                        crate::model::indicator::process_signature::MemoryHashSignature,
9002                    >,
9003                >,
9004        >(
9005            mut self,
9006            v: T,
9007        ) -> Self {
9008            self.signature = std::option::Option::Some(
9009                crate::model::indicator::process_signature::Signature::MemoryHashSignature(
9010                    v.into(),
9011                ),
9012            );
9013            self
9014        }
9015
9016        /// The value of [signature][crate::model::indicator::ProcessSignature::signature]
9017        /// if it holds a `YaraRuleSignature`, `None` if the field is not set or
9018        /// holds a different branch.
9019        pub fn yara_rule_signature(
9020            &self,
9021        ) -> std::option::Option<
9022            &std::boxed::Box<crate::model::indicator::process_signature::YaraRuleSignature>,
9023        > {
9024            #[allow(unreachable_patterns)]
9025            self.signature.as_ref().and_then(|v| match v {
9026                crate::model::indicator::process_signature::Signature::YaraRuleSignature(v) => {
9027                    std::option::Option::Some(v)
9028                }
9029                _ => std::option::Option::None,
9030            })
9031        }
9032
9033        /// Sets the value of [signature][crate::model::indicator::ProcessSignature::signature]
9034        /// to hold a `YaraRuleSignature`.
9035        ///
9036        /// Note that all the setters affecting `signature` are
9037        /// mutually exclusive.
9038        ///
9039        /// # Example
9040        /// ```ignore,no_run
9041        /// # use google_cloud_securitycenter_v2::model::indicator::ProcessSignature;
9042        /// use google_cloud_securitycenter_v2::model::indicator::process_signature::YaraRuleSignature;
9043        /// let x = ProcessSignature::new().set_yara_rule_signature(YaraRuleSignature::default()/* use setters */);
9044        /// assert!(x.yara_rule_signature().is_some());
9045        /// assert!(x.memory_hash_signature().is_none());
9046        /// ```
9047        pub fn set_yara_rule_signature<
9048            T: std::convert::Into<
9049                    std::boxed::Box<crate::model::indicator::process_signature::YaraRuleSignature>,
9050                >,
9051        >(
9052            mut self,
9053            v: T,
9054        ) -> Self {
9055            self.signature = std::option::Option::Some(
9056                crate::model::indicator::process_signature::Signature::YaraRuleSignature(v.into()),
9057            );
9058            self
9059        }
9060    }
9061
9062    impl wkt::message::Message for ProcessSignature {
9063        fn typename() -> &'static str {
9064            "type.googleapis.com/google.cloud.securitycenter.v2.Indicator.ProcessSignature"
9065        }
9066    }
9067
9068    /// Defines additional types related to [ProcessSignature].
9069    pub mod process_signature {
9070        #[allow(unused_imports)]
9071        use super::*;
9072
9073        /// A signature corresponding to memory page hashes.
9074        #[derive(Clone, Default, PartialEq)]
9075        #[non_exhaustive]
9076        pub struct MemoryHashSignature {
9077            /// The binary family.
9078            pub binary_family: std::string::String,
9079
9080            /// The list of memory hash detections contributing to the binary family
9081            /// match.
9082            pub detections: std::vec::Vec<
9083                crate::model::indicator::process_signature::memory_hash_signature::Detection,
9084            >,
9085
9086            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9087        }
9088
9089        impl MemoryHashSignature {
9090            /// Creates a new default instance.
9091            pub fn new() -> Self {
9092                std::default::Default::default()
9093            }
9094
9095            /// Sets the value of [binary_family][crate::model::indicator::process_signature::MemoryHashSignature::binary_family].
9096            ///
9097            /// # Example
9098            /// ```ignore,no_run
9099            /// # use google_cloud_securitycenter_v2::model::indicator::process_signature::MemoryHashSignature;
9100            /// let x = MemoryHashSignature::new().set_binary_family("example");
9101            /// ```
9102            pub fn set_binary_family<T: std::convert::Into<std::string::String>>(
9103                mut self,
9104                v: T,
9105            ) -> Self {
9106                self.binary_family = v.into();
9107                self
9108            }
9109
9110            /// Sets the value of [detections][crate::model::indicator::process_signature::MemoryHashSignature::detections].
9111            ///
9112            /// # Example
9113            /// ```ignore,no_run
9114            /// # use google_cloud_securitycenter_v2::model::indicator::process_signature::MemoryHashSignature;
9115            /// use google_cloud_securitycenter_v2::model::indicator::process_signature::memory_hash_signature::Detection;
9116            /// let x = MemoryHashSignature::new()
9117            ///     .set_detections([
9118            ///         Detection::default()/* use setters */,
9119            ///         Detection::default()/* use (different) setters */,
9120            ///     ]);
9121            /// ```
9122            pub fn set_detections<T, V>(mut self, v: T) -> Self
9123            where
9124                T: std::iter::IntoIterator<Item = V>,
9125                V: std::convert::Into<crate::model::indicator::process_signature::memory_hash_signature::Detection>
9126            {
9127                use std::iter::Iterator;
9128                self.detections = v.into_iter().map(|i| i.into()).collect();
9129                self
9130            }
9131        }
9132
9133        impl wkt::message::Message for MemoryHashSignature {
9134            fn typename() -> &'static str {
9135                "type.googleapis.com/google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature"
9136            }
9137        }
9138
9139        /// Defines additional types related to [MemoryHashSignature].
9140        pub mod memory_hash_signature {
9141            #[allow(unused_imports)]
9142            use super::*;
9143
9144            /// Memory hash detection contributing to the binary family match.
9145            #[derive(Clone, Default, PartialEq)]
9146            #[non_exhaustive]
9147            pub struct Detection {
9148                /// The name of the binary associated with the memory hash
9149                /// signature detection.
9150                pub binary: std::string::String,
9151
9152                /// The percentage of memory page hashes in the signature
9153                /// that were matched.
9154                pub percent_pages_matched: f64,
9155
9156                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9157            }
9158
9159            impl Detection {
9160                /// Creates a new default instance.
9161                pub fn new() -> Self {
9162                    std::default::Default::default()
9163                }
9164
9165                /// Sets the value of [binary][crate::model::indicator::process_signature::memory_hash_signature::Detection::binary].
9166                ///
9167                /// # Example
9168                /// ```ignore,no_run
9169                /// # use google_cloud_securitycenter_v2::model::indicator::process_signature::memory_hash_signature::Detection;
9170                /// let x = Detection::new().set_binary("example");
9171                /// ```
9172                pub fn set_binary<T: std::convert::Into<std::string::String>>(
9173                    mut self,
9174                    v: T,
9175                ) -> Self {
9176                    self.binary = v.into();
9177                    self
9178                }
9179
9180                /// Sets the value of [percent_pages_matched][crate::model::indicator::process_signature::memory_hash_signature::Detection::percent_pages_matched].
9181                ///
9182                /// # Example
9183                /// ```ignore,no_run
9184                /// # use google_cloud_securitycenter_v2::model::indicator::process_signature::memory_hash_signature::Detection;
9185                /// let x = Detection::new().set_percent_pages_matched(42.0);
9186                /// ```
9187                pub fn set_percent_pages_matched<T: std::convert::Into<f64>>(
9188                    mut self,
9189                    v: T,
9190                ) -> Self {
9191                    self.percent_pages_matched = v.into();
9192                    self
9193                }
9194            }
9195
9196            impl wkt::message::Message for Detection {
9197                fn typename() -> &'static str {
9198                    "type.googleapis.com/google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection"
9199                }
9200            }
9201        }
9202
9203        /// A signature corresponding to a YARA rule.
9204        #[derive(Clone, Default, PartialEq)]
9205        #[non_exhaustive]
9206        pub struct YaraRuleSignature {
9207            /// The name of the YARA rule.
9208            pub yara_rule: std::string::String,
9209
9210            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9211        }
9212
9213        impl YaraRuleSignature {
9214            /// Creates a new default instance.
9215            pub fn new() -> Self {
9216                std::default::Default::default()
9217            }
9218
9219            /// Sets the value of [yara_rule][crate::model::indicator::process_signature::YaraRuleSignature::yara_rule].
9220            ///
9221            /// # Example
9222            /// ```ignore,no_run
9223            /// # use google_cloud_securitycenter_v2::model::indicator::process_signature::YaraRuleSignature;
9224            /// let x = YaraRuleSignature::new().set_yara_rule("example");
9225            /// ```
9226            pub fn set_yara_rule<T: std::convert::Into<std::string::String>>(
9227                mut self,
9228                v: T,
9229            ) -> Self {
9230                self.yara_rule = v.into();
9231                self
9232            }
9233        }
9234
9235        impl wkt::message::Message for YaraRuleSignature {
9236            fn typename() -> &'static str {
9237                "type.googleapis.com/google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature"
9238            }
9239        }
9240
9241        /// Possible resource types to be associated with a signature.
9242        ///
9243        /// # Working with unknown values
9244        ///
9245        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9246        /// additional enum variants at any time. Adding new variants is not considered
9247        /// a breaking change. Applications should write their code in anticipation of:
9248        ///
9249        /// - New values appearing in future releases of the client library, **and**
9250        /// - New values received dynamically, without application changes.
9251        ///
9252        /// Please consult the [Working with enums] section in the user guide for some
9253        /// guidelines.
9254        ///
9255        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9256        #[derive(Clone, Debug, PartialEq)]
9257        #[non_exhaustive]
9258        pub enum SignatureType {
9259            /// The default signature type.
9260            Unspecified,
9261            /// Used for signatures concerning processes.
9262            Process,
9263            /// Used for signatures concerning disks.
9264            File,
9265            /// If set, the enum was initialized with an unknown value.
9266            ///
9267            /// Applications can examine the value using [SignatureType::value] or
9268            /// [SignatureType::name].
9269            UnknownValue(signature_type::UnknownValue),
9270        }
9271
9272        #[doc(hidden)]
9273        pub mod signature_type {
9274            #[allow(unused_imports)]
9275            use super::*;
9276            #[derive(Clone, Debug, PartialEq)]
9277            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9278        }
9279
9280        impl SignatureType {
9281            /// Gets the enum value.
9282            ///
9283            /// Returns `None` if the enum contains an unknown value deserialized from
9284            /// the string representation of enums.
9285            pub fn value(&self) -> std::option::Option<i32> {
9286                match self {
9287                    Self::Unspecified => std::option::Option::Some(0),
9288                    Self::Process => std::option::Option::Some(1),
9289                    Self::File => std::option::Option::Some(2),
9290                    Self::UnknownValue(u) => u.0.value(),
9291                }
9292            }
9293
9294            /// Gets the enum value as a string.
9295            ///
9296            /// Returns `None` if the enum contains an unknown value deserialized from
9297            /// the integer representation of enums.
9298            pub fn name(&self) -> std::option::Option<&str> {
9299                match self {
9300                    Self::Unspecified => std::option::Option::Some("SIGNATURE_TYPE_UNSPECIFIED"),
9301                    Self::Process => std::option::Option::Some("SIGNATURE_TYPE_PROCESS"),
9302                    Self::File => std::option::Option::Some("SIGNATURE_TYPE_FILE"),
9303                    Self::UnknownValue(u) => u.0.name(),
9304                }
9305            }
9306        }
9307
9308        impl std::default::Default for SignatureType {
9309            fn default() -> Self {
9310                use std::convert::From;
9311                Self::from(0)
9312            }
9313        }
9314
9315        impl std::fmt::Display for SignatureType {
9316            fn fmt(
9317                &self,
9318                f: &mut std::fmt::Formatter<'_>,
9319            ) -> std::result::Result<(), std::fmt::Error> {
9320                wkt::internal::display_enum(f, self.name(), self.value())
9321            }
9322        }
9323
9324        impl std::convert::From<i32> for SignatureType {
9325            fn from(value: i32) -> Self {
9326                match value {
9327                    0 => Self::Unspecified,
9328                    1 => Self::Process,
9329                    2 => Self::File,
9330                    _ => Self::UnknownValue(signature_type::UnknownValue(
9331                        wkt::internal::UnknownEnumValue::Integer(value),
9332                    )),
9333                }
9334            }
9335        }
9336
9337        impl std::convert::From<&str> for SignatureType {
9338            fn from(value: &str) -> Self {
9339                use std::string::ToString;
9340                match value {
9341                    "SIGNATURE_TYPE_UNSPECIFIED" => Self::Unspecified,
9342                    "SIGNATURE_TYPE_PROCESS" => Self::Process,
9343                    "SIGNATURE_TYPE_FILE" => Self::File,
9344                    _ => Self::UnknownValue(signature_type::UnknownValue(
9345                        wkt::internal::UnknownEnumValue::String(value.to_string()),
9346                    )),
9347                }
9348            }
9349        }
9350
9351        impl serde::ser::Serialize for SignatureType {
9352            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9353            where
9354                S: serde::Serializer,
9355            {
9356                match self {
9357                    Self::Unspecified => serializer.serialize_i32(0),
9358                    Self::Process => serializer.serialize_i32(1),
9359                    Self::File => serializer.serialize_i32(2),
9360                    Self::UnknownValue(u) => u.0.serialize(serializer),
9361                }
9362            }
9363        }
9364
9365        impl<'de> serde::de::Deserialize<'de> for SignatureType {
9366            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9367            where
9368                D: serde::Deserializer<'de>,
9369            {
9370                deserializer.deserialize_any(wkt::internal::EnumVisitor::<SignatureType>::new(
9371                    ".google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType",
9372                ))
9373            }
9374        }
9375
9376        /// The signature.
9377        #[derive(Clone, Debug, PartialEq)]
9378        #[non_exhaustive]
9379        pub enum Signature {
9380            /// Signature indicating that a binary family was matched.
9381            MemoryHashSignature(
9382                std::boxed::Box<crate::model::indicator::process_signature::MemoryHashSignature>,
9383            ),
9384            /// Signature indicating that a YARA rule was matched.
9385            YaraRuleSignature(
9386                std::boxed::Box<crate::model::indicator::process_signature::YaraRuleSignature>,
9387            ),
9388        }
9389    }
9390}
9391
9392/// IP rules associated with the finding.
9393#[derive(Clone, Default, PartialEq)]
9394#[non_exhaustive]
9395pub struct IpRules {
9396    /// The direction that the rule is applicable to, one of ingress or egress.
9397    pub direction: crate::model::ip_rules::Direction,
9398
9399    /// If source IP ranges are specified, the firewall rule applies only to
9400    /// traffic that has a source IP address in these ranges. These ranges must be
9401    /// expressed in CIDR format. Only supports IPv4.
9402    pub source_ip_ranges: std::vec::Vec<std::string::String>,
9403
9404    /// If destination IP ranges are specified, the firewall rule applies only to
9405    /// traffic that has a destination IP address in these ranges. These ranges
9406    /// must be expressed in CIDR format. Only supports IPv4.
9407    pub destination_ip_ranges: std::vec::Vec<std::string::String>,
9408
9409    /// Name of the network protocol service, such as FTP, that is exposed by the
9410    /// open port. Follows the naming convention available at:
9411    /// <https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml>.
9412    pub exposed_services: std::vec::Vec<std::string::String>,
9413
9414    /// The list of allow rules specified by this firewall. Each rule specifies a
9415    /// protocol and port-range tuple that describes a permitted connection.
9416    pub rules: std::option::Option<crate::model::ip_rules::Rules>,
9417
9418    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9419}
9420
9421impl IpRules {
9422    /// Creates a new default instance.
9423    pub fn new() -> Self {
9424        std::default::Default::default()
9425    }
9426
9427    /// Sets the value of [direction][crate::model::IpRules::direction].
9428    ///
9429    /// # Example
9430    /// ```ignore,no_run
9431    /// # use google_cloud_securitycenter_v2::model::IpRules;
9432    /// use google_cloud_securitycenter_v2::model::ip_rules::Direction;
9433    /// let x0 = IpRules::new().set_direction(Direction::Ingress);
9434    /// let x1 = IpRules::new().set_direction(Direction::Egress);
9435    /// ```
9436    pub fn set_direction<T: std::convert::Into<crate::model::ip_rules::Direction>>(
9437        mut self,
9438        v: T,
9439    ) -> Self {
9440        self.direction = v.into();
9441        self
9442    }
9443
9444    /// Sets the value of [source_ip_ranges][crate::model::IpRules::source_ip_ranges].
9445    ///
9446    /// # Example
9447    /// ```ignore,no_run
9448    /// # use google_cloud_securitycenter_v2::model::IpRules;
9449    /// let x = IpRules::new().set_source_ip_ranges(["a", "b", "c"]);
9450    /// ```
9451    pub fn set_source_ip_ranges<T, V>(mut self, v: T) -> Self
9452    where
9453        T: std::iter::IntoIterator<Item = V>,
9454        V: std::convert::Into<std::string::String>,
9455    {
9456        use std::iter::Iterator;
9457        self.source_ip_ranges = v.into_iter().map(|i| i.into()).collect();
9458        self
9459    }
9460
9461    /// Sets the value of [destination_ip_ranges][crate::model::IpRules::destination_ip_ranges].
9462    ///
9463    /// # Example
9464    /// ```ignore,no_run
9465    /// # use google_cloud_securitycenter_v2::model::IpRules;
9466    /// let x = IpRules::new().set_destination_ip_ranges(["a", "b", "c"]);
9467    /// ```
9468    pub fn set_destination_ip_ranges<T, V>(mut self, v: T) -> Self
9469    where
9470        T: std::iter::IntoIterator<Item = V>,
9471        V: std::convert::Into<std::string::String>,
9472    {
9473        use std::iter::Iterator;
9474        self.destination_ip_ranges = v.into_iter().map(|i| i.into()).collect();
9475        self
9476    }
9477
9478    /// Sets the value of [exposed_services][crate::model::IpRules::exposed_services].
9479    ///
9480    /// # Example
9481    /// ```ignore,no_run
9482    /// # use google_cloud_securitycenter_v2::model::IpRules;
9483    /// let x = IpRules::new().set_exposed_services(["a", "b", "c"]);
9484    /// ```
9485    pub fn set_exposed_services<T, V>(mut self, v: T) -> Self
9486    where
9487        T: std::iter::IntoIterator<Item = V>,
9488        V: std::convert::Into<std::string::String>,
9489    {
9490        use std::iter::Iterator;
9491        self.exposed_services = v.into_iter().map(|i| i.into()).collect();
9492        self
9493    }
9494
9495    /// Sets the value of [rules][crate::model::IpRules::rules].
9496    ///
9497    /// Note that all the setters affecting `rules` are mutually
9498    /// exclusive.
9499    ///
9500    /// # Example
9501    /// ```ignore,no_run
9502    /// # use google_cloud_securitycenter_v2::model::IpRules;
9503    /// use google_cloud_securitycenter_v2::model::Allowed;
9504    /// let x = IpRules::new().set_rules(Some(
9505    ///     google_cloud_securitycenter_v2::model::ip_rules::Rules::Allowed(Allowed::default().into())));
9506    /// ```
9507    pub fn set_rules<T: std::convert::Into<std::option::Option<crate::model::ip_rules::Rules>>>(
9508        mut self,
9509        v: T,
9510    ) -> Self {
9511        self.rules = v.into();
9512        self
9513    }
9514
9515    /// The value of [rules][crate::model::IpRules::rules]
9516    /// if it holds a `Allowed`, `None` if the field is not set or
9517    /// holds a different branch.
9518    pub fn allowed(&self) -> std::option::Option<&std::boxed::Box<crate::model::Allowed>> {
9519        #[allow(unreachable_patterns)]
9520        self.rules.as_ref().and_then(|v| match v {
9521            crate::model::ip_rules::Rules::Allowed(v) => std::option::Option::Some(v),
9522            _ => std::option::Option::None,
9523        })
9524    }
9525
9526    /// Sets the value of [rules][crate::model::IpRules::rules]
9527    /// to hold a `Allowed`.
9528    ///
9529    /// Note that all the setters affecting `rules` are
9530    /// mutually exclusive.
9531    ///
9532    /// # Example
9533    /// ```ignore,no_run
9534    /// # use google_cloud_securitycenter_v2::model::IpRules;
9535    /// use google_cloud_securitycenter_v2::model::Allowed;
9536    /// let x = IpRules::new().set_allowed(Allowed::default()/* use setters */);
9537    /// assert!(x.allowed().is_some());
9538    /// assert!(x.denied().is_none());
9539    /// ```
9540    pub fn set_allowed<T: std::convert::Into<std::boxed::Box<crate::model::Allowed>>>(
9541        mut self,
9542        v: T,
9543    ) -> Self {
9544        self.rules = std::option::Option::Some(crate::model::ip_rules::Rules::Allowed(v.into()));
9545        self
9546    }
9547
9548    /// The value of [rules][crate::model::IpRules::rules]
9549    /// if it holds a `Denied`, `None` if the field is not set or
9550    /// holds a different branch.
9551    pub fn denied(&self) -> std::option::Option<&std::boxed::Box<crate::model::Denied>> {
9552        #[allow(unreachable_patterns)]
9553        self.rules.as_ref().and_then(|v| match v {
9554            crate::model::ip_rules::Rules::Denied(v) => std::option::Option::Some(v),
9555            _ => std::option::Option::None,
9556        })
9557    }
9558
9559    /// Sets the value of [rules][crate::model::IpRules::rules]
9560    /// to hold a `Denied`.
9561    ///
9562    /// Note that all the setters affecting `rules` are
9563    /// mutually exclusive.
9564    ///
9565    /// # Example
9566    /// ```ignore,no_run
9567    /// # use google_cloud_securitycenter_v2::model::IpRules;
9568    /// use google_cloud_securitycenter_v2::model::Denied;
9569    /// let x = IpRules::new().set_denied(Denied::default()/* use setters */);
9570    /// assert!(x.denied().is_some());
9571    /// assert!(x.allowed().is_none());
9572    /// ```
9573    pub fn set_denied<T: std::convert::Into<std::boxed::Box<crate::model::Denied>>>(
9574        mut self,
9575        v: T,
9576    ) -> Self {
9577        self.rules = std::option::Option::Some(crate::model::ip_rules::Rules::Denied(v.into()));
9578        self
9579    }
9580}
9581
9582impl wkt::message::Message for IpRules {
9583    fn typename() -> &'static str {
9584        "type.googleapis.com/google.cloud.securitycenter.v2.IpRules"
9585    }
9586}
9587
9588/// Defines additional types related to [IpRules].
9589pub mod ip_rules {
9590    #[allow(unused_imports)]
9591    use super::*;
9592
9593    /// The type of direction that the rule is applicable to, one of ingress or
9594    /// egress. Not applicable to OPEN_X_PORT findings.
9595    ///
9596    /// # Working with unknown values
9597    ///
9598    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9599    /// additional enum variants at any time. Adding new variants is not considered
9600    /// a breaking change. Applications should write their code in anticipation of:
9601    ///
9602    /// - New values appearing in future releases of the client library, **and**
9603    /// - New values received dynamically, without application changes.
9604    ///
9605    /// Please consult the [Working with enums] section in the user guide for some
9606    /// guidelines.
9607    ///
9608    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9609    #[derive(Clone, Debug, PartialEq)]
9610    #[non_exhaustive]
9611    pub enum Direction {
9612        /// Unspecified direction value.
9613        Unspecified,
9614        /// Ingress direction value.
9615        Ingress,
9616        /// Egress direction value.
9617        Egress,
9618        /// If set, the enum was initialized with an unknown value.
9619        ///
9620        /// Applications can examine the value using [Direction::value] or
9621        /// [Direction::name].
9622        UnknownValue(direction::UnknownValue),
9623    }
9624
9625    #[doc(hidden)]
9626    pub mod direction {
9627        #[allow(unused_imports)]
9628        use super::*;
9629        #[derive(Clone, Debug, PartialEq)]
9630        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9631    }
9632
9633    impl Direction {
9634        /// Gets the enum value.
9635        ///
9636        /// Returns `None` if the enum contains an unknown value deserialized from
9637        /// the string representation of enums.
9638        pub fn value(&self) -> std::option::Option<i32> {
9639            match self {
9640                Self::Unspecified => std::option::Option::Some(0),
9641                Self::Ingress => std::option::Option::Some(1),
9642                Self::Egress => std::option::Option::Some(2),
9643                Self::UnknownValue(u) => u.0.value(),
9644            }
9645        }
9646
9647        /// Gets the enum value as a string.
9648        ///
9649        /// Returns `None` if the enum contains an unknown value deserialized from
9650        /// the integer representation of enums.
9651        pub fn name(&self) -> std::option::Option<&str> {
9652            match self {
9653                Self::Unspecified => std::option::Option::Some("DIRECTION_UNSPECIFIED"),
9654                Self::Ingress => std::option::Option::Some("INGRESS"),
9655                Self::Egress => std::option::Option::Some("EGRESS"),
9656                Self::UnknownValue(u) => u.0.name(),
9657            }
9658        }
9659    }
9660
9661    impl std::default::Default for Direction {
9662        fn default() -> Self {
9663            use std::convert::From;
9664            Self::from(0)
9665        }
9666    }
9667
9668    impl std::fmt::Display for Direction {
9669        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9670            wkt::internal::display_enum(f, self.name(), self.value())
9671        }
9672    }
9673
9674    impl std::convert::From<i32> for Direction {
9675        fn from(value: i32) -> Self {
9676            match value {
9677                0 => Self::Unspecified,
9678                1 => Self::Ingress,
9679                2 => Self::Egress,
9680                _ => Self::UnknownValue(direction::UnknownValue(
9681                    wkt::internal::UnknownEnumValue::Integer(value),
9682                )),
9683            }
9684        }
9685    }
9686
9687    impl std::convert::From<&str> for Direction {
9688        fn from(value: &str) -> Self {
9689            use std::string::ToString;
9690            match value {
9691                "DIRECTION_UNSPECIFIED" => Self::Unspecified,
9692                "INGRESS" => Self::Ingress,
9693                "EGRESS" => Self::Egress,
9694                _ => Self::UnknownValue(direction::UnknownValue(
9695                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9696                )),
9697            }
9698        }
9699    }
9700
9701    impl serde::ser::Serialize for Direction {
9702        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9703        where
9704            S: serde::Serializer,
9705        {
9706            match self {
9707                Self::Unspecified => serializer.serialize_i32(0),
9708                Self::Ingress => serializer.serialize_i32(1),
9709                Self::Egress => serializer.serialize_i32(2),
9710                Self::UnknownValue(u) => u.0.serialize(serializer),
9711            }
9712        }
9713    }
9714
9715    impl<'de> serde::de::Deserialize<'de> for Direction {
9716        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9717        where
9718            D: serde::Deserializer<'de>,
9719        {
9720            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Direction>::new(
9721                ".google.cloud.securitycenter.v2.IpRules.Direction",
9722            ))
9723        }
9724    }
9725
9726    /// The list of allow rules specified by this firewall. Each rule specifies a
9727    /// protocol and port-range tuple that describes a permitted connection.
9728    #[derive(Clone, Debug, PartialEq)]
9729    #[non_exhaustive]
9730    pub enum Rules {
9731        /// Tuple with allowed rules.
9732        Allowed(std::boxed::Box<crate::model::Allowed>),
9733        /// Tuple with denied rules.
9734        Denied(std::boxed::Box<crate::model::Denied>),
9735    }
9736}
9737
9738/// IP rule information.
9739#[derive(Clone, Default, PartialEq)]
9740#[non_exhaustive]
9741pub struct IpRule {
9742    /// The IP protocol this rule applies to. This value can either be one of the
9743    /// following well known protocol strings (TCP, UDP, ICMP, ESP, AH, IPIP,
9744    /// SCTP) or a string representation of the integer value.
9745    pub protocol: std::string::String,
9746
9747    /// Optional. An optional list of ports to which this rule applies. This field
9748    /// is only applicable for the UDP or (S)TCP protocols. Each entry must be
9749    /// either an integer or a range including a min and max port number.
9750    pub port_ranges: std::vec::Vec<crate::model::ip_rule::PortRange>,
9751
9752    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9753}
9754
9755impl IpRule {
9756    /// Creates a new default instance.
9757    pub fn new() -> Self {
9758        std::default::Default::default()
9759    }
9760
9761    /// Sets the value of [protocol][crate::model::IpRule::protocol].
9762    ///
9763    /// # Example
9764    /// ```ignore,no_run
9765    /// # use google_cloud_securitycenter_v2::model::IpRule;
9766    /// let x = IpRule::new().set_protocol("example");
9767    /// ```
9768    pub fn set_protocol<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9769        self.protocol = v.into();
9770        self
9771    }
9772
9773    /// Sets the value of [port_ranges][crate::model::IpRule::port_ranges].
9774    ///
9775    /// # Example
9776    /// ```ignore,no_run
9777    /// # use google_cloud_securitycenter_v2::model::IpRule;
9778    /// use google_cloud_securitycenter_v2::model::ip_rule::PortRange;
9779    /// let x = IpRule::new()
9780    ///     .set_port_ranges([
9781    ///         PortRange::default()/* use setters */,
9782    ///         PortRange::default()/* use (different) setters */,
9783    ///     ]);
9784    /// ```
9785    pub fn set_port_ranges<T, V>(mut self, v: T) -> Self
9786    where
9787        T: std::iter::IntoIterator<Item = V>,
9788        V: std::convert::Into<crate::model::ip_rule::PortRange>,
9789    {
9790        use std::iter::Iterator;
9791        self.port_ranges = v.into_iter().map(|i| i.into()).collect();
9792        self
9793    }
9794}
9795
9796impl wkt::message::Message for IpRule {
9797    fn typename() -> &'static str {
9798        "type.googleapis.com/google.cloud.securitycenter.v2.IpRule"
9799    }
9800}
9801
9802/// Defines additional types related to [IpRule].
9803pub mod ip_rule {
9804    #[allow(unused_imports)]
9805    use super::*;
9806
9807    /// A port range which is inclusive of the min and max values.
9808    /// Values are between 0 and 2^16-1. The max can be equal / must be not smaller
9809    /// than the min value. If min and max are equal this indicates that it is a
9810    /// single port.
9811    #[derive(Clone, Default, PartialEq)]
9812    #[non_exhaustive]
9813    pub struct PortRange {
9814        /// Minimum port value.
9815        pub min: i64,
9816
9817        /// Maximum port value.
9818        pub max: i64,
9819
9820        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9821    }
9822
9823    impl PortRange {
9824        /// Creates a new default instance.
9825        pub fn new() -> Self {
9826            std::default::Default::default()
9827        }
9828
9829        /// Sets the value of [min][crate::model::ip_rule::PortRange::min].
9830        ///
9831        /// # Example
9832        /// ```ignore,no_run
9833        /// # use google_cloud_securitycenter_v2::model::ip_rule::PortRange;
9834        /// let x = PortRange::new().set_min(42);
9835        /// ```
9836        pub fn set_min<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9837            self.min = v.into();
9838            self
9839        }
9840
9841        /// Sets the value of [max][crate::model::ip_rule::PortRange::max].
9842        ///
9843        /// # Example
9844        /// ```ignore,no_run
9845        /// # use google_cloud_securitycenter_v2::model::ip_rule::PortRange;
9846        /// let x = PortRange::new().set_max(42);
9847        /// ```
9848        pub fn set_max<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9849            self.max = v.into();
9850            self
9851        }
9852    }
9853
9854    impl wkt::message::Message for PortRange {
9855        fn typename() -> &'static str {
9856            "type.googleapis.com/google.cloud.securitycenter.v2.IpRule.PortRange"
9857        }
9858    }
9859}
9860
9861/// Allowed IP rule.
9862#[derive(Clone, Default, PartialEq)]
9863#[non_exhaustive]
9864pub struct Allowed {
9865    /// Optional. Optional list of allowed IP rules.
9866    pub ip_rules: std::vec::Vec<crate::model::IpRule>,
9867
9868    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9869}
9870
9871impl Allowed {
9872    /// Creates a new default instance.
9873    pub fn new() -> Self {
9874        std::default::Default::default()
9875    }
9876
9877    /// Sets the value of [ip_rules][crate::model::Allowed::ip_rules].
9878    ///
9879    /// # Example
9880    /// ```ignore,no_run
9881    /// # use google_cloud_securitycenter_v2::model::Allowed;
9882    /// use google_cloud_securitycenter_v2::model::IpRule;
9883    /// let x = Allowed::new()
9884    ///     .set_ip_rules([
9885    ///         IpRule::default()/* use setters */,
9886    ///         IpRule::default()/* use (different) setters */,
9887    ///     ]);
9888    /// ```
9889    pub fn set_ip_rules<T, V>(mut self, v: T) -> Self
9890    where
9891        T: std::iter::IntoIterator<Item = V>,
9892        V: std::convert::Into<crate::model::IpRule>,
9893    {
9894        use std::iter::Iterator;
9895        self.ip_rules = v.into_iter().map(|i| i.into()).collect();
9896        self
9897    }
9898}
9899
9900impl wkt::message::Message for Allowed {
9901    fn typename() -> &'static str {
9902        "type.googleapis.com/google.cloud.securitycenter.v2.Allowed"
9903    }
9904}
9905
9906/// Denied IP rule.
9907#[derive(Clone, Default, PartialEq)]
9908#[non_exhaustive]
9909pub struct Denied {
9910    /// Optional. Optional list of denied IP rules.
9911    pub ip_rules: std::vec::Vec<crate::model::IpRule>,
9912
9913    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9914}
9915
9916impl Denied {
9917    /// Creates a new default instance.
9918    pub fn new() -> Self {
9919        std::default::Default::default()
9920    }
9921
9922    /// Sets the value of [ip_rules][crate::model::Denied::ip_rules].
9923    ///
9924    /// # Example
9925    /// ```ignore,no_run
9926    /// # use google_cloud_securitycenter_v2::model::Denied;
9927    /// use google_cloud_securitycenter_v2::model::IpRule;
9928    /// let x = Denied::new()
9929    ///     .set_ip_rules([
9930    ///         IpRule::default()/* use setters */,
9931    ///         IpRule::default()/* use (different) setters */,
9932    ///     ]);
9933    /// ```
9934    pub fn set_ip_rules<T, V>(mut self, v: T) -> Self
9935    where
9936        T: std::iter::IntoIterator<Item = V>,
9937        V: std::convert::Into<crate::model::IpRule>,
9938    {
9939        use std::iter::Iterator;
9940        self.ip_rules = v.into_iter().map(|i| i.into()).collect();
9941        self
9942    }
9943}
9944
9945impl wkt::message::Message for Denied {
9946    fn typename() -> &'static str {
9947        "type.googleapis.com/google.cloud.securitycenter.v2.Denied"
9948    }
9949}
9950
9951/// Describes a job
9952#[derive(Clone, Default, PartialEq)]
9953#[non_exhaustive]
9954pub struct Job {
9955    /// The fully-qualified name for a job.
9956    /// e.g. `projects/<project_id>/jobs/<job_id>`
9957    pub name: std::string::String,
9958
9959    /// Output only. State of the job, such as `RUNNING` or `PENDING`.
9960    pub state: crate::model::JobState,
9961
9962    /// Optional. If the job did not complete successfully, this field describes
9963    /// why.
9964    pub error_code: i32,
9965
9966    /// Optional. Gives the location where the job ran, such as `US` or
9967    /// `europe-west1`
9968    pub location: std::string::String,
9969
9970    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9971}
9972
9973impl Job {
9974    /// Creates a new default instance.
9975    pub fn new() -> Self {
9976        std::default::Default::default()
9977    }
9978
9979    /// Sets the value of [name][crate::model::Job::name].
9980    ///
9981    /// # Example
9982    /// ```ignore,no_run
9983    /// # use google_cloud_securitycenter_v2::model::Job;
9984    /// let x = Job::new().set_name("example");
9985    /// ```
9986    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9987        self.name = v.into();
9988        self
9989    }
9990
9991    /// Sets the value of [state][crate::model::Job::state].
9992    ///
9993    /// # Example
9994    /// ```ignore,no_run
9995    /// # use google_cloud_securitycenter_v2::model::Job;
9996    /// use google_cloud_securitycenter_v2::model::JobState;
9997    /// let x0 = Job::new().set_state(JobState::Pending);
9998    /// let x1 = Job::new().set_state(JobState::Running);
9999    /// let x2 = Job::new().set_state(JobState::Succeeded);
10000    /// ```
10001    pub fn set_state<T: std::convert::Into<crate::model::JobState>>(mut self, v: T) -> Self {
10002        self.state = v.into();
10003        self
10004    }
10005
10006    /// Sets the value of [error_code][crate::model::Job::error_code].
10007    ///
10008    /// # Example
10009    /// ```ignore,no_run
10010    /// # use google_cloud_securitycenter_v2::model::Job;
10011    /// let x = Job::new().set_error_code(42);
10012    /// ```
10013    pub fn set_error_code<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10014        self.error_code = v.into();
10015        self
10016    }
10017
10018    /// Sets the value of [location][crate::model::Job::location].
10019    ///
10020    /// # Example
10021    /// ```ignore,no_run
10022    /// # use google_cloud_securitycenter_v2::model::Job;
10023    /// let x = Job::new().set_location("example");
10024    /// ```
10025    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10026        self.location = v.into();
10027        self
10028    }
10029}
10030
10031impl wkt::message::Message for Job {
10032    fn typename() -> &'static str {
10033        "type.googleapis.com/google.cloud.securitycenter.v2.Job"
10034    }
10035}
10036
10037/// Kernel mode rootkit signatures.
10038#[derive(Clone, Default, PartialEq)]
10039#[non_exhaustive]
10040pub struct KernelRootkit {
10041    /// Rootkit name, when available.
10042    pub name: std::string::String,
10043
10044    /// True if unexpected modifications of kernel code memory are present.
10045    pub unexpected_code_modification: bool,
10046
10047    /// True if unexpected modifications of kernel read-only data memory are
10048    /// present.
10049    pub unexpected_read_only_data_modification: bool,
10050
10051    /// True if `ftrace` points are present with callbacks pointing to regions
10052    /// that are not in the expected kernel or module code range.
10053    pub unexpected_ftrace_handler: bool,
10054
10055    /// True if `kprobe` points are present with callbacks pointing to regions
10056    /// that are not in the expected kernel or module code range.
10057    pub unexpected_kprobe_handler: bool,
10058
10059    /// True if kernel code pages that are not in the expected kernel or module
10060    /// code regions are present.
10061    pub unexpected_kernel_code_pages: bool,
10062
10063    /// True if system call handlers that are are not in the expected kernel or
10064    /// module code regions are present.
10065    pub unexpected_system_call_handler: bool,
10066
10067    /// True if interrupt handlers that are are not in the expected kernel or
10068    /// module code regions are present.
10069    pub unexpected_interrupt_handler: bool,
10070
10071    /// True if unexpected processes in the scheduler run queue are present. Such
10072    /// processes are in the run queue, but not in the process task list.
10073    pub unexpected_processes_in_runqueue: bool,
10074
10075    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10076}
10077
10078impl KernelRootkit {
10079    /// Creates a new default instance.
10080    pub fn new() -> Self {
10081        std::default::Default::default()
10082    }
10083
10084    /// Sets the value of [name][crate::model::KernelRootkit::name].
10085    ///
10086    /// # Example
10087    /// ```ignore,no_run
10088    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10089    /// let x = KernelRootkit::new().set_name("example");
10090    /// ```
10091    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10092        self.name = v.into();
10093        self
10094    }
10095
10096    /// Sets the value of [unexpected_code_modification][crate::model::KernelRootkit::unexpected_code_modification].
10097    ///
10098    /// # Example
10099    /// ```ignore,no_run
10100    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10101    /// let x = KernelRootkit::new().set_unexpected_code_modification(true);
10102    /// ```
10103    pub fn set_unexpected_code_modification<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10104        self.unexpected_code_modification = v.into();
10105        self
10106    }
10107
10108    /// Sets the value of [unexpected_read_only_data_modification][crate::model::KernelRootkit::unexpected_read_only_data_modification].
10109    ///
10110    /// # Example
10111    /// ```ignore,no_run
10112    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10113    /// let x = KernelRootkit::new().set_unexpected_read_only_data_modification(true);
10114    /// ```
10115    pub fn set_unexpected_read_only_data_modification<T: std::convert::Into<bool>>(
10116        mut self,
10117        v: T,
10118    ) -> Self {
10119        self.unexpected_read_only_data_modification = v.into();
10120        self
10121    }
10122
10123    /// Sets the value of [unexpected_ftrace_handler][crate::model::KernelRootkit::unexpected_ftrace_handler].
10124    ///
10125    /// # Example
10126    /// ```ignore,no_run
10127    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10128    /// let x = KernelRootkit::new().set_unexpected_ftrace_handler(true);
10129    /// ```
10130    pub fn set_unexpected_ftrace_handler<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10131        self.unexpected_ftrace_handler = v.into();
10132        self
10133    }
10134
10135    /// Sets the value of [unexpected_kprobe_handler][crate::model::KernelRootkit::unexpected_kprobe_handler].
10136    ///
10137    /// # Example
10138    /// ```ignore,no_run
10139    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10140    /// let x = KernelRootkit::new().set_unexpected_kprobe_handler(true);
10141    /// ```
10142    pub fn set_unexpected_kprobe_handler<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10143        self.unexpected_kprobe_handler = v.into();
10144        self
10145    }
10146
10147    /// Sets the value of [unexpected_kernel_code_pages][crate::model::KernelRootkit::unexpected_kernel_code_pages].
10148    ///
10149    /// # Example
10150    /// ```ignore,no_run
10151    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10152    /// let x = KernelRootkit::new().set_unexpected_kernel_code_pages(true);
10153    /// ```
10154    pub fn set_unexpected_kernel_code_pages<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10155        self.unexpected_kernel_code_pages = v.into();
10156        self
10157    }
10158
10159    /// Sets the value of [unexpected_system_call_handler][crate::model::KernelRootkit::unexpected_system_call_handler].
10160    ///
10161    /// # Example
10162    /// ```ignore,no_run
10163    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10164    /// let x = KernelRootkit::new().set_unexpected_system_call_handler(true);
10165    /// ```
10166    pub fn set_unexpected_system_call_handler<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10167        self.unexpected_system_call_handler = v.into();
10168        self
10169    }
10170
10171    /// Sets the value of [unexpected_interrupt_handler][crate::model::KernelRootkit::unexpected_interrupt_handler].
10172    ///
10173    /// # Example
10174    /// ```ignore,no_run
10175    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10176    /// let x = KernelRootkit::new().set_unexpected_interrupt_handler(true);
10177    /// ```
10178    pub fn set_unexpected_interrupt_handler<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10179        self.unexpected_interrupt_handler = v.into();
10180        self
10181    }
10182
10183    /// Sets the value of [unexpected_processes_in_runqueue][crate::model::KernelRootkit::unexpected_processes_in_runqueue].
10184    ///
10185    /// # Example
10186    /// ```ignore,no_run
10187    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10188    /// let x = KernelRootkit::new().set_unexpected_processes_in_runqueue(true);
10189    /// ```
10190    pub fn set_unexpected_processes_in_runqueue<T: std::convert::Into<bool>>(
10191        mut self,
10192        v: T,
10193    ) -> Self {
10194        self.unexpected_processes_in_runqueue = v.into();
10195        self
10196    }
10197}
10198
10199impl wkt::message::Message for KernelRootkit {
10200    fn typename() -> &'static str {
10201        "type.googleapis.com/google.cloud.securitycenter.v2.KernelRootkit"
10202    }
10203}
10204
10205/// Kubernetes-related attributes.
10206#[derive(Clone, Default, PartialEq)]
10207#[non_exhaustive]
10208pub struct Kubernetes {
10209    /// Kubernetes
10210    /// [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
10211    /// associated with the finding. This field contains Pod records for each
10212    /// container that is owned by a Pod.
10213    pub pods: std::vec::Vec<crate::model::kubernetes::Pod>,
10214
10215    /// Provides Kubernetes
10216    /// [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
10217    /// information.
10218    pub nodes: std::vec::Vec<crate::model::kubernetes::Node>,
10219
10220    /// GKE [node
10221    /// pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
10222    /// associated with the finding. This field contains node pool information for
10223    /// each node, when it is available.
10224    pub node_pools: std::vec::Vec<crate::model::kubernetes::NodePool>,
10225
10226    /// Provides Kubernetes role information for findings that involve [Roles or
10227    /// ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
10228    pub roles: std::vec::Vec<crate::model::kubernetes::Role>,
10229
10230    /// Provides Kubernetes role binding information for findings that involve
10231    /// [RoleBindings or
10232    /// ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
10233    pub bindings: std::vec::Vec<crate::model::kubernetes::Binding>,
10234
10235    /// Provides information on any Kubernetes access reviews (privilege checks)
10236    /// relevant to the finding.
10237    pub access_reviews: std::vec::Vec<crate::model::kubernetes::AccessReview>,
10238
10239    /// Kubernetes objects related to the finding.
10240    pub objects: std::vec::Vec<crate::model::kubernetes::Object>,
10241
10242    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10243}
10244
10245impl Kubernetes {
10246    /// Creates a new default instance.
10247    pub fn new() -> Self {
10248        std::default::Default::default()
10249    }
10250
10251    /// Sets the value of [pods][crate::model::Kubernetes::pods].
10252    ///
10253    /// # Example
10254    /// ```ignore,no_run
10255    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10256    /// use google_cloud_securitycenter_v2::model::kubernetes::Pod;
10257    /// let x = Kubernetes::new()
10258    ///     .set_pods([
10259    ///         Pod::default()/* use setters */,
10260    ///         Pod::default()/* use (different) setters */,
10261    ///     ]);
10262    /// ```
10263    pub fn set_pods<T, V>(mut self, v: T) -> Self
10264    where
10265        T: std::iter::IntoIterator<Item = V>,
10266        V: std::convert::Into<crate::model::kubernetes::Pod>,
10267    {
10268        use std::iter::Iterator;
10269        self.pods = v.into_iter().map(|i| i.into()).collect();
10270        self
10271    }
10272
10273    /// Sets the value of [nodes][crate::model::Kubernetes::nodes].
10274    ///
10275    /// # Example
10276    /// ```ignore,no_run
10277    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10278    /// use google_cloud_securitycenter_v2::model::kubernetes::Node;
10279    /// let x = Kubernetes::new()
10280    ///     .set_nodes([
10281    ///         Node::default()/* use setters */,
10282    ///         Node::default()/* use (different) setters */,
10283    ///     ]);
10284    /// ```
10285    pub fn set_nodes<T, V>(mut self, v: T) -> Self
10286    where
10287        T: std::iter::IntoIterator<Item = V>,
10288        V: std::convert::Into<crate::model::kubernetes::Node>,
10289    {
10290        use std::iter::Iterator;
10291        self.nodes = v.into_iter().map(|i| i.into()).collect();
10292        self
10293    }
10294
10295    /// Sets the value of [node_pools][crate::model::Kubernetes::node_pools].
10296    ///
10297    /// # Example
10298    /// ```ignore,no_run
10299    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10300    /// use google_cloud_securitycenter_v2::model::kubernetes::NodePool;
10301    /// let x = Kubernetes::new()
10302    ///     .set_node_pools([
10303    ///         NodePool::default()/* use setters */,
10304    ///         NodePool::default()/* use (different) setters */,
10305    ///     ]);
10306    /// ```
10307    pub fn set_node_pools<T, V>(mut self, v: T) -> Self
10308    where
10309        T: std::iter::IntoIterator<Item = V>,
10310        V: std::convert::Into<crate::model::kubernetes::NodePool>,
10311    {
10312        use std::iter::Iterator;
10313        self.node_pools = v.into_iter().map(|i| i.into()).collect();
10314        self
10315    }
10316
10317    /// Sets the value of [roles][crate::model::Kubernetes::roles].
10318    ///
10319    /// # Example
10320    /// ```ignore,no_run
10321    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10322    /// use google_cloud_securitycenter_v2::model::kubernetes::Role;
10323    /// let x = Kubernetes::new()
10324    ///     .set_roles([
10325    ///         Role::default()/* use setters */,
10326    ///         Role::default()/* use (different) setters */,
10327    ///     ]);
10328    /// ```
10329    pub fn set_roles<T, V>(mut self, v: T) -> Self
10330    where
10331        T: std::iter::IntoIterator<Item = V>,
10332        V: std::convert::Into<crate::model::kubernetes::Role>,
10333    {
10334        use std::iter::Iterator;
10335        self.roles = v.into_iter().map(|i| i.into()).collect();
10336        self
10337    }
10338
10339    /// Sets the value of [bindings][crate::model::Kubernetes::bindings].
10340    ///
10341    /// # Example
10342    /// ```ignore,no_run
10343    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10344    /// use google_cloud_securitycenter_v2::model::kubernetes::Binding;
10345    /// let x = Kubernetes::new()
10346    ///     .set_bindings([
10347    ///         Binding::default()/* use setters */,
10348    ///         Binding::default()/* use (different) setters */,
10349    ///     ]);
10350    /// ```
10351    pub fn set_bindings<T, V>(mut self, v: T) -> Self
10352    where
10353        T: std::iter::IntoIterator<Item = V>,
10354        V: std::convert::Into<crate::model::kubernetes::Binding>,
10355    {
10356        use std::iter::Iterator;
10357        self.bindings = v.into_iter().map(|i| i.into()).collect();
10358        self
10359    }
10360
10361    /// Sets the value of [access_reviews][crate::model::Kubernetes::access_reviews].
10362    ///
10363    /// # Example
10364    /// ```ignore,no_run
10365    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10366    /// use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
10367    /// let x = Kubernetes::new()
10368    ///     .set_access_reviews([
10369    ///         AccessReview::default()/* use setters */,
10370    ///         AccessReview::default()/* use (different) setters */,
10371    ///     ]);
10372    /// ```
10373    pub fn set_access_reviews<T, V>(mut self, v: T) -> Self
10374    where
10375        T: std::iter::IntoIterator<Item = V>,
10376        V: std::convert::Into<crate::model::kubernetes::AccessReview>,
10377    {
10378        use std::iter::Iterator;
10379        self.access_reviews = v.into_iter().map(|i| i.into()).collect();
10380        self
10381    }
10382
10383    /// Sets the value of [objects][crate::model::Kubernetes::objects].
10384    ///
10385    /// # Example
10386    /// ```ignore,no_run
10387    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10388    /// use google_cloud_securitycenter_v2::model::kubernetes::Object;
10389    /// let x = Kubernetes::new()
10390    ///     .set_objects([
10391    ///         Object::default()/* use setters */,
10392    ///         Object::default()/* use (different) setters */,
10393    ///     ]);
10394    /// ```
10395    pub fn set_objects<T, V>(mut self, v: T) -> Self
10396    where
10397        T: std::iter::IntoIterator<Item = V>,
10398        V: std::convert::Into<crate::model::kubernetes::Object>,
10399    {
10400        use std::iter::Iterator;
10401        self.objects = v.into_iter().map(|i| i.into()).collect();
10402        self
10403    }
10404}
10405
10406impl wkt::message::Message for Kubernetes {
10407    fn typename() -> &'static str {
10408        "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes"
10409    }
10410}
10411
10412/// Defines additional types related to [Kubernetes].
10413pub mod kubernetes {
10414    #[allow(unused_imports)]
10415    use super::*;
10416
10417    /// A Kubernetes Pod.
10418    #[derive(Clone, Default, PartialEq)]
10419    #[non_exhaustive]
10420    pub struct Pod {
10421        /// Kubernetes Pod namespace.
10422        pub ns: std::string::String,
10423
10424        /// Kubernetes Pod name.
10425        pub name: std::string::String,
10426
10427        /// Pod labels.  For Kubernetes containers, these are applied to the
10428        /// container.
10429        pub labels: std::vec::Vec<crate::model::Label>,
10430
10431        /// Pod containers associated with this finding, if any.
10432        pub containers: std::vec::Vec<crate::model::Container>,
10433
10434        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10435    }
10436
10437    impl Pod {
10438        /// Creates a new default instance.
10439        pub fn new() -> Self {
10440            std::default::Default::default()
10441        }
10442
10443        /// Sets the value of [ns][crate::model::kubernetes::Pod::ns].
10444        ///
10445        /// # Example
10446        /// ```ignore,no_run
10447        /// # use google_cloud_securitycenter_v2::model::kubernetes::Pod;
10448        /// let x = Pod::new().set_ns("example");
10449        /// ```
10450        pub fn set_ns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10451            self.ns = v.into();
10452            self
10453        }
10454
10455        /// Sets the value of [name][crate::model::kubernetes::Pod::name].
10456        ///
10457        /// # Example
10458        /// ```ignore,no_run
10459        /// # use google_cloud_securitycenter_v2::model::kubernetes::Pod;
10460        /// let x = Pod::new().set_name("example");
10461        /// ```
10462        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10463            self.name = v.into();
10464            self
10465        }
10466
10467        /// Sets the value of [labels][crate::model::kubernetes::Pod::labels].
10468        ///
10469        /// # Example
10470        /// ```ignore,no_run
10471        /// # use google_cloud_securitycenter_v2::model::kubernetes::Pod;
10472        /// use google_cloud_securitycenter_v2::model::Label;
10473        /// let x = Pod::new()
10474        ///     .set_labels([
10475        ///         Label::default()/* use setters */,
10476        ///         Label::default()/* use (different) setters */,
10477        ///     ]);
10478        /// ```
10479        pub fn set_labels<T, V>(mut self, v: T) -> Self
10480        where
10481            T: std::iter::IntoIterator<Item = V>,
10482            V: std::convert::Into<crate::model::Label>,
10483        {
10484            use std::iter::Iterator;
10485            self.labels = v.into_iter().map(|i| i.into()).collect();
10486            self
10487        }
10488
10489        /// Sets the value of [containers][crate::model::kubernetes::Pod::containers].
10490        ///
10491        /// # Example
10492        /// ```ignore,no_run
10493        /// # use google_cloud_securitycenter_v2::model::kubernetes::Pod;
10494        /// use google_cloud_securitycenter_v2::model::Container;
10495        /// let x = Pod::new()
10496        ///     .set_containers([
10497        ///         Container::default()/* use setters */,
10498        ///         Container::default()/* use (different) setters */,
10499        ///     ]);
10500        /// ```
10501        pub fn set_containers<T, V>(mut self, v: T) -> Self
10502        where
10503            T: std::iter::IntoIterator<Item = V>,
10504            V: std::convert::Into<crate::model::Container>,
10505        {
10506            use std::iter::Iterator;
10507            self.containers = v.into_iter().map(|i| i.into()).collect();
10508            self
10509        }
10510    }
10511
10512    impl wkt::message::Message for Pod {
10513        fn typename() -> &'static str {
10514            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.Pod"
10515        }
10516    }
10517
10518    /// Kubernetes nodes associated with the finding.
10519    #[derive(Clone, Default, PartialEq)]
10520    #[non_exhaustive]
10521    pub struct Node {
10522        /// [Full resource name](https://google.aip.dev/122#full-resource-names) of
10523        /// the Compute Engine VM running the cluster node.
10524        pub name: std::string::String,
10525
10526        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10527    }
10528
10529    impl Node {
10530        /// Creates a new default instance.
10531        pub fn new() -> Self {
10532            std::default::Default::default()
10533        }
10534
10535        /// Sets the value of [name][crate::model::kubernetes::Node::name].
10536        ///
10537        /// # Example
10538        /// ```ignore,no_run
10539        /// # use google_cloud_securitycenter_v2::model::kubernetes::Node;
10540        /// let x = Node::new().set_name("example");
10541        /// ```
10542        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10543            self.name = v.into();
10544            self
10545        }
10546    }
10547
10548    impl wkt::message::Message for Node {
10549        fn typename() -> &'static str {
10550            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.Node"
10551        }
10552    }
10553
10554    /// Provides GKE node pool information.
10555    #[derive(Clone, Default, PartialEq)]
10556    #[non_exhaustive]
10557    pub struct NodePool {
10558        /// Kubernetes node pool name.
10559        pub name: std::string::String,
10560
10561        /// Nodes associated with the finding.
10562        pub nodes: std::vec::Vec<crate::model::kubernetes::Node>,
10563
10564        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10565    }
10566
10567    impl NodePool {
10568        /// Creates a new default instance.
10569        pub fn new() -> Self {
10570            std::default::Default::default()
10571        }
10572
10573        /// Sets the value of [name][crate::model::kubernetes::NodePool::name].
10574        ///
10575        /// # Example
10576        /// ```ignore,no_run
10577        /// # use google_cloud_securitycenter_v2::model::kubernetes::NodePool;
10578        /// let x = NodePool::new().set_name("example");
10579        /// ```
10580        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10581            self.name = v.into();
10582            self
10583        }
10584
10585        /// Sets the value of [nodes][crate::model::kubernetes::NodePool::nodes].
10586        ///
10587        /// # Example
10588        /// ```ignore,no_run
10589        /// # use google_cloud_securitycenter_v2::model::kubernetes::NodePool;
10590        /// use google_cloud_securitycenter_v2::model::kubernetes::Node;
10591        /// let x = NodePool::new()
10592        ///     .set_nodes([
10593        ///         Node::default()/* use setters */,
10594        ///         Node::default()/* use (different) setters */,
10595        ///     ]);
10596        /// ```
10597        pub fn set_nodes<T, V>(mut self, v: T) -> Self
10598        where
10599            T: std::iter::IntoIterator<Item = V>,
10600            V: std::convert::Into<crate::model::kubernetes::Node>,
10601        {
10602            use std::iter::Iterator;
10603            self.nodes = v.into_iter().map(|i| i.into()).collect();
10604            self
10605        }
10606    }
10607
10608    impl wkt::message::Message for NodePool {
10609        fn typename() -> &'static str {
10610            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.NodePool"
10611        }
10612    }
10613
10614    /// Kubernetes Role or ClusterRole.
10615    #[derive(Clone, Default, PartialEq)]
10616    #[non_exhaustive]
10617    pub struct Role {
10618        /// Role type.
10619        pub kind: crate::model::kubernetes::role::Kind,
10620
10621        /// Role namespace.
10622        pub ns: std::string::String,
10623
10624        /// Role name.
10625        pub name: std::string::String,
10626
10627        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10628    }
10629
10630    impl Role {
10631        /// Creates a new default instance.
10632        pub fn new() -> Self {
10633            std::default::Default::default()
10634        }
10635
10636        /// Sets the value of [kind][crate::model::kubernetes::Role::kind].
10637        ///
10638        /// # Example
10639        /// ```ignore,no_run
10640        /// # use google_cloud_securitycenter_v2::model::kubernetes::Role;
10641        /// use google_cloud_securitycenter_v2::model::kubernetes::role::Kind;
10642        /// let x0 = Role::new().set_kind(Kind::Role);
10643        /// let x1 = Role::new().set_kind(Kind::ClusterRole);
10644        /// ```
10645        pub fn set_kind<T: std::convert::Into<crate::model::kubernetes::role::Kind>>(
10646            mut self,
10647            v: T,
10648        ) -> Self {
10649            self.kind = v.into();
10650            self
10651        }
10652
10653        /// Sets the value of [ns][crate::model::kubernetes::Role::ns].
10654        ///
10655        /// # Example
10656        /// ```ignore,no_run
10657        /// # use google_cloud_securitycenter_v2::model::kubernetes::Role;
10658        /// let x = Role::new().set_ns("example");
10659        /// ```
10660        pub fn set_ns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10661            self.ns = v.into();
10662            self
10663        }
10664
10665        /// Sets the value of [name][crate::model::kubernetes::Role::name].
10666        ///
10667        /// # Example
10668        /// ```ignore,no_run
10669        /// # use google_cloud_securitycenter_v2::model::kubernetes::Role;
10670        /// let x = Role::new().set_name("example");
10671        /// ```
10672        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10673            self.name = v.into();
10674            self
10675        }
10676    }
10677
10678    impl wkt::message::Message for Role {
10679        fn typename() -> &'static str {
10680            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.Role"
10681        }
10682    }
10683
10684    /// Defines additional types related to [Role].
10685    pub mod role {
10686        #[allow(unused_imports)]
10687        use super::*;
10688
10689        /// Types of Kubernetes roles.
10690        ///
10691        /// # Working with unknown values
10692        ///
10693        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10694        /// additional enum variants at any time. Adding new variants is not considered
10695        /// a breaking change. Applications should write their code in anticipation of:
10696        ///
10697        /// - New values appearing in future releases of the client library, **and**
10698        /// - New values received dynamically, without application changes.
10699        ///
10700        /// Please consult the [Working with enums] section in the user guide for some
10701        /// guidelines.
10702        ///
10703        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10704        #[derive(Clone, Debug, PartialEq)]
10705        #[non_exhaustive]
10706        pub enum Kind {
10707            /// Role type is not specified.
10708            Unspecified,
10709            /// Kubernetes Role.
10710            Role,
10711            /// Kubernetes ClusterRole.
10712            ClusterRole,
10713            /// If set, the enum was initialized with an unknown value.
10714            ///
10715            /// Applications can examine the value using [Kind::value] or
10716            /// [Kind::name].
10717            UnknownValue(kind::UnknownValue),
10718        }
10719
10720        #[doc(hidden)]
10721        pub mod kind {
10722            #[allow(unused_imports)]
10723            use super::*;
10724            #[derive(Clone, Debug, PartialEq)]
10725            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10726        }
10727
10728        impl Kind {
10729            /// Gets the enum value.
10730            ///
10731            /// Returns `None` if the enum contains an unknown value deserialized from
10732            /// the string representation of enums.
10733            pub fn value(&self) -> std::option::Option<i32> {
10734                match self {
10735                    Self::Unspecified => std::option::Option::Some(0),
10736                    Self::Role => std::option::Option::Some(1),
10737                    Self::ClusterRole => std::option::Option::Some(2),
10738                    Self::UnknownValue(u) => u.0.value(),
10739                }
10740            }
10741
10742            /// Gets the enum value as a string.
10743            ///
10744            /// Returns `None` if the enum contains an unknown value deserialized from
10745            /// the integer representation of enums.
10746            pub fn name(&self) -> std::option::Option<&str> {
10747                match self {
10748                    Self::Unspecified => std::option::Option::Some("KIND_UNSPECIFIED"),
10749                    Self::Role => std::option::Option::Some("ROLE"),
10750                    Self::ClusterRole => std::option::Option::Some("CLUSTER_ROLE"),
10751                    Self::UnknownValue(u) => u.0.name(),
10752                }
10753            }
10754        }
10755
10756        impl std::default::Default for Kind {
10757            fn default() -> Self {
10758                use std::convert::From;
10759                Self::from(0)
10760            }
10761        }
10762
10763        impl std::fmt::Display for Kind {
10764            fn fmt(
10765                &self,
10766                f: &mut std::fmt::Formatter<'_>,
10767            ) -> std::result::Result<(), std::fmt::Error> {
10768                wkt::internal::display_enum(f, self.name(), self.value())
10769            }
10770        }
10771
10772        impl std::convert::From<i32> for Kind {
10773            fn from(value: i32) -> Self {
10774                match value {
10775                    0 => Self::Unspecified,
10776                    1 => Self::Role,
10777                    2 => Self::ClusterRole,
10778                    _ => Self::UnknownValue(kind::UnknownValue(
10779                        wkt::internal::UnknownEnumValue::Integer(value),
10780                    )),
10781                }
10782            }
10783        }
10784
10785        impl std::convert::From<&str> for Kind {
10786            fn from(value: &str) -> Self {
10787                use std::string::ToString;
10788                match value {
10789                    "KIND_UNSPECIFIED" => Self::Unspecified,
10790                    "ROLE" => Self::Role,
10791                    "CLUSTER_ROLE" => Self::ClusterRole,
10792                    _ => Self::UnknownValue(kind::UnknownValue(
10793                        wkt::internal::UnknownEnumValue::String(value.to_string()),
10794                    )),
10795                }
10796            }
10797        }
10798
10799        impl serde::ser::Serialize for Kind {
10800            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10801            where
10802                S: serde::Serializer,
10803            {
10804                match self {
10805                    Self::Unspecified => serializer.serialize_i32(0),
10806                    Self::Role => serializer.serialize_i32(1),
10807                    Self::ClusterRole => serializer.serialize_i32(2),
10808                    Self::UnknownValue(u) => u.0.serialize(serializer),
10809                }
10810            }
10811        }
10812
10813        impl<'de> serde::de::Deserialize<'de> for Kind {
10814            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10815            where
10816                D: serde::Deserializer<'de>,
10817            {
10818                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Kind>::new(
10819                    ".google.cloud.securitycenter.v2.Kubernetes.Role.Kind",
10820                ))
10821            }
10822        }
10823    }
10824
10825    /// Represents a Kubernetes RoleBinding or ClusterRoleBinding.
10826    #[derive(Clone, Default, PartialEq)]
10827    #[non_exhaustive]
10828    pub struct Binding {
10829        /// Namespace for the binding.
10830        pub ns: std::string::String,
10831
10832        /// Name for the binding.
10833        pub name: std::string::String,
10834
10835        /// The Role or ClusterRole referenced by the binding.
10836        pub role: std::option::Option<crate::model::kubernetes::Role>,
10837
10838        /// Represents one or more subjects that are bound to the role. Not always
10839        /// available for PATCH requests.
10840        pub subjects: std::vec::Vec<crate::model::kubernetes::Subject>,
10841
10842        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10843    }
10844
10845    impl Binding {
10846        /// Creates a new default instance.
10847        pub fn new() -> Self {
10848            std::default::Default::default()
10849        }
10850
10851        /// Sets the value of [ns][crate::model::kubernetes::Binding::ns].
10852        ///
10853        /// # Example
10854        /// ```ignore,no_run
10855        /// # use google_cloud_securitycenter_v2::model::kubernetes::Binding;
10856        /// let x = Binding::new().set_ns("example");
10857        /// ```
10858        pub fn set_ns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10859            self.ns = v.into();
10860            self
10861        }
10862
10863        /// Sets the value of [name][crate::model::kubernetes::Binding::name].
10864        ///
10865        /// # Example
10866        /// ```ignore,no_run
10867        /// # use google_cloud_securitycenter_v2::model::kubernetes::Binding;
10868        /// let x = Binding::new().set_name("example");
10869        /// ```
10870        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10871            self.name = v.into();
10872            self
10873        }
10874
10875        /// Sets the value of [role][crate::model::kubernetes::Binding::role].
10876        ///
10877        /// # Example
10878        /// ```ignore,no_run
10879        /// # use google_cloud_securitycenter_v2::model::kubernetes::Binding;
10880        /// use google_cloud_securitycenter_v2::model::kubernetes::Role;
10881        /// let x = Binding::new().set_role(Role::default()/* use setters */);
10882        /// ```
10883        pub fn set_role<T>(mut self, v: T) -> Self
10884        where
10885            T: std::convert::Into<crate::model::kubernetes::Role>,
10886        {
10887            self.role = std::option::Option::Some(v.into());
10888            self
10889        }
10890
10891        /// Sets or clears the value of [role][crate::model::kubernetes::Binding::role].
10892        ///
10893        /// # Example
10894        /// ```ignore,no_run
10895        /// # use google_cloud_securitycenter_v2::model::kubernetes::Binding;
10896        /// use google_cloud_securitycenter_v2::model::kubernetes::Role;
10897        /// let x = Binding::new().set_or_clear_role(Some(Role::default()/* use setters */));
10898        /// let x = Binding::new().set_or_clear_role(None::<Role>);
10899        /// ```
10900        pub fn set_or_clear_role<T>(mut self, v: std::option::Option<T>) -> Self
10901        where
10902            T: std::convert::Into<crate::model::kubernetes::Role>,
10903        {
10904            self.role = v.map(|x| x.into());
10905            self
10906        }
10907
10908        /// Sets the value of [subjects][crate::model::kubernetes::Binding::subjects].
10909        ///
10910        /// # Example
10911        /// ```ignore,no_run
10912        /// # use google_cloud_securitycenter_v2::model::kubernetes::Binding;
10913        /// use google_cloud_securitycenter_v2::model::kubernetes::Subject;
10914        /// let x = Binding::new()
10915        ///     .set_subjects([
10916        ///         Subject::default()/* use setters */,
10917        ///         Subject::default()/* use (different) setters */,
10918        ///     ]);
10919        /// ```
10920        pub fn set_subjects<T, V>(mut self, v: T) -> Self
10921        where
10922            T: std::iter::IntoIterator<Item = V>,
10923            V: std::convert::Into<crate::model::kubernetes::Subject>,
10924        {
10925            use std::iter::Iterator;
10926            self.subjects = v.into_iter().map(|i| i.into()).collect();
10927            self
10928        }
10929    }
10930
10931    impl wkt::message::Message for Binding {
10932        fn typename() -> &'static str {
10933            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.Binding"
10934        }
10935    }
10936
10937    /// Represents a Kubernetes subject.
10938    #[derive(Clone, Default, PartialEq)]
10939    #[non_exhaustive]
10940    pub struct Subject {
10941        /// Authentication type for the subject.
10942        pub kind: crate::model::kubernetes::subject::AuthType,
10943
10944        /// Namespace for the subject.
10945        pub ns: std::string::String,
10946
10947        /// Name for the subject.
10948        pub name: std::string::String,
10949
10950        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10951    }
10952
10953    impl Subject {
10954        /// Creates a new default instance.
10955        pub fn new() -> Self {
10956            std::default::Default::default()
10957        }
10958
10959        /// Sets the value of [kind][crate::model::kubernetes::Subject::kind].
10960        ///
10961        /// # Example
10962        /// ```ignore,no_run
10963        /// # use google_cloud_securitycenter_v2::model::kubernetes::Subject;
10964        /// use google_cloud_securitycenter_v2::model::kubernetes::subject::AuthType;
10965        /// let x0 = Subject::new().set_kind(AuthType::User);
10966        /// let x1 = Subject::new().set_kind(AuthType::Serviceaccount);
10967        /// let x2 = Subject::new().set_kind(AuthType::Group);
10968        /// ```
10969        pub fn set_kind<T: std::convert::Into<crate::model::kubernetes::subject::AuthType>>(
10970            mut self,
10971            v: T,
10972        ) -> Self {
10973            self.kind = v.into();
10974            self
10975        }
10976
10977        /// Sets the value of [ns][crate::model::kubernetes::Subject::ns].
10978        ///
10979        /// # Example
10980        /// ```ignore,no_run
10981        /// # use google_cloud_securitycenter_v2::model::kubernetes::Subject;
10982        /// let x = Subject::new().set_ns("example");
10983        /// ```
10984        pub fn set_ns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10985            self.ns = v.into();
10986            self
10987        }
10988
10989        /// Sets the value of [name][crate::model::kubernetes::Subject::name].
10990        ///
10991        /// # Example
10992        /// ```ignore,no_run
10993        /// # use google_cloud_securitycenter_v2::model::kubernetes::Subject;
10994        /// let x = Subject::new().set_name("example");
10995        /// ```
10996        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10997            self.name = v.into();
10998            self
10999        }
11000    }
11001
11002    impl wkt::message::Message for Subject {
11003        fn typename() -> &'static str {
11004            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.Subject"
11005        }
11006    }
11007
11008    /// Defines additional types related to [Subject].
11009    pub mod subject {
11010        #[allow(unused_imports)]
11011        use super::*;
11012
11013        /// Auth types that can be used for the subject's kind field.
11014        ///
11015        /// # Working with unknown values
11016        ///
11017        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11018        /// additional enum variants at any time. Adding new variants is not considered
11019        /// a breaking change. Applications should write their code in anticipation of:
11020        ///
11021        /// - New values appearing in future releases of the client library, **and**
11022        /// - New values received dynamically, without application changes.
11023        ///
11024        /// Please consult the [Working with enums] section in the user guide for some
11025        /// guidelines.
11026        ///
11027        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11028        #[derive(Clone, Debug, PartialEq)]
11029        #[non_exhaustive]
11030        pub enum AuthType {
11031            /// Authentication is not specified.
11032            Unspecified,
11033            /// User with valid certificate.
11034            User,
11035            /// Users managed by Kubernetes API with credentials stored as secrets.
11036            Serviceaccount,
11037            /// Collection of users.
11038            Group,
11039            /// If set, the enum was initialized with an unknown value.
11040            ///
11041            /// Applications can examine the value using [AuthType::value] or
11042            /// [AuthType::name].
11043            UnknownValue(auth_type::UnknownValue),
11044        }
11045
11046        #[doc(hidden)]
11047        pub mod auth_type {
11048            #[allow(unused_imports)]
11049            use super::*;
11050            #[derive(Clone, Debug, PartialEq)]
11051            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11052        }
11053
11054        impl AuthType {
11055            /// Gets the enum value.
11056            ///
11057            /// Returns `None` if the enum contains an unknown value deserialized from
11058            /// the string representation of enums.
11059            pub fn value(&self) -> std::option::Option<i32> {
11060                match self {
11061                    Self::Unspecified => std::option::Option::Some(0),
11062                    Self::User => std::option::Option::Some(1),
11063                    Self::Serviceaccount => std::option::Option::Some(2),
11064                    Self::Group => std::option::Option::Some(3),
11065                    Self::UnknownValue(u) => u.0.value(),
11066                }
11067            }
11068
11069            /// Gets the enum value as a string.
11070            ///
11071            /// Returns `None` if the enum contains an unknown value deserialized from
11072            /// the integer representation of enums.
11073            pub fn name(&self) -> std::option::Option<&str> {
11074                match self {
11075                    Self::Unspecified => std::option::Option::Some("AUTH_TYPE_UNSPECIFIED"),
11076                    Self::User => std::option::Option::Some("USER"),
11077                    Self::Serviceaccount => std::option::Option::Some("SERVICEACCOUNT"),
11078                    Self::Group => std::option::Option::Some("GROUP"),
11079                    Self::UnknownValue(u) => u.0.name(),
11080                }
11081            }
11082        }
11083
11084        impl std::default::Default for AuthType {
11085            fn default() -> Self {
11086                use std::convert::From;
11087                Self::from(0)
11088            }
11089        }
11090
11091        impl std::fmt::Display for AuthType {
11092            fn fmt(
11093                &self,
11094                f: &mut std::fmt::Formatter<'_>,
11095            ) -> std::result::Result<(), std::fmt::Error> {
11096                wkt::internal::display_enum(f, self.name(), self.value())
11097            }
11098        }
11099
11100        impl std::convert::From<i32> for AuthType {
11101            fn from(value: i32) -> Self {
11102                match value {
11103                    0 => Self::Unspecified,
11104                    1 => Self::User,
11105                    2 => Self::Serviceaccount,
11106                    3 => Self::Group,
11107                    _ => Self::UnknownValue(auth_type::UnknownValue(
11108                        wkt::internal::UnknownEnumValue::Integer(value),
11109                    )),
11110                }
11111            }
11112        }
11113
11114        impl std::convert::From<&str> for AuthType {
11115            fn from(value: &str) -> Self {
11116                use std::string::ToString;
11117                match value {
11118                    "AUTH_TYPE_UNSPECIFIED" => Self::Unspecified,
11119                    "USER" => Self::User,
11120                    "SERVICEACCOUNT" => Self::Serviceaccount,
11121                    "GROUP" => Self::Group,
11122                    _ => Self::UnknownValue(auth_type::UnknownValue(
11123                        wkt::internal::UnknownEnumValue::String(value.to_string()),
11124                    )),
11125                }
11126            }
11127        }
11128
11129        impl serde::ser::Serialize for AuthType {
11130            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11131            where
11132                S: serde::Serializer,
11133            {
11134                match self {
11135                    Self::Unspecified => serializer.serialize_i32(0),
11136                    Self::User => serializer.serialize_i32(1),
11137                    Self::Serviceaccount => serializer.serialize_i32(2),
11138                    Self::Group => serializer.serialize_i32(3),
11139                    Self::UnknownValue(u) => u.0.serialize(serializer),
11140                }
11141            }
11142        }
11143
11144        impl<'de> serde::de::Deserialize<'de> for AuthType {
11145            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11146            where
11147                D: serde::Deserializer<'de>,
11148            {
11149                deserializer.deserialize_any(wkt::internal::EnumVisitor::<AuthType>::new(
11150                    ".google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType",
11151                ))
11152            }
11153        }
11154    }
11155
11156    /// Conveys information about a Kubernetes access review (such as one returned
11157    /// by a [`kubectl auth
11158    /// can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access)
11159    /// command) that was involved in a finding.
11160    #[derive(Clone, Default, PartialEq)]
11161    #[non_exhaustive]
11162    pub struct AccessReview {
11163        /// The API group of the resource. "*" means all.
11164        pub group: std::string::String,
11165
11166        /// Namespace of the action being requested. Currently, there is no
11167        /// distinction between no namespace and all namespaces.  Both
11168        /// are represented by "" (empty).
11169        pub ns: std::string::String,
11170
11171        /// The name of the resource being requested. Empty means all.
11172        pub name: std::string::String,
11173
11174        /// The optional resource type requested. "*" means all.
11175        pub resource: std::string::String,
11176
11177        /// The optional subresource type.
11178        pub subresource: std::string::String,
11179
11180        /// A Kubernetes resource API verb, like get, list, watch, create, update,
11181        /// delete, proxy. "*" means all.
11182        pub verb: std::string::String,
11183
11184        /// The API version of the resource. "*" means all.
11185        pub version: std::string::String,
11186
11187        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11188    }
11189
11190    impl AccessReview {
11191        /// Creates a new default instance.
11192        pub fn new() -> Self {
11193            std::default::Default::default()
11194        }
11195
11196        /// Sets the value of [group][crate::model::kubernetes::AccessReview::group].
11197        ///
11198        /// # Example
11199        /// ```ignore,no_run
11200        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11201        /// let x = AccessReview::new().set_group("example");
11202        /// ```
11203        pub fn set_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11204            self.group = v.into();
11205            self
11206        }
11207
11208        /// Sets the value of [ns][crate::model::kubernetes::AccessReview::ns].
11209        ///
11210        /// # Example
11211        /// ```ignore,no_run
11212        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11213        /// let x = AccessReview::new().set_ns("example");
11214        /// ```
11215        pub fn set_ns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11216            self.ns = v.into();
11217            self
11218        }
11219
11220        /// Sets the value of [name][crate::model::kubernetes::AccessReview::name].
11221        ///
11222        /// # Example
11223        /// ```ignore,no_run
11224        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11225        /// let x = AccessReview::new().set_name("example");
11226        /// ```
11227        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11228            self.name = v.into();
11229            self
11230        }
11231
11232        /// Sets the value of [resource][crate::model::kubernetes::AccessReview::resource].
11233        ///
11234        /// # Example
11235        /// ```ignore,no_run
11236        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11237        /// let x = AccessReview::new().set_resource("example");
11238        /// ```
11239        pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11240            self.resource = v.into();
11241            self
11242        }
11243
11244        /// Sets the value of [subresource][crate::model::kubernetes::AccessReview::subresource].
11245        ///
11246        /// # Example
11247        /// ```ignore,no_run
11248        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11249        /// let x = AccessReview::new().set_subresource("example");
11250        /// ```
11251        pub fn set_subresource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11252            self.subresource = v.into();
11253            self
11254        }
11255
11256        /// Sets the value of [verb][crate::model::kubernetes::AccessReview::verb].
11257        ///
11258        /// # Example
11259        /// ```ignore,no_run
11260        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11261        /// let x = AccessReview::new().set_verb("example");
11262        /// ```
11263        pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11264            self.verb = v.into();
11265            self
11266        }
11267
11268        /// Sets the value of [version][crate::model::kubernetes::AccessReview::version].
11269        ///
11270        /// # Example
11271        /// ```ignore,no_run
11272        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11273        /// let x = AccessReview::new().set_version("example");
11274        /// ```
11275        pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11276            self.version = v.into();
11277            self
11278        }
11279    }
11280
11281    impl wkt::message::Message for AccessReview {
11282        fn typename() -> &'static str {
11283            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.AccessReview"
11284        }
11285    }
11286
11287    /// Kubernetes object related to the finding, uniquely identified by GKNN.
11288    /// Used if the object Kind is not one of Pod, Node, NodePool, Binding, or
11289    /// AccessReview.
11290    #[derive(Clone, Default, PartialEq)]
11291    #[non_exhaustive]
11292    pub struct Object {
11293        /// Kubernetes object group, such as "policy.k8s.io/v1".
11294        pub group: std::string::String,
11295
11296        /// Kubernetes object kind, such as "Namespace".
11297        pub kind: std::string::String,
11298
11299        /// Kubernetes object namespace. Must be a valid DNS label. Named
11300        /// "ns" to avoid collision with C++ namespace keyword. For details see
11301        /// <https://kubernetes.io/docs/tasks/administer-cluster/namespaces/>.
11302        pub ns: std::string::String,
11303
11304        /// Kubernetes object name. For details see
11305        /// <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/>.
11306        pub name: std::string::String,
11307
11308        /// Pod containers associated with this finding, if any.
11309        pub containers: std::vec::Vec<crate::model::Container>,
11310
11311        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11312    }
11313
11314    impl Object {
11315        /// Creates a new default instance.
11316        pub fn new() -> Self {
11317            std::default::Default::default()
11318        }
11319
11320        /// Sets the value of [group][crate::model::kubernetes::Object::group].
11321        ///
11322        /// # Example
11323        /// ```ignore,no_run
11324        /// # use google_cloud_securitycenter_v2::model::kubernetes::Object;
11325        /// let x = Object::new().set_group("example");
11326        /// ```
11327        pub fn set_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11328            self.group = v.into();
11329            self
11330        }
11331
11332        /// Sets the value of [kind][crate::model::kubernetes::Object::kind].
11333        ///
11334        /// # Example
11335        /// ```ignore,no_run
11336        /// # use google_cloud_securitycenter_v2::model::kubernetes::Object;
11337        /// let x = Object::new().set_kind("example");
11338        /// ```
11339        pub fn set_kind<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11340            self.kind = v.into();
11341            self
11342        }
11343
11344        /// Sets the value of [ns][crate::model::kubernetes::Object::ns].
11345        ///
11346        /// # Example
11347        /// ```ignore,no_run
11348        /// # use google_cloud_securitycenter_v2::model::kubernetes::Object;
11349        /// let x = Object::new().set_ns("example");
11350        /// ```
11351        pub fn set_ns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11352            self.ns = v.into();
11353            self
11354        }
11355
11356        /// Sets the value of [name][crate::model::kubernetes::Object::name].
11357        ///
11358        /// # Example
11359        /// ```ignore,no_run
11360        /// # use google_cloud_securitycenter_v2::model::kubernetes::Object;
11361        /// let x = Object::new().set_name("example");
11362        /// ```
11363        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11364            self.name = v.into();
11365            self
11366        }
11367
11368        /// Sets the value of [containers][crate::model::kubernetes::Object::containers].
11369        ///
11370        /// # Example
11371        /// ```ignore,no_run
11372        /// # use google_cloud_securitycenter_v2::model::kubernetes::Object;
11373        /// use google_cloud_securitycenter_v2::model::Container;
11374        /// let x = Object::new()
11375        ///     .set_containers([
11376        ///         Container::default()/* use setters */,
11377        ///         Container::default()/* use (different) setters */,
11378        ///     ]);
11379        /// ```
11380        pub fn set_containers<T, V>(mut self, v: T) -> Self
11381        where
11382            T: std::iter::IntoIterator<Item = V>,
11383            V: std::convert::Into<crate::model::Container>,
11384        {
11385            use std::iter::Iterator;
11386            self.containers = v.into_iter().map(|i| i.into()).collect();
11387            self
11388        }
11389    }
11390
11391    impl wkt::message::Message for Object {
11392        fn typename() -> &'static str {
11393            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.Object"
11394        }
11395    }
11396}
11397
11398/// Represents a generic name-value label. A label has separate name and value
11399/// fields to support filtering with the `contains()` function. For more
11400/// information, see [Filtering on array-type
11401/// fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering).
11402#[derive(Clone, Default, PartialEq)]
11403#[non_exhaustive]
11404pub struct Label {
11405    /// Name of the label.
11406    pub name: std::string::String,
11407
11408    /// Value that corresponds to the label's name.
11409    pub value: std::string::String,
11410
11411    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11412}
11413
11414impl Label {
11415    /// Creates a new default instance.
11416    pub fn new() -> Self {
11417        std::default::Default::default()
11418    }
11419
11420    /// Sets the value of [name][crate::model::Label::name].
11421    ///
11422    /// # Example
11423    /// ```ignore,no_run
11424    /// # use google_cloud_securitycenter_v2::model::Label;
11425    /// let x = Label::new().set_name("example");
11426    /// ```
11427    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11428        self.name = v.into();
11429        self
11430    }
11431
11432    /// Sets the value of [value][crate::model::Label::value].
11433    ///
11434    /// # Example
11435    /// ```ignore,no_run
11436    /// # use google_cloud_securitycenter_v2::model::Label;
11437    /// let x = Label::new().set_value("example");
11438    /// ```
11439    pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11440        self.value = v.into();
11441        self
11442    }
11443}
11444
11445impl wkt::message::Message for Label {
11446    fn typename() -> &'static str {
11447        "type.googleapis.com/google.cloud.securitycenter.v2.Label"
11448    }
11449}
11450
11451/// Contains information related to the load balancer associated with the
11452/// finding.
11453#[derive(Clone, Default, PartialEq)]
11454#[non_exhaustive]
11455pub struct LoadBalancer {
11456    /// The name of the load balancer associated with the finding.
11457    pub name: std::string::String,
11458
11459    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11460}
11461
11462impl LoadBalancer {
11463    /// Creates a new default instance.
11464    pub fn new() -> Self {
11465        std::default::Default::default()
11466    }
11467
11468    /// Sets the value of [name][crate::model::LoadBalancer::name].
11469    ///
11470    /// # Example
11471    /// ```ignore,no_run
11472    /// # use google_cloud_securitycenter_v2::model::LoadBalancer;
11473    /// let x = LoadBalancer::new().set_name("example");
11474    /// ```
11475    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11476        self.name = v.into();
11477        self
11478    }
11479}
11480
11481impl wkt::message::Message for LoadBalancer {
11482    fn typename() -> &'static str {
11483        "type.googleapis.com/google.cloud.securitycenter.v2.LoadBalancer"
11484    }
11485}
11486
11487/// An individual entry in a log.
11488#[derive(Clone, Default, PartialEq)]
11489#[non_exhaustive]
11490pub struct LogEntry {
11491    /// The log entry.
11492    pub log_entry: std::option::Option<crate::model::log_entry::LogEntry>,
11493
11494    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11495}
11496
11497impl LogEntry {
11498    /// Creates a new default instance.
11499    pub fn new() -> Self {
11500        std::default::Default::default()
11501    }
11502
11503    /// Sets the value of [log_entry][crate::model::LogEntry::log_entry].
11504    ///
11505    /// Note that all the setters affecting `log_entry` are mutually
11506    /// exclusive.
11507    ///
11508    /// # Example
11509    /// ```ignore,no_run
11510    /// # use google_cloud_securitycenter_v2::model::LogEntry;
11511    /// use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
11512    /// let x = LogEntry::new().set_log_entry(Some(
11513    ///     google_cloud_securitycenter_v2::model::log_entry::LogEntry::CloudLoggingEntry(CloudLoggingEntry::default().into())));
11514    /// ```
11515    pub fn set_log_entry<
11516        T: std::convert::Into<std::option::Option<crate::model::log_entry::LogEntry>>,
11517    >(
11518        mut self,
11519        v: T,
11520    ) -> Self {
11521        self.log_entry = v.into();
11522        self
11523    }
11524
11525    /// The value of [log_entry][crate::model::LogEntry::log_entry]
11526    /// if it holds a `CloudLoggingEntry`, `None` if the field is not set or
11527    /// holds a different branch.
11528    pub fn cloud_logging_entry(
11529        &self,
11530    ) -> std::option::Option<&std::boxed::Box<crate::model::CloudLoggingEntry>> {
11531        #[allow(unreachable_patterns)]
11532        self.log_entry.as_ref().and_then(|v| match v {
11533            crate::model::log_entry::LogEntry::CloudLoggingEntry(v) => std::option::Option::Some(v),
11534            _ => std::option::Option::None,
11535        })
11536    }
11537
11538    /// Sets the value of [log_entry][crate::model::LogEntry::log_entry]
11539    /// to hold a `CloudLoggingEntry`.
11540    ///
11541    /// Note that all the setters affecting `log_entry` are
11542    /// mutually exclusive.
11543    ///
11544    /// # Example
11545    /// ```ignore,no_run
11546    /// # use google_cloud_securitycenter_v2::model::LogEntry;
11547    /// use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
11548    /// let x = LogEntry::new().set_cloud_logging_entry(CloudLoggingEntry::default()/* use setters */);
11549    /// assert!(x.cloud_logging_entry().is_some());
11550    /// ```
11551    pub fn set_cloud_logging_entry<
11552        T: std::convert::Into<std::boxed::Box<crate::model::CloudLoggingEntry>>,
11553    >(
11554        mut self,
11555        v: T,
11556    ) -> Self {
11557        self.log_entry = std::option::Option::Some(
11558            crate::model::log_entry::LogEntry::CloudLoggingEntry(v.into()),
11559        );
11560        self
11561    }
11562}
11563
11564impl wkt::message::Message for LogEntry {
11565    fn typename() -> &'static str {
11566        "type.googleapis.com/google.cloud.securitycenter.v2.LogEntry"
11567    }
11568}
11569
11570/// Defines additional types related to [LogEntry].
11571pub mod log_entry {
11572    #[allow(unused_imports)]
11573    use super::*;
11574
11575    /// The log entry.
11576    #[derive(Clone, Debug, PartialEq)]
11577    #[non_exhaustive]
11578    pub enum LogEntry {
11579        /// An individual entry in a log stored in Cloud Logging.
11580        CloudLoggingEntry(std::boxed::Box<crate::model::CloudLoggingEntry>),
11581    }
11582}
11583
11584/// Metadata taken from a [Cloud Logging
11585/// LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry)
11586#[derive(Clone, Default, PartialEq)]
11587#[non_exhaustive]
11588pub struct CloudLoggingEntry {
11589    /// A unique identifier for the log entry.
11590    pub insert_id: std::string::String,
11591
11592    /// The type of the log (part of `log_name`. `log_name` is the resource name of
11593    /// the log to which this log entry belongs). For example:
11594    /// `cloudresourcemanager.googleapis.com/activity` Note that this field is not
11595    /// URL-encoded, unlike in `LogEntry`.
11596    pub log_id: std::string::String,
11597
11598    /// The organization, folder, or project of the monitored resource that
11599    /// produced this log entry.
11600    pub resource_container: std::string::String,
11601
11602    /// The time the event described by the log entry occurred.
11603    pub timestamp: std::option::Option<wkt::Timestamp>,
11604
11605    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11606}
11607
11608impl CloudLoggingEntry {
11609    /// Creates a new default instance.
11610    pub fn new() -> Self {
11611        std::default::Default::default()
11612    }
11613
11614    /// Sets the value of [insert_id][crate::model::CloudLoggingEntry::insert_id].
11615    ///
11616    /// # Example
11617    /// ```ignore,no_run
11618    /// # use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
11619    /// let x = CloudLoggingEntry::new().set_insert_id("example");
11620    /// ```
11621    pub fn set_insert_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11622        self.insert_id = v.into();
11623        self
11624    }
11625
11626    /// Sets the value of [log_id][crate::model::CloudLoggingEntry::log_id].
11627    ///
11628    /// # Example
11629    /// ```ignore,no_run
11630    /// # use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
11631    /// let x = CloudLoggingEntry::new().set_log_id("example");
11632    /// ```
11633    pub fn set_log_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11634        self.log_id = v.into();
11635        self
11636    }
11637
11638    /// Sets the value of [resource_container][crate::model::CloudLoggingEntry::resource_container].
11639    ///
11640    /// # Example
11641    /// ```ignore,no_run
11642    /// # use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
11643    /// let x = CloudLoggingEntry::new().set_resource_container("example");
11644    /// ```
11645    pub fn set_resource_container<T: std::convert::Into<std::string::String>>(
11646        mut self,
11647        v: T,
11648    ) -> Self {
11649        self.resource_container = v.into();
11650        self
11651    }
11652
11653    /// Sets the value of [timestamp][crate::model::CloudLoggingEntry::timestamp].
11654    ///
11655    /// # Example
11656    /// ```ignore,no_run
11657    /// # use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
11658    /// use wkt::Timestamp;
11659    /// let x = CloudLoggingEntry::new().set_timestamp(Timestamp::default()/* use setters */);
11660    /// ```
11661    pub fn set_timestamp<T>(mut self, v: T) -> Self
11662    where
11663        T: std::convert::Into<wkt::Timestamp>,
11664    {
11665        self.timestamp = std::option::Option::Some(v.into());
11666        self
11667    }
11668
11669    /// Sets or clears the value of [timestamp][crate::model::CloudLoggingEntry::timestamp].
11670    ///
11671    /// # Example
11672    /// ```ignore,no_run
11673    /// # use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
11674    /// use wkt::Timestamp;
11675    /// let x = CloudLoggingEntry::new().set_or_clear_timestamp(Some(Timestamp::default()/* use setters */));
11676    /// let x = CloudLoggingEntry::new().set_or_clear_timestamp(None::<Timestamp>);
11677    /// ```
11678    pub fn set_or_clear_timestamp<T>(mut self, v: std::option::Option<T>) -> Self
11679    where
11680        T: std::convert::Into<wkt::Timestamp>,
11681    {
11682        self.timestamp = v.map(|x| x.into());
11683        self
11684    }
11685}
11686
11687impl wkt::message::Message for CloudLoggingEntry {
11688    fn typename() -> &'static str {
11689        "type.googleapis.com/google.cloud.securitycenter.v2.CloudLoggingEntry"
11690    }
11691}
11692
11693/// MITRE ATT&CK tactics and techniques related to this finding.
11694/// See: <https://attack.mitre.org>
11695#[derive(Clone, Default, PartialEq)]
11696#[non_exhaustive]
11697pub struct MitreAttack {
11698    /// The MITRE ATT&CK tactic most closely represented by this finding, if any.
11699    pub primary_tactic: crate::model::mitre_attack::Tactic,
11700
11701    /// The MITRE ATT&CK technique most closely represented by this finding, if
11702    /// any. primary_techniques is a repeated field because there are multiple
11703    /// levels of MITRE ATT&CK techniques.  If the technique most closely
11704    /// represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`),
11705    /// both the sub-technique and its parent technique(s) will be listed (e.g.
11706    /// `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`).
11707    pub primary_techniques: std::vec::Vec<crate::model::mitre_attack::Technique>,
11708
11709    /// Additional MITRE ATT&CK tactics related to this finding, if any.
11710    pub additional_tactics: std::vec::Vec<crate::model::mitre_attack::Tactic>,
11711
11712    /// Additional MITRE ATT&CK techniques related to this finding, if any, along
11713    /// with any of their respective parent techniques.
11714    pub additional_techniques: std::vec::Vec<crate::model::mitre_attack::Technique>,
11715
11716    /// The MITRE ATT&CK version referenced by the above fields. E.g. "8".
11717    pub version: std::string::String,
11718
11719    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11720}
11721
11722impl MitreAttack {
11723    /// Creates a new default instance.
11724    pub fn new() -> Self {
11725        std::default::Default::default()
11726    }
11727
11728    /// Sets the value of [primary_tactic][crate::model::MitreAttack::primary_tactic].
11729    ///
11730    /// # Example
11731    /// ```ignore,no_run
11732    /// # use google_cloud_securitycenter_v2::model::MitreAttack;
11733    /// use google_cloud_securitycenter_v2::model::mitre_attack::Tactic;
11734    /// let x0 = MitreAttack::new().set_primary_tactic(Tactic::Reconnaissance);
11735    /// let x1 = MitreAttack::new().set_primary_tactic(Tactic::ResourceDevelopment);
11736    /// let x2 = MitreAttack::new().set_primary_tactic(Tactic::InitialAccess);
11737    /// ```
11738    pub fn set_primary_tactic<T: std::convert::Into<crate::model::mitre_attack::Tactic>>(
11739        mut self,
11740        v: T,
11741    ) -> Self {
11742        self.primary_tactic = v.into();
11743        self
11744    }
11745
11746    /// Sets the value of [primary_techniques][crate::model::MitreAttack::primary_techniques].
11747    ///
11748    /// # Example
11749    /// ```ignore,no_run
11750    /// # use google_cloud_securitycenter_v2::model::MitreAttack;
11751    /// use google_cloud_securitycenter_v2::model::mitre_attack::Technique;
11752    /// let x = MitreAttack::new().set_primary_techniques([
11753    ///     Technique::DataObfuscation,
11754    ///     Technique::DataObfuscationSteganography,
11755    ///     Technique::OsCredentialDumping,
11756    /// ]);
11757    /// ```
11758    pub fn set_primary_techniques<T, V>(mut self, v: T) -> Self
11759    where
11760        T: std::iter::IntoIterator<Item = V>,
11761        V: std::convert::Into<crate::model::mitre_attack::Technique>,
11762    {
11763        use std::iter::Iterator;
11764        self.primary_techniques = v.into_iter().map(|i| i.into()).collect();
11765        self
11766    }
11767
11768    /// Sets the value of [additional_tactics][crate::model::MitreAttack::additional_tactics].
11769    ///
11770    /// # Example
11771    /// ```ignore,no_run
11772    /// # use google_cloud_securitycenter_v2::model::MitreAttack;
11773    /// use google_cloud_securitycenter_v2::model::mitre_attack::Tactic;
11774    /// let x = MitreAttack::new().set_additional_tactics([
11775    ///     Tactic::Reconnaissance,
11776    ///     Tactic::ResourceDevelopment,
11777    ///     Tactic::InitialAccess,
11778    /// ]);
11779    /// ```
11780    pub fn set_additional_tactics<T, V>(mut self, v: T) -> Self
11781    where
11782        T: std::iter::IntoIterator<Item = V>,
11783        V: std::convert::Into<crate::model::mitre_attack::Tactic>,
11784    {
11785        use std::iter::Iterator;
11786        self.additional_tactics = v.into_iter().map(|i| i.into()).collect();
11787        self
11788    }
11789
11790    /// Sets the value of [additional_techniques][crate::model::MitreAttack::additional_techniques].
11791    ///
11792    /// # Example
11793    /// ```ignore,no_run
11794    /// # use google_cloud_securitycenter_v2::model::MitreAttack;
11795    /// use google_cloud_securitycenter_v2::model::mitre_attack::Technique;
11796    /// let x = MitreAttack::new().set_additional_techniques([
11797    ///     Technique::DataObfuscation,
11798    ///     Technique::DataObfuscationSteganography,
11799    ///     Technique::OsCredentialDumping,
11800    /// ]);
11801    /// ```
11802    pub fn set_additional_techniques<T, V>(mut self, v: T) -> Self
11803    where
11804        T: std::iter::IntoIterator<Item = V>,
11805        V: std::convert::Into<crate::model::mitre_attack::Technique>,
11806    {
11807        use std::iter::Iterator;
11808        self.additional_techniques = v.into_iter().map(|i| i.into()).collect();
11809        self
11810    }
11811
11812    /// Sets the value of [version][crate::model::MitreAttack::version].
11813    ///
11814    /// # Example
11815    /// ```ignore,no_run
11816    /// # use google_cloud_securitycenter_v2::model::MitreAttack;
11817    /// let x = MitreAttack::new().set_version("example");
11818    /// ```
11819    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11820        self.version = v.into();
11821        self
11822    }
11823}
11824
11825impl wkt::message::Message for MitreAttack {
11826    fn typename() -> &'static str {
11827        "type.googleapis.com/google.cloud.securitycenter.v2.MitreAttack"
11828    }
11829}
11830
11831/// Defines additional types related to [MitreAttack].
11832pub mod mitre_attack {
11833    #[allow(unused_imports)]
11834    use super::*;
11835
11836    /// MITRE ATT&CK tactics that can be referenced by SCC findings.
11837    /// See: <https://attack.mitre.org/tactics/enterprise/>
11838    ///
11839    /// # Working with unknown values
11840    ///
11841    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11842    /// additional enum variants at any time. Adding new variants is not considered
11843    /// a breaking change. Applications should write their code in anticipation of:
11844    ///
11845    /// - New values appearing in future releases of the client library, **and**
11846    /// - New values received dynamically, without application changes.
11847    ///
11848    /// Please consult the [Working with enums] section in the user guide for some
11849    /// guidelines.
11850    ///
11851    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11852    #[derive(Clone, Debug, PartialEq)]
11853    #[non_exhaustive]
11854    pub enum Tactic {
11855        /// Unspecified value.
11856        Unspecified,
11857        /// TA0043
11858        Reconnaissance,
11859        /// TA0042
11860        ResourceDevelopment,
11861        /// TA0001
11862        InitialAccess,
11863        /// TA0002
11864        Execution,
11865        /// TA0003
11866        Persistence,
11867        /// TA0004
11868        PrivilegeEscalation,
11869        /// TA0005
11870        DefenseEvasion,
11871        /// TA0006
11872        CredentialAccess,
11873        /// TA0007
11874        Discovery,
11875        /// TA0008
11876        LateralMovement,
11877        /// TA0009
11878        Collection,
11879        /// TA0011
11880        CommandAndControl,
11881        /// TA0010
11882        Exfiltration,
11883        /// TA0040
11884        Impact,
11885        /// If set, the enum was initialized with an unknown value.
11886        ///
11887        /// Applications can examine the value using [Tactic::value] or
11888        /// [Tactic::name].
11889        UnknownValue(tactic::UnknownValue),
11890    }
11891
11892    #[doc(hidden)]
11893    pub mod tactic {
11894        #[allow(unused_imports)]
11895        use super::*;
11896        #[derive(Clone, Debug, PartialEq)]
11897        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11898    }
11899
11900    impl Tactic {
11901        /// Gets the enum value.
11902        ///
11903        /// Returns `None` if the enum contains an unknown value deserialized from
11904        /// the string representation of enums.
11905        pub fn value(&self) -> std::option::Option<i32> {
11906            match self {
11907                Self::Unspecified => std::option::Option::Some(0),
11908                Self::Reconnaissance => std::option::Option::Some(1),
11909                Self::ResourceDevelopment => std::option::Option::Some(2),
11910                Self::InitialAccess => std::option::Option::Some(5),
11911                Self::Execution => std::option::Option::Some(3),
11912                Self::Persistence => std::option::Option::Some(6),
11913                Self::PrivilegeEscalation => std::option::Option::Some(8),
11914                Self::DefenseEvasion => std::option::Option::Some(7),
11915                Self::CredentialAccess => std::option::Option::Some(9),
11916                Self::Discovery => std::option::Option::Some(10),
11917                Self::LateralMovement => std::option::Option::Some(11),
11918                Self::Collection => std::option::Option::Some(12),
11919                Self::CommandAndControl => std::option::Option::Some(4),
11920                Self::Exfiltration => std::option::Option::Some(13),
11921                Self::Impact => std::option::Option::Some(14),
11922                Self::UnknownValue(u) => u.0.value(),
11923            }
11924        }
11925
11926        /// Gets the enum value as a string.
11927        ///
11928        /// Returns `None` if the enum contains an unknown value deserialized from
11929        /// the integer representation of enums.
11930        pub fn name(&self) -> std::option::Option<&str> {
11931            match self {
11932                Self::Unspecified => std::option::Option::Some("TACTIC_UNSPECIFIED"),
11933                Self::Reconnaissance => std::option::Option::Some("RECONNAISSANCE"),
11934                Self::ResourceDevelopment => std::option::Option::Some("RESOURCE_DEVELOPMENT"),
11935                Self::InitialAccess => std::option::Option::Some("INITIAL_ACCESS"),
11936                Self::Execution => std::option::Option::Some("EXECUTION"),
11937                Self::Persistence => std::option::Option::Some("PERSISTENCE"),
11938                Self::PrivilegeEscalation => std::option::Option::Some("PRIVILEGE_ESCALATION"),
11939                Self::DefenseEvasion => std::option::Option::Some("DEFENSE_EVASION"),
11940                Self::CredentialAccess => std::option::Option::Some("CREDENTIAL_ACCESS"),
11941                Self::Discovery => std::option::Option::Some("DISCOVERY"),
11942                Self::LateralMovement => std::option::Option::Some("LATERAL_MOVEMENT"),
11943                Self::Collection => std::option::Option::Some("COLLECTION"),
11944                Self::CommandAndControl => std::option::Option::Some("COMMAND_AND_CONTROL"),
11945                Self::Exfiltration => std::option::Option::Some("EXFILTRATION"),
11946                Self::Impact => std::option::Option::Some("IMPACT"),
11947                Self::UnknownValue(u) => u.0.name(),
11948            }
11949        }
11950    }
11951
11952    impl std::default::Default for Tactic {
11953        fn default() -> Self {
11954            use std::convert::From;
11955            Self::from(0)
11956        }
11957    }
11958
11959    impl std::fmt::Display for Tactic {
11960        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11961            wkt::internal::display_enum(f, self.name(), self.value())
11962        }
11963    }
11964
11965    impl std::convert::From<i32> for Tactic {
11966        fn from(value: i32) -> Self {
11967            match value {
11968                0 => Self::Unspecified,
11969                1 => Self::Reconnaissance,
11970                2 => Self::ResourceDevelopment,
11971                3 => Self::Execution,
11972                4 => Self::CommandAndControl,
11973                5 => Self::InitialAccess,
11974                6 => Self::Persistence,
11975                7 => Self::DefenseEvasion,
11976                8 => Self::PrivilegeEscalation,
11977                9 => Self::CredentialAccess,
11978                10 => Self::Discovery,
11979                11 => Self::LateralMovement,
11980                12 => Self::Collection,
11981                13 => Self::Exfiltration,
11982                14 => Self::Impact,
11983                _ => Self::UnknownValue(tactic::UnknownValue(
11984                    wkt::internal::UnknownEnumValue::Integer(value),
11985                )),
11986            }
11987        }
11988    }
11989
11990    impl std::convert::From<&str> for Tactic {
11991        fn from(value: &str) -> Self {
11992            use std::string::ToString;
11993            match value {
11994                "TACTIC_UNSPECIFIED" => Self::Unspecified,
11995                "RECONNAISSANCE" => Self::Reconnaissance,
11996                "RESOURCE_DEVELOPMENT" => Self::ResourceDevelopment,
11997                "INITIAL_ACCESS" => Self::InitialAccess,
11998                "EXECUTION" => Self::Execution,
11999                "PERSISTENCE" => Self::Persistence,
12000                "PRIVILEGE_ESCALATION" => Self::PrivilegeEscalation,
12001                "DEFENSE_EVASION" => Self::DefenseEvasion,
12002                "CREDENTIAL_ACCESS" => Self::CredentialAccess,
12003                "DISCOVERY" => Self::Discovery,
12004                "LATERAL_MOVEMENT" => Self::LateralMovement,
12005                "COLLECTION" => Self::Collection,
12006                "COMMAND_AND_CONTROL" => Self::CommandAndControl,
12007                "EXFILTRATION" => Self::Exfiltration,
12008                "IMPACT" => Self::Impact,
12009                _ => Self::UnknownValue(tactic::UnknownValue(
12010                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12011                )),
12012            }
12013        }
12014    }
12015
12016    impl serde::ser::Serialize for Tactic {
12017        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12018        where
12019            S: serde::Serializer,
12020        {
12021            match self {
12022                Self::Unspecified => serializer.serialize_i32(0),
12023                Self::Reconnaissance => serializer.serialize_i32(1),
12024                Self::ResourceDevelopment => serializer.serialize_i32(2),
12025                Self::InitialAccess => serializer.serialize_i32(5),
12026                Self::Execution => serializer.serialize_i32(3),
12027                Self::Persistence => serializer.serialize_i32(6),
12028                Self::PrivilegeEscalation => serializer.serialize_i32(8),
12029                Self::DefenseEvasion => serializer.serialize_i32(7),
12030                Self::CredentialAccess => serializer.serialize_i32(9),
12031                Self::Discovery => serializer.serialize_i32(10),
12032                Self::LateralMovement => serializer.serialize_i32(11),
12033                Self::Collection => serializer.serialize_i32(12),
12034                Self::CommandAndControl => serializer.serialize_i32(4),
12035                Self::Exfiltration => serializer.serialize_i32(13),
12036                Self::Impact => serializer.serialize_i32(14),
12037                Self::UnknownValue(u) => u.0.serialize(serializer),
12038            }
12039        }
12040    }
12041
12042    impl<'de> serde::de::Deserialize<'de> for Tactic {
12043        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12044        where
12045            D: serde::Deserializer<'de>,
12046        {
12047            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Tactic>::new(
12048                ".google.cloud.securitycenter.v2.MitreAttack.Tactic",
12049            ))
12050        }
12051    }
12052
12053    /// MITRE ATT&CK techniques that can be referenced by Security Command Center
12054    /// findings. See: <https://attack.mitre.org/techniques/enterprise/>
12055    ///
12056    /// # Working with unknown values
12057    ///
12058    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12059    /// additional enum variants at any time. Adding new variants is not considered
12060    /// a breaking change. Applications should write their code in anticipation of:
12061    ///
12062    /// - New values appearing in future releases of the client library, **and**
12063    /// - New values received dynamically, without application changes.
12064    ///
12065    /// Please consult the [Working with enums] section in the user guide for some
12066    /// guidelines.
12067    ///
12068    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12069    #[derive(Clone, Debug, PartialEq)]
12070    #[non_exhaustive]
12071    pub enum Technique {
12072        /// Unspecified value.
12073        Unspecified,
12074        /// T1001
12075        DataObfuscation,
12076        /// T1001.002
12077        DataObfuscationSteganography,
12078        /// T1003
12079        OsCredentialDumping,
12080        /// T1003.007
12081        OsCredentialDumpingProcFilesystem,
12082        /// T1003.008
12083        OsCredentialDumpingEtcPasswordAndEtcShadow,
12084        /// T1005
12085        DataFromLocalSystem,
12086        /// T1020
12087        AutomatedExfiltration,
12088        /// T1027
12089        ObfuscatedFilesOrInfo,
12090        /// T1027.003
12091        Steganography,
12092        /// T1027.004
12093        CompileAfterDelivery,
12094        /// T1027.010
12095        CommandObfuscation,
12096        /// T1029
12097        ScheduledTransfer,
12098        /// T1033
12099        SystemOwnerUserDiscovery,
12100        /// T1036
12101        Masquerading,
12102        /// T1036.005
12103        MatchLegitimateNameOrLocation,
12104        /// T1037
12105        BootOrLogonInitializationScripts,
12106        /// T1037.005
12107        StartupItems,
12108        /// T1046
12109        NetworkServiceDiscovery,
12110        /// T1053
12111        ScheduledTaskJob,
12112        /// T1053.003
12113        ScheduledTaskJobCron,
12114        /// T1053.007
12115        ContainerOrchestrationJob,
12116        /// T1055
12117        ProcessInjection,
12118        /// T1056
12119        InputCapture,
12120        /// T1056.001
12121        InputCaptureKeylogging,
12122        /// T1057
12123        ProcessDiscovery,
12124        /// T1059
12125        CommandAndScriptingInterpreter,
12126        /// T1059.004
12127        UnixShell,
12128        /// T1059.006
12129        Python,
12130        /// T1068
12131        ExploitationForPrivilegeEscalation,
12132        /// T1069
12133        PermissionGroupsDiscovery,
12134        /// T1069.003
12135        CloudGroups,
12136        /// T1070
12137        IndicatorRemoval,
12138        /// T1070.002
12139        IndicatorRemovalClearLinuxOrMacSystemLogs,
12140        /// T1070.003
12141        IndicatorRemovalClearCommandHistory,
12142        /// T1070.004
12143        IndicatorRemovalFileDeletion,
12144        /// T1070.006
12145        IndicatorRemovalTimestomp,
12146        /// T1070.008
12147        IndicatorRemovalClearMailboxData,
12148        /// T1071
12149        ApplicationLayerProtocol,
12150        /// T1071.004
12151        Dns,
12152        /// T1072
12153        SoftwareDeploymentTools,
12154        /// T1078
12155        ValidAccounts,
12156        /// T1078.001
12157        DefaultAccounts,
12158        /// T1078.003
12159        LocalAccounts,
12160        /// T1078.004
12161        CloudAccounts,
12162        /// T1083
12163        FileAndDirectoryDiscovery,
12164        /// T1087.001
12165        AccountDiscoveryLocalAccount,
12166        /// T1090
12167        Proxy,
12168        /// T1090.002
12169        ExternalProxy,
12170        /// T1090.003
12171        MultiHopProxy,
12172        /// T1098
12173        AccountManipulation,
12174        /// T1098.001
12175        AdditionalCloudCredentials,
12176        /// T1098.003
12177        AdditionalCloudRoles,
12178        /// T1098.004
12179        SshAuthorizedKeys,
12180        /// T1098.006
12181        AdditionalContainerClusterRoles,
12182        /// T1104
12183        MultiStageChannels,
12184        /// T1105
12185        IngressToolTransfer,
12186        /// T1106
12187        NativeApi,
12188        /// T1110
12189        BruteForce,
12190        /// T1119
12191        AutomatedCollection,
12192        /// T1129
12193        SharedModules,
12194        /// T1132
12195        DataEncoding,
12196        /// T1132.001
12197        StandardEncoding,
12198        /// T1134
12199        AccessTokenManipulation,
12200        /// T1134.001
12201        TokenImpersonationOrTheft,
12202        /// T1136
12203        CreateAccount,
12204        /// T1136.001
12205        LocalAccount,
12206        /// T1140
12207        DeobfuscateDecodeFilesOrInfo,
12208        /// T1190
12209        ExploitPublicFacingApplication,
12210        /// T1195
12211        SupplyChainCompromise,
12212        /// T1195.001
12213        CompromiseSoftwareDependenciesAndDevelopmentTools,
12214        /// T1203
12215        ExploitationForClientExecution,
12216        /// T1204
12217        UserExecution,
12218        /// T1222.002
12219        LinuxAndMacFileAndDirectoryPermissionsModification,
12220        /// T1484
12221        DomainPolicyModification,
12222        /// T1485
12223        DataDestruction,
12224        /// T1486
12225        DataEncryptedForImpact,
12226        /// T1489
12227        ServiceStop,
12228        /// T1490
12229        InhibitSystemRecovery,
12230        /// T1495
12231        FirmwareCorruption,
12232        /// T1496
12233        ResourceHijacking,
12234        /// T1498
12235        NetworkDenialOfService,
12236        /// T1526
12237        CloudServiceDiscovery,
12238        /// T1528
12239        StealApplicationAccessToken,
12240        /// T1531
12241        AccountAccessRemoval,
12242        /// T1537
12243        TransferDataToCloudAccount,
12244        /// T1539
12245        StealWebSessionCookie,
12246        /// T1543
12247        CreateOrModifySystemProcess,
12248        /// T1546
12249        EventTriggeredExecution,
12250        /// T1547
12251        BootOrLogonAutostartExecution,
12252        /// T1547.006
12253        KernelModulesAndExtensions,
12254        /// T1547.009
12255        ShortcutModification,
12256        /// T1548
12257        AbuseElevationControlMechanism,
12258        /// T1548.001
12259        AbuseElevationControlMechanismSetuidAndSetgid,
12260        /// T1548.003
12261        AbuseElevationControlMechanismSudoAndSudoCaching,
12262        /// T1552
12263        UnsecuredCredentials,
12264        /// T1552.001
12265        CredentialsInFiles,
12266        /// T1552.003
12267        BashHistory,
12268        /// T1552.004
12269        PrivateKeys,
12270        /// T1553
12271        SubvertTrustControl,
12272        /// T1553.004
12273        InstallRootCertificate,
12274        /// T1554
12275        CompromiseHostSoftwareBinary,
12276        /// T1555
12277        CredentialsFromPasswordStores,
12278        /// T1556
12279        ModifyAuthenticationProcess,
12280        /// T1556.003
12281        PluggableAuthenticationModules,
12282        /// T1556.006
12283        MultiFactorAuthentication,
12284        /// T1562
12285        ImpairDefenses,
12286        /// T1562.001
12287        DisableOrModifyTools,
12288        /// T1562.006
12289        IndicatorBlocking,
12290        /// T1562.012
12291        DisableOrModifyLinuxAuditSystem,
12292        /// T1564
12293        HideArtifacts,
12294        /// T1564.001
12295        HiddenFilesAndDirectories,
12296        /// T1564.002
12297        HiddenUsers,
12298        /// T1567
12299        ExfiltrationOverWebService,
12300        /// T1567.002
12301        ExfiltrationToCloudStorage,
12302        /// T1568
12303        DynamicResolution,
12304        /// T1570
12305        LateralToolTransfer,
12306        /// T1574
12307        HijackExecutionFlow,
12308        /// T1574.006
12309        HijackExecutionFlowDynamicLinkerHijacking,
12310        /// T1578
12311        ModifyCloudComputeInfrastructure,
12312        /// T1578.001
12313        CreateSnapshot,
12314        /// T1580
12315        CloudInfrastructureDiscovery,
12316        /// T1587
12317        DevelopCapabilities,
12318        /// T1587.001
12319        DevelopCapabilitiesMalware,
12320        /// T1588
12321        ObtainCapabilities,
12322        /// T1588.001
12323        ObtainCapabilitiesMalware,
12324        /// T1588.006
12325        ObtainCapabilitiesVulnerabilities,
12326        /// T1595
12327        ActiveScanning,
12328        /// T1595.001
12329        ScanningIpBlocks,
12330        /// T1608
12331        StageCapabilities,
12332        /// T1608.001
12333        UploadMalware,
12334        /// T1609
12335        ContainerAdministrationCommand,
12336        /// T1610
12337        DeployContainer,
12338        /// T1611
12339        EscapeToHost,
12340        /// T1613
12341        ContainerAndResourceDiscovery,
12342        /// T1620
12343        ReflectiveCodeLoading,
12344        /// T1649
12345        StealOrForgeAuthenticationCertificates,
12346        /// T1657
12347        FinancialTheft,
12348        /// If set, the enum was initialized with an unknown value.
12349        ///
12350        /// Applications can examine the value using [Technique::value] or
12351        /// [Technique::name].
12352        UnknownValue(technique::UnknownValue),
12353    }
12354
12355    #[doc(hidden)]
12356    pub mod technique {
12357        #[allow(unused_imports)]
12358        use super::*;
12359        #[derive(Clone, Debug, PartialEq)]
12360        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12361    }
12362
12363    impl Technique {
12364        /// Gets the enum value.
12365        ///
12366        /// Returns `None` if the enum contains an unknown value deserialized from
12367        /// the string representation of enums.
12368        pub fn value(&self) -> std::option::Option<i32> {
12369            match self {
12370                Self::Unspecified => std::option::Option::Some(0),
12371                Self::DataObfuscation => std::option::Option::Some(70),
12372                Self::DataObfuscationSteganography => std::option::Option::Some(71),
12373                Self::OsCredentialDumping => std::option::Option::Some(114),
12374                Self::OsCredentialDumpingProcFilesystem => std::option::Option::Some(115),
12375                Self::OsCredentialDumpingEtcPasswordAndEtcShadow => std::option::Option::Some(122),
12376                Self::DataFromLocalSystem => std::option::Option::Some(117),
12377                Self::AutomatedExfiltration => std::option::Option::Some(68),
12378                Self::ObfuscatedFilesOrInfo => std::option::Option::Some(72),
12379                Self::Steganography => std::option::Option::Some(73),
12380                Self::CompileAfterDelivery => std::option::Option::Some(74),
12381                Self::CommandObfuscation => std::option::Option::Some(75),
12382                Self::ScheduledTransfer => std::option::Option::Some(120),
12383                Self::SystemOwnerUserDiscovery => std::option::Option::Some(118),
12384                Self::Masquerading => std::option::Option::Some(49),
12385                Self::MatchLegitimateNameOrLocation => std::option::Option::Some(50),
12386                Self::BootOrLogonInitializationScripts => std::option::Option::Some(37),
12387                Self::StartupItems => std::option::Option::Some(38),
12388                Self::NetworkServiceDiscovery => std::option::Option::Some(32),
12389                Self::ScheduledTaskJob => std::option::Option::Some(89),
12390                Self::ScheduledTaskJobCron => std::option::Option::Some(119),
12391                Self::ContainerOrchestrationJob => std::option::Option::Some(90),
12392                Self::ProcessInjection => std::option::Option::Some(93),
12393                Self::InputCapture => std::option::Option::Some(103),
12394                Self::InputCaptureKeylogging => std::option::Option::Some(104),
12395                Self::ProcessDiscovery => std::option::Option::Some(56),
12396                Self::CommandAndScriptingInterpreter => std::option::Option::Some(6),
12397                Self::UnixShell => std::option::Option::Some(7),
12398                Self::Python => std::option::Option::Some(59),
12399                Self::ExploitationForPrivilegeEscalation => std::option::Option::Some(63),
12400                Self::PermissionGroupsDiscovery => std::option::Option::Some(18),
12401                Self::CloudGroups => std::option::Option::Some(19),
12402                Self::IndicatorRemoval => std::option::Option::Some(123),
12403                Self::IndicatorRemovalClearLinuxOrMacSystemLogs => std::option::Option::Some(124),
12404                Self::IndicatorRemovalClearCommandHistory => std::option::Option::Some(125),
12405                Self::IndicatorRemovalFileDeletion => std::option::Option::Some(64),
12406                Self::IndicatorRemovalTimestomp => std::option::Option::Some(128),
12407                Self::IndicatorRemovalClearMailboxData => std::option::Option::Some(126),
12408                Self::ApplicationLayerProtocol => std::option::Option::Some(45),
12409                Self::Dns => std::option::Option::Some(46),
12410                Self::SoftwareDeploymentTools => std::option::Option::Some(47),
12411                Self::ValidAccounts => std::option::Option::Some(14),
12412                Self::DefaultAccounts => std::option::Option::Some(35),
12413                Self::LocalAccounts => std::option::Option::Some(15),
12414                Self::CloudAccounts => std::option::Option::Some(16),
12415                Self::FileAndDirectoryDiscovery => std::option::Option::Some(121),
12416                Self::AccountDiscoveryLocalAccount => std::option::Option::Some(116),
12417                Self::Proxy => std::option::Option::Some(9),
12418                Self::ExternalProxy => std::option::Option::Some(10),
12419                Self::MultiHopProxy => std::option::Option::Some(11),
12420                Self::AccountManipulation => std::option::Option::Some(22),
12421                Self::AdditionalCloudCredentials => std::option::Option::Some(40),
12422                Self::AdditionalCloudRoles => std::option::Option::Some(67),
12423                Self::SshAuthorizedKeys => std::option::Option::Some(23),
12424                Self::AdditionalContainerClusterRoles => std::option::Option::Some(58),
12425                Self::MultiStageChannels => std::option::Option::Some(76),
12426                Self::IngressToolTransfer => std::option::Option::Some(3),
12427                Self::NativeApi => std::option::Option::Some(4),
12428                Self::BruteForce => std::option::Option::Some(44),
12429                Self::AutomatedCollection => std::option::Option::Some(94),
12430                Self::SharedModules => std::option::Option::Some(5),
12431                Self::DataEncoding => std::option::Option::Some(77),
12432                Self::StandardEncoding => std::option::Option::Some(78),
12433                Self::AccessTokenManipulation => std::option::Option::Some(33),
12434                Self::TokenImpersonationOrTheft => std::option::Option::Some(39),
12435                Self::CreateAccount => std::option::Option::Some(79),
12436                Self::LocalAccount => std::option::Option::Some(80),
12437                Self::DeobfuscateDecodeFilesOrInfo => std::option::Option::Some(95),
12438                Self::ExploitPublicFacingApplication => std::option::Option::Some(27),
12439                Self::SupplyChainCompromise => std::option::Option::Some(129),
12440                Self::CompromiseSoftwareDependenciesAndDevelopmentTools => {
12441                    std::option::Option::Some(130)
12442                }
12443                Self::ExploitationForClientExecution => std::option::Option::Some(134),
12444                Self::UserExecution => std::option::Option::Some(69),
12445                Self::LinuxAndMacFileAndDirectoryPermissionsModification => {
12446                    std::option::Option::Some(135)
12447                }
12448                Self::DomainPolicyModification => std::option::Option::Some(30),
12449                Self::DataDestruction => std::option::Option::Some(29),
12450                Self::DataEncryptedForImpact => std::option::Option::Some(132),
12451                Self::ServiceStop => std::option::Option::Some(52),
12452                Self::InhibitSystemRecovery => std::option::Option::Some(36),
12453                Self::FirmwareCorruption => std::option::Option::Some(81),
12454                Self::ResourceHijacking => std::option::Option::Some(8),
12455                Self::NetworkDenialOfService => std::option::Option::Some(17),
12456                Self::CloudServiceDiscovery => std::option::Option::Some(48),
12457                Self::StealApplicationAccessToken => std::option::Option::Some(42),
12458                Self::AccountAccessRemoval => std::option::Option::Some(51),
12459                Self::TransferDataToCloudAccount => std::option::Option::Some(91),
12460                Self::StealWebSessionCookie => std::option::Option::Some(25),
12461                Self::CreateOrModifySystemProcess => std::option::Option::Some(24),
12462                Self::EventTriggeredExecution => std::option::Option::Some(65),
12463                Self::BootOrLogonAutostartExecution => std::option::Option::Some(82),
12464                Self::KernelModulesAndExtensions => std::option::Option::Some(83),
12465                Self::ShortcutModification => std::option::Option::Some(127),
12466                Self::AbuseElevationControlMechanism => std::option::Option::Some(34),
12467                Self::AbuseElevationControlMechanismSetuidAndSetgid => {
12468                    std::option::Option::Some(136)
12469                }
12470                Self::AbuseElevationControlMechanismSudoAndSudoCaching => {
12471                    std::option::Option::Some(109)
12472                }
12473                Self::UnsecuredCredentials => std::option::Option::Some(13),
12474                Self::CredentialsInFiles => std::option::Option::Some(105),
12475                Self::BashHistory => std::option::Option::Some(96),
12476                Self::PrivateKeys => std::option::Option::Some(97),
12477                Self::SubvertTrustControl => std::option::Option::Some(106),
12478                Self::InstallRootCertificate => std::option::Option::Some(107),
12479                Self::CompromiseHostSoftwareBinary => std::option::Option::Some(84),
12480                Self::CredentialsFromPasswordStores => std::option::Option::Some(98),
12481                Self::ModifyAuthenticationProcess => std::option::Option::Some(28),
12482                Self::PluggableAuthenticationModules => std::option::Option::Some(108),
12483                Self::MultiFactorAuthentication => std::option::Option::Some(137),
12484                Self::ImpairDefenses => std::option::Option::Some(31),
12485                Self::DisableOrModifyTools => std::option::Option::Some(55),
12486                Self::IndicatorBlocking => std::option::Option::Some(110),
12487                Self::DisableOrModifyLinuxAuditSystem => std::option::Option::Some(111),
12488                Self::HideArtifacts => std::option::Option::Some(85),
12489                Self::HiddenFilesAndDirectories => std::option::Option::Some(86),
12490                Self::HiddenUsers => std::option::Option::Some(87),
12491                Self::ExfiltrationOverWebService => std::option::Option::Some(20),
12492                Self::ExfiltrationToCloudStorage => std::option::Option::Some(21),
12493                Self::DynamicResolution => std::option::Option::Some(12),
12494                Self::LateralToolTransfer => std::option::Option::Some(41),
12495                Self::HijackExecutionFlow => std::option::Option::Some(112),
12496                Self::HijackExecutionFlowDynamicLinkerHijacking => std::option::Option::Some(113),
12497                Self::ModifyCloudComputeInfrastructure => std::option::Option::Some(26),
12498                Self::CreateSnapshot => std::option::Option::Some(54),
12499                Self::CloudInfrastructureDiscovery => std::option::Option::Some(53),
12500                Self::DevelopCapabilities => std::option::Option::Some(99),
12501                Self::DevelopCapabilitiesMalware => std::option::Option::Some(100),
12502                Self::ObtainCapabilities => std::option::Option::Some(43),
12503                Self::ObtainCapabilitiesMalware => std::option::Option::Some(101),
12504                Self::ObtainCapabilitiesVulnerabilities => std::option::Option::Some(133),
12505                Self::ActiveScanning => std::option::Option::Some(1),
12506                Self::ScanningIpBlocks => std::option::Option::Some(2),
12507                Self::StageCapabilities => std::option::Option::Some(88),
12508                Self::UploadMalware => std::option::Option::Some(102),
12509                Self::ContainerAdministrationCommand => std::option::Option::Some(60),
12510                Self::DeployContainer => std::option::Option::Some(66),
12511                Self::EscapeToHost => std::option::Option::Some(61),
12512                Self::ContainerAndResourceDiscovery => std::option::Option::Some(57),
12513                Self::ReflectiveCodeLoading => std::option::Option::Some(92),
12514                Self::StealOrForgeAuthenticationCertificates => std::option::Option::Some(62),
12515                Self::FinancialTheft => std::option::Option::Some(131),
12516                Self::UnknownValue(u) => u.0.value(),
12517            }
12518        }
12519
12520        /// Gets the enum value as a string.
12521        ///
12522        /// Returns `None` if the enum contains an unknown value deserialized from
12523        /// the integer representation of enums.
12524        pub fn name(&self) -> std::option::Option<&str> {
12525            match self {
12526                Self::Unspecified => std::option::Option::Some("TECHNIQUE_UNSPECIFIED"),
12527                Self::DataObfuscation => std::option::Option::Some("DATA_OBFUSCATION"),
12528                Self::DataObfuscationSteganography => {
12529                    std::option::Option::Some("DATA_OBFUSCATION_STEGANOGRAPHY")
12530                }
12531                Self::OsCredentialDumping => std::option::Option::Some("OS_CREDENTIAL_DUMPING"),
12532                Self::OsCredentialDumpingProcFilesystem => {
12533                    std::option::Option::Some("OS_CREDENTIAL_DUMPING_PROC_FILESYSTEM")
12534                }
12535                Self::OsCredentialDumpingEtcPasswordAndEtcShadow => {
12536                    std::option::Option::Some("OS_CREDENTIAL_DUMPING_ETC_PASSWORD_AND_ETC_SHADOW")
12537                }
12538                Self::DataFromLocalSystem => std::option::Option::Some("DATA_FROM_LOCAL_SYSTEM"),
12539                Self::AutomatedExfiltration => std::option::Option::Some("AUTOMATED_EXFILTRATION"),
12540                Self::ObfuscatedFilesOrInfo => {
12541                    std::option::Option::Some("OBFUSCATED_FILES_OR_INFO")
12542                }
12543                Self::Steganography => std::option::Option::Some("STEGANOGRAPHY"),
12544                Self::CompileAfterDelivery => std::option::Option::Some("COMPILE_AFTER_DELIVERY"),
12545                Self::CommandObfuscation => std::option::Option::Some("COMMAND_OBFUSCATION"),
12546                Self::ScheduledTransfer => std::option::Option::Some("SCHEDULED_TRANSFER"),
12547                Self::SystemOwnerUserDiscovery => {
12548                    std::option::Option::Some("SYSTEM_OWNER_USER_DISCOVERY")
12549                }
12550                Self::Masquerading => std::option::Option::Some("MASQUERADING"),
12551                Self::MatchLegitimateNameOrLocation => {
12552                    std::option::Option::Some("MATCH_LEGITIMATE_NAME_OR_LOCATION")
12553                }
12554                Self::BootOrLogonInitializationScripts => {
12555                    std::option::Option::Some("BOOT_OR_LOGON_INITIALIZATION_SCRIPTS")
12556                }
12557                Self::StartupItems => std::option::Option::Some("STARTUP_ITEMS"),
12558                Self::NetworkServiceDiscovery => {
12559                    std::option::Option::Some("NETWORK_SERVICE_DISCOVERY")
12560                }
12561                Self::ScheduledTaskJob => std::option::Option::Some("SCHEDULED_TASK_JOB"),
12562                Self::ScheduledTaskJobCron => std::option::Option::Some("SCHEDULED_TASK_JOB_CRON"),
12563                Self::ContainerOrchestrationJob => {
12564                    std::option::Option::Some("CONTAINER_ORCHESTRATION_JOB")
12565                }
12566                Self::ProcessInjection => std::option::Option::Some("PROCESS_INJECTION"),
12567                Self::InputCapture => std::option::Option::Some("INPUT_CAPTURE"),
12568                Self::InputCaptureKeylogging => {
12569                    std::option::Option::Some("INPUT_CAPTURE_KEYLOGGING")
12570                }
12571                Self::ProcessDiscovery => std::option::Option::Some("PROCESS_DISCOVERY"),
12572                Self::CommandAndScriptingInterpreter => {
12573                    std::option::Option::Some("COMMAND_AND_SCRIPTING_INTERPRETER")
12574                }
12575                Self::UnixShell => std::option::Option::Some("UNIX_SHELL"),
12576                Self::Python => std::option::Option::Some("PYTHON"),
12577                Self::ExploitationForPrivilegeEscalation => {
12578                    std::option::Option::Some("EXPLOITATION_FOR_PRIVILEGE_ESCALATION")
12579                }
12580                Self::PermissionGroupsDiscovery => {
12581                    std::option::Option::Some("PERMISSION_GROUPS_DISCOVERY")
12582                }
12583                Self::CloudGroups => std::option::Option::Some("CLOUD_GROUPS"),
12584                Self::IndicatorRemoval => std::option::Option::Some("INDICATOR_REMOVAL"),
12585                Self::IndicatorRemovalClearLinuxOrMacSystemLogs => {
12586                    std::option::Option::Some("INDICATOR_REMOVAL_CLEAR_LINUX_OR_MAC_SYSTEM_LOGS")
12587                }
12588                Self::IndicatorRemovalClearCommandHistory => {
12589                    std::option::Option::Some("INDICATOR_REMOVAL_CLEAR_COMMAND_HISTORY")
12590                }
12591                Self::IndicatorRemovalFileDeletion => {
12592                    std::option::Option::Some("INDICATOR_REMOVAL_FILE_DELETION")
12593                }
12594                Self::IndicatorRemovalTimestomp => {
12595                    std::option::Option::Some("INDICATOR_REMOVAL_TIMESTOMP")
12596                }
12597                Self::IndicatorRemovalClearMailboxData => {
12598                    std::option::Option::Some("INDICATOR_REMOVAL_CLEAR_MAILBOX_DATA")
12599                }
12600                Self::ApplicationLayerProtocol => {
12601                    std::option::Option::Some("APPLICATION_LAYER_PROTOCOL")
12602                }
12603                Self::Dns => std::option::Option::Some("DNS"),
12604                Self::SoftwareDeploymentTools => {
12605                    std::option::Option::Some("SOFTWARE_DEPLOYMENT_TOOLS")
12606                }
12607                Self::ValidAccounts => std::option::Option::Some("VALID_ACCOUNTS"),
12608                Self::DefaultAccounts => std::option::Option::Some("DEFAULT_ACCOUNTS"),
12609                Self::LocalAccounts => std::option::Option::Some("LOCAL_ACCOUNTS"),
12610                Self::CloudAccounts => std::option::Option::Some("CLOUD_ACCOUNTS"),
12611                Self::FileAndDirectoryDiscovery => {
12612                    std::option::Option::Some("FILE_AND_DIRECTORY_DISCOVERY")
12613                }
12614                Self::AccountDiscoveryLocalAccount => {
12615                    std::option::Option::Some("ACCOUNT_DISCOVERY_LOCAL_ACCOUNT")
12616                }
12617                Self::Proxy => std::option::Option::Some("PROXY"),
12618                Self::ExternalProxy => std::option::Option::Some("EXTERNAL_PROXY"),
12619                Self::MultiHopProxy => std::option::Option::Some("MULTI_HOP_PROXY"),
12620                Self::AccountManipulation => std::option::Option::Some("ACCOUNT_MANIPULATION"),
12621                Self::AdditionalCloudCredentials => {
12622                    std::option::Option::Some("ADDITIONAL_CLOUD_CREDENTIALS")
12623                }
12624                Self::AdditionalCloudRoles => std::option::Option::Some("ADDITIONAL_CLOUD_ROLES"),
12625                Self::SshAuthorizedKeys => std::option::Option::Some("SSH_AUTHORIZED_KEYS"),
12626                Self::AdditionalContainerClusterRoles => {
12627                    std::option::Option::Some("ADDITIONAL_CONTAINER_CLUSTER_ROLES")
12628                }
12629                Self::MultiStageChannels => std::option::Option::Some("MULTI_STAGE_CHANNELS"),
12630                Self::IngressToolTransfer => std::option::Option::Some("INGRESS_TOOL_TRANSFER"),
12631                Self::NativeApi => std::option::Option::Some("NATIVE_API"),
12632                Self::BruteForce => std::option::Option::Some("BRUTE_FORCE"),
12633                Self::AutomatedCollection => std::option::Option::Some("AUTOMATED_COLLECTION"),
12634                Self::SharedModules => std::option::Option::Some("SHARED_MODULES"),
12635                Self::DataEncoding => std::option::Option::Some("DATA_ENCODING"),
12636                Self::StandardEncoding => std::option::Option::Some("STANDARD_ENCODING"),
12637                Self::AccessTokenManipulation => {
12638                    std::option::Option::Some("ACCESS_TOKEN_MANIPULATION")
12639                }
12640                Self::TokenImpersonationOrTheft => {
12641                    std::option::Option::Some("TOKEN_IMPERSONATION_OR_THEFT")
12642                }
12643                Self::CreateAccount => std::option::Option::Some("CREATE_ACCOUNT"),
12644                Self::LocalAccount => std::option::Option::Some("LOCAL_ACCOUNT"),
12645                Self::DeobfuscateDecodeFilesOrInfo => {
12646                    std::option::Option::Some("DEOBFUSCATE_DECODE_FILES_OR_INFO")
12647                }
12648                Self::ExploitPublicFacingApplication => {
12649                    std::option::Option::Some("EXPLOIT_PUBLIC_FACING_APPLICATION")
12650                }
12651                Self::SupplyChainCompromise => std::option::Option::Some("SUPPLY_CHAIN_COMPROMISE"),
12652                Self::CompromiseSoftwareDependenciesAndDevelopmentTools => {
12653                    std::option::Option::Some(
12654                        "COMPROMISE_SOFTWARE_DEPENDENCIES_AND_DEVELOPMENT_TOOLS",
12655                    )
12656                }
12657                Self::ExploitationForClientExecution => {
12658                    std::option::Option::Some("EXPLOITATION_FOR_CLIENT_EXECUTION")
12659                }
12660                Self::UserExecution => std::option::Option::Some("USER_EXECUTION"),
12661                Self::LinuxAndMacFileAndDirectoryPermissionsModification => {
12662                    std::option::Option::Some(
12663                        "LINUX_AND_MAC_FILE_AND_DIRECTORY_PERMISSIONS_MODIFICATION",
12664                    )
12665                }
12666                Self::DomainPolicyModification => {
12667                    std::option::Option::Some("DOMAIN_POLICY_MODIFICATION")
12668                }
12669                Self::DataDestruction => std::option::Option::Some("DATA_DESTRUCTION"),
12670                Self::DataEncryptedForImpact => {
12671                    std::option::Option::Some("DATA_ENCRYPTED_FOR_IMPACT")
12672                }
12673                Self::ServiceStop => std::option::Option::Some("SERVICE_STOP"),
12674                Self::InhibitSystemRecovery => std::option::Option::Some("INHIBIT_SYSTEM_RECOVERY"),
12675                Self::FirmwareCorruption => std::option::Option::Some("FIRMWARE_CORRUPTION"),
12676                Self::ResourceHijacking => std::option::Option::Some("RESOURCE_HIJACKING"),
12677                Self::NetworkDenialOfService => {
12678                    std::option::Option::Some("NETWORK_DENIAL_OF_SERVICE")
12679                }
12680                Self::CloudServiceDiscovery => std::option::Option::Some("CLOUD_SERVICE_DISCOVERY"),
12681                Self::StealApplicationAccessToken => {
12682                    std::option::Option::Some("STEAL_APPLICATION_ACCESS_TOKEN")
12683                }
12684                Self::AccountAccessRemoval => std::option::Option::Some("ACCOUNT_ACCESS_REMOVAL"),
12685                Self::TransferDataToCloudAccount => {
12686                    std::option::Option::Some("TRANSFER_DATA_TO_CLOUD_ACCOUNT")
12687                }
12688                Self::StealWebSessionCookie => {
12689                    std::option::Option::Some("STEAL_WEB_SESSION_COOKIE")
12690                }
12691                Self::CreateOrModifySystemProcess => {
12692                    std::option::Option::Some("CREATE_OR_MODIFY_SYSTEM_PROCESS")
12693                }
12694                Self::EventTriggeredExecution => {
12695                    std::option::Option::Some("EVENT_TRIGGERED_EXECUTION")
12696                }
12697                Self::BootOrLogonAutostartExecution => {
12698                    std::option::Option::Some("BOOT_OR_LOGON_AUTOSTART_EXECUTION")
12699                }
12700                Self::KernelModulesAndExtensions => {
12701                    std::option::Option::Some("KERNEL_MODULES_AND_EXTENSIONS")
12702                }
12703                Self::ShortcutModification => std::option::Option::Some("SHORTCUT_MODIFICATION"),
12704                Self::AbuseElevationControlMechanism => {
12705                    std::option::Option::Some("ABUSE_ELEVATION_CONTROL_MECHANISM")
12706                }
12707                Self::AbuseElevationControlMechanismSetuidAndSetgid => {
12708                    std::option::Option::Some("ABUSE_ELEVATION_CONTROL_MECHANISM_SETUID_AND_SETGID")
12709                }
12710                Self::AbuseElevationControlMechanismSudoAndSudoCaching => {
12711                    std::option::Option::Some(
12712                        "ABUSE_ELEVATION_CONTROL_MECHANISM_SUDO_AND_SUDO_CACHING",
12713                    )
12714                }
12715                Self::UnsecuredCredentials => std::option::Option::Some("UNSECURED_CREDENTIALS"),
12716                Self::CredentialsInFiles => std::option::Option::Some("CREDENTIALS_IN_FILES"),
12717                Self::BashHistory => std::option::Option::Some("BASH_HISTORY"),
12718                Self::PrivateKeys => std::option::Option::Some("PRIVATE_KEYS"),
12719                Self::SubvertTrustControl => std::option::Option::Some("SUBVERT_TRUST_CONTROL"),
12720                Self::InstallRootCertificate => {
12721                    std::option::Option::Some("INSTALL_ROOT_CERTIFICATE")
12722                }
12723                Self::CompromiseHostSoftwareBinary => {
12724                    std::option::Option::Some("COMPROMISE_HOST_SOFTWARE_BINARY")
12725                }
12726                Self::CredentialsFromPasswordStores => {
12727                    std::option::Option::Some("CREDENTIALS_FROM_PASSWORD_STORES")
12728                }
12729                Self::ModifyAuthenticationProcess => {
12730                    std::option::Option::Some("MODIFY_AUTHENTICATION_PROCESS")
12731                }
12732                Self::PluggableAuthenticationModules => {
12733                    std::option::Option::Some("PLUGGABLE_AUTHENTICATION_MODULES")
12734                }
12735                Self::MultiFactorAuthentication => {
12736                    std::option::Option::Some("MULTI_FACTOR_AUTHENTICATION")
12737                }
12738                Self::ImpairDefenses => std::option::Option::Some("IMPAIR_DEFENSES"),
12739                Self::DisableOrModifyTools => std::option::Option::Some("DISABLE_OR_MODIFY_TOOLS"),
12740                Self::IndicatorBlocking => std::option::Option::Some("INDICATOR_BLOCKING"),
12741                Self::DisableOrModifyLinuxAuditSystem => {
12742                    std::option::Option::Some("DISABLE_OR_MODIFY_LINUX_AUDIT_SYSTEM")
12743                }
12744                Self::HideArtifacts => std::option::Option::Some("HIDE_ARTIFACTS"),
12745                Self::HiddenFilesAndDirectories => {
12746                    std::option::Option::Some("HIDDEN_FILES_AND_DIRECTORIES")
12747                }
12748                Self::HiddenUsers => std::option::Option::Some("HIDDEN_USERS"),
12749                Self::ExfiltrationOverWebService => {
12750                    std::option::Option::Some("EXFILTRATION_OVER_WEB_SERVICE")
12751                }
12752                Self::ExfiltrationToCloudStorage => {
12753                    std::option::Option::Some("EXFILTRATION_TO_CLOUD_STORAGE")
12754                }
12755                Self::DynamicResolution => std::option::Option::Some("DYNAMIC_RESOLUTION"),
12756                Self::LateralToolTransfer => std::option::Option::Some("LATERAL_TOOL_TRANSFER"),
12757                Self::HijackExecutionFlow => std::option::Option::Some("HIJACK_EXECUTION_FLOW"),
12758                Self::HijackExecutionFlowDynamicLinkerHijacking => {
12759                    std::option::Option::Some("HIJACK_EXECUTION_FLOW_DYNAMIC_LINKER_HIJACKING")
12760                }
12761                Self::ModifyCloudComputeInfrastructure => {
12762                    std::option::Option::Some("MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE")
12763                }
12764                Self::CreateSnapshot => std::option::Option::Some("CREATE_SNAPSHOT"),
12765                Self::CloudInfrastructureDiscovery => {
12766                    std::option::Option::Some("CLOUD_INFRASTRUCTURE_DISCOVERY")
12767                }
12768                Self::DevelopCapabilities => std::option::Option::Some("DEVELOP_CAPABILITIES"),
12769                Self::DevelopCapabilitiesMalware => {
12770                    std::option::Option::Some("DEVELOP_CAPABILITIES_MALWARE")
12771                }
12772                Self::ObtainCapabilities => std::option::Option::Some("OBTAIN_CAPABILITIES"),
12773                Self::ObtainCapabilitiesMalware => {
12774                    std::option::Option::Some("OBTAIN_CAPABILITIES_MALWARE")
12775                }
12776                Self::ObtainCapabilitiesVulnerabilities => {
12777                    std::option::Option::Some("OBTAIN_CAPABILITIES_VULNERABILITIES")
12778                }
12779                Self::ActiveScanning => std::option::Option::Some("ACTIVE_SCANNING"),
12780                Self::ScanningIpBlocks => std::option::Option::Some("SCANNING_IP_BLOCKS"),
12781                Self::StageCapabilities => std::option::Option::Some("STAGE_CAPABILITIES"),
12782                Self::UploadMalware => std::option::Option::Some("UPLOAD_MALWARE"),
12783                Self::ContainerAdministrationCommand => {
12784                    std::option::Option::Some("CONTAINER_ADMINISTRATION_COMMAND")
12785                }
12786                Self::DeployContainer => std::option::Option::Some("DEPLOY_CONTAINER"),
12787                Self::EscapeToHost => std::option::Option::Some("ESCAPE_TO_HOST"),
12788                Self::ContainerAndResourceDiscovery => {
12789                    std::option::Option::Some("CONTAINER_AND_RESOURCE_DISCOVERY")
12790                }
12791                Self::ReflectiveCodeLoading => std::option::Option::Some("REFLECTIVE_CODE_LOADING"),
12792                Self::StealOrForgeAuthenticationCertificates => {
12793                    std::option::Option::Some("STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES")
12794                }
12795                Self::FinancialTheft => std::option::Option::Some("FINANCIAL_THEFT"),
12796                Self::UnknownValue(u) => u.0.name(),
12797            }
12798        }
12799    }
12800
12801    impl std::default::Default for Technique {
12802        fn default() -> Self {
12803            use std::convert::From;
12804            Self::from(0)
12805        }
12806    }
12807
12808    impl std::fmt::Display for Technique {
12809        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12810            wkt::internal::display_enum(f, self.name(), self.value())
12811        }
12812    }
12813
12814    impl std::convert::From<i32> for Technique {
12815        fn from(value: i32) -> Self {
12816            match value {
12817                0 => Self::Unspecified,
12818                1 => Self::ActiveScanning,
12819                2 => Self::ScanningIpBlocks,
12820                3 => Self::IngressToolTransfer,
12821                4 => Self::NativeApi,
12822                5 => Self::SharedModules,
12823                6 => Self::CommandAndScriptingInterpreter,
12824                7 => Self::UnixShell,
12825                8 => Self::ResourceHijacking,
12826                9 => Self::Proxy,
12827                10 => Self::ExternalProxy,
12828                11 => Self::MultiHopProxy,
12829                12 => Self::DynamicResolution,
12830                13 => Self::UnsecuredCredentials,
12831                14 => Self::ValidAccounts,
12832                15 => Self::LocalAccounts,
12833                16 => Self::CloudAccounts,
12834                17 => Self::NetworkDenialOfService,
12835                18 => Self::PermissionGroupsDiscovery,
12836                19 => Self::CloudGroups,
12837                20 => Self::ExfiltrationOverWebService,
12838                21 => Self::ExfiltrationToCloudStorage,
12839                22 => Self::AccountManipulation,
12840                23 => Self::SshAuthorizedKeys,
12841                24 => Self::CreateOrModifySystemProcess,
12842                25 => Self::StealWebSessionCookie,
12843                26 => Self::ModifyCloudComputeInfrastructure,
12844                27 => Self::ExploitPublicFacingApplication,
12845                28 => Self::ModifyAuthenticationProcess,
12846                29 => Self::DataDestruction,
12847                30 => Self::DomainPolicyModification,
12848                31 => Self::ImpairDefenses,
12849                32 => Self::NetworkServiceDiscovery,
12850                33 => Self::AccessTokenManipulation,
12851                34 => Self::AbuseElevationControlMechanism,
12852                35 => Self::DefaultAccounts,
12853                36 => Self::InhibitSystemRecovery,
12854                37 => Self::BootOrLogonInitializationScripts,
12855                38 => Self::StartupItems,
12856                39 => Self::TokenImpersonationOrTheft,
12857                40 => Self::AdditionalCloudCredentials,
12858                41 => Self::LateralToolTransfer,
12859                42 => Self::StealApplicationAccessToken,
12860                43 => Self::ObtainCapabilities,
12861                44 => Self::BruteForce,
12862                45 => Self::ApplicationLayerProtocol,
12863                46 => Self::Dns,
12864                47 => Self::SoftwareDeploymentTools,
12865                48 => Self::CloudServiceDiscovery,
12866                49 => Self::Masquerading,
12867                50 => Self::MatchLegitimateNameOrLocation,
12868                51 => Self::AccountAccessRemoval,
12869                52 => Self::ServiceStop,
12870                53 => Self::CloudInfrastructureDiscovery,
12871                54 => Self::CreateSnapshot,
12872                55 => Self::DisableOrModifyTools,
12873                56 => Self::ProcessDiscovery,
12874                57 => Self::ContainerAndResourceDiscovery,
12875                58 => Self::AdditionalContainerClusterRoles,
12876                59 => Self::Python,
12877                60 => Self::ContainerAdministrationCommand,
12878                61 => Self::EscapeToHost,
12879                62 => Self::StealOrForgeAuthenticationCertificates,
12880                63 => Self::ExploitationForPrivilegeEscalation,
12881                64 => Self::IndicatorRemovalFileDeletion,
12882                65 => Self::EventTriggeredExecution,
12883                66 => Self::DeployContainer,
12884                67 => Self::AdditionalCloudRoles,
12885                68 => Self::AutomatedExfiltration,
12886                69 => Self::UserExecution,
12887                70 => Self::DataObfuscation,
12888                71 => Self::DataObfuscationSteganography,
12889                72 => Self::ObfuscatedFilesOrInfo,
12890                73 => Self::Steganography,
12891                74 => Self::CompileAfterDelivery,
12892                75 => Self::CommandObfuscation,
12893                76 => Self::MultiStageChannels,
12894                77 => Self::DataEncoding,
12895                78 => Self::StandardEncoding,
12896                79 => Self::CreateAccount,
12897                80 => Self::LocalAccount,
12898                81 => Self::FirmwareCorruption,
12899                82 => Self::BootOrLogonAutostartExecution,
12900                83 => Self::KernelModulesAndExtensions,
12901                84 => Self::CompromiseHostSoftwareBinary,
12902                85 => Self::HideArtifacts,
12903                86 => Self::HiddenFilesAndDirectories,
12904                87 => Self::HiddenUsers,
12905                88 => Self::StageCapabilities,
12906                89 => Self::ScheduledTaskJob,
12907                90 => Self::ContainerOrchestrationJob,
12908                91 => Self::TransferDataToCloudAccount,
12909                92 => Self::ReflectiveCodeLoading,
12910                93 => Self::ProcessInjection,
12911                94 => Self::AutomatedCollection,
12912                95 => Self::DeobfuscateDecodeFilesOrInfo,
12913                96 => Self::BashHistory,
12914                97 => Self::PrivateKeys,
12915                98 => Self::CredentialsFromPasswordStores,
12916                99 => Self::DevelopCapabilities,
12917                100 => Self::DevelopCapabilitiesMalware,
12918                101 => Self::ObtainCapabilitiesMalware,
12919                102 => Self::UploadMalware,
12920                103 => Self::InputCapture,
12921                104 => Self::InputCaptureKeylogging,
12922                105 => Self::CredentialsInFiles,
12923                106 => Self::SubvertTrustControl,
12924                107 => Self::InstallRootCertificate,
12925                108 => Self::PluggableAuthenticationModules,
12926                109 => Self::AbuseElevationControlMechanismSudoAndSudoCaching,
12927                110 => Self::IndicatorBlocking,
12928                111 => Self::DisableOrModifyLinuxAuditSystem,
12929                112 => Self::HijackExecutionFlow,
12930                113 => Self::HijackExecutionFlowDynamicLinkerHijacking,
12931                114 => Self::OsCredentialDumping,
12932                115 => Self::OsCredentialDumpingProcFilesystem,
12933                116 => Self::AccountDiscoveryLocalAccount,
12934                117 => Self::DataFromLocalSystem,
12935                118 => Self::SystemOwnerUserDiscovery,
12936                119 => Self::ScheduledTaskJobCron,
12937                120 => Self::ScheduledTransfer,
12938                121 => Self::FileAndDirectoryDiscovery,
12939                122 => Self::OsCredentialDumpingEtcPasswordAndEtcShadow,
12940                123 => Self::IndicatorRemoval,
12941                124 => Self::IndicatorRemovalClearLinuxOrMacSystemLogs,
12942                125 => Self::IndicatorRemovalClearCommandHistory,
12943                126 => Self::IndicatorRemovalClearMailboxData,
12944                127 => Self::ShortcutModification,
12945                128 => Self::IndicatorRemovalTimestomp,
12946                129 => Self::SupplyChainCompromise,
12947                130 => Self::CompromiseSoftwareDependenciesAndDevelopmentTools,
12948                131 => Self::FinancialTheft,
12949                132 => Self::DataEncryptedForImpact,
12950                133 => Self::ObtainCapabilitiesVulnerabilities,
12951                134 => Self::ExploitationForClientExecution,
12952                135 => Self::LinuxAndMacFileAndDirectoryPermissionsModification,
12953                136 => Self::AbuseElevationControlMechanismSetuidAndSetgid,
12954                137 => Self::MultiFactorAuthentication,
12955                _ => Self::UnknownValue(technique::UnknownValue(
12956                    wkt::internal::UnknownEnumValue::Integer(value),
12957                )),
12958            }
12959        }
12960    }
12961
12962    impl std::convert::From<&str> for Technique {
12963        fn from(value: &str) -> Self {
12964            use std::string::ToString;
12965            match value {
12966                "TECHNIQUE_UNSPECIFIED" => Self::Unspecified,
12967                "DATA_OBFUSCATION" => Self::DataObfuscation,
12968                "DATA_OBFUSCATION_STEGANOGRAPHY" => Self::DataObfuscationSteganography,
12969                "OS_CREDENTIAL_DUMPING" => Self::OsCredentialDumping,
12970                "OS_CREDENTIAL_DUMPING_PROC_FILESYSTEM" => Self::OsCredentialDumpingProcFilesystem,
12971                "OS_CREDENTIAL_DUMPING_ETC_PASSWORD_AND_ETC_SHADOW" => {
12972                    Self::OsCredentialDumpingEtcPasswordAndEtcShadow
12973                }
12974                "DATA_FROM_LOCAL_SYSTEM" => Self::DataFromLocalSystem,
12975                "AUTOMATED_EXFILTRATION" => Self::AutomatedExfiltration,
12976                "OBFUSCATED_FILES_OR_INFO" => Self::ObfuscatedFilesOrInfo,
12977                "STEGANOGRAPHY" => Self::Steganography,
12978                "COMPILE_AFTER_DELIVERY" => Self::CompileAfterDelivery,
12979                "COMMAND_OBFUSCATION" => Self::CommandObfuscation,
12980                "SCHEDULED_TRANSFER" => Self::ScheduledTransfer,
12981                "SYSTEM_OWNER_USER_DISCOVERY" => Self::SystemOwnerUserDiscovery,
12982                "MASQUERADING" => Self::Masquerading,
12983                "MATCH_LEGITIMATE_NAME_OR_LOCATION" => Self::MatchLegitimateNameOrLocation,
12984                "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS" => Self::BootOrLogonInitializationScripts,
12985                "STARTUP_ITEMS" => Self::StartupItems,
12986                "NETWORK_SERVICE_DISCOVERY" => Self::NetworkServiceDiscovery,
12987                "SCHEDULED_TASK_JOB" => Self::ScheduledTaskJob,
12988                "SCHEDULED_TASK_JOB_CRON" => Self::ScheduledTaskJobCron,
12989                "CONTAINER_ORCHESTRATION_JOB" => Self::ContainerOrchestrationJob,
12990                "PROCESS_INJECTION" => Self::ProcessInjection,
12991                "INPUT_CAPTURE" => Self::InputCapture,
12992                "INPUT_CAPTURE_KEYLOGGING" => Self::InputCaptureKeylogging,
12993                "PROCESS_DISCOVERY" => Self::ProcessDiscovery,
12994                "COMMAND_AND_SCRIPTING_INTERPRETER" => Self::CommandAndScriptingInterpreter,
12995                "UNIX_SHELL" => Self::UnixShell,
12996                "PYTHON" => Self::Python,
12997                "EXPLOITATION_FOR_PRIVILEGE_ESCALATION" => Self::ExploitationForPrivilegeEscalation,
12998                "PERMISSION_GROUPS_DISCOVERY" => Self::PermissionGroupsDiscovery,
12999                "CLOUD_GROUPS" => Self::CloudGroups,
13000                "INDICATOR_REMOVAL" => Self::IndicatorRemoval,
13001                "INDICATOR_REMOVAL_CLEAR_LINUX_OR_MAC_SYSTEM_LOGS" => {
13002                    Self::IndicatorRemovalClearLinuxOrMacSystemLogs
13003                }
13004                "INDICATOR_REMOVAL_CLEAR_COMMAND_HISTORY" => {
13005                    Self::IndicatorRemovalClearCommandHistory
13006                }
13007                "INDICATOR_REMOVAL_FILE_DELETION" => Self::IndicatorRemovalFileDeletion,
13008                "INDICATOR_REMOVAL_TIMESTOMP" => Self::IndicatorRemovalTimestomp,
13009                "INDICATOR_REMOVAL_CLEAR_MAILBOX_DATA" => Self::IndicatorRemovalClearMailboxData,
13010                "APPLICATION_LAYER_PROTOCOL" => Self::ApplicationLayerProtocol,
13011                "DNS" => Self::Dns,
13012                "SOFTWARE_DEPLOYMENT_TOOLS" => Self::SoftwareDeploymentTools,
13013                "VALID_ACCOUNTS" => Self::ValidAccounts,
13014                "DEFAULT_ACCOUNTS" => Self::DefaultAccounts,
13015                "LOCAL_ACCOUNTS" => Self::LocalAccounts,
13016                "CLOUD_ACCOUNTS" => Self::CloudAccounts,
13017                "FILE_AND_DIRECTORY_DISCOVERY" => Self::FileAndDirectoryDiscovery,
13018                "ACCOUNT_DISCOVERY_LOCAL_ACCOUNT" => Self::AccountDiscoveryLocalAccount,
13019                "PROXY" => Self::Proxy,
13020                "EXTERNAL_PROXY" => Self::ExternalProxy,
13021                "MULTI_HOP_PROXY" => Self::MultiHopProxy,
13022                "ACCOUNT_MANIPULATION" => Self::AccountManipulation,
13023                "ADDITIONAL_CLOUD_CREDENTIALS" => Self::AdditionalCloudCredentials,
13024                "ADDITIONAL_CLOUD_ROLES" => Self::AdditionalCloudRoles,
13025                "SSH_AUTHORIZED_KEYS" => Self::SshAuthorizedKeys,
13026                "ADDITIONAL_CONTAINER_CLUSTER_ROLES" => Self::AdditionalContainerClusterRoles,
13027                "MULTI_STAGE_CHANNELS" => Self::MultiStageChannels,
13028                "INGRESS_TOOL_TRANSFER" => Self::IngressToolTransfer,
13029                "NATIVE_API" => Self::NativeApi,
13030                "BRUTE_FORCE" => Self::BruteForce,
13031                "AUTOMATED_COLLECTION" => Self::AutomatedCollection,
13032                "SHARED_MODULES" => Self::SharedModules,
13033                "DATA_ENCODING" => Self::DataEncoding,
13034                "STANDARD_ENCODING" => Self::StandardEncoding,
13035                "ACCESS_TOKEN_MANIPULATION" => Self::AccessTokenManipulation,
13036                "TOKEN_IMPERSONATION_OR_THEFT" => Self::TokenImpersonationOrTheft,
13037                "CREATE_ACCOUNT" => Self::CreateAccount,
13038                "LOCAL_ACCOUNT" => Self::LocalAccount,
13039                "DEOBFUSCATE_DECODE_FILES_OR_INFO" => Self::DeobfuscateDecodeFilesOrInfo,
13040                "EXPLOIT_PUBLIC_FACING_APPLICATION" => Self::ExploitPublicFacingApplication,
13041                "SUPPLY_CHAIN_COMPROMISE" => Self::SupplyChainCompromise,
13042                "COMPROMISE_SOFTWARE_DEPENDENCIES_AND_DEVELOPMENT_TOOLS" => {
13043                    Self::CompromiseSoftwareDependenciesAndDevelopmentTools
13044                }
13045                "EXPLOITATION_FOR_CLIENT_EXECUTION" => Self::ExploitationForClientExecution,
13046                "USER_EXECUTION" => Self::UserExecution,
13047                "LINUX_AND_MAC_FILE_AND_DIRECTORY_PERMISSIONS_MODIFICATION" => {
13048                    Self::LinuxAndMacFileAndDirectoryPermissionsModification
13049                }
13050                "DOMAIN_POLICY_MODIFICATION" => Self::DomainPolicyModification,
13051                "DATA_DESTRUCTION" => Self::DataDestruction,
13052                "DATA_ENCRYPTED_FOR_IMPACT" => Self::DataEncryptedForImpact,
13053                "SERVICE_STOP" => Self::ServiceStop,
13054                "INHIBIT_SYSTEM_RECOVERY" => Self::InhibitSystemRecovery,
13055                "FIRMWARE_CORRUPTION" => Self::FirmwareCorruption,
13056                "RESOURCE_HIJACKING" => Self::ResourceHijacking,
13057                "NETWORK_DENIAL_OF_SERVICE" => Self::NetworkDenialOfService,
13058                "CLOUD_SERVICE_DISCOVERY" => Self::CloudServiceDiscovery,
13059                "STEAL_APPLICATION_ACCESS_TOKEN" => Self::StealApplicationAccessToken,
13060                "ACCOUNT_ACCESS_REMOVAL" => Self::AccountAccessRemoval,
13061                "TRANSFER_DATA_TO_CLOUD_ACCOUNT" => Self::TransferDataToCloudAccount,
13062                "STEAL_WEB_SESSION_COOKIE" => Self::StealWebSessionCookie,
13063                "CREATE_OR_MODIFY_SYSTEM_PROCESS" => Self::CreateOrModifySystemProcess,
13064                "EVENT_TRIGGERED_EXECUTION" => Self::EventTriggeredExecution,
13065                "BOOT_OR_LOGON_AUTOSTART_EXECUTION" => Self::BootOrLogonAutostartExecution,
13066                "KERNEL_MODULES_AND_EXTENSIONS" => Self::KernelModulesAndExtensions,
13067                "SHORTCUT_MODIFICATION" => Self::ShortcutModification,
13068                "ABUSE_ELEVATION_CONTROL_MECHANISM" => Self::AbuseElevationControlMechanism,
13069                "ABUSE_ELEVATION_CONTROL_MECHANISM_SETUID_AND_SETGID" => {
13070                    Self::AbuseElevationControlMechanismSetuidAndSetgid
13071                }
13072                "ABUSE_ELEVATION_CONTROL_MECHANISM_SUDO_AND_SUDO_CACHING" => {
13073                    Self::AbuseElevationControlMechanismSudoAndSudoCaching
13074                }
13075                "UNSECURED_CREDENTIALS" => Self::UnsecuredCredentials,
13076                "CREDENTIALS_IN_FILES" => Self::CredentialsInFiles,
13077                "BASH_HISTORY" => Self::BashHistory,
13078                "PRIVATE_KEYS" => Self::PrivateKeys,
13079                "SUBVERT_TRUST_CONTROL" => Self::SubvertTrustControl,
13080                "INSTALL_ROOT_CERTIFICATE" => Self::InstallRootCertificate,
13081                "COMPROMISE_HOST_SOFTWARE_BINARY" => Self::CompromiseHostSoftwareBinary,
13082                "CREDENTIALS_FROM_PASSWORD_STORES" => Self::CredentialsFromPasswordStores,
13083                "MODIFY_AUTHENTICATION_PROCESS" => Self::ModifyAuthenticationProcess,
13084                "PLUGGABLE_AUTHENTICATION_MODULES" => Self::PluggableAuthenticationModules,
13085                "MULTI_FACTOR_AUTHENTICATION" => Self::MultiFactorAuthentication,
13086                "IMPAIR_DEFENSES" => Self::ImpairDefenses,
13087                "DISABLE_OR_MODIFY_TOOLS" => Self::DisableOrModifyTools,
13088                "INDICATOR_BLOCKING" => Self::IndicatorBlocking,
13089                "DISABLE_OR_MODIFY_LINUX_AUDIT_SYSTEM" => Self::DisableOrModifyLinuxAuditSystem,
13090                "HIDE_ARTIFACTS" => Self::HideArtifacts,
13091                "HIDDEN_FILES_AND_DIRECTORIES" => Self::HiddenFilesAndDirectories,
13092                "HIDDEN_USERS" => Self::HiddenUsers,
13093                "EXFILTRATION_OVER_WEB_SERVICE" => Self::ExfiltrationOverWebService,
13094                "EXFILTRATION_TO_CLOUD_STORAGE" => Self::ExfiltrationToCloudStorage,
13095                "DYNAMIC_RESOLUTION" => Self::DynamicResolution,
13096                "LATERAL_TOOL_TRANSFER" => Self::LateralToolTransfer,
13097                "HIJACK_EXECUTION_FLOW" => Self::HijackExecutionFlow,
13098                "HIJACK_EXECUTION_FLOW_DYNAMIC_LINKER_HIJACKING" => {
13099                    Self::HijackExecutionFlowDynamicLinkerHijacking
13100                }
13101                "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" => Self::ModifyCloudComputeInfrastructure,
13102                "CREATE_SNAPSHOT" => Self::CreateSnapshot,
13103                "CLOUD_INFRASTRUCTURE_DISCOVERY" => Self::CloudInfrastructureDiscovery,
13104                "DEVELOP_CAPABILITIES" => Self::DevelopCapabilities,
13105                "DEVELOP_CAPABILITIES_MALWARE" => Self::DevelopCapabilitiesMalware,
13106                "OBTAIN_CAPABILITIES" => Self::ObtainCapabilities,
13107                "OBTAIN_CAPABILITIES_MALWARE" => Self::ObtainCapabilitiesMalware,
13108                "OBTAIN_CAPABILITIES_VULNERABILITIES" => Self::ObtainCapabilitiesVulnerabilities,
13109                "ACTIVE_SCANNING" => Self::ActiveScanning,
13110                "SCANNING_IP_BLOCKS" => Self::ScanningIpBlocks,
13111                "STAGE_CAPABILITIES" => Self::StageCapabilities,
13112                "UPLOAD_MALWARE" => Self::UploadMalware,
13113                "CONTAINER_ADMINISTRATION_COMMAND" => Self::ContainerAdministrationCommand,
13114                "DEPLOY_CONTAINER" => Self::DeployContainer,
13115                "ESCAPE_TO_HOST" => Self::EscapeToHost,
13116                "CONTAINER_AND_RESOURCE_DISCOVERY" => Self::ContainerAndResourceDiscovery,
13117                "REFLECTIVE_CODE_LOADING" => Self::ReflectiveCodeLoading,
13118                "STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES" => {
13119                    Self::StealOrForgeAuthenticationCertificates
13120                }
13121                "FINANCIAL_THEFT" => Self::FinancialTheft,
13122                _ => Self::UnknownValue(technique::UnknownValue(
13123                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13124                )),
13125            }
13126        }
13127    }
13128
13129    impl serde::ser::Serialize for Technique {
13130        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13131        where
13132            S: serde::Serializer,
13133        {
13134            match self {
13135                Self::Unspecified => serializer.serialize_i32(0),
13136                Self::DataObfuscation => serializer.serialize_i32(70),
13137                Self::DataObfuscationSteganography => serializer.serialize_i32(71),
13138                Self::OsCredentialDumping => serializer.serialize_i32(114),
13139                Self::OsCredentialDumpingProcFilesystem => serializer.serialize_i32(115),
13140                Self::OsCredentialDumpingEtcPasswordAndEtcShadow => serializer.serialize_i32(122),
13141                Self::DataFromLocalSystem => serializer.serialize_i32(117),
13142                Self::AutomatedExfiltration => serializer.serialize_i32(68),
13143                Self::ObfuscatedFilesOrInfo => serializer.serialize_i32(72),
13144                Self::Steganography => serializer.serialize_i32(73),
13145                Self::CompileAfterDelivery => serializer.serialize_i32(74),
13146                Self::CommandObfuscation => serializer.serialize_i32(75),
13147                Self::ScheduledTransfer => serializer.serialize_i32(120),
13148                Self::SystemOwnerUserDiscovery => serializer.serialize_i32(118),
13149                Self::Masquerading => serializer.serialize_i32(49),
13150                Self::MatchLegitimateNameOrLocation => serializer.serialize_i32(50),
13151                Self::BootOrLogonInitializationScripts => serializer.serialize_i32(37),
13152                Self::StartupItems => serializer.serialize_i32(38),
13153                Self::NetworkServiceDiscovery => serializer.serialize_i32(32),
13154                Self::ScheduledTaskJob => serializer.serialize_i32(89),
13155                Self::ScheduledTaskJobCron => serializer.serialize_i32(119),
13156                Self::ContainerOrchestrationJob => serializer.serialize_i32(90),
13157                Self::ProcessInjection => serializer.serialize_i32(93),
13158                Self::InputCapture => serializer.serialize_i32(103),
13159                Self::InputCaptureKeylogging => serializer.serialize_i32(104),
13160                Self::ProcessDiscovery => serializer.serialize_i32(56),
13161                Self::CommandAndScriptingInterpreter => serializer.serialize_i32(6),
13162                Self::UnixShell => serializer.serialize_i32(7),
13163                Self::Python => serializer.serialize_i32(59),
13164                Self::ExploitationForPrivilegeEscalation => serializer.serialize_i32(63),
13165                Self::PermissionGroupsDiscovery => serializer.serialize_i32(18),
13166                Self::CloudGroups => serializer.serialize_i32(19),
13167                Self::IndicatorRemoval => serializer.serialize_i32(123),
13168                Self::IndicatorRemovalClearLinuxOrMacSystemLogs => serializer.serialize_i32(124),
13169                Self::IndicatorRemovalClearCommandHistory => serializer.serialize_i32(125),
13170                Self::IndicatorRemovalFileDeletion => serializer.serialize_i32(64),
13171                Self::IndicatorRemovalTimestomp => serializer.serialize_i32(128),
13172                Self::IndicatorRemovalClearMailboxData => serializer.serialize_i32(126),
13173                Self::ApplicationLayerProtocol => serializer.serialize_i32(45),
13174                Self::Dns => serializer.serialize_i32(46),
13175                Self::SoftwareDeploymentTools => serializer.serialize_i32(47),
13176                Self::ValidAccounts => serializer.serialize_i32(14),
13177                Self::DefaultAccounts => serializer.serialize_i32(35),
13178                Self::LocalAccounts => serializer.serialize_i32(15),
13179                Self::CloudAccounts => serializer.serialize_i32(16),
13180                Self::FileAndDirectoryDiscovery => serializer.serialize_i32(121),
13181                Self::AccountDiscoveryLocalAccount => serializer.serialize_i32(116),
13182                Self::Proxy => serializer.serialize_i32(9),
13183                Self::ExternalProxy => serializer.serialize_i32(10),
13184                Self::MultiHopProxy => serializer.serialize_i32(11),
13185                Self::AccountManipulation => serializer.serialize_i32(22),
13186                Self::AdditionalCloudCredentials => serializer.serialize_i32(40),
13187                Self::AdditionalCloudRoles => serializer.serialize_i32(67),
13188                Self::SshAuthorizedKeys => serializer.serialize_i32(23),
13189                Self::AdditionalContainerClusterRoles => serializer.serialize_i32(58),
13190                Self::MultiStageChannels => serializer.serialize_i32(76),
13191                Self::IngressToolTransfer => serializer.serialize_i32(3),
13192                Self::NativeApi => serializer.serialize_i32(4),
13193                Self::BruteForce => serializer.serialize_i32(44),
13194                Self::AutomatedCollection => serializer.serialize_i32(94),
13195                Self::SharedModules => serializer.serialize_i32(5),
13196                Self::DataEncoding => serializer.serialize_i32(77),
13197                Self::StandardEncoding => serializer.serialize_i32(78),
13198                Self::AccessTokenManipulation => serializer.serialize_i32(33),
13199                Self::TokenImpersonationOrTheft => serializer.serialize_i32(39),
13200                Self::CreateAccount => serializer.serialize_i32(79),
13201                Self::LocalAccount => serializer.serialize_i32(80),
13202                Self::DeobfuscateDecodeFilesOrInfo => serializer.serialize_i32(95),
13203                Self::ExploitPublicFacingApplication => serializer.serialize_i32(27),
13204                Self::SupplyChainCompromise => serializer.serialize_i32(129),
13205                Self::CompromiseSoftwareDependenciesAndDevelopmentTools => {
13206                    serializer.serialize_i32(130)
13207                }
13208                Self::ExploitationForClientExecution => serializer.serialize_i32(134),
13209                Self::UserExecution => serializer.serialize_i32(69),
13210                Self::LinuxAndMacFileAndDirectoryPermissionsModification => {
13211                    serializer.serialize_i32(135)
13212                }
13213                Self::DomainPolicyModification => serializer.serialize_i32(30),
13214                Self::DataDestruction => serializer.serialize_i32(29),
13215                Self::DataEncryptedForImpact => serializer.serialize_i32(132),
13216                Self::ServiceStop => serializer.serialize_i32(52),
13217                Self::InhibitSystemRecovery => serializer.serialize_i32(36),
13218                Self::FirmwareCorruption => serializer.serialize_i32(81),
13219                Self::ResourceHijacking => serializer.serialize_i32(8),
13220                Self::NetworkDenialOfService => serializer.serialize_i32(17),
13221                Self::CloudServiceDiscovery => serializer.serialize_i32(48),
13222                Self::StealApplicationAccessToken => serializer.serialize_i32(42),
13223                Self::AccountAccessRemoval => serializer.serialize_i32(51),
13224                Self::TransferDataToCloudAccount => serializer.serialize_i32(91),
13225                Self::StealWebSessionCookie => serializer.serialize_i32(25),
13226                Self::CreateOrModifySystemProcess => serializer.serialize_i32(24),
13227                Self::EventTriggeredExecution => serializer.serialize_i32(65),
13228                Self::BootOrLogonAutostartExecution => serializer.serialize_i32(82),
13229                Self::KernelModulesAndExtensions => serializer.serialize_i32(83),
13230                Self::ShortcutModification => serializer.serialize_i32(127),
13231                Self::AbuseElevationControlMechanism => serializer.serialize_i32(34),
13232                Self::AbuseElevationControlMechanismSetuidAndSetgid => {
13233                    serializer.serialize_i32(136)
13234                }
13235                Self::AbuseElevationControlMechanismSudoAndSudoCaching => {
13236                    serializer.serialize_i32(109)
13237                }
13238                Self::UnsecuredCredentials => serializer.serialize_i32(13),
13239                Self::CredentialsInFiles => serializer.serialize_i32(105),
13240                Self::BashHistory => serializer.serialize_i32(96),
13241                Self::PrivateKeys => serializer.serialize_i32(97),
13242                Self::SubvertTrustControl => serializer.serialize_i32(106),
13243                Self::InstallRootCertificate => serializer.serialize_i32(107),
13244                Self::CompromiseHostSoftwareBinary => serializer.serialize_i32(84),
13245                Self::CredentialsFromPasswordStores => serializer.serialize_i32(98),
13246                Self::ModifyAuthenticationProcess => serializer.serialize_i32(28),
13247                Self::PluggableAuthenticationModules => serializer.serialize_i32(108),
13248                Self::MultiFactorAuthentication => serializer.serialize_i32(137),
13249                Self::ImpairDefenses => serializer.serialize_i32(31),
13250                Self::DisableOrModifyTools => serializer.serialize_i32(55),
13251                Self::IndicatorBlocking => serializer.serialize_i32(110),
13252                Self::DisableOrModifyLinuxAuditSystem => serializer.serialize_i32(111),
13253                Self::HideArtifacts => serializer.serialize_i32(85),
13254                Self::HiddenFilesAndDirectories => serializer.serialize_i32(86),
13255                Self::HiddenUsers => serializer.serialize_i32(87),
13256                Self::ExfiltrationOverWebService => serializer.serialize_i32(20),
13257                Self::ExfiltrationToCloudStorage => serializer.serialize_i32(21),
13258                Self::DynamicResolution => serializer.serialize_i32(12),
13259                Self::LateralToolTransfer => serializer.serialize_i32(41),
13260                Self::HijackExecutionFlow => serializer.serialize_i32(112),
13261                Self::HijackExecutionFlowDynamicLinkerHijacking => serializer.serialize_i32(113),
13262                Self::ModifyCloudComputeInfrastructure => serializer.serialize_i32(26),
13263                Self::CreateSnapshot => serializer.serialize_i32(54),
13264                Self::CloudInfrastructureDiscovery => serializer.serialize_i32(53),
13265                Self::DevelopCapabilities => serializer.serialize_i32(99),
13266                Self::DevelopCapabilitiesMalware => serializer.serialize_i32(100),
13267                Self::ObtainCapabilities => serializer.serialize_i32(43),
13268                Self::ObtainCapabilitiesMalware => serializer.serialize_i32(101),
13269                Self::ObtainCapabilitiesVulnerabilities => serializer.serialize_i32(133),
13270                Self::ActiveScanning => serializer.serialize_i32(1),
13271                Self::ScanningIpBlocks => serializer.serialize_i32(2),
13272                Self::StageCapabilities => serializer.serialize_i32(88),
13273                Self::UploadMalware => serializer.serialize_i32(102),
13274                Self::ContainerAdministrationCommand => serializer.serialize_i32(60),
13275                Self::DeployContainer => serializer.serialize_i32(66),
13276                Self::EscapeToHost => serializer.serialize_i32(61),
13277                Self::ContainerAndResourceDiscovery => serializer.serialize_i32(57),
13278                Self::ReflectiveCodeLoading => serializer.serialize_i32(92),
13279                Self::StealOrForgeAuthenticationCertificates => serializer.serialize_i32(62),
13280                Self::FinancialTheft => serializer.serialize_i32(131),
13281                Self::UnknownValue(u) => u.0.serialize(serializer),
13282            }
13283        }
13284    }
13285
13286    impl<'de> serde::de::Deserialize<'de> for Technique {
13287        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13288        where
13289            D: serde::Deserializer<'de>,
13290        {
13291            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Technique>::new(
13292                ".google.cloud.securitycenter.v2.MitreAttack.Technique",
13293            ))
13294        }
13295    }
13296}
13297
13298/// A mute config is a Cloud SCC resource that contains the configuration
13299/// to mute create/update events of findings.
13300#[derive(Clone, Default, PartialEq)]
13301#[non_exhaustive]
13302pub struct MuteConfig {
13303    /// Identifier. This field will be ignored if provided on config creation. The
13304    /// following list shows some examples of the format:
13305    ///
13306    /// + `organizations/{organization}/muteConfigs/{mute_config}`
13307    ///
13308    /// `organizations/{organization}locations/{location}//muteConfigs/{mute_config}`
13309    ///
13310    /// + `folders/{folder}/muteConfigs/{mute_config}`
13311    /// + `folders/{folder}/locations/{location}/muteConfigs/{mute_config}`
13312    /// + `projects/{project}/muteConfigs/{mute_config}`
13313    /// + `projects/{project}/locations/{location}/muteConfigs/{mute_config}`
13314    pub name: std::string::String,
13315
13316    /// A description of the mute config.
13317    pub description: std::string::String,
13318
13319    /// Required. An expression that defines the filter to apply across
13320    /// create/update events of findings. While creating a filter string, be
13321    /// mindful of the scope in which the mute configuration is being created.
13322    /// E.g., If a filter contains project = X but is created under the project = Y
13323    /// scope, it might not match any findings.
13324    ///
13325    /// The following field and operator combinations are supported:
13326    ///
13327    /// * severity: `=`, `:`
13328    /// * category: `=`, `:`
13329    /// * resource.name: `=`, `:`
13330    /// * resource.project_name: `=`, `:`
13331    /// * resource.project_display_name: `=`, `:`
13332    /// * resource.folders.resource_folder: `=`, `:`
13333    /// * resource.parent_name: `=`, `:`
13334    /// * resource.parent_display_name: `=`, `:`
13335    /// * resource.type: `=`, `:`
13336    /// * finding_class: `=`, `:`
13337    /// * indicator.ip_addresses: `=`, `:`
13338    /// * indicator.domains: `=`, `:`
13339    pub filter: std::string::String,
13340
13341    /// Output only. The time at which the mute config was created.
13342    /// This field is set by the server and will be ignored if provided on config
13343    /// creation.
13344    pub create_time: std::option::Option<wkt::Timestamp>,
13345
13346    /// Output only. The most recent time at which the mute config was updated.
13347    /// This field is set by the server and will be ignored if provided on config
13348    /// creation or update.
13349    pub update_time: std::option::Option<wkt::Timestamp>,
13350
13351    /// Output only. Email address of the user who last edited the mute config.
13352    /// This field is set by the server and will be ignored if provided on config
13353    /// creation or update.
13354    pub most_recent_editor: std::string::String,
13355
13356    /// Required. The type of the mute config, which determines what type of mute
13357    /// state the config affects. Immutable after creation.
13358    pub r#type: crate::model::mute_config::MuteConfigType,
13359
13360    /// Optional. The expiry of the mute config. Only applicable for dynamic
13361    /// configs. If the expiry is set, when the config expires, it is removed from
13362    /// all findings.
13363    pub expiry_time: std::option::Option<wkt::Timestamp>,
13364
13365    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13366}
13367
13368impl MuteConfig {
13369    /// Creates a new default instance.
13370    pub fn new() -> Self {
13371        std::default::Default::default()
13372    }
13373
13374    /// Sets the value of [name][crate::model::MuteConfig::name].
13375    ///
13376    /// # Example
13377    /// ```ignore,no_run
13378    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13379    /// # let organization_id = "organization_id";
13380    /// # let mute_config_id = "mute_config_id";
13381    /// let x = MuteConfig::new().set_name(format!("organizations/{organization_id}/muteConfigs/{mute_config_id}"));
13382    /// ```
13383    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13384        self.name = v.into();
13385        self
13386    }
13387
13388    /// Sets the value of [description][crate::model::MuteConfig::description].
13389    ///
13390    /// # Example
13391    /// ```ignore,no_run
13392    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13393    /// let x = MuteConfig::new().set_description("example");
13394    /// ```
13395    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13396        self.description = v.into();
13397        self
13398    }
13399
13400    /// Sets the value of [filter][crate::model::MuteConfig::filter].
13401    ///
13402    /// # Example
13403    /// ```ignore,no_run
13404    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13405    /// let x = MuteConfig::new().set_filter("example");
13406    /// ```
13407    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13408        self.filter = v.into();
13409        self
13410    }
13411
13412    /// Sets the value of [create_time][crate::model::MuteConfig::create_time].
13413    ///
13414    /// # Example
13415    /// ```ignore,no_run
13416    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13417    /// use wkt::Timestamp;
13418    /// let x = MuteConfig::new().set_create_time(Timestamp::default()/* use setters */);
13419    /// ```
13420    pub fn set_create_time<T>(mut self, v: T) -> Self
13421    where
13422        T: std::convert::Into<wkt::Timestamp>,
13423    {
13424        self.create_time = std::option::Option::Some(v.into());
13425        self
13426    }
13427
13428    /// Sets or clears the value of [create_time][crate::model::MuteConfig::create_time].
13429    ///
13430    /// # Example
13431    /// ```ignore,no_run
13432    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13433    /// use wkt::Timestamp;
13434    /// let x = MuteConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
13435    /// let x = MuteConfig::new().set_or_clear_create_time(None::<Timestamp>);
13436    /// ```
13437    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
13438    where
13439        T: std::convert::Into<wkt::Timestamp>,
13440    {
13441        self.create_time = v.map(|x| x.into());
13442        self
13443    }
13444
13445    /// Sets the value of [update_time][crate::model::MuteConfig::update_time].
13446    ///
13447    /// # Example
13448    /// ```ignore,no_run
13449    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13450    /// use wkt::Timestamp;
13451    /// let x = MuteConfig::new().set_update_time(Timestamp::default()/* use setters */);
13452    /// ```
13453    pub fn set_update_time<T>(mut self, v: T) -> Self
13454    where
13455        T: std::convert::Into<wkt::Timestamp>,
13456    {
13457        self.update_time = std::option::Option::Some(v.into());
13458        self
13459    }
13460
13461    /// Sets or clears the value of [update_time][crate::model::MuteConfig::update_time].
13462    ///
13463    /// # Example
13464    /// ```ignore,no_run
13465    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13466    /// use wkt::Timestamp;
13467    /// let x = MuteConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
13468    /// let x = MuteConfig::new().set_or_clear_update_time(None::<Timestamp>);
13469    /// ```
13470    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
13471    where
13472        T: std::convert::Into<wkt::Timestamp>,
13473    {
13474        self.update_time = v.map(|x| x.into());
13475        self
13476    }
13477
13478    /// Sets the value of [most_recent_editor][crate::model::MuteConfig::most_recent_editor].
13479    ///
13480    /// # Example
13481    /// ```ignore,no_run
13482    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13483    /// let x = MuteConfig::new().set_most_recent_editor("example");
13484    /// ```
13485    pub fn set_most_recent_editor<T: std::convert::Into<std::string::String>>(
13486        mut self,
13487        v: T,
13488    ) -> Self {
13489        self.most_recent_editor = v.into();
13490        self
13491    }
13492
13493    /// Sets the value of [r#type][crate::model::MuteConfig::type].
13494    ///
13495    /// # Example
13496    /// ```ignore,no_run
13497    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13498    /// use google_cloud_securitycenter_v2::model::mute_config::MuteConfigType;
13499    /// let x0 = MuteConfig::new().set_type(MuteConfigType::Static);
13500    /// let x1 = MuteConfig::new().set_type(MuteConfigType::Dynamic);
13501    /// ```
13502    pub fn set_type<T: std::convert::Into<crate::model::mute_config::MuteConfigType>>(
13503        mut self,
13504        v: T,
13505    ) -> Self {
13506        self.r#type = v.into();
13507        self
13508    }
13509
13510    /// Sets the value of [expiry_time][crate::model::MuteConfig::expiry_time].
13511    ///
13512    /// # Example
13513    /// ```ignore,no_run
13514    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13515    /// use wkt::Timestamp;
13516    /// let x = MuteConfig::new().set_expiry_time(Timestamp::default()/* use setters */);
13517    /// ```
13518    pub fn set_expiry_time<T>(mut self, v: T) -> Self
13519    where
13520        T: std::convert::Into<wkt::Timestamp>,
13521    {
13522        self.expiry_time = std::option::Option::Some(v.into());
13523        self
13524    }
13525
13526    /// Sets or clears the value of [expiry_time][crate::model::MuteConfig::expiry_time].
13527    ///
13528    /// # Example
13529    /// ```ignore,no_run
13530    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13531    /// use wkt::Timestamp;
13532    /// let x = MuteConfig::new().set_or_clear_expiry_time(Some(Timestamp::default()/* use setters */));
13533    /// let x = MuteConfig::new().set_or_clear_expiry_time(None::<Timestamp>);
13534    /// ```
13535    pub fn set_or_clear_expiry_time<T>(mut self, v: std::option::Option<T>) -> Self
13536    where
13537        T: std::convert::Into<wkt::Timestamp>,
13538    {
13539        self.expiry_time = v.map(|x| x.into());
13540        self
13541    }
13542}
13543
13544impl wkt::message::Message for MuteConfig {
13545    fn typename() -> &'static str {
13546        "type.googleapis.com/google.cloud.securitycenter.v2.MuteConfig"
13547    }
13548}
13549
13550/// Defines additional types related to [MuteConfig].
13551pub mod mute_config {
13552    #[allow(unused_imports)]
13553    use super::*;
13554
13555    /// The type of MuteConfig.
13556    ///
13557    /// # Working with unknown values
13558    ///
13559    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13560    /// additional enum variants at any time. Adding new variants is not considered
13561    /// a breaking change. Applications should write their code in anticipation of:
13562    ///
13563    /// - New values appearing in future releases of the client library, **and**
13564    /// - New values received dynamically, without application changes.
13565    ///
13566    /// Please consult the [Working with enums] section in the user guide for some
13567    /// guidelines.
13568    ///
13569    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13570    #[derive(Clone, Debug, PartialEq)]
13571    #[non_exhaustive]
13572    pub enum MuteConfigType {
13573        /// Unused.
13574        Unspecified,
13575        /// A static mute config, which sets the static mute state of future matching
13576        /// findings to muted. Once the static mute state has been set, finding or
13577        /// config modifications will not affect the state.
13578        Static,
13579        /// A dynamic mute config, which is applied to existing and future matching
13580        /// findings, setting their dynamic mute state to "muted". If the config is
13581        /// updated or deleted, or a matching finding is updated, such that the
13582        /// finding doesn't match the config, the config will be removed from the
13583        /// finding, and the finding's dynamic mute state may become "unmuted"
13584        /// (unless other configs still match).
13585        Dynamic,
13586        /// If set, the enum was initialized with an unknown value.
13587        ///
13588        /// Applications can examine the value using [MuteConfigType::value] or
13589        /// [MuteConfigType::name].
13590        UnknownValue(mute_config_type::UnknownValue),
13591    }
13592
13593    #[doc(hidden)]
13594    pub mod mute_config_type {
13595        #[allow(unused_imports)]
13596        use super::*;
13597        #[derive(Clone, Debug, PartialEq)]
13598        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13599    }
13600
13601    impl MuteConfigType {
13602        /// Gets the enum value.
13603        ///
13604        /// Returns `None` if the enum contains an unknown value deserialized from
13605        /// the string representation of enums.
13606        pub fn value(&self) -> std::option::Option<i32> {
13607            match self {
13608                Self::Unspecified => std::option::Option::Some(0),
13609                Self::Static => std::option::Option::Some(1),
13610                Self::Dynamic => std::option::Option::Some(2),
13611                Self::UnknownValue(u) => u.0.value(),
13612            }
13613        }
13614
13615        /// Gets the enum value as a string.
13616        ///
13617        /// Returns `None` if the enum contains an unknown value deserialized from
13618        /// the integer representation of enums.
13619        pub fn name(&self) -> std::option::Option<&str> {
13620            match self {
13621                Self::Unspecified => std::option::Option::Some("MUTE_CONFIG_TYPE_UNSPECIFIED"),
13622                Self::Static => std::option::Option::Some("STATIC"),
13623                Self::Dynamic => std::option::Option::Some("DYNAMIC"),
13624                Self::UnknownValue(u) => u.0.name(),
13625            }
13626        }
13627    }
13628
13629    impl std::default::Default for MuteConfigType {
13630        fn default() -> Self {
13631            use std::convert::From;
13632            Self::from(0)
13633        }
13634    }
13635
13636    impl std::fmt::Display for MuteConfigType {
13637        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13638            wkt::internal::display_enum(f, self.name(), self.value())
13639        }
13640    }
13641
13642    impl std::convert::From<i32> for MuteConfigType {
13643        fn from(value: i32) -> Self {
13644            match value {
13645                0 => Self::Unspecified,
13646                1 => Self::Static,
13647                2 => Self::Dynamic,
13648                _ => Self::UnknownValue(mute_config_type::UnknownValue(
13649                    wkt::internal::UnknownEnumValue::Integer(value),
13650                )),
13651            }
13652        }
13653    }
13654
13655    impl std::convert::From<&str> for MuteConfigType {
13656        fn from(value: &str) -> Self {
13657            use std::string::ToString;
13658            match value {
13659                "MUTE_CONFIG_TYPE_UNSPECIFIED" => Self::Unspecified,
13660                "STATIC" => Self::Static,
13661                "DYNAMIC" => Self::Dynamic,
13662                _ => Self::UnknownValue(mute_config_type::UnknownValue(
13663                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13664                )),
13665            }
13666        }
13667    }
13668
13669    impl serde::ser::Serialize for MuteConfigType {
13670        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13671        where
13672            S: serde::Serializer,
13673        {
13674            match self {
13675                Self::Unspecified => serializer.serialize_i32(0),
13676                Self::Static => serializer.serialize_i32(1),
13677                Self::Dynamic => serializer.serialize_i32(2),
13678                Self::UnknownValue(u) => u.0.serialize(serializer),
13679            }
13680        }
13681    }
13682
13683    impl<'de> serde::de::Deserialize<'de> for MuteConfigType {
13684        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13685        where
13686            D: serde::Deserializer<'de>,
13687        {
13688            deserializer.deserialize_any(wkt::internal::EnumVisitor::<MuteConfigType>::new(
13689                ".google.cloud.securitycenter.v2.MuteConfig.MuteConfigType",
13690            ))
13691        }
13692    }
13693}
13694
13695/// Contains information about a VPC network associated with the finding.
13696#[derive(Clone, Default, PartialEq)]
13697#[non_exhaustive]
13698pub struct Network {
13699    /// The name of the VPC network resource, for example,
13700    /// `//compute.googleapis.com/projects/my-project/global/networks/my-network`.
13701    pub name: std::string::String,
13702
13703    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13704}
13705
13706impl Network {
13707    /// Creates a new default instance.
13708    pub fn new() -> Self {
13709        std::default::Default::default()
13710    }
13711
13712    /// Sets the value of [name][crate::model::Network::name].
13713    ///
13714    /// # Example
13715    /// ```ignore,no_run
13716    /// # use google_cloud_securitycenter_v2::model::Network;
13717    /// let x = Network::new().set_name("example");
13718    /// ```
13719    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13720        self.name = v.into();
13721        self
13722    }
13723}
13724
13725impl wkt::message::Message for Network {
13726    fn typename() -> &'static str {
13727        "type.googleapis.com/google.cloud.securitycenter.v2.Network"
13728    }
13729}
13730
13731/// Represents a Jupyter notebook IPYNB file, such as a [Colab Enterprise
13732/// notebook](https://cloud.google.com/colab/docs/introduction) file, that is
13733/// associated with a finding.
13734#[derive(Clone, Default, PartialEq)]
13735#[non_exhaustive]
13736pub struct Notebook {
13737    /// The name of the notebook.
13738    pub name: std::string::String,
13739
13740    /// The source notebook service, for example, "Colab Enterprise".
13741    pub service: std::string::String,
13742
13743    /// The user ID of the latest author to modify the notebook.
13744    pub last_author: std::string::String,
13745
13746    /// The most recent time the notebook was updated.
13747    pub notebook_update_time: std::option::Option<wkt::Timestamp>,
13748
13749    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13750}
13751
13752impl Notebook {
13753    /// Creates a new default instance.
13754    pub fn new() -> Self {
13755        std::default::Default::default()
13756    }
13757
13758    /// Sets the value of [name][crate::model::Notebook::name].
13759    ///
13760    /// # Example
13761    /// ```ignore,no_run
13762    /// # use google_cloud_securitycenter_v2::model::Notebook;
13763    /// let x = Notebook::new().set_name("example");
13764    /// ```
13765    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13766        self.name = v.into();
13767        self
13768    }
13769
13770    /// Sets the value of [service][crate::model::Notebook::service].
13771    ///
13772    /// # Example
13773    /// ```ignore,no_run
13774    /// # use google_cloud_securitycenter_v2::model::Notebook;
13775    /// let x = Notebook::new().set_service("example");
13776    /// ```
13777    pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13778        self.service = v.into();
13779        self
13780    }
13781
13782    /// Sets the value of [last_author][crate::model::Notebook::last_author].
13783    ///
13784    /// # Example
13785    /// ```ignore,no_run
13786    /// # use google_cloud_securitycenter_v2::model::Notebook;
13787    /// let x = Notebook::new().set_last_author("example");
13788    /// ```
13789    pub fn set_last_author<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13790        self.last_author = v.into();
13791        self
13792    }
13793
13794    /// Sets the value of [notebook_update_time][crate::model::Notebook::notebook_update_time].
13795    ///
13796    /// # Example
13797    /// ```ignore,no_run
13798    /// # use google_cloud_securitycenter_v2::model::Notebook;
13799    /// use wkt::Timestamp;
13800    /// let x = Notebook::new().set_notebook_update_time(Timestamp::default()/* use setters */);
13801    /// ```
13802    pub fn set_notebook_update_time<T>(mut self, v: T) -> Self
13803    where
13804        T: std::convert::Into<wkt::Timestamp>,
13805    {
13806        self.notebook_update_time = std::option::Option::Some(v.into());
13807        self
13808    }
13809
13810    /// Sets or clears the value of [notebook_update_time][crate::model::Notebook::notebook_update_time].
13811    ///
13812    /// # Example
13813    /// ```ignore,no_run
13814    /// # use google_cloud_securitycenter_v2::model::Notebook;
13815    /// use wkt::Timestamp;
13816    /// let x = Notebook::new().set_or_clear_notebook_update_time(Some(Timestamp::default()/* use setters */));
13817    /// let x = Notebook::new().set_or_clear_notebook_update_time(None::<Timestamp>);
13818    /// ```
13819    pub fn set_or_clear_notebook_update_time<T>(mut self, v: std::option::Option<T>) -> Self
13820    where
13821        T: std::convert::Into<wkt::Timestamp>,
13822    {
13823        self.notebook_update_time = v.map(|x| x.into());
13824        self
13825    }
13826}
13827
13828impl wkt::message::Message for Notebook {
13829    fn typename() -> &'static str {
13830        "type.googleapis.com/google.cloud.securitycenter.v2.Notebook"
13831    }
13832}
13833
13834/// Cloud Security Command Center (Cloud SCC) notification configs.
13835///
13836/// A notification config is a Cloud SCC resource that contains the configuration
13837/// to send notifications for create/update events of findings, assets and etc.
13838#[derive(Clone, Default, PartialEq)]
13839#[non_exhaustive]
13840pub struct NotificationConfig {
13841    /// Identifier. The relative resource name of this notification config. See:
13842    /// <https://cloud.google.com/apis/design/resource_names#relative_resource_name>
13843    /// The following list shows some examples:
13844    /// +
13845    /// `organizations/{organization_id}/locations/{location_id}/notificationConfigs/notify_public_bucket`
13846    /// +
13847    /// `folders/{folder_id}/locations/{location_id}/notificationConfigs/notify_public_bucket`
13848    /// +
13849    /// `projects/{project_id}/locations/{location_id}/notificationConfigs/notify_public_bucket`
13850    pub name: std::string::String,
13851
13852    /// The description of the notification config (max of 1024 characters).
13853    pub description: std::string::String,
13854
13855    /// The Pub/Sub topic to send notifications to. Its format is
13856    /// "projects/[project_id]/topics/[topic]".
13857    pub pubsub_topic: std::string::String,
13858
13859    /// Output only. The service account that needs "pubsub.topics.publish"
13860    /// permission to publish to the Pub/Sub topic.
13861    pub service_account: std::string::String,
13862
13863    /// Output only. The timestamp of when the notification config was last
13864    /// updated.
13865    pub update_time: std::option::Option<wkt::Timestamp>,
13866
13867    /// The config for triggering notifications.
13868    pub notify_config: std::option::Option<crate::model::notification_config::NotifyConfig>,
13869
13870    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13871}
13872
13873impl NotificationConfig {
13874    /// Creates a new default instance.
13875    pub fn new() -> Self {
13876        std::default::Default::default()
13877    }
13878
13879    /// Sets the value of [name][crate::model::NotificationConfig::name].
13880    ///
13881    /// # Example
13882    /// ```ignore,no_run
13883    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
13884    /// # let organization_id = "organization_id";
13885    /// # let location_id = "location_id";
13886    /// # let notification_config_id = "notification_config_id";
13887    /// let x = NotificationConfig::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/notificationConfigs/{notification_config_id}"));
13888    /// ```
13889    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13890        self.name = v.into();
13891        self
13892    }
13893
13894    /// Sets the value of [description][crate::model::NotificationConfig::description].
13895    ///
13896    /// # Example
13897    /// ```ignore,no_run
13898    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
13899    /// let x = NotificationConfig::new().set_description("example");
13900    /// ```
13901    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13902        self.description = v.into();
13903        self
13904    }
13905
13906    /// Sets the value of [pubsub_topic][crate::model::NotificationConfig::pubsub_topic].
13907    ///
13908    /// # Example
13909    /// ```ignore,no_run
13910    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
13911    /// let x = NotificationConfig::new().set_pubsub_topic("example");
13912    /// ```
13913    pub fn set_pubsub_topic<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13914        self.pubsub_topic = v.into();
13915        self
13916    }
13917
13918    /// Sets the value of [service_account][crate::model::NotificationConfig::service_account].
13919    ///
13920    /// # Example
13921    /// ```ignore,no_run
13922    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
13923    /// let x = NotificationConfig::new().set_service_account("example");
13924    /// ```
13925    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13926        self.service_account = v.into();
13927        self
13928    }
13929
13930    /// Sets the value of [update_time][crate::model::NotificationConfig::update_time].
13931    ///
13932    /// # Example
13933    /// ```ignore,no_run
13934    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
13935    /// use wkt::Timestamp;
13936    /// let x = NotificationConfig::new().set_update_time(Timestamp::default()/* use setters */);
13937    /// ```
13938    pub fn set_update_time<T>(mut self, v: T) -> Self
13939    where
13940        T: std::convert::Into<wkt::Timestamp>,
13941    {
13942        self.update_time = std::option::Option::Some(v.into());
13943        self
13944    }
13945
13946    /// Sets or clears the value of [update_time][crate::model::NotificationConfig::update_time].
13947    ///
13948    /// # Example
13949    /// ```ignore,no_run
13950    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
13951    /// use wkt::Timestamp;
13952    /// let x = NotificationConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
13953    /// let x = NotificationConfig::new().set_or_clear_update_time(None::<Timestamp>);
13954    /// ```
13955    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
13956    where
13957        T: std::convert::Into<wkt::Timestamp>,
13958    {
13959        self.update_time = v.map(|x| x.into());
13960        self
13961    }
13962
13963    /// Sets the value of [notify_config][crate::model::NotificationConfig::notify_config].
13964    ///
13965    /// Note that all the setters affecting `notify_config` are mutually
13966    /// exclusive.
13967    ///
13968    /// # Example
13969    /// ```ignore,no_run
13970    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
13971    /// use google_cloud_securitycenter_v2::model::notification_config::StreamingConfig;
13972    /// let x = NotificationConfig::new().set_notify_config(Some(
13973    ///     google_cloud_securitycenter_v2::model::notification_config::NotifyConfig::StreamingConfig(StreamingConfig::default().into())));
13974    /// ```
13975    pub fn set_notify_config<
13976        T: std::convert::Into<std::option::Option<crate::model::notification_config::NotifyConfig>>,
13977    >(
13978        mut self,
13979        v: T,
13980    ) -> Self {
13981        self.notify_config = v.into();
13982        self
13983    }
13984
13985    /// The value of [notify_config][crate::model::NotificationConfig::notify_config]
13986    /// if it holds a `StreamingConfig`, `None` if the field is not set or
13987    /// holds a different branch.
13988    pub fn streaming_config(
13989        &self,
13990    ) -> std::option::Option<&std::boxed::Box<crate::model::notification_config::StreamingConfig>>
13991    {
13992        #[allow(unreachable_patterns)]
13993        self.notify_config.as_ref().and_then(|v| match v {
13994            crate::model::notification_config::NotifyConfig::StreamingConfig(v) => {
13995                std::option::Option::Some(v)
13996            }
13997            _ => std::option::Option::None,
13998        })
13999    }
14000
14001    /// Sets the value of [notify_config][crate::model::NotificationConfig::notify_config]
14002    /// to hold a `StreamingConfig`.
14003    ///
14004    /// Note that all the setters affecting `notify_config` are
14005    /// mutually exclusive.
14006    ///
14007    /// # Example
14008    /// ```ignore,no_run
14009    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
14010    /// use google_cloud_securitycenter_v2::model::notification_config::StreamingConfig;
14011    /// let x = NotificationConfig::new().set_streaming_config(StreamingConfig::default()/* use setters */);
14012    /// assert!(x.streaming_config().is_some());
14013    /// ```
14014    pub fn set_streaming_config<
14015        T: std::convert::Into<std::boxed::Box<crate::model::notification_config::StreamingConfig>>,
14016    >(
14017        mut self,
14018        v: T,
14019    ) -> Self {
14020        self.notify_config = std::option::Option::Some(
14021            crate::model::notification_config::NotifyConfig::StreamingConfig(v.into()),
14022        );
14023        self
14024    }
14025}
14026
14027impl wkt::message::Message for NotificationConfig {
14028    fn typename() -> &'static str {
14029        "type.googleapis.com/google.cloud.securitycenter.v2.NotificationConfig"
14030    }
14031}
14032
14033/// Defines additional types related to [NotificationConfig].
14034pub mod notification_config {
14035    #[allow(unused_imports)]
14036    use super::*;
14037
14038    /// The config for streaming-based notifications, which send each event as soon
14039    /// as it is detected.
14040    #[derive(Clone, Default, PartialEq)]
14041    #[non_exhaustive]
14042    pub struct StreamingConfig {
14043        /// Expression that defines the filter to apply across create/update events
14044        /// of assets or findings as specified by the event type. The expression is a
14045        /// list of zero or more restrictions combined via logical operators `AND`
14046        /// and `OR`. Parentheses are supported, and `OR` has higher precedence than
14047        /// `AND`.
14048        ///
14049        /// Restrictions have the form `<field> <operator> <value>` and may have a
14050        /// `-` character in front of them to indicate negation. The fields map to
14051        /// those defined in the corresponding resource.
14052        ///
14053        /// The supported operators are:
14054        ///
14055        /// * `=` for all value types.
14056        /// * `>`, `<`, `>=`, `<=` for integer values.
14057        /// * `:`, meaning substring matching, for strings.
14058        ///
14059        /// The supported value types are:
14060        ///
14061        /// * string literals in quotes.
14062        /// * integer literals without quotes.
14063        /// * boolean literals `true` and `false` without quotes.
14064        pub filter: std::string::String,
14065
14066        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14067    }
14068
14069    impl StreamingConfig {
14070        /// Creates a new default instance.
14071        pub fn new() -> Self {
14072            std::default::Default::default()
14073        }
14074
14075        /// Sets the value of [filter][crate::model::notification_config::StreamingConfig::filter].
14076        ///
14077        /// # Example
14078        /// ```ignore,no_run
14079        /// # use google_cloud_securitycenter_v2::model::notification_config::StreamingConfig;
14080        /// let x = StreamingConfig::new().set_filter("example");
14081        /// ```
14082        pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14083            self.filter = v.into();
14084            self
14085        }
14086    }
14087
14088    impl wkt::message::Message for StreamingConfig {
14089        fn typename() -> &'static str {
14090            "type.googleapis.com/google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig"
14091        }
14092    }
14093
14094    /// The config for triggering notifications.
14095    #[derive(Clone, Debug, PartialEq)]
14096    #[non_exhaustive]
14097    pub enum NotifyConfig {
14098        /// The config for triggering streaming-based notifications.
14099        StreamingConfig(std::boxed::Box<crate::model::notification_config::StreamingConfig>),
14100    }
14101}
14102
14103/// Cloud SCC's Notification
14104#[derive(Clone, Default, PartialEq)]
14105#[non_exhaustive]
14106pub struct NotificationMessage {
14107    /// Name of the notification config that generated current notification.
14108    pub notification_config_name: std::string::String,
14109
14110    /// The Cloud resource tied to this notification's Finding.
14111    pub resource: std::option::Option<crate::model::Resource>,
14112
14113    /// Notification Event.
14114    pub event: std::option::Option<crate::model::notification_message::Event>,
14115
14116    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14117}
14118
14119impl NotificationMessage {
14120    /// Creates a new default instance.
14121    pub fn new() -> Self {
14122        std::default::Default::default()
14123    }
14124
14125    /// Sets the value of [notification_config_name][crate::model::NotificationMessage::notification_config_name].
14126    ///
14127    /// # Example
14128    /// ```ignore,no_run
14129    /// # use google_cloud_securitycenter_v2::model::NotificationMessage;
14130    /// let x = NotificationMessage::new().set_notification_config_name("example");
14131    /// ```
14132    pub fn set_notification_config_name<T: std::convert::Into<std::string::String>>(
14133        mut self,
14134        v: T,
14135    ) -> Self {
14136        self.notification_config_name = v.into();
14137        self
14138    }
14139
14140    /// Sets the value of [resource][crate::model::NotificationMessage::resource].
14141    ///
14142    /// # Example
14143    /// ```ignore,no_run
14144    /// # use google_cloud_securitycenter_v2::model::NotificationMessage;
14145    /// use google_cloud_securitycenter_v2::model::Resource;
14146    /// let x = NotificationMessage::new().set_resource(Resource::default()/* use setters */);
14147    /// ```
14148    pub fn set_resource<T>(mut self, v: T) -> Self
14149    where
14150        T: std::convert::Into<crate::model::Resource>,
14151    {
14152        self.resource = std::option::Option::Some(v.into());
14153        self
14154    }
14155
14156    /// Sets or clears the value of [resource][crate::model::NotificationMessage::resource].
14157    ///
14158    /// # Example
14159    /// ```ignore,no_run
14160    /// # use google_cloud_securitycenter_v2::model::NotificationMessage;
14161    /// use google_cloud_securitycenter_v2::model::Resource;
14162    /// let x = NotificationMessage::new().set_or_clear_resource(Some(Resource::default()/* use setters */));
14163    /// let x = NotificationMessage::new().set_or_clear_resource(None::<Resource>);
14164    /// ```
14165    pub fn set_or_clear_resource<T>(mut self, v: std::option::Option<T>) -> Self
14166    where
14167        T: std::convert::Into<crate::model::Resource>,
14168    {
14169        self.resource = v.map(|x| x.into());
14170        self
14171    }
14172
14173    /// Sets the value of [event][crate::model::NotificationMessage::event].
14174    ///
14175    /// Note that all the setters affecting `event` are mutually
14176    /// exclusive.
14177    ///
14178    /// # Example
14179    /// ```ignore,no_run
14180    /// # use google_cloud_securitycenter_v2::model::NotificationMessage;
14181    /// use google_cloud_securitycenter_v2::model::Finding;
14182    /// let x = NotificationMessage::new().set_event(Some(
14183    ///     google_cloud_securitycenter_v2::model::notification_message::Event::Finding(Finding::default().into())));
14184    /// ```
14185    pub fn set_event<
14186        T: std::convert::Into<std::option::Option<crate::model::notification_message::Event>>,
14187    >(
14188        mut self,
14189        v: T,
14190    ) -> Self {
14191        self.event = v.into();
14192        self
14193    }
14194
14195    /// The value of [event][crate::model::NotificationMessage::event]
14196    /// if it holds a `Finding`, `None` if the field is not set or
14197    /// holds a different branch.
14198    pub fn finding(&self) -> std::option::Option<&std::boxed::Box<crate::model::Finding>> {
14199        #[allow(unreachable_patterns)]
14200        self.event.as_ref().and_then(|v| match v {
14201            crate::model::notification_message::Event::Finding(v) => std::option::Option::Some(v),
14202            _ => std::option::Option::None,
14203        })
14204    }
14205
14206    /// Sets the value of [event][crate::model::NotificationMessage::event]
14207    /// to hold a `Finding`.
14208    ///
14209    /// Note that all the setters affecting `event` are
14210    /// mutually exclusive.
14211    ///
14212    /// # Example
14213    /// ```ignore,no_run
14214    /// # use google_cloud_securitycenter_v2::model::NotificationMessage;
14215    /// use google_cloud_securitycenter_v2::model::Finding;
14216    /// let x = NotificationMessage::new().set_finding(Finding::default()/* use setters */);
14217    /// assert!(x.finding().is_some());
14218    /// ```
14219    pub fn set_finding<T: std::convert::Into<std::boxed::Box<crate::model::Finding>>>(
14220        mut self,
14221        v: T,
14222    ) -> Self {
14223        self.event =
14224            std::option::Option::Some(crate::model::notification_message::Event::Finding(v.into()));
14225        self
14226    }
14227}
14228
14229impl wkt::message::Message for NotificationMessage {
14230    fn typename() -> &'static str {
14231        "type.googleapis.com/google.cloud.securitycenter.v2.NotificationMessage"
14232    }
14233}
14234
14235/// Defines additional types related to [NotificationMessage].
14236pub mod notification_message {
14237    #[allow(unused_imports)]
14238    use super::*;
14239
14240    /// Notification Event.
14241    #[derive(Clone, Debug, PartialEq)]
14242    #[non_exhaustive]
14243    pub enum Event {
14244        /// If it's a Finding based notification config, this field will be
14245        /// populated.
14246        Finding(std::boxed::Box<crate::model::Finding>),
14247    }
14248}
14249
14250/// Contains information about the org policies associated with the finding.
14251#[derive(Clone, Default, PartialEq)]
14252#[non_exhaustive]
14253pub struct OrgPolicy {
14254    /// Identifier. The resource name of the org policy.
14255    /// Example:
14256    /// "organizations/{organization_id}/policies/{constraint_name}"
14257    pub name: std::string::String,
14258
14259    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14260}
14261
14262impl OrgPolicy {
14263    /// Creates a new default instance.
14264    pub fn new() -> Self {
14265        std::default::Default::default()
14266    }
14267
14268    /// Sets the value of [name][crate::model::OrgPolicy::name].
14269    ///
14270    /// # Example
14271    /// ```ignore,no_run
14272    /// # use google_cloud_securitycenter_v2::model::OrgPolicy;
14273    /// # let organization_id = "organization_id";
14274    /// # let constraint_name = "constraint_name";
14275    /// let x = OrgPolicy::new().set_name(format!("organizations/{organization_id}/policies/{constraint_name}"));
14276    /// ```
14277    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14278        self.name = v.into();
14279        self
14280    }
14281}
14282
14283impl wkt::message::Message for OrgPolicy {
14284    fn typename() -> &'static str {
14285        "type.googleapis.com/google.cloud.securitycenter.v2.OrgPolicy"
14286    }
14287}
14288
14289/// Represents an operating system process.
14290#[derive(Clone, Default, PartialEq)]
14291#[non_exhaustive]
14292pub struct Process {
14293    /// The process name, as displayed in utilities like `top` and `ps`. This name
14294    /// can be accessed through `/proc/[pid]/comm` and changed with
14295    /// `prctl(PR_SET_NAME)`.
14296    pub name: std::string::String,
14297
14298    /// File information for the process executable.
14299    pub binary: std::option::Option<crate::model::File>,
14300
14301    /// File information for libraries loaded by the process.
14302    pub libraries: std::vec::Vec<crate::model::File>,
14303
14304    /// When the process represents the invocation of a script, `binary` provides
14305    /// information about the interpreter, while `script` provides information
14306    /// about the script file provided to the interpreter.
14307    pub script: std::option::Option<crate::model::File>,
14308
14309    /// Process arguments as JSON encoded strings.
14310    pub args: std::vec::Vec<std::string::String>,
14311
14312    /// True if `args` is incomplete.
14313    pub arguments_truncated: bool,
14314
14315    /// Process environment variables.
14316    pub env_variables: std::vec::Vec<crate::model::EnvironmentVariable>,
14317
14318    /// True if `env_variables` is incomplete.
14319    pub env_variables_truncated: bool,
14320
14321    /// The process ID.
14322    pub pid: i64,
14323
14324    /// The parent process ID.
14325    pub parent_pid: i64,
14326
14327    /// The ID of the user that executed the process. E.g. If this is the root user
14328    /// this will always be 0.
14329    pub user_id: i64,
14330
14331    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14332}
14333
14334impl Process {
14335    /// Creates a new default instance.
14336    pub fn new() -> Self {
14337        std::default::Default::default()
14338    }
14339
14340    /// Sets the value of [name][crate::model::Process::name].
14341    ///
14342    /// # Example
14343    /// ```ignore,no_run
14344    /// # use google_cloud_securitycenter_v2::model::Process;
14345    /// let x = Process::new().set_name("example");
14346    /// ```
14347    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14348        self.name = v.into();
14349        self
14350    }
14351
14352    /// Sets the value of [binary][crate::model::Process::binary].
14353    ///
14354    /// # Example
14355    /// ```ignore,no_run
14356    /// # use google_cloud_securitycenter_v2::model::Process;
14357    /// use google_cloud_securitycenter_v2::model::File;
14358    /// let x = Process::new().set_binary(File::default()/* use setters */);
14359    /// ```
14360    pub fn set_binary<T>(mut self, v: T) -> Self
14361    where
14362        T: std::convert::Into<crate::model::File>,
14363    {
14364        self.binary = std::option::Option::Some(v.into());
14365        self
14366    }
14367
14368    /// Sets or clears the value of [binary][crate::model::Process::binary].
14369    ///
14370    /// # Example
14371    /// ```ignore,no_run
14372    /// # use google_cloud_securitycenter_v2::model::Process;
14373    /// use google_cloud_securitycenter_v2::model::File;
14374    /// let x = Process::new().set_or_clear_binary(Some(File::default()/* use setters */));
14375    /// let x = Process::new().set_or_clear_binary(None::<File>);
14376    /// ```
14377    pub fn set_or_clear_binary<T>(mut self, v: std::option::Option<T>) -> Self
14378    where
14379        T: std::convert::Into<crate::model::File>,
14380    {
14381        self.binary = v.map(|x| x.into());
14382        self
14383    }
14384
14385    /// Sets the value of [libraries][crate::model::Process::libraries].
14386    ///
14387    /// # Example
14388    /// ```ignore,no_run
14389    /// # use google_cloud_securitycenter_v2::model::Process;
14390    /// use google_cloud_securitycenter_v2::model::File;
14391    /// let x = Process::new()
14392    ///     .set_libraries([
14393    ///         File::default()/* use setters */,
14394    ///         File::default()/* use (different) setters */,
14395    ///     ]);
14396    /// ```
14397    pub fn set_libraries<T, V>(mut self, v: T) -> Self
14398    where
14399        T: std::iter::IntoIterator<Item = V>,
14400        V: std::convert::Into<crate::model::File>,
14401    {
14402        use std::iter::Iterator;
14403        self.libraries = v.into_iter().map(|i| i.into()).collect();
14404        self
14405    }
14406
14407    /// Sets the value of [script][crate::model::Process::script].
14408    ///
14409    /// # Example
14410    /// ```ignore,no_run
14411    /// # use google_cloud_securitycenter_v2::model::Process;
14412    /// use google_cloud_securitycenter_v2::model::File;
14413    /// let x = Process::new().set_script(File::default()/* use setters */);
14414    /// ```
14415    pub fn set_script<T>(mut self, v: T) -> Self
14416    where
14417        T: std::convert::Into<crate::model::File>,
14418    {
14419        self.script = std::option::Option::Some(v.into());
14420        self
14421    }
14422
14423    /// Sets or clears the value of [script][crate::model::Process::script].
14424    ///
14425    /// # Example
14426    /// ```ignore,no_run
14427    /// # use google_cloud_securitycenter_v2::model::Process;
14428    /// use google_cloud_securitycenter_v2::model::File;
14429    /// let x = Process::new().set_or_clear_script(Some(File::default()/* use setters */));
14430    /// let x = Process::new().set_or_clear_script(None::<File>);
14431    /// ```
14432    pub fn set_or_clear_script<T>(mut self, v: std::option::Option<T>) -> Self
14433    where
14434        T: std::convert::Into<crate::model::File>,
14435    {
14436        self.script = v.map(|x| x.into());
14437        self
14438    }
14439
14440    /// Sets the value of [args][crate::model::Process::args].
14441    ///
14442    /// # Example
14443    /// ```ignore,no_run
14444    /// # use google_cloud_securitycenter_v2::model::Process;
14445    /// let x = Process::new().set_args(["a", "b", "c"]);
14446    /// ```
14447    pub fn set_args<T, V>(mut self, v: T) -> Self
14448    where
14449        T: std::iter::IntoIterator<Item = V>,
14450        V: std::convert::Into<std::string::String>,
14451    {
14452        use std::iter::Iterator;
14453        self.args = v.into_iter().map(|i| i.into()).collect();
14454        self
14455    }
14456
14457    /// Sets the value of [arguments_truncated][crate::model::Process::arguments_truncated].
14458    ///
14459    /// # Example
14460    /// ```ignore,no_run
14461    /// # use google_cloud_securitycenter_v2::model::Process;
14462    /// let x = Process::new().set_arguments_truncated(true);
14463    /// ```
14464    pub fn set_arguments_truncated<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14465        self.arguments_truncated = v.into();
14466        self
14467    }
14468
14469    /// Sets the value of [env_variables][crate::model::Process::env_variables].
14470    ///
14471    /// # Example
14472    /// ```ignore,no_run
14473    /// # use google_cloud_securitycenter_v2::model::Process;
14474    /// use google_cloud_securitycenter_v2::model::EnvironmentVariable;
14475    /// let x = Process::new()
14476    ///     .set_env_variables([
14477    ///         EnvironmentVariable::default()/* use setters */,
14478    ///         EnvironmentVariable::default()/* use (different) setters */,
14479    ///     ]);
14480    /// ```
14481    pub fn set_env_variables<T, V>(mut self, v: T) -> Self
14482    where
14483        T: std::iter::IntoIterator<Item = V>,
14484        V: std::convert::Into<crate::model::EnvironmentVariable>,
14485    {
14486        use std::iter::Iterator;
14487        self.env_variables = v.into_iter().map(|i| i.into()).collect();
14488        self
14489    }
14490
14491    /// Sets the value of [env_variables_truncated][crate::model::Process::env_variables_truncated].
14492    ///
14493    /// # Example
14494    /// ```ignore,no_run
14495    /// # use google_cloud_securitycenter_v2::model::Process;
14496    /// let x = Process::new().set_env_variables_truncated(true);
14497    /// ```
14498    pub fn set_env_variables_truncated<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14499        self.env_variables_truncated = v.into();
14500        self
14501    }
14502
14503    /// Sets the value of [pid][crate::model::Process::pid].
14504    ///
14505    /// # Example
14506    /// ```ignore,no_run
14507    /// # use google_cloud_securitycenter_v2::model::Process;
14508    /// let x = Process::new().set_pid(42);
14509    /// ```
14510    pub fn set_pid<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14511        self.pid = v.into();
14512        self
14513    }
14514
14515    /// Sets the value of [parent_pid][crate::model::Process::parent_pid].
14516    ///
14517    /// # Example
14518    /// ```ignore,no_run
14519    /// # use google_cloud_securitycenter_v2::model::Process;
14520    /// let x = Process::new().set_parent_pid(42);
14521    /// ```
14522    pub fn set_parent_pid<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14523        self.parent_pid = v.into();
14524        self
14525    }
14526
14527    /// Sets the value of [user_id][crate::model::Process::user_id].
14528    ///
14529    /// # Example
14530    /// ```ignore,no_run
14531    /// # use google_cloud_securitycenter_v2::model::Process;
14532    /// let x = Process::new().set_user_id(42);
14533    /// ```
14534    pub fn set_user_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14535        self.user_id = v.into();
14536        self
14537    }
14538}
14539
14540impl wkt::message::Message for Process {
14541    fn typename() -> &'static str {
14542        "type.googleapis.com/google.cloud.securitycenter.v2.Process"
14543    }
14544}
14545
14546/// A name-value pair representing an environment variable used in an operating
14547/// system process.
14548#[derive(Clone, Default, PartialEq)]
14549#[non_exhaustive]
14550pub struct EnvironmentVariable {
14551    /// Environment variable name as a JSON encoded string.
14552    pub name: std::string::String,
14553
14554    /// Environment variable value as a JSON encoded string.
14555    pub val: std::string::String,
14556
14557    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14558}
14559
14560impl EnvironmentVariable {
14561    /// Creates a new default instance.
14562    pub fn new() -> Self {
14563        std::default::Default::default()
14564    }
14565
14566    /// Sets the value of [name][crate::model::EnvironmentVariable::name].
14567    ///
14568    /// # Example
14569    /// ```ignore,no_run
14570    /// # use google_cloud_securitycenter_v2::model::EnvironmentVariable;
14571    /// let x = EnvironmentVariable::new().set_name("example");
14572    /// ```
14573    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14574        self.name = v.into();
14575        self
14576    }
14577
14578    /// Sets the value of [val][crate::model::EnvironmentVariable::val].
14579    ///
14580    /// # Example
14581    /// ```ignore,no_run
14582    /// # use google_cloud_securitycenter_v2::model::EnvironmentVariable;
14583    /// let x = EnvironmentVariable::new().set_val("example");
14584    /// ```
14585    pub fn set_val<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14586        self.val = v.into();
14587        self
14588    }
14589}
14590
14591impl wkt::message::Message for EnvironmentVariable {
14592    fn typename() -> &'static str {
14593        "type.googleapis.com/google.cloud.securitycenter.v2.EnvironmentVariable"
14594    }
14595}
14596
14597/// Information related to the Google Cloud resource.
14598#[derive(Clone, Default, PartialEq)]
14599#[non_exhaustive]
14600pub struct Resource {
14601    /// The full resource name of the resource. See:
14602    /// <https://cloud.google.com/apis/design/resource_names#full_resource_name>
14603    pub name: std::string::String,
14604
14605    /// The human readable name of the resource.
14606    pub display_name: std::string::String,
14607
14608    /// The full resource type of the resource.
14609    pub r#type: std::string::String,
14610
14611    /// Indicates which cloud provider the finding is from.
14612    pub cloud_provider: crate::model::CloudProvider,
14613
14614    /// The service or resource provider associated with the resource.
14615    pub service: std::string::String,
14616
14617    /// The region or location of the service (if applicable).
14618    pub location: std::string::String,
14619
14620    /// Provides the path to the resource within the resource hierarchy.
14621    pub resource_path: std::option::Option<crate::model::ResourcePath>,
14622
14623    /// A string representation of the resource path.
14624    /// For Google Cloud, it has the format of
14625    /// `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}`
14626    /// where there can be any number of folders.
14627    /// For AWS, it has the format of
14628    /// `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}`
14629    /// where there can be any number of organizational units.
14630    /// For Azure, it has the format of
14631    /// `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}`
14632    /// where there can be any number of management groups.
14633    pub resource_path_string: std::string::String,
14634
14635    /// The metadata associated with the cloud provider.
14636    pub cloud_provider_metadata: std::option::Option<crate::model::resource::CloudProviderMetadata>,
14637
14638    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14639}
14640
14641impl Resource {
14642    /// Creates a new default instance.
14643    pub fn new() -> Self {
14644        std::default::Default::default()
14645    }
14646
14647    /// Sets the value of [name][crate::model::Resource::name].
14648    ///
14649    /// # Example
14650    /// ```ignore,no_run
14651    /// # use google_cloud_securitycenter_v2::model::Resource;
14652    /// let x = Resource::new().set_name("example");
14653    /// ```
14654    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14655        self.name = v.into();
14656        self
14657    }
14658
14659    /// Sets the value of [display_name][crate::model::Resource::display_name].
14660    ///
14661    /// # Example
14662    /// ```ignore,no_run
14663    /// # use google_cloud_securitycenter_v2::model::Resource;
14664    /// let x = Resource::new().set_display_name("example");
14665    /// ```
14666    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14667        self.display_name = v.into();
14668        self
14669    }
14670
14671    /// Sets the value of [r#type][crate::model::Resource::type].
14672    ///
14673    /// # Example
14674    /// ```ignore,no_run
14675    /// # use google_cloud_securitycenter_v2::model::Resource;
14676    /// let x = Resource::new().set_type("example");
14677    /// ```
14678    pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14679        self.r#type = v.into();
14680        self
14681    }
14682
14683    /// Sets the value of [cloud_provider][crate::model::Resource::cloud_provider].
14684    ///
14685    /// # Example
14686    /// ```ignore,no_run
14687    /// # use google_cloud_securitycenter_v2::model::Resource;
14688    /// use google_cloud_securitycenter_v2::model::CloudProvider;
14689    /// let x0 = Resource::new().set_cloud_provider(CloudProvider::GoogleCloudPlatform);
14690    /// let x1 = Resource::new().set_cloud_provider(CloudProvider::AmazonWebServices);
14691    /// let x2 = Resource::new().set_cloud_provider(CloudProvider::MicrosoftAzure);
14692    /// ```
14693    pub fn set_cloud_provider<T: std::convert::Into<crate::model::CloudProvider>>(
14694        mut self,
14695        v: T,
14696    ) -> Self {
14697        self.cloud_provider = v.into();
14698        self
14699    }
14700
14701    /// Sets the value of [service][crate::model::Resource::service].
14702    ///
14703    /// # Example
14704    /// ```ignore,no_run
14705    /// # use google_cloud_securitycenter_v2::model::Resource;
14706    /// let x = Resource::new().set_service("example");
14707    /// ```
14708    pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14709        self.service = v.into();
14710        self
14711    }
14712
14713    /// Sets the value of [location][crate::model::Resource::location].
14714    ///
14715    /// # Example
14716    /// ```ignore,no_run
14717    /// # use google_cloud_securitycenter_v2::model::Resource;
14718    /// let x = Resource::new().set_location("example");
14719    /// ```
14720    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14721        self.location = v.into();
14722        self
14723    }
14724
14725    /// Sets the value of [resource_path][crate::model::Resource::resource_path].
14726    ///
14727    /// # Example
14728    /// ```ignore,no_run
14729    /// # use google_cloud_securitycenter_v2::model::Resource;
14730    /// use google_cloud_securitycenter_v2::model::ResourcePath;
14731    /// let x = Resource::new().set_resource_path(ResourcePath::default()/* use setters */);
14732    /// ```
14733    pub fn set_resource_path<T>(mut self, v: T) -> Self
14734    where
14735        T: std::convert::Into<crate::model::ResourcePath>,
14736    {
14737        self.resource_path = std::option::Option::Some(v.into());
14738        self
14739    }
14740
14741    /// Sets or clears the value of [resource_path][crate::model::Resource::resource_path].
14742    ///
14743    /// # Example
14744    /// ```ignore,no_run
14745    /// # use google_cloud_securitycenter_v2::model::Resource;
14746    /// use google_cloud_securitycenter_v2::model::ResourcePath;
14747    /// let x = Resource::new().set_or_clear_resource_path(Some(ResourcePath::default()/* use setters */));
14748    /// let x = Resource::new().set_or_clear_resource_path(None::<ResourcePath>);
14749    /// ```
14750    pub fn set_or_clear_resource_path<T>(mut self, v: std::option::Option<T>) -> Self
14751    where
14752        T: std::convert::Into<crate::model::ResourcePath>,
14753    {
14754        self.resource_path = v.map(|x| x.into());
14755        self
14756    }
14757
14758    /// Sets the value of [resource_path_string][crate::model::Resource::resource_path_string].
14759    ///
14760    /// # Example
14761    /// ```ignore,no_run
14762    /// # use google_cloud_securitycenter_v2::model::Resource;
14763    /// let x = Resource::new().set_resource_path_string("example");
14764    /// ```
14765    pub fn set_resource_path_string<T: std::convert::Into<std::string::String>>(
14766        mut self,
14767        v: T,
14768    ) -> Self {
14769        self.resource_path_string = v.into();
14770        self
14771    }
14772
14773    /// Sets the value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata].
14774    ///
14775    /// Note that all the setters affecting `cloud_provider_metadata` are mutually
14776    /// exclusive.
14777    ///
14778    /// # Example
14779    /// ```ignore,no_run
14780    /// # use google_cloud_securitycenter_v2::model::Resource;
14781    /// use google_cloud_securitycenter_v2::model::GcpMetadata;
14782    /// let x = Resource::new().set_cloud_provider_metadata(Some(
14783    ///     google_cloud_securitycenter_v2::model::resource::CloudProviderMetadata::GcpMetadata(GcpMetadata::default().into())));
14784    /// ```
14785    pub fn set_cloud_provider_metadata<
14786        T: std::convert::Into<std::option::Option<crate::model::resource::CloudProviderMetadata>>,
14787    >(
14788        mut self,
14789        v: T,
14790    ) -> Self {
14791        self.cloud_provider_metadata = v.into();
14792        self
14793    }
14794
14795    /// The value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata]
14796    /// if it holds a `GcpMetadata`, `None` if the field is not set or
14797    /// holds a different branch.
14798    pub fn gcp_metadata(&self) -> std::option::Option<&std::boxed::Box<crate::model::GcpMetadata>> {
14799        #[allow(unreachable_patterns)]
14800        self.cloud_provider_metadata.as_ref().and_then(|v| match v {
14801            crate::model::resource::CloudProviderMetadata::GcpMetadata(v) => {
14802                std::option::Option::Some(v)
14803            }
14804            _ => std::option::Option::None,
14805        })
14806    }
14807
14808    /// Sets the value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata]
14809    /// to hold a `GcpMetadata`.
14810    ///
14811    /// Note that all the setters affecting `cloud_provider_metadata` are
14812    /// mutually exclusive.
14813    ///
14814    /// # Example
14815    /// ```ignore,no_run
14816    /// # use google_cloud_securitycenter_v2::model::Resource;
14817    /// use google_cloud_securitycenter_v2::model::GcpMetadata;
14818    /// let x = Resource::new().set_gcp_metadata(GcpMetadata::default()/* use setters */);
14819    /// assert!(x.gcp_metadata().is_some());
14820    /// assert!(x.aws_metadata().is_none());
14821    /// assert!(x.azure_metadata().is_none());
14822    /// ```
14823    pub fn set_gcp_metadata<T: std::convert::Into<std::boxed::Box<crate::model::GcpMetadata>>>(
14824        mut self,
14825        v: T,
14826    ) -> Self {
14827        self.cloud_provider_metadata = std::option::Option::Some(
14828            crate::model::resource::CloudProviderMetadata::GcpMetadata(v.into()),
14829        );
14830        self
14831    }
14832
14833    /// The value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata]
14834    /// if it holds a `AwsMetadata`, `None` if the field is not set or
14835    /// holds a different branch.
14836    pub fn aws_metadata(&self) -> std::option::Option<&std::boxed::Box<crate::model::AwsMetadata>> {
14837        #[allow(unreachable_patterns)]
14838        self.cloud_provider_metadata.as_ref().and_then(|v| match v {
14839            crate::model::resource::CloudProviderMetadata::AwsMetadata(v) => {
14840                std::option::Option::Some(v)
14841            }
14842            _ => std::option::Option::None,
14843        })
14844    }
14845
14846    /// Sets the value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata]
14847    /// to hold a `AwsMetadata`.
14848    ///
14849    /// Note that all the setters affecting `cloud_provider_metadata` are
14850    /// mutually exclusive.
14851    ///
14852    /// # Example
14853    /// ```ignore,no_run
14854    /// # use google_cloud_securitycenter_v2::model::Resource;
14855    /// use google_cloud_securitycenter_v2::model::AwsMetadata;
14856    /// let x = Resource::new().set_aws_metadata(AwsMetadata::default()/* use setters */);
14857    /// assert!(x.aws_metadata().is_some());
14858    /// assert!(x.gcp_metadata().is_none());
14859    /// assert!(x.azure_metadata().is_none());
14860    /// ```
14861    pub fn set_aws_metadata<T: std::convert::Into<std::boxed::Box<crate::model::AwsMetadata>>>(
14862        mut self,
14863        v: T,
14864    ) -> Self {
14865        self.cloud_provider_metadata = std::option::Option::Some(
14866            crate::model::resource::CloudProviderMetadata::AwsMetadata(v.into()),
14867        );
14868        self
14869    }
14870
14871    /// The value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata]
14872    /// if it holds a `AzureMetadata`, `None` if the field is not set or
14873    /// holds a different branch.
14874    pub fn azure_metadata(
14875        &self,
14876    ) -> std::option::Option<&std::boxed::Box<crate::model::AzureMetadata>> {
14877        #[allow(unreachable_patterns)]
14878        self.cloud_provider_metadata.as_ref().and_then(|v| match v {
14879            crate::model::resource::CloudProviderMetadata::AzureMetadata(v) => {
14880                std::option::Option::Some(v)
14881            }
14882            _ => std::option::Option::None,
14883        })
14884    }
14885
14886    /// Sets the value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata]
14887    /// to hold a `AzureMetadata`.
14888    ///
14889    /// Note that all the setters affecting `cloud_provider_metadata` are
14890    /// mutually exclusive.
14891    ///
14892    /// # Example
14893    /// ```ignore,no_run
14894    /// # use google_cloud_securitycenter_v2::model::Resource;
14895    /// use google_cloud_securitycenter_v2::model::AzureMetadata;
14896    /// let x = Resource::new().set_azure_metadata(AzureMetadata::default()/* use setters */);
14897    /// assert!(x.azure_metadata().is_some());
14898    /// assert!(x.gcp_metadata().is_none());
14899    /// assert!(x.aws_metadata().is_none());
14900    /// ```
14901    pub fn set_azure_metadata<
14902        T: std::convert::Into<std::boxed::Box<crate::model::AzureMetadata>>,
14903    >(
14904        mut self,
14905        v: T,
14906    ) -> Self {
14907        self.cloud_provider_metadata = std::option::Option::Some(
14908            crate::model::resource::CloudProviderMetadata::AzureMetadata(v.into()),
14909        );
14910        self
14911    }
14912}
14913
14914impl wkt::message::Message for Resource {
14915    fn typename() -> &'static str {
14916        "type.googleapis.com/google.cloud.securitycenter.v2.Resource"
14917    }
14918}
14919
14920/// Defines additional types related to [Resource].
14921pub mod resource {
14922    #[allow(unused_imports)]
14923    use super::*;
14924
14925    /// The metadata associated with the cloud provider.
14926    #[derive(Clone, Debug, PartialEq)]
14927    #[non_exhaustive]
14928    pub enum CloudProviderMetadata {
14929        /// The GCP metadata associated with the finding.
14930        GcpMetadata(std::boxed::Box<crate::model::GcpMetadata>),
14931        /// The AWS metadata associated with the finding.
14932        AwsMetadata(std::boxed::Box<crate::model::AwsMetadata>),
14933        /// The Azure metadata associated with the finding.
14934        AzureMetadata(std::boxed::Box<crate::model::AzureMetadata>),
14935    }
14936}
14937
14938/// Google Cloud metadata associated with the resource. Only applicable if the
14939/// finding's cloud provider is Google Cloud.
14940#[derive(Clone, Default, PartialEq)]
14941#[non_exhaustive]
14942pub struct GcpMetadata {
14943    /// The full resource name of project that the resource belongs to.
14944    pub project: std::string::String,
14945
14946    /// The project ID that the resource belongs to.
14947    pub project_display_name: std::string::String,
14948
14949    /// The full resource name of resource's parent.
14950    pub parent: std::string::String,
14951
14952    /// The human readable name of resource's parent.
14953    pub parent_display_name: std::string::String,
14954
14955    /// Output only. Contains a Folder message for each folder in the assets
14956    /// ancestry. The first folder is the deepest nested folder, and the last
14957    /// folder is the folder directly under the Organization.
14958    pub folders: std::vec::Vec<crate::model::Folder>,
14959
14960    /// The name of the organization that the resource belongs to.
14961    pub organization: std::string::String,
14962
14963    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14964}
14965
14966impl GcpMetadata {
14967    /// Creates a new default instance.
14968    pub fn new() -> Self {
14969        std::default::Default::default()
14970    }
14971
14972    /// Sets the value of [project][crate::model::GcpMetadata::project].
14973    ///
14974    /// # Example
14975    /// ```ignore,no_run
14976    /// # use google_cloud_securitycenter_v2::model::GcpMetadata;
14977    /// let x = GcpMetadata::new().set_project("example");
14978    /// ```
14979    pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14980        self.project = v.into();
14981        self
14982    }
14983
14984    /// Sets the value of [project_display_name][crate::model::GcpMetadata::project_display_name].
14985    ///
14986    /// # Example
14987    /// ```ignore,no_run
14988    /// # use google_cloud_securitycenter_v2::model::GcpMetadata;
14989    /// let x = GcpMetadata::new().set_project_display_name("example");
14990    /// ```
14991    pub fn set_project_display_name<T: std::convert::Into<std::string::String>>(
14992        mut self,
14993        v: T,
14994    ) -> Self {
14995        self.project_display_name = v.into();
14996        self
14997    }
14998
14999    /// Sets the value of [parent][crate::model::GcpMetadata::parent].
15000    ///
15001    /// # Example
15002    /// ```ignore,no_run
15003    /// # use google_cloud_securitycenter_v2::model::GcpMetadata;
15004    /// let x = GcpMetadata::new().set_parent("example");
15005    /// ```
15006    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15007        self.parent = v.into();
15008        self
15009    }
15010
15011    /// Sets the value of [parent_display_name][crate::model::GcpMetadata::parent_display_name].
15012    ///
15013    /// # Example
15014    /// ```ignore,no_run
15015    /// # use google_cloud_securitycenter_v2::model::GcpMetadata;
15016    /// let x = GcpMetadata::new().set_parent_display_name("example");
15017    /// ```
15018    pub fn set_parent_display_name<T: std::convert::Into<std::string::String>>(
15019        mut self,
15020        v: T,
15021    ) -> Self {
15022        self.parent_display_name = v.into();
15023        self
15024    }
15025
15026    /// Sets the value of [folders][crate::model::GcpMetadata::folders].
15027    ///
15028    /// # Example
15029    /// ```ignore,no_run
15030    /// # use google_cloud_securitycenter_v2::model::GcpMetadata;
15031    /// use google_cloud_securitycenter_v2::model::Folder;
15032    /// let x = GcpMetadata::new()
15033    ///     .set_folders([
15034    ///         Folder::default()/* use setters */,
15035    ///         Folder::default()/* use (different) setters */,
15036    ///     ]);
15037    /// ```
15038    pub fn set_folders<T, V>(mut self, v: T) -> Self
15039    where
15040        T: std::iter::IntoIterator<Item = V>,
15041        V: std::convert::Into<crate::model::Folder>,
15042    {
15043        use std::iter::Iterator;
15044        self.folders = v.into_iter().map(|i| i.into()).collect();
15045        self
15046    }
15047
15048    /// Sets the value of [organization][crate::model::GcpMetadata::organization].
15049    ///
15050    /// # Example
15051    /// ```ignore,no_run
15052    /// # use google_cloud_securitycenter_v2::model::GcpMetadata;
15053    /// let x = GcpMetadata::new().set_organization("example");
15054    /// ```
15055    pub fn set_organization<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15056        self.organization = v.into();
15057        self
15058    }
15059}
15060
15061impl wkt::message::Message for GcpMetadata {
15062    fn typename() -> &'static str {
15063        "type.googleapis.com/google.cloud.securitycenter.v2.GcpMetadata"
15064    }
15065}
15066
15067/// AWS metadata associated with the resource, only applicable if the finding's
15068/// cloud provider is Amazon Web Services.
15069#[derive(Clone, Default, PartialEq)]
15070#[non_exhaustive]
15071pub struct AwsMetadata {
15072    /// The AWS organization associated with the resource.
15073    pub organization: std::option::Option<crate::model::aws_metadata::AwsOrganization>,
15074
15075    /// A list of AWS organizational units associated with the resource, ordered
15076    /// from lowest level (closest to the account) to highest level.
15077    pub organizational_units: std::vec::Vec<crate::model::aws_metadata::AwsOrganizationalUnit>,
15078
15079    /// The AWS account associated with the resource.
15080    pub account: std::option::Option<crate::model::aws_metadata::AwsAccount>,
15081
15082    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15083}
15084
15085impl AwsMetadata {
15086    /// Creates a new default instance.
15087    pub fn new() -> Self {
15088        std::default::Default::default()
15089    }
15090
15091    /// Sets the value of [organization][crate::model::AwsMetadata::organization].
15092    ///
15093    /// # Example
15094    /// ```ignore,no_run
15095    /// # use google_cloud_securitycenter_v2::model::AwsMetadata;
15096    /// use google_cloud_securitycenter_v2::model::aws_metadata::AwsOrganization;
15097    /// let x = AwsMetadata::new().set_organization(AwsOrganization::default()/* use setters */);
15098    /// ```
15099    pub fn set_organization<T>(mut self, v: T) -> Self
15100    where
15101        T: std::convert::Into<crate::model::aws_metadata::AwsOrganization>,
15102    {
15103        self.organization = std::option::Option::Some(v.into());
15104        self
15105    }
15106
15107    /// Sets or clears the value of [organization][crate::model::AwsMetadata::organization].
15108    ///
15109    /// # Example
15110    /// ```ignore,no_run
15111    /// # use google_cloud_securitycenter_v2::model::AwsMetadata;
15112    /// use google_cloud_securitycenter_v2::model::aws_metadata::AwsOrganization;
15113    /// let x = AwsMetadata::new().set_or_clear_organization(Some(AwsOrganization::default()/* use setters */));
15114    /// let x = AwsMetadata::new().set_or_clear_organization(None::<AwsOrganization>);
15115    /// ```
15116    pub fn set_or_clear_organization<T>(mut self, v: std::option::Option<T>) -> Self
15117    where
15118        T: std::convert::Into<crate::model::aws_metadata::AwsOrganization>,
15119    {
15120        self.organization = v.map(|x| x.into());
15121        self
15122    }
15123
15124    /// Sets the value of [organizational_units][crate::model::AwsMetadata::organizational_units].
15125    ///
15126    /// # Example
15127    /// ```ignore,no_run
15128    /// # use google_cloud_securitycenter_v2::model::AwsMetadata;
15129    /// use google_cloud_securitycenter_v2::model::aws_metadata::AwsOrganizationalUnit;
15130    /// let x = AwsMetadata::new()
15131    ///     .set_organizational_units([
15132    ///         AwsOrganizationalUnit::default()/* use setters */,
15133    ///         AwsOrganizationalUnit::default()/* use (different) setters */,
15134    ///     ]);
15135    /// ```
15136    pub fn set_organizational_units<T, V>(mut self, v: T) -> Self
15137    where
15138        T: std::iter::IntoIterator<Item = V>,
15139        V: std::convert::Into<crate::model::aws_metadata::AwsOrganizationalUnit>,
15140    {
15141        use std::iter::Iterator;
15142        self.organizational_units = v.into_iter().map(|i| i.into()).collect();
15143        self
15144    }
15145
15146    /// Sets the value of [account][crate::model::AwsMetadata::account].
15147    ///
15148    /// # Example
15149    /// ```ignore,no_run
15150    /// # use google_cloud_securitycenter_v2::model::AwsMetadata;
15151    /// use google_cloud_securitycenter_v2::model::aws_metadata::AwsAccount;
15152    /// let x = AwsMetadata::new().set_account(AwsAccount::default()/* use setters */);
15153    /// ```
15154    pub fn set_account<T>(mut self, v: T) -> Self
15155    where
15156        T: std::convert::Into<crate::model::aws_metadata::AwsAccount>,
15157    {
15158        self.account = std::option::Option::Some(v.into());
15159        self
15160    }
15161
15162    /// Sets or clears the value of [account][crate::model::AwsMetadata::account].
15163    ///
15164    /// # Example
15165    /// ```ignore,no_run
15166    /// # use google_cloud_securitycenter_v2::model::AwsMetadata;
15167    /// use google_cloud_securitycenter_v2::model::aws_metadata::AwsAccount;
15168    /// let x = AwsMetadata::new().set_or_clear_account(Some(AwsAccount::default()/* use setters */));
15169    /// let x = AwsMetadata::new().set_or_clear_account(None::<AwsAccount>);
15170    /// ```
15171    pub fn set_or_clear_account<T>(mut self, v: std::option::Option<T>) -> Self
15172    where
15173        T: std::convert::Into<crate::model::aws_metadata::AwsAccount>,
15174    {
15175        self.account = v.map(|x| x.into());
15176        self
15177    }
15178}
15179
15180impl wkt::message::Message for AwsMetadata {
15181    fn typename() -> &'static str {
15182        "type.googleapis.com/google.cloud.securitycenter.v2.AwsMetadata"
15183    }
15184}
15185
15186/// Defines additional types related to [AwsMetadata].
15187pub mod aws_metadata {
15188    #[allow(unused_imports)]
15189    use super::*;
15190
15191    /// An organization is a collection of accounts that are centrally managed
15192    /// together using consolidated billing, organized hierarchically with
15193    /// organizational units (OUs), and controlled with policies.
15194    #[derive(Clone, Default, PartialEq)]
15195    #[non_exhaustive]
15196    pub struct AwsOrganization {
15197        /// The unique identifier (ID) for the organization. The regex pattern for an
15198        /// organization ID string requires "o-" followed by from 10 to 32 lowercase
15199        /// letters or digits.
15200        pub id: std::string::String,
15201
15202        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15203    }
15204
15205    impl AwsOrganization {
15206        /// Creates a new default instance.
15207        pub fn new() -> Self {
15208            std::default::Default::default()
15209        }
15210
15211        /// Sets the value of [id][crate::model::aws_metadata::AwsOrganization::id].
15212        ///
15213        /// # Example
15214        /// ```ignore,no_run
15215        /// # use google_cloud_securitycenter_v2::model::aws_metadata::AwsOrganization;
15216        /// let x = AwsOrganization::new().set_id("example");
15217        /// ```
15218        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15219            self.id = v.into();
15220            self
15221        }
15222    }
15223
15224    impl wkt::message::Message for AwsOrganization {
15225        fn typename() -> &'static str {
15226            "type.googleapis.com/google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization"
15227        }
15228    }
15229
15230    /// An Organizational Unit (OU) is a container of AWS accounts within a root of
15231    /// an organization. Policies that are attached to an OU apply to all accounts
15232    /// contained in that OU and in any child OUs.
15233    #[derive(Clone, Default, PartialEq)]
15234    #[non_exhaustive]
15235    pub struct AwsOrganizationalUnit {
15236        /// The unique identifier (ID) associated with this OU. The regex pattern for
15237        /// an organizational unit ID string requires "ou-" followed by from 4 to 32
15238        /// lowercase letters or digits (the ID of the root that contains the OU).
15239        /// This string is followed by a second "-" dash and from 8 to 32 additional
15240        /// lowercase letters or digits. For example, "ou-ab12-cd34ef56".
15241        pub id: std::string::String,
15242
15243        /// The friendly name of the OU.
15244        pub name: std::string::String,
15245
15246        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15247    }
15248
15249    impl AwsOrganizationalUnit {
15250        /// Creates a new default instance.
15251        pub fn new() -> Self {
15252            std::default::Default::default()
15253        }
15254
15255        /// Sets the value of [id][crate::model::aws_metadata::AwsOrganizationalUnit::id].
15256        ///
15257        /// # Example
15258        /// ```ignore,no_run
15259        /// # use google_cloud_securitycenter_v2::model::aws_metadata::AwsOrganizationalUnit;
15260        /// let x = AwsOrganizationalUnit::new().set_id("example");
15261        /// ```
15262        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15263            self.id = v.into();
15264            self
15265        }
15266
15267        /// Sets the value of [name][crate::model::aws_metadata::AwsOrganizationalUnit::name].
15268        ///
15269        /// # Example
15270        /// ```ignore,no_run
15271        /// # use google_cloud_securitycenter_v2::model::aws_metadata::AwsOrganizationalUnit;
15272        /// let x = AwsOrganizationalUnit::new().set_name("example");
15273        /// ```
15274        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15275            self.name = v.into();
15276            self
15277        }
15278    }
15279
15280    impl wkt::message::Message for AwsOrganizationalUnit {
15281        fn typename() -> &'static str {
15282            "type.googleapis.com/google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit"
15283        }
15284    }
15285
15286    /// An AWS account that is a member of an organization.
15287    #[derive(Clone, Default, PartialEq)]
15288    #[non_exhaustive]
15289    pub struct AwsAccount {
15290        /// The unique identifier (ID) of the account, containing exactly 12 digits.
15291        pub id: std::string::String,
15292
15293        /// The friendly name of this account.
15294        pub name: std::string::String,
15295
15296        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15297    }
15298
15299    impl AwsAccount {
15300        /// Creates a new default instance.
15301        pub fn new() -> Self {
15302            std::default::Default::default()
15303        }
15304
15305        /// Sets the value of [id][crate::model::aws_metadata::AwsAccount::id].
15306        ///
15307        /// # Example
15308        /// ```ignore,no_run
15309        /// # use google_cloud_securitycenter_v2::model::aws_metadata::AwsAccount;
15310        /// let x = AwsAccount::new().set_id("example");
15311        /// ```
15312        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15313            self.id = v.into();
15314            self
15315        }
15316
15317        /// Sets the value of [name][crate::model::aws_metadata::AwsAccount::name].
15318        ///
15319        /// # Example
15320        /// ```ignore,no_run
15321        /// # use google_cloud_securitycenter_v2::model::aws_metadata::AwsAccount;
15322        /// let x = AwsAccount::new().set_name("example");
15323        /// ```
15324        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15325            self.name = v.into();
15326            self
15327        }
15328    }
15329
15330    impl wkt::message::Message for AwsAccount {
15331        fn typename() -> &'static str {
15332            "type.googleapis.com/google.cloud.securitycenter.v2.AwsMetadata.AwsAccount"
15333        }
15334    }
15335}
15336
15337/// Azure metadata associated with the resource, only applicable if the finding's
15338/// cloud provider is Microsoft Azure.
15339#[derive(Clone, Default, PartialEq)]
15340#[non_exhaustive]
15341pub struct AzureMetadata {
15342    /// A list of Azure management groups associated with the resource, ordered
15343    /// from lowest level (closest to the subscription) to highest level.
15344    pub management_groups: std::vec::Vec<crate::model::azure_metadata::AzureManagementGroup>,
15345
15346    /// The Azure subscription associated with the resource.
15347    pub subscription: std::option::Option<crate::model::azure_metadata::AzureSubscription>,
15348
15349    /// The Azure resource group associated with the resource.
15350    pub resource_group: std::option::Option<crate::model::azure_metadata::AzureResourceGroup>,
15351
15352    /// The Azure Entra tenant associated with the resource.
15353    pub tenant: std::option::Option<crate::model::azure_metadata::AzureTenant>,
15354
15355    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15356}
15357
15358impl AzureMetadata {
15359    /// Creates a new default instance.
15360    pub fn new() -> Self {
15361        std::default::Default::default()
15362    }
15363
15364    /// Sets the value of [management_groups][crate::model::AzureMetadata::management_groups].
15365    ///
15366    /// # Example
15367    /// ```ignore,no_run
15368    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
15369    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureManagementGroup;
15370    /// let x = AzureMetadata::new()
15371    ///     .set_management_groups([
15372    ///         AzureManagementGroup::default()/* use setters */,
15373    ///         AzureManagementGroup::default()/* use (different) setters */,
15374    ///     ]);
15375    /// ```
15376    pub fn set_management_groups<T, V>(mut self, v: T) -> Self
15377    where
15378        T: std::iter::IntoIterator<Item = V>,
15379        V: std::convert::Into<crate::model::azure_metadata::AzureManagementGroup>,
15380    {
15381        use std::iter::Iterator;
15382        self.management_groups = v.into_iter().map(|i| i.into()).collect();
15383        self
15384    }
15385
15386    /// Sets the value of [subscription][crate::model::AzureMetadata::subscription].
15387    ///
15388    /// # Example
15389    /// ```ignore,no_run
15390    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
15391    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureSubscription;
15392    /// let x = AzureMetadata::new().set_subscription(AzureSubscription::default()/* use setters */);
15393    /// ```
15394    pub fn set_subscription<T>(mut self, v: T) -> Self
15395    where
15396        T: std::convert::Into<crate::model::azure_metadata::AzureSubscription>,
15397    {
15398        self.subscription = std::option::Option::Some(v.into());
15399        self
15400    }
15401
15402    /// Sets or clears the value of [subscription][crate::model::AzureMetadata::subscription].
15403    ///
15404    /// # Example
15405    /// ```ignore,no_run
15406    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
15407    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureSubscription;
15408    /// let x = AzureMetadata::new().set_or_clear_subscription(Some(AzureSubscription::default()/* use setters */));
15409    /// let x = AzureMetadata::new().set_or_clear_subscription(None::<AzureSubscription>);
15410    /// ```
15411    pub fn set_or_clear_subscription<T>(mut self, v: std::option::Option<T>) -> Self
15412    where
15413        T: std::convert::Into<crate::model::azure_metadata::AzureSubscription>,
15414    {
15415        self.subscription = v.map(|x| x.into());
15416        self
15417    }
15418
15419    /// Sets the value of [resource_group][crate::model::AzureMetadata::resource_group].
15420    ///
15421    /// # Example
15422    /// ```ignore,no_run
15423    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
15424    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureResourceGroup;
15425    /// let x = AzureMetadata::new().set_resource_group(AzureResourceGroup::default()/* use setters */);
15426    /// ```
15427    pub fn set_resource_group<T>(mut self, v: T) -> Self
15428    where
15429        T: std::convert::Into<crate::model::azure_metadata::AzureResourceGroup>,
15430    {
15431        self.resource_group = std::option::Option::Some(v.into());
15432        self
15433    }
15434
15435    /// Sets or clears the value of [resource_group][crate::model::AzureMetadata::resource_group].
15436    ///
15437    /// # Example
15438    /// ```ignore,no_run
15439    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
15440    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureResourceGroup;
15441    /// let x = AzureMetadata::new().set_or_clear_resource_group(Some(AzureResourceGroup::default()/* use setters */));
15442    /// let x = AzureMetadata::new().set_or_clear_resource_group(None::<AzureResourceGroup>);
15443    /// ```
15444    pub fn set_or_clear_resource_group<T>(mut self, v: std::option::Option<T>) -> Self
15445    where
15446        T: std::convert::Into<crate::model::azure_metadata::AzureResourceGroup>,
15447    {
15448        self.resource_group = v.map(|x| x.into());
15449        self
15450    }
15451
15452    /// Sets the value of [tenant][crate::model::AzureMetadata::tenant].
15453    ///
15454    /// # Example
15455    /// ```ignore,no_run
15456    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
15457    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureTenant;
15458    /// let x = AzureMetadata::new().set_tenant(AzureTenant::default()/* use setters */);
15459    /// ```
15460    pub fn set_tenant<T>(mut self, v: T) -> Self
15461    where
15462        T: std::convert::Into<crate::model::azure_metadata::AzureTenant>,
15463    {
15464        self.tenant = std::option::Option::Some(v.into());
15465        self
15466    }
15467
15468    /// Sets or clears the value of [tenant][crate::model::AzureMetadata::tenant].
15469    ///
15470    /// # Example
15471    /// ```ignore,no_run
15472    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
15473    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureTenant;
15474    /// let x = AzureMetadata::new().set_or_clear_tenant(Some(AzureTenant::default()/* use setters */));
15475    /// let x = AzureMetadata::new().set_or_clear_tenant(None::<AzureTenant>);
15476    /// ```
15477    pub fn set_or_clear_tenant<T>(mut self, v: std::option::Option<T>) -> Self
15478    where
15479        T: std::convert::Into<crate::model::azure_metadata::AzureTenant>,
15480    {
15481        self.tenant = v.map(|x| x.into());
15482        self
15483    }
15484}
15485
15486impl wkt::message::Message for AzureMetadata {
15487    fn typename() -> &'static str {
15488        "type.googleapis.com/google.cloud.securitycenter.v2.AzureMetadata"
15489    }
15490}
15491
15492/// Defines additional types related to [AzureMetadata].
15493pub mod azure_metadata {
15494    #[allow(unused_imports)]
15495    use super::*;
15496
15497    /// Represents an Azure management group.
15498    #[derive(Clone, Default, PartialEq)]
15499    #[non_exhaustive]
15500    pub struct AzureManagementGroup {
15501        /// The UUID of the Azure management group, for example,
15502        /// `20000000-0001-0000-0000-000000000000`.
15503        pub id: std::string::String,
15504
15505        /// The display name of the Azure management group.
15506        pub display_name: std::string::String,
15507
15508        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15509    }
15510
15511    impl AzureManagementGroup {
15512        /// Creates a new default instance.
15513        pub fn new() -> Self {
15514            std::default::Default::default()
15515        }
15516
15517        /// Sets the value of [id][crate::model::azure_metadata::AzureManagementGroup::id].
15518        ///
15519        /// # Example
15520        /// ```ignore,no_run
15521        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureManagementGroup;
15522        /// let x = AzureManagementGroup::new().set_id("example");
15523        /// ```
15524        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15525            self.id = v.into();
15526            self
15527        }
15528
15529        /// Sets the value of [display_name][crate::model::azure_metadata::AzureManagementGroup::display_name].
15530        ///
15531        /// # Example
15532        /// ```ignore,no_run
15533        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureManagementGroup;
15534        /// let x = AzureManagementGroup::new().set_display_name("example");
15535        /// ```
15536        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
15537            mut self,
15538            v: T,
15539        ) -> Self {
15540            self.display_name = v.into();
15541            self
15542        }
15543    }
15544
15545    impl wkt::message::Message for AzureManagementGroup {
15546        fn typename() -> &'static str {
15547            "type.googleapis.com/google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup"
15548        }
15549    }
15550
15551    /// Represents an Azure subscription.
15552    #[derive(Clone, Default, PartialEq)]
15553    #[non_exhaustive]
15554    pub struct AzureSubscription {
15555        /// The UUID of the Azure subscription, for example,
15556        /// `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`.
15557        pub id: std::string::String,
15558
15559        /// The display name of the Azure subscription.
15560        pub display_name: std::string::String,
15561
15562        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15563    }
15564
15565    impl AzureSubscription {
15566        /// Creates a new default instance.
15567        pub fn new() -> Self {
15568            std::default::Default::default()
15569        }
15570
15571        /// Sets the value of [id][crate::model::azure_metadata::AzureSubscription::id].
15572        ///
15573        /// # Example
15574        /// ```ignore,no_run
15575        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureSubscription;
15576        /// let x = AzureSubscription::new().set_id("example");
15577        /// ```
15578        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15579            self.id = v.into();
15580            self
15581        }
15582
15583        /// Sets the value of [display_name][crate::model::azure_metadata::AzureSubscription::display_name].
15584        ///
15585        /// # Example
15586        /// ```ignore,no_run
15587        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureSubscription;
15588        /// let x = AzureSubscription::new().set_display_name("example");
15589        /// ```
15590        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
15591            mut self,
15592            v: T,
15593        ) -> Self {
15594            self.display_name = v.into();
15595            self
15596        }
15597    }
15598
15599    impl wkt::message::Message for AzureSubscription {
15600        fn typename() -> &'static str {
15601            "type.googleapis.com/google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription"
15602        }
15603    }
15604
15605    /// Represents an Azure resource group.
15606    #[derive(Clone, Default, PartialEq)]
15607    #[non_exhaustive]
15608    pub struct AzureResourceGroup {
15609        /// The ID of the Azure resource group.
15610        pub id: std::string::String,
15611
15612        /// The name of the Azure resource group. This is not a UUID.
15613        pub name: std::string::String,
15614
15615        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15616    }
15617
15618    impl AzureResourceGroup {
15619        /// Creates a new default instance.
15620        pub fn new() -> Self {
15621            std::default::Default::default()
15622        }
15623
15624        /// Sets the value of [id][crate::model::azure_metadata::AzureResourceGroup::id].
15625        ///
15626        /// # Example
15627        /// ```ignore,no_run
15628        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureResourceGroup;
15629        /// let x = AzureResourceGroup::new().set_id("example");
15630        /// ```
15631        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15632            self.id = v.into();
15633            self
15634        }
15635
15636        /// Sets the value of [name][crate::model::azure_metadata::AzureResourceGroup::name].
15637        ///
15638        /// # Example
15639        /// ```ignore,no_run
15640        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureResourceGroup;
15641        /// let x = AzureResourceGroup::new().set_name("example");
15642        /// ```
15643        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15644            self.name = v.into();
15645            self
15646        }
15647    }
15648
15649    impl wkt::message::Message for AzureResourceGroup {
15650        fn typename() -> &'static str {
15651            "type.googleapis.com/google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup"
15652        }
15653    }
15654
15655    /// Represents a Microsoft Entra tenant.
15656    #[derive(Clone, Default, PartialEq)]
15657    #[non_exhaustive]
15658    pub struct AzureTenant {
15659        /// The ID of the Microsoft Entra tenant, for example,
15660        /// "a11aaa11-aa11-1aa1-11aa-1aaa11a".
15661        pub id: std::string::String,
15662
15663        /// The display name of the Azure tenant.
15664        pub display_name: std::string::String,
15665
15666        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15667    }
15668
15669    impl AzureTenant {
15670        /// Creates a new default instance.
15671        pub fn new() -> Self {
15672            std::default::Default::default()
15673        }
15674
15675        /// Sets the value of [id][crate::model::azure_metadata::AzureTenant::id].
15676        ///
15677        /// # Example
15678        /// ```ignore,no_run
15679        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureTenant;
15680        /// let x = AzureTenant::new().set_id("example");
15681        /// ```
15682        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15683            self.id = v.into();
15684            self
15685        }
15686
15687        /// Sets the value of [display_name][crate::model::azure_metadata::AzureTenant::display_name].
15688        ///
15689        /// # Example
15690        /// ```ignore,no_run
15691        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureTenant;
15692        /// let x = AzureTenant::new().set_display_name("example");
15693        /// ```
15694        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
15695            mut self,
15696            v: T,
15697        ) -> Self {
15698            self.display_name = v.into();
15699            self
15700        }
15701    }
15702
15703    impl wkt::message::Message for AzureTenant {
15704        fn typename() -> &'static str {
15705            "type.googleapis.com/google.cloud.securitycenter.v2.AzureMetadata.AzureTenant"
15706        }
15707    }
15708}
15709
15710/// Represents the path of resources leading up to the resource this finding is
15711/// about.
15712#[derive(Clone, Default, PartialEq)]
15713#[non_exhaustive]
15714pub struct ResourcePath {
15715    /// The list of nodes that make the up resource path, ordered from lowest
15716    /// level to highest level.
15717    pub nodes: std::vec::Vec<crate::model::resource_path::ResourcePathNode>,
15718
15719    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15720}
15721
15722impl ResourcePath {
15723    /// Creates a new default instance.
15724    pub fn new() -> Self {
15725        std::default::Default::default()
15726    }
15727
15728    /// Sets the value of [nodes][crate::model::ResourcePath::nodes].
15729    ///
15730    /// # Example
15731    /// ```ignore,no_run
15732    /// # use google_cloud_securitycenter_v2::model::ResourcePath;
15733    /// use google_cloud_securitycenter_v2::model::resource_path::ResourcePathNode;
15734    /// let x = ResourcePath::new()
15735    ///     .set_nodes([
15736    ///         ResourcePathNode::default()/* use setters */,
15737    ///         ResourcePathNode::default()/* use (different) setters */,
15738    ///     ]);
15739    /// ```
15740    pub fn set_nodes<T, V>(mut self, v: T) -> Self
15741    where
15742        T: std::iter::IntoIterator<Item = V>,
15743        V: std::convert::Into<crate::model::resource_path::ResourcePathNode>,
15744    {
15745        use std::iter::Iterator;
15746        self.nodes = v.into_iter().map(|i| i.into()).collect();
15747        self
15748    }
15749}
15750
15751impl wkt::message::Message for ResourcePath {
15752    fn typename() -> &'static str {
15753        "type.googleapis.com/google.cloud.securitycenter.v2.ResourcePath"
15754    }
15755}
15756
15757/// Defines additional types related to [ResourcePath].
15758pub mod resource_path {
15759    #[allow(unused_imports)]
15760    use super::*;
15761
15762    /// A node within the resource path. Each node represents a resource within the
15763    /// resource hierarchy.
15764    #[derive(Clone, Default, PartialEq)]
15765    #[non_exhaustive]
15766    pub struct ResourcePathNode {
15767        /// The type of resource this node represents.
15768        pub node_type: crate::model::resource_path::ResourcePathNodeType,
15769
15770        /// The ID of the resource this node represents.
15771        pub id: std::string::String,
15772
15773        /// The display name of the resource this node represents.
15774        pub display_name: std::string::String,
15775
15776        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15777    }
15778
15779    impl ResourcePathNode {
15780        /// Creates a new default instance.
15781        pub fn new() -> Self {
15782            std::default::Default::default()
15783        }
15784
15785        /// Sets the value of [node_type][crate::model::resource_path::ResourcePathNode::node_type].
15786        ///
15787        /// # Example
15788        /// ```ignore,no_run
15789        /// # use google_cloud_securitycenter_v2::model::resource_path::ResourcePathNode;
15790        /// use google_cloud_securitycenter_v2::model::resource_path::ResourcePathNodeType;
15791        /// let x0 = ResourcePathNode::new().set_node_type(ResourcePathNodeType::GcpOrganization);
15792        /// let x1 = ResourcePathNode::new().set_node_type(ResourcePathNodeType::GcpFolder);
15793        /// let x2 = ResourcePathNode::new().set_node_type(ResourcePathNodeType::GcpProject);
15794        /// ```
15795        pub fn set_node_type<
15796            T: std::convert::Into<crate::model::resource_path::ResourcePathNodeType>,
15797        >(
15798            mut self,
15799            v: T,
15800        ) -> Self {
15801            self.node_type = v.into();
15802            self
15803        }
15804
15805        /// Sets the value of [id][crate::model::resource_path::ResourcePathNode::id].
15806        ///
15807        /// # Example
15808        /// ```ignore,no_run
15809        /// # use google_cloud_securitycenter_v2::model::resource_path::ResourcePathNode;
15810        /// let x = ResourcePathNode::new().set_id("example");
15811        /// ```
15812        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15813            self.id = v.into();
15814            self
15815        }
15816
15817        /// Sets the value of [display_name][crate::model::resource_path::ResourcePathNode::display_name].
15818        ///
15819        /// # Example
15820        /// ```ignore,no_run
15821        /// # use google_cloud_securitycenter_v2::model::resource_path::ResourcePathNode;
15822        /// let x = ResourcePathNode::new().set_display_name("example");
15823        /// ```
15824        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
15825            mut self,
15826            v: T,
15827        ) -> Self {
15828            self.display_name = v.into();
15829            self
15830        }
15831    }
15832
15833    impl wkt::message::Message for ResourcePathNode {
15834        fn typename() -> &'static str {
15835            "type.googleapis.com/google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode"
15836        }
15837    }
15838
15839    /// The type of resource the node represents.
15840    ///
15841    /// # Working with unknown values
15842    ///
15843    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15844    /// additional enum variants at any time. Adding new variants is not considered
15845    /// a breaking change. Applications should write their code in anticipation of:
15846    ///
15847    /// - New values appearing in future releases of the client library, **and**
15848    /// - New values received dynamically, without application changes.
15849    ///
15850    /// Please consult the [Working with enums] section in the user guide for some
15851    /// guidelines.
15852    ///
15853    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15854    #[derive(Clone, Debug, PartialEq)]
15855    #[non_exhaustive]
15856    pub enum ResourcePathNodeType {
15857        /// Node type is unspecified.
15858        Unspecified,
15859        /// The node represents a Google Cloud organization.
15860        GcpOrganization,
15861        /// The node represents a Google Cloud folder.
15862        GcpFolder,
15863        /// The node represents a Google Cloud project.
15864        GcpProject,
15865        /// The node represents an AWS organization.
15866        AwsOrganization,
15867        /// The node represents an AWS organizational unit.
15868        AwsOrganizationalUnit,
15869        /// The node represents an AWS account.
15870        AwsAccount,
15871        /// The node represents an Azure management group.
15872        AzureManagementGroup,
15873        /// The node represents an Azure subscription.
15874        AzureSubscription,
15875        /// The node represents an Azure resource group.
15876        AzureResourceGroup,
15877        /// If set, the enum was initialized with an unknown value.
15878        ///
15879        /// Applications can examine the value using [ResourcePathNodeType::value] or
15880        /// [ResourcePathNodeType::name].
15881        UnknownValue(resource_path_node_type::UnknownValue),
15882    }
15883
15884    #[doc(hidden)]
15885    pub mod resource_path_node_type {
15886        #[allow(unused_imports)]
15887        use super::*;
15888        #[derive(Clone, Debug, PartialEq)]
15889        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15890    }
15891
15892    impl ResourcePathNodeType {
15893        /// Gets the enum value.
15894        ///
15895        /// Returns `None` if the enum contains an unknown value deserialized from
15896        /// the string representation of enums.
15897        pub fn value(&self) -> std::option::Option<i32> {
15898            match self {
15899                Self::Unspecified => std::option::Option::Some(0),
15900                Self::GcpOrganization => std::option::Option::Some(1),
15901                Self::GcpFolder => std::option::Option::Some(2),
15902                Self::GcpProject => std::option::Option::Some(3),
15903                Self::AwsOrganization => std::option::Option::Some(4),
15904                Self::AwsOrganizationalUnit => std::option::Option::Some(5),
15905                Self::AwsAccount => std::option::Option::Some(6),
15906                Self::AzureManagementGroup => std::option::Option::Some(7),
15907                Self::AzureSubscription => std::option::Option::Some(8),
15908                Self::AzureResourceGroup => std::option::Option::Some(9),
15909                Self::UnknownValue(u) => u.0.value(),
15910            }
15911        }
15912
15913        /// Gets the enum value as a string.
15914        ///
15915        /// Returns `None` if the enum contains an unknown value deserialized from
15916        /// the integer representation of enums.
15917        pub fn name(&self) -> std::option::Option<&str> {
15918            match self {
15919                Self::Unspecified => {
15920                    std::option::Option::Some("RESOURCE_PATH_NODE_TYPE_UNSPECIFIED")
15921                }
15922                Self::GcpOrganization => std::option::Option::Some("GCP_ORGANIZATION"),
15923                Self::GcpFolder => std::option::Option::Some("GCP_FOLDER"),
15924                Self::GcpProject => std::option::Option::Some("GCP_PROJECT"),
15925                Self::AwsOrganization => std::option::Option::Some("AWS_ORGANIZATION"),
15926                Self::AwsOrganizationalUnit => std::option::Option::Some("AWS_ORGANIZATIONAL_UNIT"),
15927                Self::AwsAccount => std::option::Option::Some("AWS_ACCOUNT"),
15928                Self::AzureManagementGroup => std::option::Option::Some("AZURE_MANAGEMENT_GROUP"),
15929                Self::AzureSubscription => std::option::Option::Some("AZURE_SUBSCRIPTION"),
15930                Self::AzureResourceGroup => std::option::Option::Some("AZURE_RESOURCE_GROUP"),
15931                Self::UnknownValue(u) => u.0.name(),
15932            }
15933        }
15934    }
15935
15936    impl std::default::Default for ResourcePathNodeType {
15937        fn default() -> Self {
15938            use std::convert::From;
15939            Self::from(0)
15940        }
15941    }
15942
15943    impl std::fmt::Display for ResourcePathNodeType {
15944        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15945            wkt::internal::display_enum(f, self.name(), self.value())
15946        }
15947    }
15948
15949    impl std::convert::From<i32> for ResourcePathNodeType {
15950        fn from(value: i32) -> Self {
15951            match value {
15952                0 => Self::Unspecified,
15953                1 => Self::GcpOrganization,
15954                2 => Self::GcpFolder,
15955                3 => Self::GcpProject,
15956                4 => Self::AwsOrganization,
15957                5 => Self::AwsOrganizationalUnit,
15958                6 => Self::AwsAccount,
15959                7 => Self::AzureManagementGroup,
15960                8 => Self::AzureSubscription,
15961                9 => Self::AzureResourceGroup,
15962                _ => Self::UnknownValue(resource_path_node_type::UnknownValue(
15963                    wkt::internal::UnknownEnumValue::Integer(value),
15964                )),
15965            }
15966        }
15967    }
15968
15969    impl std::convert::From<&str> for ResourcePathNodeType {
15970        fn from(value: &str) -> Self {
15971            use std::string::ToString;
15972            match value {
15973                "RESOURCE_PATH_NODE_TYPE_UNSPECIFIED" => Self::Unspecified,
15974                "GCP_ORGANIZATION" => Self::GcpOrganization,
15975                "GCP_FOLDER" => Self::GcpFolder,
15976                "GCP_PROJECT" => Self::GcpProject,
15977                "AWS_ORGANIZATION" => Self::AwsOrganization,
15978                "AWS_ORGANIZATIONAL_UNIT" => Self::AwsOrganizationalUnit,
15979                "AWS_ACCOUNT" => Self::AwsAccount,
15980                "AZURE_MANAGEMENT_GROUP" => Self::AzureManagementGroup,
15981                "AZURE_SUBSCRIPTION" => Self::AzureSubscription,
15982                "AZURE_RESOURCE_GROUP" => Self::AzureResourceGroup,
15983                _ => Self::UnknownValue(resource_path_node_type::UnknownValue(
15984                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15985                )),
15986            }
15987        }
15988    }
15989
15990    impl serde::ser::Serialize for ResourcePathNodeType {
15991        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15992        where
15993            S: serde::Serializer,
15994        {
15995            match self {
15996                Self::Unspecified => serializer.serialize_i32(0),
15997                Self::GcpOrganization => serializer.serialize_i32(1),
15998                Self::GcpFolder => serializer.serialize_i32(2),
15999                Self::GcpProject => serializer.serialize_i32(3),
16000                Self::AwsOrganization => serializer.serialize_i32(4),
16001                Self::AwsOrganizationalUnit => serializer.serialize_i32(5),
16002                Self::AwsAccount => serializer.serialize_i32(6),
16003                Self::AzureManagementGroup => serializer.serialize_i32(7),
16004                Self::AzureSubscription => serializer.serialize_i32(8),
16005                Self::AzureResourceGroup => serializer.serialize_i32(9),
16006                Self::UnknownValue(u) => u.0.serialize(serializer),
16007            }
16008        }
16009    }
16010
16011    impl<'de> serde::de::Deserialize<'de> for ResourcePathNodeType {
16012        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16013        where
16014            D: serde::Deserializer<'de>,
16015        {
16016            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResourcePathNodeType>::new(
16017                ".google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType",
16018            ))
16019        }
16020    }
16021}
16022
16023/// A resource value configuration (RVC) is a mapping configuration of user's
16024/// resources to resource values. Used in Attack path simulations.
16025#[derive(Clone, Default, PartialEq)]
16026#[non_exhaustive]
16027pub struct ResourceValueConfig {
16028    /// Identifier. Name for the resource value configuration
16029    pub name: std::string::String,
16030
16031    /// Resource value level this expression represents
16032    /// Only required when there is no Sensitive Data Protection mapping in the
16033    /// request
16034    pub resource_value: crate::model::ResourceValue,
16035
16036    /// Tag values combined with `AND` to check against.
16037    /// For Google Cloud resources, they are tag value IDs in the form of
16038    /// "tagValues/123". Example: `[ "tagValues/123", "tagValues/456",
16039    /// "tagValues/789" ]`
16040    /// <https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing>
16041    pub tag_values: std::vec::Vec<std::string::String>,
16042
16043    /// Apply resource_value only to resources that match resource_type.
16044    /// resource_type will be checked with `AND` of other resources.
16045    /// For example, "storage.googleapis.com/Bucket" with resource_value "HIGH"
16046    /// will apply "HIGH" value only to "storage.googleapis.com/Bucket" resources.
16047    pub resource_type: std::string::String,
16048
16049    /// Project or folder to scope this configuration to.
16050    /// For example, "project/456" would apply this configuration only to resources
16051    /// in "project/456" scope and will be checked with `AND` of other resources.
16052    pub scope: std::string::String,
16053
16054    /// List of resource labels to search for, evaluated with `AND`.
16055    /// For example, "resource_labels_selector": {"key": "value", "env": "prod"}
16056    /// will match resources with labels "key": "value" `AND` "env":
16057    /// "prod"
16058    /// <https://cloud.google.com/resource-manager/docs/creating-managing-labels>
16059    pub resource_labels_selector:
16060        std::collections::HashMap<std::string::String, std::string::String>,
16061
16062    /// Description of the resource value configuration.
16063    pub description: std::string::String,
16064
16065    /// Output only. Timestamp this resource value configuration was created.
16066    pub create_time: std::option::Option<wkt::Timestamp>,
16067
16068    /// Output only. Timestamp this resource value configuration was last updated.
16069    pub update_time: std::option::Option<wkt::Timestamp>,
16070
16071    /// Cloud provider this configuration applies to
16072    pub cloud_provider: crate::model::CloudProvider,
16073
16074    /// A mapping of the sensitivity on Sensitive Data Protection finding to
16075    /// resource values. This mapping can only be used in combination with a
16076    /// resource_type that is related to BigQuery, e.g.
16077    /// "bigquery.googleapis.com/Dataset".
16078    pub sensitive_data_protection_mapping:
16079        std::option::Option<crate::model::resource_value_config::SensitiveDataProtectionMapping>,
16080
16081    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16082}
16083
16084impl ResourceValueConfig {
16085    /// Creates a new default instance.
16086    pub fn new() -> Self {
16087        std::default::Default::default()
16088    }
16089
16090    /// Sets the value of [name][crate::model::ResourceValueConfig::name].
16091    ///
16092    /// # Example
16093    /// ```ignore,no_run
16094    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16095    /// # let organization_id = "organization_id";
16096    /// # let resource_value_config_id = "resource_value_config_id";
16097    /// let x = ResourceValueConfig::new().set_name(format!("organizations/{organization_id}/resourceValueConfigs/{resource_value_config_id}"));
16098    /// ```
16099    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16100        self.name = v.into();
16101        self
16102    }
16103
16104    /// Sets the value of [resource_value][crate::model::ResourceValueConfig::resource_value].
16105    ///
16106    /// # Example
16107    /// ```ignore,no_run
16108    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16109    /// use google_cloud_securitycenter_v2::model::ResourceValue;
16110    /// let x0 = ResourceValueConfig::new().set_resource_value(ResourceValue::High);
16111    /// let x1 = ResourceValueConfig::new().set_resource_value(ResourceValue::Medium);
16112    /// let x2 = ResourceValueConfig::new().set_resource_value(ResourceValue::Low);
16113    /// ```
16114    pub fn set_resource_value<T: std::convert::Into<crate::model::ResourceValue>>(
16115        mut self,
16116        v: T,
16117    ) -> Self {
16118        self.resource_value = v.into();
16119        self
16120    }
16121
16122    /// Sets the value of [tag_values][crate::model::ResourceValueConfig::tag_values].
16123    ///
16124    /// # Example
16125    /// ```ignore,no_run
16126    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16127    /// let x = ResourceValueConfig::new().set_tag_values(["a", "b", "c"]);
16128    /// ```
16129    pub fn set_tag_values<T, V>(mut self, v: T) -> Self
16130    where
16131        T: std::iter::IntoIterator<Item = V>,
16132        V: std::convert::Into<std::string::String>,
16133    {
16134        use std::iter::Iterator;
16135        self.tag_values = v.into_iter().map(|i| i.into()).collect();
16136        self
16137    }
16138
16139    /// Sets the value of [resource_type][crate::model::ResourceValueConfig::resource_type].
16140    ///
16141    /// # Example
16142    /// ```ignore,no_run
16143    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16144    /// let x = ResourceValueConfig::new().set_resource_type("example");
16145    /// ```
16146    pub fn set_resource_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16147        self.resource_type = v.into();
16148        self
16149    }
16150
16151    /// Sets the value of [scope][crate::model::ResourceValueConfig::scope].
16152    ///
16153    /// # Example
16154    /// ```ignore,no_run
16155    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16156    /// let x = ResourceValueConfig::new().set_scope("example");
16157    /// ```
16158    pub fn set_scope<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16159        self.scope = v.into();
16160        self
16161    }
16162
16163    /// Sets the value of [resource_labels_selector][crate::model::ResourceValueConfig::resource_labels_selector].
16164    ///
16165    /// # Example
16166    /// ```ignore,no_run
16167    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16168    /// let x = ResourceValueConfig::new().set_resource_labels_selector([
16169    ///     ("key0", "abc"),
16170    ///     ("key1", "xyz"),
16171    /// ]);
16172    /// ```
16173    pub fn set_resource_labels_selector<T, K, V>(mut self, v: T) -> Self
16174    where
16175        T: std::iter::IntoIterator<Item = (K, V)>,
16176        K: std::convert::Into<std::string::String>,
16177        V: std::convert::Into<std::string::String>,
16178    {
16179        use std::iter::Iterator;
16180        self.resource_labels_selector = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
16181        self
16182    }
16183
16184    /// Sets the value of [description][crate::model::ResourceValueConfig::description].
16185    ///
16186    /// # Example
16187    /// ```ignore,no_run
16188    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16189    /// let x = ResourceValueConfig::new().set_description("example");
16190    /// ```
16191    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16192        self.description = v.into();
16193        self
16194    }
16195
16196    /// Sets the value of [create_time][crate::model::ResourceValueConfig::create_time].
16197    ///
16198    /// # Example
16199    /// ```ignore,no_run
16200    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16201    /// use wkt::Timestamp;
16202    /// let x = ResourceValueConfig::new().set_create_time(Timestamp::default()/* use setters */);
16203    /// ```
16204    pub fn set_create_time<T>(mut self, v: T) -> Self
16205    where
16206        T: std::convert::Into<wkt::Timestamp>,
16207    {
16208        self.create_time = std::option::Option::Some(v.into());
16209        self
16210    }
16211
16212    /// Sets or clears the value of [create_time][crate::model::ResourceValueConfig::create_time].
16213    ///
16214    /// # Example
16215    /// ```ignore,no_run
16216    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16217    /// use wkt::Timestamp;
16218    /// let x = ResourceValueConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
16219    /// let x = ResourceValueConfig::new().set_or_clear_create_time(None::<Timestamp>);
16220    /// ```
16221    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
16222    where
16223        T: std::convert::Into<wkt::Timestamp>,
16224    {
16225        self.create_time = v.map(|x| x.into());
16226        self
16227    }
16228
16229    /// Sets the value of [update_time][crate::model::ResourceValueConfig::update_time].
16230    ///
16231    /// # Example
16232    /// ```ignore,no_run
16233    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16234    /// use wkt::Timestamp;
16235    /// let x = ResourceValueConfig::new().set_update_time(Timestamp::default()/* use setters */);
16236    /// ```
16237    pub fn set_update_time<T>(mut self, v: T) -> Self
16238    where
16239        T: std::convert::Into<wkt::Timestamp>,
16240    {
16241        self.update_time = std::option::Option::Some(v.into());
16242        self
16243    }
16244
16245    /// Sets or clears the value of [update_time][crate::model::ResourceValueConfig::update_time].
16246    ///
16247    /// # Example
16248    /// ```ignore,no_run
16249    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16250    /// use wkt::Timestamp;
16251    /// let x = ResourceValueConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
16252    /// let x = ResourceValueConfig::new().set_or_clear_update_time(None::<Timestamp>);
16253    /// ```
16254    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
16255    where
16256        T: std::convert::Into<wkt::Timestamp>,
16257    {
16258        self.update_time = v.map(|x| x.into());
16259        self
16260    }
16261
16262    /// Sets the value of [cloud_provider][crate::model::ResourceValueConfig::cloud_provider].
16263    ///
16264    /// # Example
16265    /// ```ignore,no_run
16266    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16267    /// use google_cloud_securitycenter_v2::model::CloudProvider;
16268    /// let x0 = ResourceValueConfig::new().set_cloud_provider(CloudProvider::GoogleCloudPlatform);
16269    /// let x1 = ResourceValueConfig::new().set_cloud_provider(CloudProvider::AmazonWebServices);
16270    /// let x2 = ResourceValueConfig::new().set_cloud_provider(CloudProvider::MicrosoftAzure);
16271    /// ```
16272    pub fn set_cloud_provider<T: std::convert::Into<crate::model::CloudProvider>>(
16273        mut self,
16274        v: T,
16275    ) -> Self {
16276        self.cloud_provider = v.into();
16277        self
16278    }
16279
16280    /// Sets the value of [sensitive_data_protection_mapping][crate::model::ResourceValueConfig::sensitive_data_protection_mapping].
16281    ///
16282    /// # Example
16283    /// ```ignore,no_run
16284    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16285    /// use google_cloud_securitycenter_v2::model::resource_value_config::SensitiveDataProtectionMapping;
16286    /// let x = ResourceValueConfig::new().set_sensitive_data_protection_mapping(SensitiveDataProtectionMapping::default()/* use setters */);
16287    /// ```
16288    pub fn set_sensitive_data_protection_mapping<T>(mut self, v: T) -> Self
16289    where
16290        T: std::convert::Into<crate::model::resource_value_config::SensitiveDataProtectionMapping>,
16291    {
16292        self.sensitive_data_protection_mapping = std::option::Option::Some(v.into());
16293        self
16294    }
16295
16296    /// Sets or clears the value of [sensitive_data_protection_mapping][crate::model::ResourceValueConfig::sensitive_data_protection_mapping].
16297    ///
16298    /// # Example
16299    /// ```ignore,no_run
16300    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16301    /// use google_cloud_securitycenter_v2::model::resource_value_config::SensitiveDataProtectionMapping;
16302    /// let x = ResourceValueConfig::new().set_or_clear_sensitive_data_protection_mapping(Some(SensitiveDataProtectionMapping::default()/* use setters */));
16303    /// let x = ResourceValueConfig::new().set_or_clear_sensitive_data_protection_mapping(None::<SensitiveDataProtectionMapping>);
16304    /// ```
16305    pub fn set_or_clear_sensitive_data_protection_mapping<T>(
16306        mut self,
16307        v: std::option::Option<T>,
16308    ) -> Self
16309    where
16310        T: std::convert::Into<crate::model::resource_value_config::SensitiveDataProtectionMapping>,
16311    {
16312        self.sensitive_data_protection_mapping = v.map(|x| x.into());
16313        self
16314    }
16315}
16316
16317impl wkt::message::Message for ResourceValueConfig {
16318    fn typename() -> &'static str {
16319        "type.googleapis.com/google.cloud.securitycenter.v2.ResourceValueConfig"
16320    }
16321}
16322
16323/// Defines additional types related to [ResourceValueConfig].
16324pub mod resource_value_config {
16325    #[allow(unused_imports)]
16326    use super::*;
16327
16328    /// Resource value mapping for Sensitive Data Protection findings
16329    /// If any of these mappings have a resource value that is not unspecified,
16330    /// the resource_value field will be ignored when reading this configuration.
16331    #[derive(Clone, Default, PartialEq)]
16332    #[non_exhaustive]
16333    pub struct SensitiveDataProtectionMapping {
16334        /// Resource value mapping for high-sensitivity Sensitive Data Protection
16335        /// findings
16336        pub high_sensitivity_mapping: crate::model::ResourceValue,
16337
16338        /// Resource value mapping for medium-sensitivity Sensitive Data Protection
16339        /// findings
16340        pub medium_sensitivity_mapping: crate::model::ResourceValue,
16341
16342        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16343    }
16344
16345    impl SensitiveDataProtectionMapping {
16346        /// Creates a new default instance.
16347        pub fn new() -> Self {
16348            std::default::Default::default()
16349        }
16350
16351        /// Sets the value of [high_sensitivity_mapping][crate::model::resource_value_config::SensitiveDataProtectionMapping::high_sensitivity_mapping].
16352        ///
16353        /// # Example
16354        /// ```ignore,no_run
16355        /// # use google_cloud_securitycenter_v2::model::resource_value_config::SensitiveDataProtectionMapping;
16356        /// use google_cloud_securitycenter_v2::model::ResourceValue;
16357        /// let x0 = SensitiveDataProtectionMapping::new().set_high_sensitivity_mapping(ResourceValue::High);
16358        /// let x1 = SensitiveDataProtectionMapping::new().set_high_sensitivity_mapping(ResourceValue::Medium);
16359        /// let x2 = SensitiveDataProtectionMapping::new().set_high_sensitivity_mapping(ResourceValue::Low);
16360        /// ```
16361        pub fn set_high_sensitivity_mapping<T: std::convert::Into<crate::model::ResourceValue>>(
16362            mut self,
16363            v: T,
16364        ) -> Self {
16365            self.high_sensitivity_mapping = v.into();
16366            self
16367        }
16368
16369        /// Sets the value of [medium_sensitivity_mapping][crate::model::resource_value_config::SensitiveDataProtectionMapping::medium_sensitivity_mapping].
16370        ///
16371        /// # Example
16372        /// ```ignore,no_run
16373        /// # use google_cloud_securitycenter_v2::model::resource_value_config::SensitiveDataProtectionMapping;
16374        /// use google_cloud_securitycenter_v2::model::ResourceValue;
16375        /// let x0 = SensitiveDataProtectionMapping::new().set_medium_sensitivity_mapping(ResourceValue::High);
16376        /// let x1 = SensitiveDataProtectionMapping::new().set_medium_sensitivity_mapping(ResourceValue::Medium);
16377        /// let x2 = SensitiveDataProtectionMapping::new().set_medium_sensitivity_mapping(ResourceValue::Low);
16378        /// ```
16379        pub fn set_medium_sensitivity_mapping<
16380            T: std::convert::Into<crate::model::ResourceValue>,
16381        >(
16382            mut self,
16383            v: T,
16384        ) -> Self {
16385            self.medium_sensitivity_mapping = v.into();
16386            self
16387        }
16388    }
16389
16390    impl wkt::message::Message for SensitiveDataProtectionMapping {
16391        fn typename() -> &'static str {
16392            "type.googleapis.com/google.cloud.securitycenter.v2.ResourceValueConfig.SensitiveDataProtectionMapping"
16393        }
16394    }
16395}
16396
16397/// User specified security marks that are attached to the parent Security
16398/// Command Center resource. Security marks are scoped within a Security Command
16399/// Center organization -- they can be modified and viewed by all users who have
16400/// proper permissions on the organization.
16401#[derive(Clone, Default, PartialEq)]
16402#[non_exhaustive]
16403pub struct SecurityMarks {
16404    /// The relative resource name of the SecurityMarks. See:
16405    /// <https://cloud.google.com/apis/design/resource_names#relative_resource_name>
16406    /// The following list shows some examples:
16407    ///
16408    /// + `organizations/{organization_id}/assets/{asset_id}/securityMarks`
16409    ///
16410    /// `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
16411    /// +
16412    /// `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
16413    pub name: std::string::String,
16414
16415    /// Mutable user specified security marks belonging to the parent resource.
16416    /// Constraints are as follows:
16417    ///
16418    /// * Keys and values are treated as case insensitive
16419    /// * Keys must be between 1 - 256 characters (inclusive)
16420    /// * Keys must be letters, numbers, underscores, or dashes
16421    /// * Values have leading and trailing whitespace trimmed, remaining
16422    ///   characters must be between 1 - 4096 characters (inclusive)
16423    pub marks: std::collections::HashMap<std::string::String, std::string::String>,
16424
16425    /// The canonical name of the marks. The following list shows some examples:
16426    ///
16427    /// + `organizations/{organization_id}/assets/{asset_id}/securityMarks`
16428    ///
16429    /// `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
16430    /// +
16431    /// `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
16432    ///
16433    /// + `folders/{folder_id}/assets/{asset_id}/securityMarks`
16434    ///
16435    /// `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
16436    /// +
16437    /// `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
16438    ///
16439    /// + `projects/{project_number}/assets/{asset_id}/securityMarks`
16440    ///
16441    /// `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks`
16442    /// +
16443    /// `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
16444    pub canonical_name: std::string::String,
16445
16446    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16447}
16448
16449impl SecurityMarks {
16450    /// Creates a new default instance.
16451    pub fn new() -> Self {
16452        std::default::Default::default()
16453    }
16454
16455    /// Sets the value of [name][crate::model::SecurityMarks::name].
16456    ///
16457    /// # Example
16458    /// ```ignore,no_run
16459    /// # use google_cloud_securitycenter_v2::model::SecurityMarks;
16460    /// # let organization_id = "organization_id";
16461    /// # let asset_id = "asset_id";
16462    /// let x = SecurityMarks::new().set_name(format!("organizations/{organization_id}/assets/{asset_id}/securityMarks"));
16463    /// ```
16464    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16465        self.name = v.into();
16466        self
16467    }
16468
16469    /// Sets the value of [marks][crate::model::SecurityMarks::marks].
16470    ///
16471    /// # Example
16472    /// ```ignore,no_run
16473    /// # use google_cloud_securitycenter_v2::model::SecurityMarks;
16474    /// let x = SecurityMarks::new().set_marks([
16475    ///     ("key0", "abc"),
16476    ///     ("key1", "xyz"),
16477    /// ]);
16478    /// ```
16479    pub fn set_marks<T, K, V>(mut self, v: T) -> Self
16480    where
16481        T: std::iter::IntoIterator<Item = (K, V)>,
16482        K: std::convert::Into<std::string::String>,
16483        V: std::convert::Into<std::string::String>,
16484    {
16485        use std::iter::Iterator;
16486        self.marks = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
16487        self
16488    }
16489
16490    /// Sets the value of [canonical_name][crate::model::SecurityMarks::canonical_name].
16491    ///
16492    /// # Example
16493    /// ```ignore,no_run
16494    /// # use google_cloud_securitycenter_v2::model::SecurityMarks;
16495    /// let x = SecurityMarks::new().set_canonical_name("example");
16496    /// ```
16497    pub fn set_canonical_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16498        self.canonical_name = v.into();
16499        self
16500    }
16501}
16502
16503impl wkt::message::Message for SecurityMarks {
16504    fn typename() -> &'static str {
16505        "type.googleapis.com/google.cloud.securitycenter.v2.SecurityMarks"
16506    }
16507}
16508
16509/// Represents a posture that is deployed on Google Cloud by the
16510/// Security Command Center Posture Management service.
16511/// A posture contains one or more policy sets. A policy set is a
16512/// group of policies that enforce a set of security rules on Google
16513/// Cloud.
16514#[derive(Clone, Default, PartialEq)]
16515#[non_exhaustive]
16516pub struct SecurityPosture {
16517    /// Name of the posture, for example, `CIS-Posture`.
16518    pub name: std::string::String,
16519
16520    /// The version of the posture, for example, `c7cfa2a8`.
16521    pub revision_id: std::string::String,
16522
16523    /// The project, folder, or organization on which the posture is deployed,
16524    /// for example, `projects/{project_number}`.
16525    pub posture_deployment_resource: std::string::String,
16526
16527    /// The name of the posture deployment, for example,
16528    /// `organizations/{org_id}/posturedeployments/{posture_deployment_id}`.
16529    pub posture_deployment: std::string::String,
16530
16531    /// The name of the updated policy, for example,
16532    /// `projects/{project_id}/policies/{constraint_name}`.
16533    pub changed_policy: std::string::String,
16534
16535    /// The name of the updated policy set, for example, `cis-policyset`.
16536    pub policy_set: std::string::String,
16537
16538    /// The ID of the updated policy, for example, `compute-policy-1`.
16539    pub policy: std::string::String,
16540
16541    /// The details about a change in an updated policy that violates the deployed
16542    /// posture.
16543    pub policy_drift_details: std::vec::Vec<crate::model::security_posture::PolicyDriftDetails>,
16544
16545    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16546}
16547
16548impl SecurityPosture {
16549    /// Creates a new default instance.
16550    pub fn new() -> Self {
16551        std::default::Default::default()
16552    }
16553
16554    /// Sets the value of [name][crate::model::SecurityPosture::name].
16555    ///
16556    /// # Example
16557    /// ```ignore,no_run
16558    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
16559    /// let x = SecurityPosture::new().set_name("example");
16560    /// ```
16561    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16562        self.name = v.into();
16563        self
16564    }
16565
16566    /// Sets the value of [revision_id][crate::model::SecurityPosture::revision_id].
16567    ///
16568    /// # Example
16569    /// ```ignore,no_run
16570    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
16571    /// let x = SecurityPosture::new().set_revision_id("example");
16572    /// ```
16573    pub fn set_revision_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16574        self.revision_id = v.into();
16575        self
16576    }
16577
16578    /// Sets the value of [posture_deployment_resource][crate::model::SecurityPosture::posture_deployment_resource].
16579    ///
16580    /// # Example
16581    /// ```ignore,no_run
16582    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
16583    /// let x = SecurityPosture::new().set_posture_deployment_resource("example");
16584    /// ```
16585    pub fn set_posture_deployment_resource<T: std::convert::Into<std::string::String>>(
16586        mut self,
16587        v: T,
16588    ) -> Self {
16589        self.posture_deployment_resource = v.into();
16590        self
16591    }
16592
16593    /// Sets the value of [posture_deployment][crate::model::SecurityPosture::posture_deployment].
16594    ///
16595    /// # Example
16596    /// ```ignore,no_run
16597    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
16598    /// let x = SecurityPosture::new().set_posture_deployment("example");
16599    /// ```
16600    pub fn set_posture_deployment<T: std::convert::Into<std::string::String>>(
16601        mut self,
16602        v: T,
16603    ) -> Self {
16604        self.posture_deployment = v.into();
16605        self
16606    }
16607
16608    /// Sets the value of [changed_policy][crate::model::SecurityPosture::changed_policy].
16609    ///
16610    /// # Example
16611    /// ```ignore,no_run
16612    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
16613    /// let x = SecurityPosture::new().set_changed_policy("example");
16614    /// ```
16615    pub fn set_changed_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16616        self.changed_policy = v.into();
16617        self
16618    }
16619
16620    /// Sets the value of [policy_set][crate::model::SecurityPosture::policy_set].
16621    ///
16622    /// # Example
16623    /// ```ignore,no_run
16624    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
16625    /// let x = SecurityPosture::new().set_policy_set("example");
16626    /// ```
16627    pub fn set_policy_set<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16628        self.policy_set = v.into();
16629        self
16630    }
16631
16632    /// Sets the value of [policy][crate::model::SecurityPosture::policy].
16633    ///
16634    /// # Example
16635    /// ```ignore,no_run
16636    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
16637    /// let x = SecurityPosture::new().set_policy("example");
16638    /// ```
16639    pub fn set_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16640        self.policy = v.into();
16641        self
16642    }
16643
16644    /// Sets the value of [policy_drift_details][crate::model::SecurityPosture::policy_drift_details].
16645    ///
16646    /// # Example
16647    /// ```ignore,no_run
16648    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
16649    /// use google_cloud_securitycenter_v2::model::security_posture::PolicyDriftDetails;
16650    /// let x = SecurityPosture::new()
16651    ///     .set_policy_drift_details([
16652    ///         PolicyDriftDetails::default()/* use setters */,
16653    ///         PolicyDriftDetails::default()/* use (different) setters */,
16654    ///     ]);
16655    /// ```
16656    pub fn set_policy_drift_details<T, V>(mut self, v: T) -> Self
16657    where
16658        T: std::iter::IntoIterator<Item = V>,
16659        V: std::convert::Into<crate::model::security_posture::PolicyDriftDetails>,
16660    {
16661        use std::iter::Iterator;
16662        self.policy_drift_details = v.into_iter().map(|i| i.into()).collect();
16663        self
16664    }
16665}
16666
16667impl wkt::message::Message for SecurityPosture {
16668    fn typename() -> &'static str {
16669        "type.googleapis.com/google.cloud.securitycenter.v2.SecurityPosture"
16670    }
16671}
16672
16673/// Defines additional types related to [SecurityPosture].
16674pub mod security_posture {
16675    #[allow(unused_imports)]
16676    use super::*;
16677
16678    /// The policy field that violates the deployed posture and its expected and
16679    /// detected values.
16680    #[derive(Clone, Default, PartialEq)]
16681    #[non_exhaustive]
16682    pub struct PolicyDriftDetails {
16683        /// The name of the updated field, for example
16684        /// constraint.implementation.policy_rules[0].enforce
16685        pub field: std::string::String,
16686
16687        /// The value of this field that was configured in a posture, for example,
16688        /// `true` or `allowed_values={"projects/29831892"}`.
16689        pub expected_value: std::string::String,
16690
16691        /// The detected value that violates the deployed posture, for example,
16692        /// `false` or `allowed_values={"projects/22831892"}`.
16693        pub detected_value: std::string::String,
16694
16695        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16696    }
16697
16698    impl PolicyDriftDetails {
16699        /// Creates a new default instance.
16700        pub fn new() -> Self {
16701            std::default::Default::default()
16702        }
16703
16704        /// Sets the value of [field][crate::model::security_posture::PolicyDriftDetails::field].
16705        ///
16706        /// # Example
16707        /// ```ignore,no_run
16708        /// # use google_cloud_securitycenter_v2::model::security_posture::PolicyDriftDetails;
16709        /// let x = PolicyDriftDetails::new().set_field("example");
16710        /// ```
16711        pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16712            self.field = v.into();
16713            self
16714        }
16715
16716        /// Sets the value of [expected_value][crate::model::security_posture::PolicyDriftDetails::expected_value].
16717        ///
16718        /// # Example
16719        /// ```ignore,no_run
16720        /// # use google_cloud_securitycenter_v2::model::security_posture::PolicyDriftDetails;
16721        /// let x = PolicyDriftDetails::new().set_expected_value("example");
16722        /// ```
16723        pub fn set_expected_value<T: std::convert::Into<std::string::String>>(
16724            mut self,
16725            v: T,
16726        ) -> Self {
16727            self.expected_value = v.into();
16728            self
16729        }
16730
16731        /// Sets the value of [detected_value][crate::model::security_posture::PolicyDriftDetails::detected_value].
16732        ///
16733        /// # Example
16734        /// ```ignore,no_run
16735        /// # use google_cloud_securitycenter_v2::model::security_posture::PolicyDriftDetails;
16736        /// let x = PolicyDriftDetails::new().set_detected_value("example");
16737        /// ```
16738        pub fn set_detected_value<T: std::convert::Into<std::string::String>>(
16739            mut self,
16740            v: T,
16741        ) -> Self {
16742            self.detected_value = v.into();
16743            self
16744        }
16745    }
16746
16747    impl wkt::message::Message for PolicyDriftDetails {
16748        fn typename() -> &'static str {
16749            "type.googleapis.com/google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails"
16750        }
16751    }
16752}
16753
16754/// Request message to create multiple resource value configs
16755#[derive(Clone, Default, PartialEq)]
16756#[non_exhaustive]
16757pub struct BatchCreateResourceValueConfigsRequest {
16758    /// Required. Resource name of the new ResourceValueConfig's parent.
16759    /// The parent field in the CreateResourceValueConfigRequest
16760    /// messages must either be empty or match this field.
16761    pub parent: std::string::String,
16762
16763    /// Required. The resource value configs to be created.
16764    pub requests: std::vec::Vec<crate::model::CreateResourceValueConfigRequest>,
16765
16766    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16767}
16768
16769impl BatchCreateResourceValueConfigsRequest {
16770    /// Creates a new default instance.
16771    pub fn new() -> Self {
16772        std::default::Default::default()
16773    }
16774
16775    /// Sets the value of [parent][crate::model::BatchCreateResourceValueConfigsRequest::parent].
16776    ///
16777    /// # Example
16778    /// ```ignore,no_run
16779    /// # use google_cloud_securitycenter_v2::model::BatchCreateResourceValueConfigsRequest;
16780    /// # let organization_id = "organization_id";
16781    /// let x = BatchCreateResourceValueConfigsRequest::new().set_parent(format!("organizations/{organization_id}"));
16782    /// ```
16783    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16784        self.parent = v.into();
16785        self
16786    }
16787
16788    /// Sets the value of [requests][crate::model::BatchCreateResourceValueConfigsRequest::requests].
16789    ///
16790    /// # Example
16791    /// ```ignore,no_run
16792    /// # use google_cloud_securitycenter_v2::model::BatchCreateResourceValueConfigsRequest;
16793    /// use google_cloud_securitycenter_v2::model::CreateResourceValueConfigRequest;
16794    /// let x = BatchCreateResourceValueConfigsRequest::new()
16795    ///     .set_requests([
16796    ///         CreateResourceValueConfigRequest::default()/* use setters */,
16797    ///         CreateResourceValueConfigRequest::default()/* use (different) setters */,
16798    ///     ]);
16799    /// ```
16800    pub fn set_requests<T, V>(mut self, v: T) -> Self
16801    where
16802        T: std::iter::IntoIterator<Item = V>,
16803        V: std::convert::Into<crate::model::CreateResourceValueConfigRequest>,
16804    {
16805        use std::iter::Iterator;
16806        self.requests = v.into_iter().map(|i| i.into()).collect();
16807        self
16808    }
16809}
16810
16811impl wkt::message::Message for BatchCreateResourceValueConfigsRequest {
16812    fn typename() -> &'static str {
16813        "type.googleapis.com/google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest"
16814    }
16815}
16816
16817/// Response message for BatchCreateResourceValueConfigs
16818#[derive(Clone, Default, PartialEq)]
16819#[non_exhaustive]
16820pub struct BatchCreateResourceValueConfigsResponse {
16821    /// The resource value configs created
16822    pub resource_value_configs: std::vec::Vec<crate::model::ResourceValueConfig>,
16823
16824    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16825}
16826
16827impl BatchCreateResourceValueConfigsResponse {
16828    /// Creates a new default instance.
16829    pub fn new() -> Self {
16830        std::default::Default::default()
16831    }
16832
16833    /// Sets the value of [resource_value_configs][crate::model::BatchCreateResourceValueConfigsResponse::resource_value_configs].
16834    ///
16835    /// # Example
16836    /// ```ignore,no_run
16837    /// # use google_cloud_securitycenter_v2::model::BatchCreateResourceValueConfigsResponse;
16838    /// use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16839    /// let x = BatchCreateResourceValueConfigsResponse::new()
16840    ///     .set_resource_value_configs([
16841    ///         ResourceValueConfig::default()/* use setters */,
16842    ///         ResourceValueConfig::default()/* use (different) setters */,
16843    ///     ]);
16844    /// ```
16845    pub fn set_resource_value_configs<T, V>(mut self, v: T) -> Self
16846    where
16847        T: std::iter::IntoIterator<Item = V>,
16848        V: std::convert::Into<crate::model::ResourceValueConfig>,
16849    {
16850        use std::iter::Iterator;
16851        self.resource_value_configs = v.into_iter().map(|i| i.into()).collect();
16852        self
16853    }
16854}
16855
16856impl wkt::message::Message for BatchCreateResourceValueConfigsResponse {
16857    fn typename() -> &'static str {
16858        "type.googleapis.com/google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse"
16859    }
16860}
16861
16862/// Request message for bulk findings update.
16863///
16864/// Note:
16865///
16866/// 1. If multiple bulk update requests match the same resource, the order in
16867///    which they get executed is not defined.
16868/// 1. Once a bulk operation is started, there is no way to stop it.
16869#[derive(Clone, Default, PartialEq)]
16870#[non_exhaustive]
16871pub struct BulkMuteFindingsRequest {
16872    /// Required. The parent, at which bulk action needs to be applied. If no
16873    /// location is specified, findings are updated in global. The following list
16874    /// shows some examples:
16875    ///
16876    /// + `organizations/[organization_id]`
16877    /// + `organizations/[organization_id]/locations/[location_id]`
16878    /// + `folders/[folder_id]`
16879    /// + `folders/[folder_id]/locations/[location_id]`
16880    /// + `projects/[project_id]`
16881    /// + `projects/[project_id]/locations/[location_id]`
16882    pub parent: std::string::String,
16883
16884    /// Expression that identifies findings that should be updated.
16885    /// The expression is a list of zero or more restrictions combined
16886    /// via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
16887    /// has higher precedence than `AND`.
16888    ///
16889    /// Restrictions have the form `<field> <operator> <value>` and may have a
16890    /// `-` character in front of them to indicate negation. The fields map to
16891    /// those defined in the corresponding resource.
16892    ///
16893    /// The supported operators are:
16894    ///
16895    /// * `=` for all value types.
16896    /// * `>`, `<`, `>=`, `<=` for integer values.
16897    /// * `:`, meaning substring matching, for strings.
16898    ///
16899    /// The supported value types are:
16900    ///
16901    /// * string literals in quotes.
16902    /// * integer literals without quotes.
16903    /// * boolean literals `true` and `false` without quotes.
16904    pub filter: std::string::String,
16905
16906    /// Optional. All findings matching the given filter will have their mute state
16907    /// set to this value. The default value is `MUTED`. Setting this to
16908    /// `UNDEFINED` will clear the mute state on all matching findings.
16909    pub mute_state: crate::model::bulk_mute_findings_request::MuteState,
16910
16911    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16912}
16913
16914impl BulkMuteFindingsRequest {
16915    /// Creates a new default instance.
16916    pub fn new() -> Self {
16917        std::default::Default::default()
16918    }
16919
16920    /// Sets the value of [parent][crate::model::BulkMuteFindingsRequest::parent].
16921    ///
16922    /// # Example
16923    /// ```ignore,no_run
16924    /// # use google_cloud_securitycenter_v2::model::BulkMuteFindingsRequest;
16925    /// let x = BulkMuteFindingsRequest::new().set_parent("example");
16926    /// ```
16927    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16928        self.parent = v.into();
16929        self
16930    }
16931
16932    /// Sets the value of [filter][crate::model::BulkMuteFindingsRequest::filter].
16933    ///
16934    /// # Example
16935    /// ```ignore,no_run
16936    /// # use google_cloud_securitycenter_v2::model::BulkMuteFindingsRequest;
16937    /// let x = BulkMuteFindingsRequest::new().set_filter("example");
16938    /// ```
16939    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16940        self.filter = v.into();
16941        self
16942    }
16943
16944    /// Sets the value of [mute_state][crate::model::BulkMuteFindingsRequest::mute_state].
16945    ///
16946    /// # Example
16947    /// ```ignore,no_run
16948    /// # use google_cloud_securitycenter_v2::model::BulkMuteFindingsRequest;
16949    /// use google_cloud_securitycenter_v2::model::bulk_mute_findings_request::MuteState;
16950    /// let x0 = BulkMuteFindingsRequest::new().set_mute_state(MuteState::Muted);
16951    /// let x1 = BulkMuteFindingsRequest::new().set_mute_state(MuteState::Undefined);
16952    /// ```
16953    pub fn set_mute_state<
16954        T: std::convert::Into<crate::model::bulk_mute_findings_request::MuteState>,
16955    >(
16956        mut self,
16957        v: T,
16958    ) -> Self {
16959        self.mute_state = v.into();
16960        self
16961    }
16962}
16963
16964impl wkt::message::Message for BulkMuteFindingsRequest {
16965    fn typename() -> &'static str {
16966        "type.googleapis.com/google.cloud.securitycenter.v2.BulkMuteFindingsRequest"
16967    }
16968}
16969
16970/// Defines additional types related to [BulkMuteFindingsRequest].
16971pub mod bulk_mute_findings_request {
16972    #[allow(unused_imports)]
16973    use super::*;
16974
16975    /// The mute state.
16976    ///
16977    /// # Working with unknown values
16978    ///
16979    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16980    /// additional enum variants at any time. Adding new variants is not considered
16981    /// a breaking change. Applications should write their code in anticipation of:
16982    ///
16983    /// - New values appearing in future releases of the client library, **and**
16984    /// - New values received dynamically, without application changes.
16985    ///
16986    /// Please consult the [Working with enums] section in the user guide for some
16987    /// guidelines.
16988    ///
16989    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
16990    #[derive(Clone, Debug, PartialEq)]
16991    #[non_exhaustive]
16992    pub enum MuteState {
16993        /// Unused.
16994        Unspecified,
16995        /// Matching findings will be muted (default).
16996        Muted,
16997        /// Matching findings will have their mute state cleared.
16998        Undefined,
16999        /// If set, the enum was initialized with an unknown value.
17000        ///
17001        /// Applications can examine the value using [MuteState::value] or
17002        /// [MuteState::name].
17003        UnknownValue(mute_state::UnknownValue),
17004    }
17005
17006    #[doc(hidden)]
17007    pub mod mute_state {
17008        #[allow(unused_imports)]
17009        use super::*;
17010        #[derive(Clone, Debug, PartialEq)]
17011        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17012    }
17013
17014    impl MuteState {
17015        /// Gets the enum value.
17016        ///
17017        /// Returns `None` if the enum contains an unknown value deserialized from
17018        /// the string representation of enums.
17019        pub fn value(&self) -> std::option::Option<i32> {
17020            match self {
17021                Self::Unspecified => std::option::Option::Some(0),
17022                Self::Muted => std::option::Option::Some(1),
17023                Self::Undefined => std::option::Option::Some(2),
17024                Self::UnknownValue(u) => u.0.value(),
17025            }
17026        }
17027
17028        /// Gets the enum value as a string.
17029        ///
17030        /// Returns `None` if the enum contains an unknown value deserialized from
17031        /// the integer representation of enums.
17032        pub fn name(&self) -> std::option::Option<&str> {
17033            match self {
17034                Self::Unspecified => std::option::Option::Some("MUTE_STATE_UNSPECIFIED"),
17035                Self::Muted => std::option::Option::Some("MUTED"),
17036                Self::Undefined => std::option::Option::Some("UNDEFINED"),
17037                Self::UnknownValue(u) => u.0.name(),
17038            }
17039        }
17040    }
17041
17042    impl std::default::Default for MuteState {
17043        fn default() -> Self {
17044            use std::convert::From;
17045            Self::from(0)
17046        }
17047    }
17048
17049    impl std::fmt::Display for MuteState {
17050        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17051            wkt::internal::display_enum(f, self.name(), self.value())
17052        }
17053    }
17054
17055    impl std::convert::From<i32> for MuteState {
17056        fn from(value: i32) -> Self {
17057            match value {
17058                0 => Self::Unspecified,
17059                1 => Self::Muted,
17060                2 => Self::Undefined,
17061                _ => Self::UnknownValue(mute_state::UnknownValue(
17062                    wkt::internal::UnknownEnumValue::Integer(value),
17063                )),
17064            }
17065        }
17066    }
17067
17068    impl std::convert::From<&str> for MuteState {
17069        fn from(value: &str) -> Self {
17070            use std::string::ToString;
17071            match value {
17072                "MUTE_STATE_UNSPECIFIED" => Self::Unspecified,
17073                "MUTED" => Self::Muted,
17074                "UNDEFINED" => Self::Undefined,
17075                _ => Self::UnknownValue(mute_state::UnknownValue(
17076                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17077                )),
17078            }
17079        }
17080    }
17081
17082    impl serde::ser::Serialize for MuteState {
17083        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17084        where
17085            S: serde::Serializer,
17086        {
17087            match self {
17088                Self::Unspecified => serializer.serialize_i32(0),
17089                Self::Muted => serializer.serialize_i32(1),
17090                Self::Undefined => serializer.serialize_i32(2),
17091                Self::UnknownValue(u) => u.0.serialize(serializer),
17092            }
17093        }
17094    }
17095
17096    impl<'de> serde::de::Deserialize<'de> for MuteState {
17097        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17098        where
17099            D: serde::Deserializer<'de>,
17100        {
17101            deserializer.deserialize_any(wkt::internal::EnumVisitor::<MuteState>::new(
17102                ".google.cloud.securitycenter.v2.BulkMuteFindingsRequest.MuteState",
17103            ))
17104        }
17105    }
17106}
17107
17108/// The response to a BulkMute request. Contains the LRO information.
17109#[derive(Clone, Default, PartialEq)]
17110#[non_exhaustive]
17111pub struct BulkMuteFindingsResponse {
17112    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17113}
17114
17115impl BulkMuteFindingsResponse {
17116    /// Creates a new default instance.
17117    pub fn new() -> Self {
17118        std::default::Default::default()
17119    }
17120}
17121
17122impl wkt::message::Message for BulkMuteFindingsResponse {
17123    fn typename() -> &'static str {
17124        "type.googleapis.com/google.cloud.securitycenter.v2.BulkMuteFindingsResponse"
17125    }
17126}
17127
17128/// Request message for creating a BigQuery export.
17129#[derive(Clone, Default, PartialEq)]
17130#[non_exhaustive]
17131pub struct CreateBigQueryExportRequest {
17132    /// Required. The name of the parent resource of the new BigQuery export. Its
17133    /// format is `organizations/[organization_id]/locations/[location_id]`,
17134    /// `folders/[folder_id]/locations/[location_id]`, or
17135    /// `projects/[project_id]/locations/[location_id]`.
17136    pub parent: std::string::String,
17137
17138    /// Required. The BigQuery export being created.
17139    pub big_query_export: std::option::Option<crate::model::BigQueryExport>,
17140
17141    /// Required. Unique identifier provided by the client within the parent scope.
17142    /// It must consist of only lowercase letters, numbers, and hyphens, must start
17143    /// with a letter, must end with either a letter or a number, and must be 63
17144    /// characters or less.
17145    pub big_query_export_id: std::string::String,
17146
17147    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17148}
17149
17150impl CreateBigQueryExportRequest {
17151    /// Creates a new default instance.
17152    pub fn new() -> Self {
17153        std::default::Default::default()
17154    }
17155
17156    /// Sets the value of [parent][crate::model::CreateBigQueryExportRequest::parent].
17157    ///
17158    /// # Example
17159    /// ```ignore,no_run
17160    /// # use google_cloud_securitycenter_v2::model::CreateBigQueryExportRequest;
17161    /// # let organization_id = "organization_id";
17162    /// # let location_id = "location_id";
17163    /// let x = CreateBigQueryExportRequest::new().set_parent(format!("organizations/{organization_id}/locations/{location_id}"));
17164    /// ```
17165    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17166        self.parent = v.into();
17167        self
17168    }
17169
17170    /// Sets the value of [big_query_export][crate::model::CreateBigQueryExportRequest::big_query_export].
17171    ///
17172    /// # Example
17173    /// ```ignore,no_run
17174    /// # use google_cloud_securitycenter_v2::model::CreateBigQueryExportRequest;
17175    /// use google_cloud_securitycenter_v2::model::BigQueryExport;
17176    /// let x = CreateBigQueryExportRequest::new().set_big_query_export(BigQueryExport::default()/* use setters */);
17177    /// ```
17178    pub fn set_big_query_export<T>(mut self, v: T) -> Self
17179    where
17180        T: std::convert::Into<crate::model::BigQueryExport>,
17181    {
17182        self.big_query_export = std::option::Option::Some(v.into());
17183        self
17184    }
17185
17186    /// Sets or clears the value of [big_query_export][crate::model::CreateBigQueryExportRequest::big_query_export].
17187    ///
17188    /// # Example
17189    /// ```ignore,no_run
17190    /// # use google_cloud_securitycenter_v2::model::CreateBigQueryExportRequest;
17191    /// use google_cloud_securitycenter_v2::model::BigQueryExport;
17192    /// let x = CreateBigQueryExportRequest::new().set_or_clear_big_query_export(Some(BigQueryExport::default()/* use setters */));
17193    /// let x = CreateBigQueryExportRequest::new().set_or_clear_big_query_export(None::<BigQueryExport>);
17194    /// ```
17195    pub fn set_or_clear_big_query_export<T>(mut self, v: std::option::Option<T>) -> Self
17196    where
17197        T: std::convert::Into<crate::model::BigQueryExport>,
17198    {
17199        self.big_query_export = v.map(|x| x.into());
17200        self
17201    }
17202
17203    /// Sets the value of [big_query_export_id][crate::model::CreateBigQueryExportRequest::big_query_export_id].
17204    ///
17205    /// # Example
17206    /// ```ignore,no_run
17207    /// # use google_cloud_securitycenter_v2::model::CreateBigQueryExportRequest;
17208    /// let x = CreateBigQueryExportRequest::new().set_big_query_export_id("example");
17209    /// ```
17210    pub fn set_big_query_export_id<T: std::convert::Into<std::string::String>>(
17211        mut self,
17212        v: T,
17213    ) -> Self {
17214        self.big_query_export_id = v.into();
17215        self
17216    }
17217}
17218
17219impl wkt::message::Message for CreateBigQueryExportRequest {
17220    fn typename() -> &'static str {
17221        "type.googleapis.com/google.cloud.securitycenter.v2.CreateBigQueryExportRequest"
17222    }
17223}
17224
17225/// Request message for creating a finding.
17226#[derive(Clone, Default, PartialEq)]
17227#[non_exhaustive]
17228pub struct CreateFindingRequest {
17229    /// Required. Resource name of the new finding's parent. The following list
17230    /// shows some examples of the format:
17231    /// +
17232    /// `organizations/[organization_id]/sources/[source_id]`
17233    /// +
17234    /// `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
17235    pub parent: std::string::String,
17236
17237    /// Required. Unique identifier provided by the client within the parent scope.
17238    /// It must be alphanumeric and less than or equal to 32 characters and
17239    /// greater than 0 characters in length.
17240    pub finding_id: std::string::String,
17241
17242    /// Required. The Finding being created. The name and security_marks will be
17243    /// ignored as they are both output only fields on this resource.
17244    pub finding: std::option::Option<crate::model::Finding>,
17245
17246    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17247}
17248
17249impl CreateFindingRequest {
17250    /// Creates a new default instance.
17251    pub fn new() -> Self {
17252        std::default::Default::default()
17253    }
17254
17255    /// Sets the value of [parent][crate::model::CreateFindingRequest::parent].
17256    ///
17257    /// # Example
17258    /// ```ignore,no_run
17259    /// # use google_cloud_securitycenter_v2::model::CreateFindingRequest;
17260    /// # let organization_id = "organization_id";
17261    /// # let source_id = "source_id";
17262    /// let x = CreateFindingRequest::new().set_parent(format!("organizations/{organization_id}/sources/{source_id}"));
17263    /// ```
17264    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17265        self.parent = v.into();
17266        self
17267    }
17268
17269    /// Sets the value of [finding_id][crate::model::CreateFindingRequest::finding_id].
17270    ///
17271    /// # Example
17272    /// ```ignore,no_run
17273    /// # use google_cloud_securitycenter_v2::model::CreateFindingRequest;
17274    /// let x = CreateFindingRequest::new().set_finding_id("example");
17275    /// ```
17276    pub fn set_finding_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17277        self.finding_id = v.into();
17278        self
17279    }
17280
17281    /// Sets the value of [finding][crate::model::CreateFindingRequest::finding].
17282    ///
17283    /// # Example
17284    /// ```ignore,no_run
17285    /// # use google_cloud_securitycenter_v2::model::CreateFindingRequest;
17286    /// use google_cloud_securitycenter_v2::model::Finding;
17287    /// let x = CreateFindingRequest::new().set_finding(Finding::default()/* use setters */);
17288    /// ```
17289    pub fn set_finding<T>(mut self, v: T) -> Self
17290    where
17291        T: std::convert::Into<crate::model::Finding>,
17292    {
17293        self.finding = std::option::Option::Some(v.into());
17294        self
17295    }
17296
17297    /// Sets or clears the value of [finding][crate::model::CreateFindingRequest::finding].
17298    ///
17299    /// # Example
17300    /// ```ignore,no_run
17301    /// # use google_cloud_securitycenter_v2::model::CreateFindingRequest;
17302    /// use google_cloud_securitycenter_v2::model::Finding;
17303    /// let x = CreateFindingRequest::new().set_or_clear_finding(Some(Finding::default()/* use setters */));
17304    /// let x = CreateFindingRequest::new().set_or_clear_finding(None::<Finding>);
17305    /// ```
17306    pub fn set_or_clear_finding<T>(mut self, v: std::option::Option<T>) -> Self
17307    where
17308        T: std::convert::Into<crate::model::Finding>,
17309    {
17310        self.finding = v.map(|x| x.into());
17311        self
17312    }
17313}
17314
17315impl wkt::message::Message for CreateFindingRequest {
17316    fn typename() -> &'static str {
17317        "type.googleapis.com/google.cloud.securitycenter.v2.CreateFindingRequest"
17318    }
17319}
17320
17321/// Request message for creating a mute config.
17322#[derive(Clone, Default, PartialEq)]
17323#[non_exhaustive]
17324pub struct CreateMuteConfigRequest {
17325    /// Required. Resource name of the new mute configs's parent. Its format is
17326    /// `organizations/[organization_id]/locations/[location_id]`,
17327    /// `folders/[folder_id]/locations/[location_id]`, or
17328    /// `projects/[project_id]/locations/[location_id]`.
17329    pub parent: std::string::String,
17330
17331    /// Required. The mute config being created.
17332    pub mute_config: std::option::Option<crate::model::MuteConfig>,
17333
17334    /// Required. Unique identifier provided by the client within the parent scope.
17335    /// It must consist of only lowercase letters, numbers, and hyphens, must start
17336    /// with a letter, must end with either a letter or a number, and must be 63
17337    /// characters or less.
17338    pub mute_config_id: std::string::String,
17339
17340    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17341}
17342
17343impl CreateMuteConfigRequest {
17344    /// Creates a new default instance.
17345    pub fn new() -> Self {
17346        std::default::Default::default()
17347    }
17348
17349    /// Sets the value of [parent][crate::model::CreateMuteConfigRequest::parent].
17350    ///
17351    /// # Example
17352    /// ```ignore,no_run
17353    /// # use google_cloud_securitycenter_v2::model::CreateMuteConfigRequest;
17354    /// # let organization_id = "organization_id";
17355    /// let x = CreateMuteConfigRequest::new().set_parent(format!("organizations/{organization_id}"));
17356    /// ```
17357    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17358        self.parent = v.into();
17359        self
17360    }
17361
17362    /// Sets the value of [mute_config][crate::model::CreateMuteConfigRequest::mute_config].
17363    ///
17364    /// # Example
17365    /// ```ignore,no_run
17366    /// # use google_cloud_securitycenter_v2::model::CreateMuteConfigRequest;
17367    /// use google_cloud_securitycenter_v2::model::MuteConfig;
17368    /// let x = CreateMuteConfigRequest::new().set_mute_config(MuteConfig::default()/* use setters */);
17369    /// ```
17370    pub fn set_mute_config<T>(mut self, v: T) -> Self
17371    where
17372        T: std::convert::Into<crate::model::MuteConfig>,
17373    {
17374        self.mute_config = std::option::Option::Some(v.into());
17375        self
17376    }
17377
17378    /// Sets or clears the value of [mute_config][crate::model::CreateMuteConfigRequest::mute_config].
17379    ///
17380    /// # Example
17381    /// ```ignore,no_run
17382    /// # use google_cloud_securitycenter_v2::model::CreateMuteConfigRequest;
17383    /// use google_cloud_securitycenter_v2::model::MuteConfig;
17384    /// let x = CreateMuteConfigRequest::new().set_or_clear_mute_config(Some(MuteConfig::default()/* use setters */));
17385    /// let x = CreateMuteConfigRequest::new().set_or_clear_mute_config(None::<MuteConfig>);
17386    /// ```
17387    pub fn set_or_clear_mute_config<T>(mut self, v: std::option::Option<T>) -> Self
17388    where
17389        T: std::convert::Into<crate::model::MuteConfig>,
17390    {
17391        self.mute_config = v.map(|x| x.into());
17392        self
17393    }
17394
17395    /// Sets the value of [mute_config_id][crate::model::CreateMuteConfigRequest::mute_config_id].
17396    ///
17397    /// # Example
17398    /// ```ignore,no_run
17399    /// # use google_cloud_securitycenter_v2::model::CreateMuteConfigRequest;
17400    /// let x = CreateMuteConfigRequest::new().set_mute_config_id("example");
17401    /// ```
17402    pub fn set_mute_config_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17403        self.mute_config_id = v.into();
17404        self
17405    }
17406}
17407
17408impl wkt::message::Message for CreateMuteConfigRequest {
17409    fn typename() -> &'static str {
17410        "type.googleapis.com/google.cloud.securitycenter.v2.CreateMuteConfigRequest"
17411    }
17412}
17413
17414/// Request message for creating a notification config.
17415#[derive(Clone, Default, PartialEq)]
17416#[non_exhaustive]
17417pub struct CreateNotificationConfigRequest {
17418    /// Required. Resource name of the new notification config's parent. Its format
17419    /// is `organizations/[organization_id]/locations/[location_id]`,
17420    /// `folders/[folder_id]/locations/[location_id]`, or
17421    /// `projects/[project_id]/locations/[location_id]`.
17422    pub parent: std::string::String,
17423
17424    /// Required.
17425    /// Unique identifier provided by the client within the parent scope.
17426    /// It must be between 1 and 128 characters and contain alphanumeric
17427    /// characters, underscores, or hyphens only.
17428    pub config_id: std::string::String,
17429
17430    /// Required. The notification config being created. The name and the service
17431    /// account will be ignored as they are both output only fields on this
17432    /// resource.
17433    pub notification_config: std::option::Option<crate::model::NotificationConfig>,
17434
17435    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17436}
17437
17438impl CreateNotificationConfigRequest {
17439    /// Creates a new default instance.
17440    pub fn new() -> Self {
17441        std::default::Default::default()
17442    }
17443
17444    /// Sets the value of [parent][crate::model::CreateNotificationConfigRequest::parent].
17445    ///
17446    /// # Example
17447    /// ```ignore,no_run
17448    /// # use google_cloud_securitycenter_v2::model::CreateNotificationConfigRequest;
17449    /// # let organization_id = "organization_id";
17450    /// # let location_id = "location_id";
17451    /// let x = CreateNotificationConfigRequest::new().set_parent(format!("organizations/{organization_id}/locations/{location_id}"));
17452    /// ```
17453    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17454        self.parent = v.into();
17455        self
17456    }
17457
17458    /// Sets the value of [config_id][crate::model::CreateNotificationConfigRequest::config_id].
17459    ///
17460    /// # Example
17461    /// ```ignore,no_run
17462    /// # use google_cloud_securitycenter_v2::model::CreateNotificationConfigRequest;
17463    /// let x = CreateNotificationConfigRequest::new().set_config_id("example");
17464    /// ```
17465    pub fn set_config_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17466        self.config_id = v.into();
17467        self
17468    }
17469
17470    /// Sets the value of [notification_config][crate::model::CreateNotificationConfigRequest::notification_config].
17471    ///
17472    /// # Example
17473    /// ```ignore,no_run
17474    /// # use google_cloud_securitycenter_v2::model::CreateNotificationConfigRequest;
17475    /// use google_cloud_securitycenter_v2::model::NotificationConfig;
17476    /// let x = CreateNotificationConfigRequest::new().set_notification_config(NotificationConfig::default()/* use setters */);
17477    /// ```
17478    pub fn set_notification_config<T>(mut self, v: T) -> Self
17479    where
17480        T: std::convert::Into<crate::model::NotificationConfig>,
17481    {
17482        self.notification_config = std::option::Option::Some(v.into());
17483        self
17484    }
17485
17486    /// Sets or clears the value of [notification_config][crate::model::CreateNotificationConfigRequest::notification_config].
17487    ///
17488    /// # Example
17489    /// ```ignore,no_run
17490    /// # use google_cloud_securitycenter_v2::model::CreateNotificationConfigRequest;
17491    /// use google_cloud_securitycenter_v2::model::NotificationConfig;
17492    /// let x = CreateNotificationConfigRequest::new().set_or_clear_notification_config(Some(NotificationConfig::default()/* use setters */));
17493    /// let x = CreateNotificationConfigRequest::new().set_or_clear_notification_config(None::<NotificationConfig>);
17494    /// ```
17495    pub fn set_or_clear_notification_config<T>(mut self, v: std::option::Option<T>) -> Self
17496    where
17497        T: std::convert::Into<crate::model::NotificationConfig>,
17498    {
17499        self.notification_config = v.map(|x| x.into());
17500        self
17501    }
17502}
17503
17504impl wkt::message::Message for CreateNotificationConfigRequest {
17505    fn typename() -> &'static str {
17506        "type.googleapis.com/google.cloud.securitycenter.v2.CreateNotificationConfigRequest"
17507    }
17508}
17509
17510/// Request message to create single resource value config
17511#[derive(Clone, Default, PartialEq)]
17512#[non_exhaustive]
17513pub struct CreateResourceValueConfigRequest {
17514    /// Required. Resource name of the new ResourceValueConfig's parent.
17515    pub parent: std::string::String,
17516
17517    /// Required. The resource value config being created.
17518    pub resource_value_config: std::option::Option<crate::model::ResourceValueConfig>,
17519
17520    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17521}
17522
17523impl CreateResourceValueConfigRequest {
17524    /// Creates a new default instance.
17525    pub fn new() -> Self {
17526        std::default::Default::default()
17527    }
17528
17529    /// Sets the value of [parent][crate::model::CreateResourceValueConfigRequest::parent].
17530    ///
17531    /// # Example
17532    /// ```ignore,no_run
17533    /// # use google_cloud_securitycenter_v2::model::CreateResourceValueConfigRequest;
17534    /// # let organization_id = "organization_id";
17535    /// let x = CreateResourceValueConfigRequest::new().set_parent(format!("organizations/{organization_id}"));
17536    /// ```
17537    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17538        self.parent = v.into();
17539        self
17540    }
17541
17542    /// Sets the value of [resource_value_config][crate::model::CreateResourceValueConfigRequest::resource_value_config].
17543    ///
17544    /// # Example
17545    /// ```ignore,no_run
17546    /// # use google_cloud_securitycenter_v2::model::CreateResourceValueConfigRequest;
17547    /// use google_cloud_securitycenter_v2::model::ResourceValueConfig;
17548    /// let x = CreateResourceValueConfigRequest::new().set_resource_value_config(ResourceValueConfig::default()/* use setters */);
17549    /// ```
17550    pub fn set_resource_value_config<T>(mut self, v: T) -> Self
17551    where
17552        T: std::convert::Into<crate::model::ResourceValueConfig>,
17553    {
17554        self.resource_value_config = std::option::Option::Some(v.into());
17555        self
17556    }
17557
17558    /// Sets or clears the value of [resource_value_config][crate::model::CreateResourceValueConfigRequest::resource_value_config].
17559    ///
17560    /// # Example
17561    /// ```ignore,no_run
17562    /// # use google_cloud_securitycenter_v2::model::CreateResourceValueConfigRequest;
17563    /// use google_cloud_securitycenter_v2::model::ResourceValueConfig;
17564    /// let x = CreateResourceValueConfigRequest::new().set_or_clear_resource_value_config(Some(ResourceValueConfig::default()/* use setters */));
17565    /// let x = CreateResourceValueConfigRequest::new().set_or_clear_resource_value_config(None::<ResourceValueConfig>);
17566    /// ```
17567    pub fn set_or_clear_resource_value_config<T>(mut self, v: std::option::Option<T>) -> Self
17568    where
17569        T: std::convert::Into<crate::model::ResourceValueConfig>,
17570    {
17571        self.resource_value_config = v.map(|x| x.into());
17572        self
17573    }
17574}
17575
17576impl wkt::message::Message for CreateResourceValueConfigRequest {
17577    fn typename() -> &'static str {
17578        "type.googleapis.com/google.cloud.securitycenter.v2.CreateResourceValueConfigRequest"
17579    }
17580}
17581
17582/// Request message for creating a source.
17583#[derive(Clone, Default, PartialEq)]
17584#[non_exhaustive]
17585pub struct CreateSourceRequest {
17586    /// Required. Resource name of the new source's parent. Its format should be
17587    /// `organizations/[organization_id]`.
17588    pub parent: std::string::String,
17589
17590    /// Required. The Source being created, only the display_name and description
17591    /// will be used. All other fields will be ignored.
17592    pub source: std::option::Option<crate::model::Source>,
17593
17594    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17595}
17596
17597impl CreateSourceRequest {
17598    /// Creates a new default instance.
17599    pub fn new() -> Self {
17600        std::default::Default::default()
17601    }
17602
17603    /// Sets the value of [parent][crate::model::CreateSourceRequest::parent].
17604    ///
17605    /// # Example
17606    /// ```ignore,no_run
17607    /// # use google_cloud_securitycenter_v2::model::CreateSourceRequest;
17608    /// let x = CreateSourceRequest::new().set_parent("example");
17609    /// ```
17610    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17611        self.parent = v.into();
17612        self
17613    }
17614
17615    /// Sets the value of [source][crate::model::CreateSourceRequest::source].
17616    ///
17617    /// # Example
17618    /// ```ignore,no_run
17619    /// # use google_cloud_securitycenter_v2::model::CreateSourceRequest;
17620    /// use google_cloud_securitycenter_v2::model::Source;
17621    /// let x = CreateSourceRequest::new().set_source(Source::default()/* use setters */);
17622    /// ```
17623    pub fn set_source<T>(mut self, v: T) -> Self
17624    where
17625        T: std::convert::Into<crate::model::Source>,
17626    {
17627        self.source = std::option::Option::Some(v.into());
17628        self
17629    }
17630
17631    /// Sets or clears the value of [source][crate::model::CreateSourceRequest::source].
17632    ///
17633    /// # Example
17634    /// ```ignore,no_run
17635    /// # use google_cloud_securitycenter_v2::model::CreateSourceRequest;
17636    /// use google_cloud_securitycenter_v2::model::Source;
17637    /// let x = CreateSourceRequest::new().set_or_clear_source(Some(Source::default()/* use setters */));
17638    /// let x = CreateSourceRequest::new().set_or_clear_source(None::<Source>);
17639    /// ```
17640    pub fn set_or_clear_source<T>(mut self, v: std::option::Option<T>) -> Self
17641    where
17642        T: std::convert::Into<crate::model::Source>,
17643    {
17644        self.source = v.map(|x| x.into());
17645        self
17646    }
17647}
17648
17649impl wkt::message::Message for CreateSourceRequest {
17650    fn typename() -> &'static str {
17651        "type.googleapis.com/google.cloud.securitycenter.v2.CreateSourceRequest"
17652    }
17653}
17654
17655/// Request message for deleting a BigQuery export.
17656#[derive(Clone, Default, PartialEq)]
17657#[non_exhaustive]
17658pub struct DeleteBigQueryExportRequest {
17659    /// Required. The name of the BigQuery export to delete. The following list
17660    /// shows some examples of the format:
17661    ///
17662    ///
17663    /// `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
17664    ///
17665    /// + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
17666    /// + `projects/{project}/locations/{location}/bigQueryExports/{export_id}`
17667    pub name: std::string::String,
17668
17669    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17670}
17671
17672impl DeleteBigQueryExportRequest {
17673    /// Creates a new default instance.
17674    pub fn new() -> Self {
17675        std::default::Default::default()
17676    }
17677
17678    /// Sets the value of [name][crate::model::DeleteBigQueryExportRequest::name].
17679    ///
17680    /// # Example
17681    /// ```ignore,no_run
17682    /// # use google_cloud_securitycenter_v2::model::DeleteBigQueryExportRequest;
17683    /// # let organization_id = "organization_id";
17684    /// # let location_id = "location_id";
17685    /// # let export_id = "export_id";
17686    /// let x = DeleteBigQueryExportRequest::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}"));
17687    /// ```
17688    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17689        self.name = v.into();
17690        self
17691    }
17692}
17693
17694impl wkt::message::Message for DeleteBigQueryExportRequest {
17695    fn typename() -> &'static str {
17696        "type.googleapis.com/google.cloud.securitycenter.v2.DeleteBigQueryExportRequest"
17697    }
17698}
17699
17700/// Request message for deleting a mute config. If no location is specified,
17701/// default is global.
17702#[derive(Clone, Default, PartialEq)]
17703#[non_exhaustive]
17704pub struct DeleteMuteConfigRequest {
17705    /// Required. Name of the mute config to delete. The following list shows some
17706    /// examples of the format:
17707    ///
17708    /// + `organizations/{organization}/muteConfigs/{config_id}`
17709    ///
17710    /// `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
17711    ///
17712    /// + `folders/{folder}/muteConfigs/{config_id}`
17713    /// + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
17714    /// + `projects/{project}/muteConfigs/{config_id}`
17715    /// + `projects/{project}/locations/{location}/muteConfigs/{config_id}`
17716    pub name: std::string::String,
17717
17718    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17719}
17720
17721impl DeleteMuteConfigRequest {
17722    /// Creates a new default instance.
17723    pub fn new() -> Self {
17724        std::default::Default::default()
17725    }
17726
17727    /// Sets the value of [name][crate::model::DeleteMuteConfigRequest::name].
17728    ///
17729    /// # Example
17730    /// ```ignore,no_run
17731    /// # use google_cloud_securitycenter_v2::model::DeleteMuteConfigRequest;
17732    /// # let organization_id = "organization_id";
17733    /// # let mute_config_id = "mute_config_id";
17734    /// let x = DeleteMuteConfigRequest::new().set_name(format!("organizations/{organization_id}/muteConfigs/{mute_config_id}"));
17735    /// ```
17736    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17737        self.name = v.into();
17738        self
17739    }
17740}
17741
17742impl wkt::message::Message for DeleteMuteConfigRequest {
17743    fn typename() -> &'static str {
17744        "type.googleapis.com/google.cloud.securitycenter.v2.DeleteMuteConfigRequest"
17745    }
17746}
17747
17748/// Request message for deleting a notification config.
17749#[derive(Clone, Default, PartialEq)]
17750#[non_exhaustive]
17751pub struct DeleteNotificationConfigRequest {
17752    /// Required. Name of the notification config to delete. The following list
17753    /// shows some examples of the format:
17754    ///
17755    ///
17756    /// `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
17757    /// +
17758    /// `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]`
17759    /// +
17760    /// `projects/[project_id]/locations/[location_id]notificationConfigs/[config_id]`
17761    pub name: std::string::String,
17762
17763    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17764}
17765
17766impl DeleteNotificationConfigRequest {
17767    /// Creates a new default instance.
17768    pub fn new() -> Self {
17769        std::default::Default::default()
17770    }
17771
17772    /// Sets the value of [name][crate::model::DeleteNotificationConfigRequest::name].
17773    ///
17774    /// # Example
17775    /// ```ignore,no_run
17776    /// # use google_cloud_securitycenter_v2::model::DeleteNotificationConfigRequest;
17777    /// # let organization_id = "organization_id";
17778    /// # let location_id = "location_id";
17779    /// # let notification_config_id = "notification_config_id";
17780    /// let x = DeleteNotificationConfigRequest::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/notificationConfigs/{notification_config_id}"));
17781    /// ```
17782    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17783        self.name = v.into();
17784        self
17785    }
17786}
17787
17788impl wkt::message::Message for DeleteNotificationConfigRequest {
17789    fn typename() -> &'static str {
17790        "type.googleapis.com/google.cloud.securitycenter.v2.DeleteNotificationConfigRequest"
17791    }
17792}
17793
17794/// Request message to delete resource value config
17795#[derive(Clone, Default, PartialEq)]
17796#[non_exhaustive]
17797pub struct DeleteResourceValueConfigRequest {
17798    /// Required. Name of the ResourceValueConfig to delete
17799    pub name: std::string::String,
17800
17801    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17802}
17803
17804impl DeleteResourceValueConfigRequest {
17805    /// Creates a new default instance.
17806    pub fn new() -> Self {
17807        std::default::Default::default()
17808    }
17809
17810    /// Sets the value of [name][crate::model::DeleteResourceValueConfigRequest::name].
17811    ///
17812    /// # Example
17813    /// ```ignore,no_run
17814    /// # use google_cloud_securitycenter_v2::model::DeleteResourceValueConfigRequest;
17815    /// # let organization_id = "organization_id";
17816    /// # let resource_value_config_id = "resource_value_config_id";
17817    /// let x = DeleteResourceValueConfigRequest::new().set_name(format!("organizations/{organization_id}/resourceValueConfigs/{resource_value_config_id}"));
17818    /// ```
17819    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17820        self.name = v.into();
17821        self
17822    }
17823}
17824
17825impl wkt::message::Message for DeleteResourceValueConfigRequest {
17826    fn typename() -> &'static str {
17827        "type.googleapis.com/google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest"
17828    }
17829}
17830
17831/// The destination big query dataset to export findings to.
17832#[derive(Clone, Default, PartialEq)]
17833#[non_exhaustive]
17834pub struct BigQueryDestination {
17835    /// Required. The relative resource name of the destination dataset, in the
17836    /// form projects/{projectId}/datasets/{datasetId}.
17837    pub dataset: std::string::String,
17838
17839    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17840}
17841
17842impl BigQueryDestination {
17843    /// Creates a new default instance.
17844    pub fn new() -> Self {
17845        std::default::Default::default()
17846    }
17847
17848    /// Sets the value of [dataset][crate::model::BigQueryDestination::dataset].
17849    ///
17850    /// # Example
17851    /// ```ignore,no_run
17852    /// # use google_cloud_securitycenter_v2::model::BigQueryDestination;
17853    /// let x = BigQueryDestination::new().set_dataset("example");
17854    /// ```
17855    pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17856        self.dataset = v.into();
17857        self
17858    }
17859}
17860
17861impl wkt::message::Message for BigQueryDestination {
17862    fn typename() -> &'static str {
17863        "type.googleapis.com/google.cloud.securitycenter.v2.BigQueryDestination"
17864    }
17865}
17866
17867/// The LRO metadata for a ExportFindings request.
17868#[derive(Clone, Default, PartialEq)]
17869#[non_exhaustive]
17870pub struct ExportFindingsMetadata {
17871    /// Optional. Timestamp at which export was started
17872    pub export_start_time: std::option::Option<wkt::Timestamp>,
17873
17874    /// The destination to export findings to.
17875    pub destination: std::option::Option<crate::model::export_findings_metadata::Destination>,
17876
17877    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17878}
17879
17880impl ExportFindingsMetadata {
17881    /// Creates a new default instance.
17882    pub fn new() -> Self {
17883        std::default::Default::default()
17884    }
17885
17886    /// Sets the value of [export_start_time][crate::model::ExportFindingsMetadata::export_start_time].
17887    ///
17888    /// # Example
17889    /// ```ignore,no_run
17890    /// # use google_cloud_securitycenter_v2::model::ExportFindingsMetadata;
17891    /// use wkt::Timestamp;
17892    /// let x = ExportFindingsMetadata::new().set_export_start_time(Timestamp::default()/* use setters */);
17893    /// ```
17894    pub fn set_export_start_time<T>(mut self, v: T) -> Self
17895    where
17896        T: std::convert::Into<wkt::Timestamp>,
17897    {
17898        self.export_start_time = std::option::Option::Some(v.into());
17899        self
17900    }
17901
17902    /// Sets or clears the value of [export_start_time][crate::model::ExportFindingsMetadata::export_start_time].
17903    ///
17904    /// # Example
17905    /// ```ignore,no_run
17906    /// # use google_cloud_securitycenter_v2::model::ExportFindingsMetadata;
17907    /// use wkt::Timestamp;
17908    /// let x = ExportFindingsMetadata::new().set_or_clear_export_start_time(Some(Timestamp::default()/* use setters */));
17909    /// let x = ExportFindingsMetadata::new().set_or_clear_export_start_time(None::<Timestamp>);
17910    /// ```
17911    pub fn set_or_clear_export_start_time<T>(mut self, v: std::option::Option<T>) -> Self
17912    where
17913        T: std::convert::Into<wkt::Timestamp>,
17914    {
17915        self.export_start_time = v.map(|x| x.into());
17916        self
17917    }
17918
17919    /// Sets the value of [destination][crate::model::ExportFindingsMetadata::destination].
17920    ///
17921    /// Note that all the setters affecting `destination` are mutually
17922    /// exclusive.
17923    ///
17924    /// # Example
17925    /// ```ignore,no_run
17926    /// # use google_cloud_securitycenter_v2::model::ExportFindingsMetadata;
17927    /// use google_cloud_securitycenter_v2::model::BigQueryDestination;
17928    /// let x = ExportFindingsMetadata::new().set_destination(Some(
17929    ///     google_cloud_securitycenter_v2::model::export_findings_metadata::Destination::BigQueryDestination(BigQueryDestination::default().into())));
17930    /// ```
17931    pub fn set_destination<
17932        T: std::convert::Into<
17933                std::option::Option<crate::model::export_findings_metadata::Destination>,
17934            >,
17935    >(
17936        mut self,
17937        v: T,
17938    ) -> Self {
17939        self.destination = v.into();
17940        self
17941    }
17942
17943    /// The value of [destination][crate::model::ExportFindingsMetadata::destination]
17944    /// if it holds a `BigQueryDestination`, `None` if the field is not set or
17945    /// holds a different branch.
17946    pub fn big_query_destination(
17947        &self,
17948    ) -> std::option::Option<&std::boxed::Box<crate::model::BigQueryDestination>> {
17949        #[allow(unreachable_patterns)]
17950        self.destination.as_ref().and_then(|v| match v {
17951            crate::model::export_findings_metadata::Destination::BigQueryDestination(v) => {
17952                std::option::Option::Some(v)
17953            }
17954            _ => std::option::Option::None,
17955        })
17956    }
17957
17958    /// Sets the value of [destination][crate::model::ExportFindingsMetadata::destination]
17959    /// to hold a `BigQueryDestination`.
17960    ///
17961    /// Note that all the setters affecting `destination` are
17962    /// mutually exclusive.
17963    ///
17964    /// # Example
17965    /// ```ignore,no_run
17966    /// # use google_cloud_securitycenter_v2::model::ExportFindingsMetadata;
17967    /// use google_cloud_securitycenter_v2::model::BigQueryDestination;
17968    /// let x = ExportFindingsMetadata::new().set_big_query_destination(BigQueryDestination::default()/* use setters */);
17969    /// assert!(x.big_query_destination().is_some());
17970    /// ```
17971    pub fn set_big_query_destination<
17972        T: std::convert::Into<std::boxed::Box<crate::model::BigQueryDestination>>,
17973    >(
17974        mut self,
17975        v: T,
17976    ) -> Self {
17977        self.destination = std::option::Option::Some(
17978            crate::model::export_findings_metadata::Destination::BigQueryDestination(v.into()),
17979        );
17980        self
17981    }
17982}
17983
17984impl wkt::message::Message for ExportFindingsMetadata {
17985    fn typename() -> &'static str {
17986        "type.googleapis.com/google.cloud.securitycenter.v2.ExportFindingsMetadata"
17987    }
17988}
17989
17990/// Defines additional types related to [ExportFindingsMetadata].
17991pub mod export_findings_metadata {
17992    #[allow(unused_imports)]
17993    use super::*;
17994
17995    /// The destination to export findings to.
17996    #[derive(Clone, Debug, PartialEq)]
17997    #[non_exhaustive]
17998    pub enum Destination {
17999        /// Required. The destination big query dataset to export findings to.
18000        BigQueryDestination(std::boxed::Box<crate::model::BigQueryDestination>),
18001    }
18002}
18003
18004/// The response to a ExportFindings request. Contains the LRO information.
18005#[derive(Clone, Default, PartialEq)]
18006#[non_exhaustive]
18007pub struct ExportFindingsResponse {
18008    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18009}
18010
18011impl ExportFindingsResponse {
18012    /// Creates a new default instance.
18013    pub fn new() -> Self {
18014        std::default::Default::default()
18015    }
18016}
18017
18018impl wkt::message::Message for ExportFindingsResponse {
18019    fn typename() -> &'static str {
18020        "type.googleapis.com/google.cloud.securitycenter.v2.ExportFindingsResponse"
18021    }
18022}
18023
18024/// Request message for retrieving a BigQuery export.
18025#[derive(Clone, Default, PartialEq)]
18026#[non_exhaustive]
18027pub struct GetBigQueryExportRequest {
18028    /// Required. Name of the BigQuery export to retrieve. The following list shows
18029    /// some examples of the format:
18030    ///
18031    ///
18032    /// `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
18033    ///
18034    /// + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
18035    /// + `projects/{project}locations/{location}//bigQueryExports/{export_id}`
18036    pub name: std::string::String,
18037
18038    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18039}
18040
18041impl GetBigQueryExportRequest {
18042    /// Creates a new default instance.
18043    pub fn new() -> Self {
18044        std::default::Default::default()
18045    }
18046
18047    /// Sets the value of [name][crate::model::GetBigQueryExportRequest::name].
18048    ///
18049    /// # Example
18050    /// ```ignore,no_run
18051    /// # use google_cloud_securitycenter_v2::model::GetBigQueryExportRequest;
18052    /// # let organization_id = "organization_id";
18053    /// # let location_id = "location_id";
18054    /// # let export_id = "export_id";
18055    /// let x = GetBigQueryExportRequest::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}"));
18056    /// ```
18057    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18058        self.name = v.into();
18059        self
18060    }
18061}
18062
18063impl wkt::message::Message for GetBigQueryExportRequest {
18064    fn typename() -> &'static str {
18065        "type.googleapis.com/google.cloud.securitycenter.v2.GetBigQueryExportRequest"
18066    }
18067}
18068
18069/// Request message for retrieving a mute config. If no location is specified,
18070/// default is global.
18071#[derive(Clone, Default, PartialEq)]
18072#[non_exhaustive]
18073pub struct GetMuteConfigRequest {
18074    /// Required. Name of the mute config to retrieve. The following list shows
18075    /// some examples of the format:
18076    ///
18077    /// + `organizations/{organization}/muteConfigs/{config_id}`
18078    ///
18079    /// `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
18080    ///
18081    /// + `folders/{folder}/muteConfigs/{config_id}`
18082    /// + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
18083    /// + `projects/{project}/muteConfigs/{config_id}`
18084    /// + `projects/{project}/locations/{location}/muteConfigs/{config_id}`
18085    pub name: std::string::String,
18086
18087    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18088}
18089
18090impl GetMuteConfigRequest {
18091    /// Creates a new default instance.
18092    pub fn new() -> Self {
18093        std::default::Default::default()
18094    }
18095
18096    /// Sets the value of [name][crate::model::GetMuteConfigRequest::name].
18097    ///
18098    /// # Example
18099    /// ```ignore,no_run
18100    /// # use google_cloud_securitycenter_v2::model::GetMuteConfigRequest;
18101    /// # let organization_id = "organization_id";
18102    /// # let mute_config_id = "mute_config_id";
18103    /// let x = GetMuteConfigRequest::new().set_name(format!("organizations/{organization_id}/muteConfigs/{mute_config_id}"));
18104    /// ```
18105    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18106        self.name = v.into();
18107        self
18108    }
18109}
18110
18111impl wkt::message::Message for GetMuteConfigRequest {
18112    fn typename() -> &'static str {
18113        "type.googleapis.com/google.cloud.securitycenter.v2.GetMuteConfigRequest"
18114    }
18115}
18116
18117/// Request message for getting a notification config.
18118#[derive(Clone, Default, PartialEq)]
18119#[non_exhaustive]
18120pub struct GetNotificationConfigRequest {
18121    /// Required. Name of the notification config to get. The following list shows
18122    /// some examples of the format:
18123    ///
18124    ///
18125    /// `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
18126    /// +
18127    /// `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]`
18128    /// +
18129    /// `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]`
18130    pub name: std::string::String,
18131
18132    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18133}
18134
18135impl GetNotificationConfigRequest {
18136    /// Creates a new default instance.
18137    pub fn new() -> Self {
18138        std::default::Default::default()
18139    }
18140
18141    /// Sets the value of [name][crate::model::GetNotificationConfigRequest::name].
18142    ///
18143    /// # Example
18144    /// ```ignore,no_run
18145    /// # use google_cloud_securitycenter_v2::model::GetNotificationConfigRequest;
18146    /// # let organization_id = "organization_id";
18147    /// # let location_id = "location_id";
18148    /// # let notification_config_id = "notification_config_id";
18149    /// let x = GetNotificationConfigRequest::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/notificationConfigs/{notification_config_id}"));
18150    /// ```
18151    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18152        self.name = v.into();
18153        self
18154    }
18155}
18156
18157impl wkt::message::Message for GetNotificationConfigRequest {
18158    fn typename() -> &'static str {
18159        "type.googleapis.com/google.cloud.securitycenter.v2.GetNotificationConfigRequest"
18160    }
18161}
18162
18163/// Request message to get resource value config
18164#[derive(Clone, Default, PartialEq)]
18165#[non_exhaustive]
18166pub struct GetResourceValueConfigRequest {
18167    /// Required. Name of the resource value config to retrieve. Its format is
18168    /// organizations/{organization}/resourceValueConfigs/{config_id}.
18169    pub name: std::string::String,
18170
18171    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18172}
18173
18174impl GetResourceValueConfigRequest {
18175    /// Creates a new default instance.
18176    pub fn new() -> Self {
18177        std::default::Default::default()
18178    }
18179
18180    /// Sets the value of [name][crate::model::GetResourceValueConfigRequest::name].
18181    ///
18182    /// # Example
18183    /// ```ignore,no_run
18184    /// # use google_cloud_securitycenter_v2::model::GetResourceValueConfigRequest;
18185    /// # let organization_id = "organization_id";
18186    /// # let resource_value_config_id = "resource_value_config_id";
18187    /// let x = GetResourceValueConfigRequest::new().set_name(format!("organizations/{organization_id}/resourceValueConfigs/{resource_value_config_id}"));
18188    /// ```
18189    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18190        self.name = v.into();
18191        self
18192    }
18193}
18194
18195impl wkt::message::Message for GetResourceValueConfigRequest {
18196    fn typename() -> &'static str {
18197        "type.googleapis.com/google.cloud.securitycenter.v2.GetResourceValueConfigRequest"
18198    }
18199}
18200
18201/// Request message for getting a source.
18202#[derive(Clone, Default, PartialEq)]
18203#[non_exhaustive]
18204pub struct GetSourceRequest {
18205    /// Required. Relative resource name of the source. Its format is
18206    /// `organizations/[organization_id]/source/[source_id]`.
18207    pub name: std::string::String,
18208
18209    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18210}
18211
18212impl GetSourceRequest {
18213    /// Creates a new default instance.
18214    pub fn new() -> Self {
18215        std::default::Default::default()
18216    }
18217
18218    /// Sets the value of [name][crate::model::GetSourceRequest::name].
18219    ///
18220    /// # Example
18221    /// ```ignore,no_run
18222    /// # use google_cloud_securitycenter_v2::model::GetSourceRequest;
18223    /// # let organization_id = "organization_id";
18224    /// # let source_id = "source_id";
18225    /// let x = GetSourceRequest::new().set_name(format!("organizations/{organization_id}/sources/{source_id}"));
18226    /// ```
18227    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18228        self.name = v.into();
18229        self
18230    }
18231}
18232
18233impl wkt::message::Message for GetSourceRequest {
18234    fn typename() -> &'static str {
18235        "type.googleapis.com/google.cloud.securitycenter.v2.GetSourceRequest"
18236    }
18237}
18238
18239/// Request message for grouping by findings.
18240#[derive(Clone, Default, PartialEq)]
18241#[non_exhaustive]
18242pub struct GroupFindingsRequest {
18243    /// Required. Name of the source to groupBy. If no location is specified,
18244    /// finding is assumed to be in global.
18245    /// The following list shows some examples:
18246    ///
18247    /// + `organizations/[organization_id]/sources/[source_id]`
18248    ///
18249    /// `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
18250    ///
18251    /// + `folders/[folder_id]/sources/[source_id]`
18252    /// + `folders/[folder_id]/sources/[source_id]/locations/[location_id]`
18253    /// + `projects/[project_id]/sources/[source_id]`
18254    /// + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
18255    ///
18256    /// To groupBy across all sources provide a source_id of `-`. The following
18257    /// list shows some examples:
18258    ///
18259    /// + `organizations/{organization_id}/sources/-`
18260    /// + `organizations/{organization_id}/sources/-/locations/[location_id]`
18261    /// + `folders/{folder_id}/sources/-`
18262    /// + `folders/{folder_id}/sources/-/locations/[location_id]`
18263    /// + `projects/{project_id}/sources/-`
18264    /// + `projects/{project_id}/sources/-/locations/[location_id]`
18265    pub parent: std::string::String,
18266
18267    /// Expression that defines the filter to apply across findings.
18268    /// The expression is a list of one or more restrictions combined via logical
18269    /// operators `AND` and `OR`.
18270    /// Parentheses are supported, and `OR` has higher precedence than `AND`.
18271    ///
18272    /// Restrictions have the form `<field> <operator> <value>` and may have a `-`
18273    /// character in front of them to indicate negation. Examples include:
18274    ///
18275    /// * name
18276    /// * security_marks.marks.marka
18277    ///
18278    /// The supported operators are:
18279    ///
18280    /// * `=` for all value types.
18281    /// * `>`, `<`, `>=`, `<=` for integer values.
18282    /// * `:`, meaning substring matching, for strings.
18283    ///
18284    /// The supported value types are:
18285    ///
18286    /// * string literals in quotes.
18287    /// * integer literals without quotes.
18288    /// * boolean literals `true` and `false` without quotes.
18289    ///
18290    /// The following field and operator combinations are supported:
18291    ///
18292    /// * name: `=`
18293    ///
18294    /// * parent: `=`, `:`
18295    ///
18296    /// * resource_name: `=`, `:`
18297    ///
18298    /// * state: `=`, `:`
18299    ///
18300    /// * category: `=`, `:`
18301    ///
18302    /// * external_uri: `=`, `:`
18303    ///
18304    /// * event_time: `=`, `>`, `<`, `>=`, `<=`
18305    ///
18306    ///   Usage: This should be milliseconds since epoch or an RFC3339 string.
18307    ///   Examples:
18308    ///   `event_time = "2019-06-10T16:07:18-07:00"`
18309    ///   `event_time = 1560208038000`
18310    ///
18311    /// * severity: `=`, `:`
18312    ///
18313    /// * security_marks.marks: `=`, `:`
18314    ///
18315    /// * resource:
18316    ///
18317    ///   * resource.name: `=`, `:`
18318    ///   * resource.parent_name: `=`, `:`
18319    ///   * resource.parent_display_name: `=`, `:`
18320    ///   * resource.project_name: `=`, `:`
18321    ///   * resource.project_display_name: `=`, `:`
18322    ///   * resource.type: `=`, `:`
18323    pub filter: std::string::String,
18324
18325    /// Required. Expression that defines what assets fields to use for grouping.
18326    /// The string value should follow SQL syntax: comma separated list of fields.
18327    /// For example: "parent,resource_name".
18328    pub group_by: std::string::String,
18329
18330    /// The value returned by the last `GroupFindingsResponse`; indicates
18331    /// that this is a continuation of a prior `GroupFindings` call, and
18332    /// that the system should return the next page of data.
18333    pub page_token: std::string::String,
18334
18335    /// The maximum number of results to return in a single response. Default is
18336    /// 10, minimum is 1, maximum is 1000.
18337    pub page_size: i32,
18338
18339    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18340}
18341
18342impl GroupFindingsRequest {
18343    /// Creates a new default instance.
18344    pub fn new() -> Self {
18345        std::default::Default::default()
18346    }
18347
18348    /// Sets the value of [parent][crate::model::GroupFindingsRequest::parent].
18349    ///
18350    /// # Example
18351    /// ```ignore,no_run
18352    /// # use google_cloud_securitycenter_v2::model::GroupFindingsRequest;
18353    /// # let organization_id = "organization_id";
18354    /// # let source_id = "source_id";
18355    /// let x = GroupFindingsRequest::new().set_parent(format!("organizations/{organization_id}/sources/{source_id}"));
18356    /// ```
18357    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18358        self.parent = v.into();
18359        self
18360    }
18361
18362    /// Sets the value of [filter][crate::model::GroupFindingsRequest::filter].
18363    ///
18364    /// # Example
18365    /// ```ignore,no_run
18366    /// # use google_cloud_securitycenter_v2::model::GroupFindingsRequest;
18367    /// let x = GroupFindingsRequest::new().set_filter("example");
18368    /// ```
18369    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18370        self.filter = v.into();
18371        self
18372    }
18373
18374    /// Sets the value of [group_by][crate::model::GroupFindingsRequest::group_by].
18375    ///
18376    /// # Example
18377    /// ```ignore,no_run
18378    /// # use google_cloud_securitycenter_v2::model::GroupFindingsRequest;
18379    /// let x = GroupFindingsRequest::new().set_group_by("example");
18380    /// ```
18381    pub fn set_group_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18382        self.group_by = v.into();
18383        self
18384    }
18385
18386    /// Sets the value of [page_token][crate::model::GroupFindingsRequest::page_token].
18387    ///
18388    /// # Example
18389    /// ```ignore,no_run
18390    /// # use google_cloud_securitycenter_v2::model::GroupFindingsRequest;
18391    /// let x = GroupFindingsRequest::new().set_page_token("example");
18392    /// ```
18393    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18394        self.page_token = v.into();
18395        self
18396    }
18397
18398    /// Sets the value of [page_size][crate::model::GroupFindingsRequest::page_size].
18399    ///
18400    /// # Example
18401    /// ```ignore,no_run
18402    /// # use google_cloud_securitycenter_v2::model::GroupFindingsRequest;
18403    /// let x = GroupFindingsRequest::new().set_page_size(42);
18404    /// ```
18405    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18406        self.page_size = v.into();
18407        self
18408    }
18409}
18410
18411impl wkt::message::Message for GroupFindingsRequest {
18412    fn typename() -> &'static str {
18413        "type.googleapis.com/google.cloud.securitycenter.v2.GroupFindingsRequest"
18414    }
18415}
18416
18417/// Response message for group by findings.
18418#[derive(Clone, Default, PartialEq)]
18419#[non_exhaustive]
18420pub struct GroupFindingsResponse {
18421    /// Group results. There exists an element for each existing unique
18422    /// combination of property/values. The element contains a count for the number
18423    /// of times those specific property/values appear.
18424    pub group_by_results: std::vec::Vec<crate::model::GroupResult>,
18425
18426    /// Token to retrieve the next page of results, or empty if there are no more
18427    /// results.
18428    pub next_page_token: std::string::String,
18429
18430    /// The total number of results matching the query.
18431    pub total_size: i32,
18432
18433    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18434}
18435
18436impl GroupFindingsResponse {
18437    /// Creates a new default instance.
18438    pub fn new() -> Self {
18439        std::default::Default::default()
18440    }
18441
18442    /// Sets the value of [group_by_results][crate::model::GroupFindingsResponse::group_by_results].
18443    ///
18444    /// # Example
18445    /// ```ignore,no_run
18446    /// # use google_cloud_securitycenter_v2::model::GroupFindingsResponse;
18447    /// use google_cloud_securitycenter_v2::model::GroupResult;
18448    /// let x = GroupFindingsResponse::new()
18449    ///     .set_group_by_results([
18450    ///         GroupResult::default()/* use setters */,
18451    ///         GroupResult::default()/* use (different) setters */,
18452    ///     ]);
18453    /// ```
18454    pub fn set_group_by_results<T, V>(mut self, v: T) -> Self
18455    where
18456        T: std::iter::IntoIterator<Item = V>,
18457        V: std::convert::Into<crate::model::GroupResult>,
18458    {
18459        use std::iter::Iterator;
18460        self.group_by_results = v.into_iter().map(|i| i.into()).collect();
18461        self
18462    }
18463
18464    /// Sets the value of [next_page_token][crate::model::GroupFindingsResponse::next_page_token].
18465    ///
18466    /// # Example
18467    /// ```ignore,no_run
18468    /// # use google_cloud_securitycenter_v2::model::GroupFindingsResponse;
18469    /// let x = GroupFindingsResponse::new().set_next_page_token("example");
18470    /// ```
18471    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18472        self.next_page_token = v.into();
18473        self
18474    }
18475
18476    /// Sets the value of [total_size][crate::model::GroupFindingsResponse::total_size].
18477    ///
18478    /// # Example
18479    /// ```ignore,no_run
18480    /// # use google_cloud_securitycenter_v2::model::GroupFindingsResponse;
18481    /// let x = GroupFindingsResponse::new().set_total_size(42);
18482    /// ```
18483    pub fn set_total_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18484        self.total_size = v.into();
18485        self
18486    }
18487}
18488
18489impl wkt::message::Message for GroupFindingsResponse {
18490    fn typename() -> &'static str {
18491        "type.googleapis.com/google.cloud.securitycenter.v2.GroupFindingsResponse"
18492    }
18493}
18494
18495#[doc(hidden)]
18496impl google_cloud_gax::paginator::internal::PageableResponse for GroupFindingsResponse {
18497    type PageItem = crate::model::GroupResult;
18498
18499    fn items(self) -> std::vec::Vec<Self::PageItem> {
18500        self.group_by_results
18501    }
18502
18503    fn next_page_token(&self) -> std::string::String {
18504        use std::clone::Clone;
18505        self.next_page_token.clone()
18506    }
18507}
18508
18509/// Result containing the properties and count of a groupBy request.
18510#[derive(Clone, Default, PartialEq)]
18511#[non_exhaustive]
18512pub struct GroupResult {
18513    /// Properties matching the groupBy fields in the request.
18514    pub properties: std::collections::HashMap<std::string::String, wkt::Value>,
18515
18516    /// Total count of resources for the given properties.
18517    pub count: i64,
18518
18519    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18520}
18521
18522impl GroupResult {
18523    /// Creates a new default instance.
18524    pub fn new() -> Self {
18525        std::default::Default::default()
18526    }
18527
18528    /// Sets the value of [properties][crate::model::GroupResult::properties].
18529    ///
18530    /// # Example
18531    /// ```ignore,no_run
18532    /// # use google_cloud_securitycenter_v2::model::GroupResult;
18533    /// use wkt::Value;
18534    /// let x = GroupResult::new().set_properties([
18535    ///     ("key0", Value::default()/* use setters */),
18536    ///     ("key1", Value::default()/* use (different) setters */),
18537    /// ]);
18538    /// ```
18539    pub fn set_properties<T, K, V>(mut self, v: T) -> Self
18540    where
18541        T: std::iter::IntoIterator<Item = (K, V)>,
18542        K: std::convert::Into<std::string::String>,
18543        V: std::convert::Into<wkt::Value>,
18544    {
18545        use std::iter::Iterator;
18546        self.properties = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
18547        self
18548    }
18549
18550    /// Sets the value of [count][crate::model::GroupResult::count].
18551    ///
18552    /// # Example
18553    /// ```ignore,no_run
18554    /// # use google_cloud_securitycenter_v2::model::GroupResult;
18555    /// let x = GroupResult::new().set_count(42);
18556    /// ```
18557    pub fn set_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
18558        self.count = v.into();
18559        self
18560    }
18561}
18562
18563impl wkt::message::Message for GroupResult {
18564    fn typename() -> &'static str {
18565        "type.googleapis.com/google.cloud.securitycenter.v2.GroupResult"
18566    }
18567}
18568
18569/// Request message for listing the attack paths for a given simulation or valued
18570/// resource.
18571#[derive(Clone, Default, PartialEq)]
18572#[non_exhaustive]
18573pub struct ListAttackPathsRequest {
18574    /// Required. Name of parent to list attack paths.
18575    ///
18576    /// Valid formats:
18577    /// `organizations/{organization}`,
18578    /// `organizations/{organization}/simulations/{simulation}`
18579    /// `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
18580    /// `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
18581    pub parent: std::string::String,
18582
18583    /// The filter expression that filters the attack path in the response.
18584    /// Supported fields:
18585    ///
18586    /// * `valued_resources` supports =
18587    pub filter: std::string::String,
18588
18589    /// The value returned by the last `ListAttackPathsResponse`; indicates
18590    /// that this is a continuation of a prior `ListAttackPaths` call, and
18591    /// that the system should return the next page of data.
18592    pub page_token: std::string::String,
18593
18594    /// The maximum number of results to return in a single response. Default is
18595    /// 10, minimum is 1, maximum is 1000.
18596    pub page_size: i32,
18597
18598    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18599}
18600
18601impl ListAttackPathsRequest {
18602    /// Creates a new default instance.
18603    pub fn new() -> Self {
18604        std::default::Default::default()
18605    }
18606
18607    /// Sets the value of [parent][crate::model::ListAttackPathsRequest::parent].
18608    ///
18609    /// # Example
18610    /// ```ignore,no_run
18611    /// # use google_cloud_securitycenter_v2::model::ListAttackPathsRequest;
18612    /// # let organization_id = "organization_id";
18613    /// # let simulation_id = "simulation_id";
18614    /// # let valued_resource_id = "valued_resource_id";
18615    /// let x = ListAttackPathsRequest::new().set_parent(format!("organizations/{organization_id}/simulations/{simulation_id}/valuedResources/{valued_resource_id}"));
18616    /// ```
18617    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18618        self.parent = v.into();
18619        self
18620    }
18621
18622    /// Sets the value of [filter][crate::model::ListAttackPathsRequest::filter].
18623    ///
18624    /// # Example
18625    /// ```ignore,no_run
18626    /// # use google_cloud_securitycenter_v2::model::ListAttackPathsRequest;
18627    /// let x = ListAttackPathsRequest::new().set_filter("example");
18628    /// ```
18629    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18630        self.filter = v.into();
18631        self
18632    }
18633
18634    /// Sets the value of [page_token][crate::model::ListAttackPathsRequest::page_token].
18635    ///
18636    /// # Example
18637    /// ```ignore,no_run
18638    /// # use google_cloud_securitycenter_v2::model::ListAttackPathsRequest;
18639    /// let x = ListAttackPathsRequest::new().set_page_token("example");
18640    /// ```
18641    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18642        self.page_token = v.into();
18643        self
18644    }
18645
18646    /// Sets the value of [page_size][crate::model::ListAttackPathsRequest::page_size].
18647    ///
18648    /// # Example
18649    /// ```ignore,no_run
18650    /// # use google_cloud_securitycenter_v2::model::ListAttackPathsRequest;
18651    /// let x = ListAttackPathsRequest::new().set_page_size(42);
18652    /// ```
18653    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18654        self.page_size = v.into();
18655        self
18656    }
18657}
18658
18659impl wkt::message::Message for ListAttackPathsRequest {
18660    fn typename() -> &'static str {
18661        "type.googleapis.com/google.cloud.securitycenter.v2.ListAttackPathsRequest"
18662    }
18663}
18664
18665/// Response message for listing the attack paths for a given simulation or
18666/// valued resource.
18667#[derive(Clone, Default, PartialEq)]
18668#[non_exhaustive]
18669pub struct ListAttackPathsResponse {
18670    /// The attack paths that the attack path simulation identified.
18671    pub attack_paths: std::vec::Vec<crate::model::AttackPath>,
18672
18673    /// Token to retrieve the next page of results, or empty if there are no more
18674    /// results.
18675    pub next_page_token: std::string::String,
18676
18677    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18678}
18679
18680impl ListAttackPathsResponse {
18681    /// Creates a new default instance.
18682    pub fn new() -> Self {
18683        std::default::Default::default()
18684    }
18685
18686    /// Sets the value of [attack_paths][crate::model::ListAttackPathsResponse::attack_paths].
18687    ///
18688    /// # Example
18689    /// ```ignore,no_run
18690    /// # use google_cloud_securitycenter_v2::model::ListAttackPathsResponse;
18691    /// use google_cloud_securitycenter_v2::model::AttackPath;
18692    /// let x = ListAttackPathsResponse::new()
18693    ///     .set_attack_paths([
18694    ///         AttackPath::default()/* use setters */,
18695    ///         AttackPath::default()/* use (different) setters */,
18696    ///     ]);
18697    /// ```
18698    pub fn set_attack_paths<T, V>(mut self, v: T) -> Self
18699    where
18700        T: std::iter::IntoIterator<Item = V>,
18701        V: std::convert::Into<crate::model::AttackPath>,
18702    {
18703        use std::iter::Iterator;
18704        self.attack_paths = v.into_iter().map(|i| i.into()).collect();
18705        self
18706    }
18707
18708    /// Sets the value of [next_page_token][crate::model::ListAttackPathsResponse::next_page_token].
18709    ///
18710    /// # Example
18711    /// ```ignore,no_run
18712    /// # use google_cloud_securitycenter_v2::model::ListAttackPathsResponse;
18713    /// let x = ListAttackPathsResponse::new().set_next_page_token("example");
18714    /// ```
18715    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18716        self.next_page_token = v.into();
18717        self
18718    }
18719}
18720
18721impl wkt::message::Message for ListAttackPathsResponse {
18722    fn typename() -> &'static str {
18723        "type.googleapis.com/google.cloud.securitycenter.v2.ListAttackPathsResponse"
18724    }
18725}
18726
18727#[doc(hidden)]
18728impl google_cloud_gax::paginator::internal::PageableResponse for ListAttackPathsResponse {
18729    type PageItem = crate::model::AttackPath;
18730
18731    fn items(self) -> std::vec::Vec<Self::PageItem> {
18732        self.attack_paths
18733    }
18734
18735    fn next_page_token(&self) -> std::string::String {
18736        use std::clone::Clone;
18737        self.next_page_token.clone()
18738    }
18739}
18740
18741/// Request message for getting simulation.
18742/// Simulation name can include "latest" to retrieve the latest simulation
18743/// For example, "organizations/123/simulations/latest"
18744#[derive(Clone, Default, PartialEq)]
18745#[non_exhaustive]
18746pub struct GetSimulationRequest {
18747    /// Required. The organization name or simulation name of this simulation
18748    ///
18749    /// Valid format:
18750    /// `organizations/{organization}/simulations/latest`
18751    /// `organizations/{organization}/simulations/{simulation}`
18752    pub name: std::string::String,
18753
18754    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18755}
18756
18757impl GetSimulationRequest {
18758    /// Creates a new default instance.
18759    pub fn new() -> Self {
18760        std::default::Default::default()
18761    }
18762
18763    /// Sets the value of [name][crate::model::GetSimulationRequest::name].
18764    ///
18765    /// # Example
18766    /// ```ignore,no_run
18767    /// # use google_cloud_securitycenter_v2::model::GetSimulationRequest;
18768    /// # let organization_id = "organization_id";
18769    /// # let simulation_id = "simulation_id";
18770    /// let x = GetSimulationRequest::new().set_name(format!("organizations/{organization_id}/simulations/{simulation_id}"));
18771    /// ```
18772    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18773        self.name = v.into();
18774        self
18775    }
18776}
18777
18778impl wkt::message::Message for GetSimulationRequest {
18779    fn typename() -> &'static str {
18780        "type.googleapis.com/google.cloud.securitycenter.v2.GetSimulationRequest"
18781    }
18782}
18783
18784/// Request message for getting a valued resource.
18785#[derive(Clone, Default, PartialEq)]
18786#[non_exhaustive]
18787pub struct GetValuedResourceRequest {
18788    /// Required. The name of this valued resource
18789    ///
18790    /// Valid format:
18791    /// `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
18792    pub name: std::string::String,
18793
18794    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18795}
18796
18797impl GetValuedResourceRequest {
18798    /// Creates a new default instance.
18799    pub fn new() -> Self {
18800        std::default::Default::default()
18801    }
18802
18803    /// Sets the value of [name][crate::model::GetValuedResourceRequest::name].
18804    ///
18805    /// # Example
18806    /// ```ignore,no_run
18807    /// # use google_cloud_securitycenter_v2::model::GetValuedResourceRequest;
18808    /// # let organization_id = "organization_id";
18809    /// # let simulation_id = "simulation_id";
18810    /// # let valued_resource_id = "valued_resource_id";
18811    /// let x = GetValuedResourceRequest::new().set_name(format!("organizations/{organization_id}/simulations/{simulation_id}/valuedResources/{valued_resource_id}"));
18812    /// ```
18813    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18814        self.name = v.into();
18815        self
18816    }
18817}
18818
18819impl wkt::message::Message for GetValuedResourceRequest {
18820    fn typename() -> &'static str {
18821        "type.googleapis.com/google.cloud.securitycenter.v2.GetValuedResourceRequest"
18822    }
18823}
18824
18825/// Request message for listing BigQuery exports at a given scope e.g.
18826/// organization, folder or project.
18827#[derive(Clone, Default, PartialEq)]
18828#[non_exhaustive]
18829pub struct ListBigQueryExportsRequest {
18830    /// Required. The parent, which owns the collection of BigQuery exports. Its
18831    /// format is `organizations/[organization_id]/locations/[location_id]`,
18832    /// `folders/[folder_id]/locations/[location_id]`, or
18833    /// `projects/[project_id]/locations/[location_id]`.
18834    pub parent: std::string::String,
18835
18836    /// The maximum number of configs to return. The service may return fewer than
18837    /// this value.
18838    /// If unspecified, at most 10 configs will be returned.
18839    /// The maximum value is 1000; values above 1000 will be coerced to 1000.
18840    pub page_size: i32,
18841
18842    /// A page token, received from a previous `ListBigQueryExports` call.
18843    /// Provide this to retrieve the subsequent page.
18844    /// When paginating, all other parameters provided to `ListBigQueryExports`
18845    /// must match the call that provided the page token.
18846    pub page_token: std::string::String,
18847
18848    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18849}
18850
18851impl ListBigQueryExportsRequest {
18852    /// Creates a new default instance.
18853    pub fn new() -> Self {
18854        std::default::Default::default()
18855    }
18856
18857    /// Sets the value of [parent][crate::model::ListBigQueryExportsRequest::parent].
18858    ///
18859    /// # Example
18860    /// ```ignore,no_run
18861    /// # use google_cloud_securitycenter_v2::model::ListBigQueryExportsRequest;
18862    /// # let organization_id = "organization_id";
18863    /// # let location_id = "location_id";
18864    /// let x = ListBigQueryExportsRequest::new().set_parent(format!("organizations/{organization_id}/locations/{location_id}"));
18865    /// ```
18866    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18867        self.parent = v.into();
18868        self
18869    }
18870
18871    /// Sets the value of [page_size][crate::model::ListBigQueryExportsRequest::page_size].
18872    ///
18873    /// # Example
18874    /// ```ignore,no_run
18875    /// # use google_cloud_securitycenter_v2::model::ListBigQueryExportsRequest;
18876    /// let x = ListBigQueryExportsRequest::new().set_page_size(42);
18877    /// ```
18878    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18879        self.page_size = v.into();
18880        self
18881    }
18882
18883    /// Sets the value of [page_token][crate::model::ListBigQueryExportsRequest::page_token].
18884    ///
18885    /// # Example
18886    /// ```ignore,no_run
18887    /// # use google_cloud_securitycenter_v2::model::ListBigQueryExportsRequest;
18888    /// let x = ListBigQueryExportsRequest::new().set_page_token("example");
18889    /// ```
18890    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18891        self.page_token = v.into();
18892        self
18893    }
18894}
18895
18896impl wkt::message::Message for ListBigQueryExportsRequest {
18897    fn typename() -> &'static str {
18898        "type.googleapis.com/google.cloud.securitycenter.v2.ListBigQueryExportsRequest"
18899    }
18900}
18901
18902/// Response message for listing BigQuery exports.
18903#[derive(Clone, Default, PartialEq)]
18904#[non_exhaustive]
18905pub struct ListBigQueryExportsResponse {
18906    /// The BigQuery exports from the specified parent.
18907    pub big_query_exports: std::vec::Vec<crate::model::BigQueryExport>,
18908
18909    /// A token, which can be sent as `page_token` to retrieve the next page.
18910    /// If this field is omitted, there are no subsequent pages.
18911    pub next_page_token: std::string::String,
18912
18913    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18914}
18915
18916impl ListBigQueryExportsResponse {
18917    /// Creates a new default instance.
18918    pub fn new() -> Self {
18919        std::default::Default::default()
18920    }
18921
18922    /// Sets the value of [big_query_exports][crate::model::ListBigQueryExportsResponse::big_query_exports].
18923    ///
18924    /// # Example
18925    /// ```ignore,no_run
18926    /// # use google_cloud_securitycenter_v2::model::ListBigQueryExportsResponse;
18927    /// use google_cloud_securitycenter_v2::model::BigQueryExport;
18928    /// let x = ListBigQueryExportsResponse::new()
18929    ///     .set_big_query_exports([
18930    ///         BigQueryExport::default()/* use setters */,
18931    ///         BigQueryExport::default()/* use (different) setters */,
18932    ///     ]);
18933    /// ```
18934    pub fn set_big_query_exports<T, V>(mut self, v: T) -> Self
18935    where
18936        T: std::iter::IntoIterator<Item = V>,
18937        V: std::convert::Into<crate::model::BigQueryExport>,
18938    {
18939        use std::iter::Iterator;
18940        self.big_query_exports = v.into_iter().map(|i| i.into()).collect();
18941        self
18942    }
18943
18944    /// Sets the value of [next_page_token][crate::model::ListBigQueryExportsResponse::next_page_token].
18945    ///
18946    /// # Example
18947    /// ```ignore,no_run
18948    /// # use google_cloud_securitycenter_v2::model::ListBigQueryExportsResponse;
18949    /// let x = ListBigQueryExportsResponse::new().set_next_page_token("example");
18950    /// ```
18951    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18952        self.next_page_token = v.into();
18953        self
18954    }
18955}
18956
18957impl wkt::message::Message for ListBigQueryExportsResponse {
18958    fn typename() -> &'static str {
18959        "type.googleapis.com/google.cloud.securitycenter.v2.ListBigQueryExportsResponse"
18960    }
18961}
18962
18963#[doc(hidden)]
18964impl google_cloud_gax::paginator::internal::PageableResponse for ListBigQueryExportsResponse {
18965    type PageItem = crate::model::BigQueryExport;
18966
18967    fn items(self) -> std::vec::Vec<Self::PageItem> {
18968        self.big_query_exports
18969    }
18970
18971    fn next_page_token(&self) -> std::string::String {
18972        use std::clone::Clone;
18973        self.next_page_token.clone()
18974    }
18975}
18976
18977/// Request message for listing findings.
18978#[derive(Clone, Default, PartialEq)]
18979#[non_exhaustive]
18980pub struct ListFindingsRequest {
18981    /// Required. Name of the source the findings belong to. If no location is
18982    /// specified, the default is global. The following list shows some examples:
18983    ///
18984    /// + `organizations/[organization_id]/sources/[source_id]`
18985    ///
18986    /// `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
18987    ///
18988    /// + `folders/[folder_id]/sources/[source_id]`
18989    /// + `folders/[folder_id]/sources/[source_id]/locations/[location_id]`
18990    /// + `projects/[project_id]/sources/[source_id]`
18991    /// + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
18992    ///
18993    /// To list across all sources provide a source_id of `-`. The following
18994    /// list shows some examples:
18995    ///
18996    /// + `organizations/{organization_id}/sources/-`
18997    /// + `organizations/{organization_id}/sources/-/locations/{location_id}`
18998    /// + `folders/{folder_id}/sources/-`
18999    /// + `folders/{folder_id}/sources/-locations/{location_id}`
19000    /// + `projects/{projects_id}/sources/-`
19001    /// + `projects/{projects_id}/sources/-/locations/{location_id}`
19002    pub parent: std::string::String,
19003
19004    /// Expression that defines the filter to apply across findings.
19005    /// The expression is a list of one or more restrictions combined via logical
19006    /// operators `AND` and `OR`.
19007    /// Parentheses are supported, and `OR` has higher precedence than `AND`.
19008    ///
19009    /// Restrictions have the form `<field> <operator> <value>` and may have a `-`
19010    /// character in front of them to indicate negation. Examples include:
19011    ///
19012    /// * name
19013    /// * security_marks.marks.marka
19014    ///
19015    /// The supported operators are:
19016    ///
19017    /// * `=` for all value types.
19018    /// * `>`, `<`, `>=`, `<=` for integer values.
19019    /// * `:`, meaning substring matching, for strings.
19020    ///
19021    /// The supported value types are:
19022    ///
19023    /// * string literals in quotes.
19024    /// * integer literals without quotes.
19025    /// * boolean literals `true` and `false` without quotes.
19026    ///
19027    /// The following field and operator combinations are supported:
19028    ///
19029    /// * name: `=`
19030    ///
19031    /// * parent: `=`, `:`
19032    ///
19033    /// * resource_name: `=`, `:`
19034    ///
19035    /// * state: `=`, `:`
19036    ///
19037    /// * category: `=`, `:`
19038    ///
19039    /// * external_uri: `=`, `:`
19040    ///
19041    /// * event_time: `=`, `>`, `<`, `>=`, `<=`
19042    ///
19043    ///   Usage: This should be milliseconds since epoch or an RFC3339 string.
19044    ///   Examples:
19045    ///   `event_time = "2019-06-10T16:07:18-07:00"`
19046    ///   `event_time = 1560208038000`
19047    ///
19048    /// * severity: `=`, `:`
19049    ///
19050    /// * security_marks.marks: `=`, `:`
19051    ///
19052    /// * resource:
19053    ///
19054    ///   * resource.name: `=`, `:`
19055    ///   * resource.parent_name: `=`, `:`
19056    ///   * resource.parent_display_name: `=`, `:`
19057    ///   * resource.project_name: `=`, `:`
19058    ///   * resource.project_display_name: `=`, `:`
19059    ///   * resource.type: `=`, `:`
19060    ///   * resource.folders.resource_folder: `=`, `:`
19061    ///   * resource.display_name: `=`, `:`
19062    pub filter: std::string::String,
19063
19064    /// Expression that defines what fields and order to use for sorting. The
19065    /// string value should follow SQL syntax: comma separated list of fields. For
19066    /// example: "name,parent". The default sorting order
19067    /// is ascending. To specify descending order for a field, a suffix " desc"
19068    /// should be appended to the field name. For example: "name
19069    /// desc,parent". Redundant space characters in the
19070    /// syntax are insignificant. "name desc,parent" and "
19071    /// name     desc  ,   parent  " are equivalent.
19072    ///
19073    /// The following fields are supported:
19074    /// name
19075    /// parent
19076    /// state
19077    /// category
19078    /// resource_name
19079    /// event_time
19080    /// security_marks.marks
19081    pub order_by: std::string::String,
19082
19083    /// A field mask to specify the Finding fields to be listed in the response.
19084    /// An empty field mask will list all fields.
19085    pub field_mask: std::option::Option<wkt::FieldMask>,
19086
19087    /// The value returned by the last `ListFindingsResponse`; indicates
19088    /// that this is a continuation of a prior `ListFindings` call, and
19089    /// that the system should return the next page of data.
19090    pub page_token: std::string::String,
19091
19092    /// The maximum number of results to return in a single response. Default is
19093    /// 10, minimum is 1, maximum is 1000.
19094    pub page_size: i32,
19095
19096    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19097}
19098
19099impl ListFindingsRequest {
19100    /// Creates a new default instance.
19101    pub fn new() -> Self {
19102        std::default::Default::default()
19103    }
19104
19105    /// Sets the value of [parent][crate::model::ListFindingsRequest::parent].
19106    ///
19107    /// # Example
19108    /// ```ignore,no_run
19109    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
19110    /// # let organization_id = "organization_id";
19111    /// # let source_id = "source_id";
19112    /// let x = ListFindingsRequest::new().set_parent(format!("organizations/{organization_id}/sources/{source_id}"));
19113    /// ```
19114    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19115        self.parent = v.into();
19116        self
19117    }
19118
19119    /// Sets the value of [filter][crate::model::ListFindingsRequest::filter].
19120    ///
19121    /// # Example
19122    /// ```ignore,no_run
19123    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
19124    /// let x = ListFindingsRequest::new().set_filter("example");
19125    /// ```
19126    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19127        self.filter = v.into();
19128        self
19129    }
19130
19131    /// Sets the value of [order_by][crate::model::ListFindingsRequest::order_by].
19132    ///
19133    /// # Example
19134    /// ```ignore,no_run
19135    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
19136    /// let x = ListFindingsRequest::new().set_order_by("example");
19137    /// ```
19138    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19139        self.order_by = v.into();
19140        self
19141    }
19142
19143    /// Sets the value of [field_mask][crate::model::ListFindingsRequest::field_mask].
19144    ///
19145    /// # Example
19146    /// ```ignore,no_run
19147    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
19148    /// use wkt::FieldMask;
19149    /// let x = ListFindingsRequest::new().set_field_mask(FieldMask::default()/* use setters */);
19150    /// ```
19151    pub fn set_field_mask<T>(mut self, v: T) -> Self
19152    where
19153        T: std::convert::Into<wkt::FieldMask>,
19154    {
19155        self.field_mask = std::option::Option::Some(v.into());
19156        self
19157    }
19158
19159    /// Sets or clears the value of [field_mask][crate::model::ListFindingsRequest::field_mask].
19160    ///
19161    /// # Example
19162    /// ```ignore,no_run
19163    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
19164    /// use wkt::FieldMask;
19165    /// let x = ListFindingsRequest::new().set_or_clear_field_mask(Some(FieldMask::default()/* use setters */));
19166    /// let x = ListFindingsRequest::new().set_or_clear_field_mask(None::<FieldMask>);
19167    /// ```
19168    pub fn set_or_clear_field_mask<T>(mut self, v: std::option::Option<T>) -> Self
19169    where
19170        T: std::convert::Into<wkt::FieldMask>,
19171    {
19172        self.field_mask = v.map(|x| x.into());
19173        self
19174    }
19175
19176    /// Sets the value of [page_token][crate::model::ListFindingsRequest::page_token].
19177    ///
19178    /// # Example
19179    /// ```ignore,no_run
19180    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
19181    /// let x = ListFindingsRequest::new().set_page_token("example");
19182    /// ```
19183    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19184        self.page_token = v.into();
19185        self
19186    }
19187
19188    /// Sets the value of [page_size][crate::model::ListFindingsRequest::page_size].
19189    ///
19190    /// # Example
19191    /// ```ignore,no_run
19192    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
19193    /// let x = ListFindingsRequest::new().set_page_size(42);
19194    /// ```
19195    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19196        self.page_size = v.into();
19197        self
19198    }
19199}
19200
19201impl wkt::message::Message for ListFindingsRequest {
19202    fn typename() -> &'static str {
19203        "type.googleapis.com/google.cloud.securitycenter.v2.ListFindingsRequest"
19204    }
19205}
19206
19207/// Response message for listing findings.
19208#[derive(Clone, Default, PartialEq)]
19209#[non_exhaustive]
19210pub struct ListFindingsResponse {
19211    /// Findings matching the list request.
19212    pub list_findings_results:
19213        std::vec::Vec<crate::model::list_findings_response::ListFindingsResult>,
19214
19215    /// Token to retrieve the next page of results, or empty if there are no more
19216    /// results.
19217    pub next_page_token: std::string::String,
19218
19219    /// The total number of findings matching the query.
19220    pub total_size: i32,
19221
19222    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19223}
19224
19225impl ListFindingsResponse {
19226    /// Creates a new default instance.
19227    pub fn new() -> Self {
19228        std::default::Default::default()
19229    }
19230
19231    /// Sets the value of [list_findings_results][crate::model::ListFindingsResponse::list_findings_results].
19232    ///
19233    /// # Example
19234    /// ```ignore,no_run
19235    /// # use google_cloud_securitycenter_v2::model::ListFindingsResponse;
19236    /// use google_cloud_securitycenter_v2::model::list_findings_response::ListFindingsResult;
19237    /// let x = ListFindingsResponse::new()
19238    ///     .set_list_findings_results([
19239    ///         ListFindingsResult::default()/* use setters */,
19240    ///         ListFindingsResult::default()/* use (different) setters */,
19241    ///     ]);
19242    /// ```
19243    pub fn set_list_findings_results<T, V>(mut self, v: T) -> Self
19244    where
19245        T: std::iter::IntoIterator<Item = V>,
19246        V: std::convert::Into<crate::model::list_findings_response::ListFindingsResult>,
19247    {
19248        use std::iter::Iterator;
19249        self.list_findings_results = v.into_iter().map(|i| i.into()).collect();
19250        self
19251    }
19252
19253    /// Sets the value of [next_page_token][crate::model::ListFindingsResponse::next_page_token].
19254    ///
19255    /// # Example
19256    /// ```ignore,no_run
19257    /// # use google_cloud_securitycenter_v2::model::ListFindingsResponse;
19258    /// let x = ListFindingsResponse::new().set_next_page_token("example");
19259    /// ```
19260    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19261        self.next_page_token = v.into();
19262        self
19263    }
19264
19265    /// Sets the value of [total_size][crate::model::ListFindingsResponse::total_size].
19266    ///
19267    /// # Example
19268    /// ```ignore,no_run
19269    /// # use google_cloud_securitycenter_v2::model::ListFindingsResponse;
19270    /// let x = ListFindingsResponse::new().set_total_size(42);
19271    /// ```
19272    pub fn set_total_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19273        self.total_size = v.into();
19274        self
19275    }
19276}
19277
19278impl wkt::message::Message for ListFindingsResponse {
19279    fn typename() -> &'static str {
19280        "type.googleapis.com/google.cloud.securitycenter.v2.ListFindingsResponse"
19281    }
19282}
19283
19284#[doc(hidden)]
19285impl google_cloud_gax::paginator::internal::PageableResponse for ListFindingsResponse {
19286    type PageItem = crate::model::list_findings_response::ListFindingsResult;
19287
19288    fn items(self) -> std::vec::Vec<Self::PageItem> {
19289        self.list_findings_results
19290    }
19291
19292    fn next_page_token(&self) -> std::string::String {
19293        use std::clone::Clone;
19294        self.next_page_token.clone()
19295    }
19296}
19297
19298/// Defines additional types related to [ListFindingsResponse].
19299pub mod list_findings_response {
19300    #[allow(unused_imports)]
19301    use super::*;
19302
19303    /// Result containing the Finding.
19304    #[derive(Clone, Default, PartialEq)]
19305    #[non_exhaustive]
19306    pub struct ListFindingsResult {
19307        /// Finding matching the search request.
19308        pub finding: std::option::Option<crate::model::Finding>,
19309
19310        /// Output only. Resource that is associated with this finding.
19311        pub resource: std::option::Option<
19312            crate::model::list_findings_response::list_findings_result::Resource,
19313        >,
19314
19315        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19316    }
19317
19318    impl ListFindingsResult {
19319        /// Creates a new default instance.
19320        pub fn new() -> Self {
19321            std::default::Default::default()
19322        }
19323
19324        /// Sets the value of [finding][crate::model::list_findings_response::ListFindingsResult::finding].
19325        ///
19326        /// # Example
19327        /// ```ignore,no_run
19328        /// # use google_cloud_securitycenter_v2::model::list_findings_response::ListFindingsResult;
19329        /// use google_cloud_securitycenter_v2::model::Finding;
19330        /// let x = ListFindingsResult::new().set_finding(Finding::default()/* use setters */);
19331        /// ```
19332        pub fn set_finding<T>(mut self, v: T) -> Self
19333        where
19334            T: std::convert::Into<crate::model::Finding>,
19335        {
19336            self.finding = std::option::Option::Some(v.into());
19337            self
19338        }
19339
19340        /// Sets or clears the value of [finding][crate::model::list_findings_response::ListFindingsResult::finding].
19341        ///
19342        /// # Example
19343        /// ```ignore,no_run
19344        /// # use google_cloud_securitycenter_v2::model::list_findings_response::ListFindingsResult;
19345        /// use google_cloud_securitycenter_v2::model::Finding;
19346        /// let x = ListFindingsResult::new().set_or_clear_finding(Some(Finding::default()/* use setters */));
19347        /// let x = ListFindingsResult::new().set_or_clear_finding(None::<Finding>);
19348        /// ```
19349        pub fn set_or_clear_finding<T>(mut self, v: std::option::Option<T>) -> Self
19350        where
19351            T: std::convert::Into<crate::model::Finding>,
19352        {
19353            self.finding = v.map(|x| x.into());
19354            self
19355        }
19356
19357        /// Sets the value of [resource][crate::model::list_findings_response::ListFindingsResult::resource].
19358        ///
19359        /// # Example
19360        /// ```ignore,no_run
19361        /// # use google_cloud_securitycenter_v2::model::list_findings_response::ListFindingsResult;
19362        /// use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19363        /// let x = ListFindingsResult::new().set_resource(Resource::default()/* use setters */);
19364        /// ```
19365        pub fn set_resource<T>(mut self, v: T) -> Self
19366        where
19367            T: std::convert::Into<
19368                    crate::model::list_findings_response::list_findings_result::Resource,
19369                >,
19370        {
19371            self.resource = std::option::Option::Some(v.into());
19372            self
19373        }
19374
19375        /// Sets or clears the value of [resource][crate::model::list_findings_response::ListFindingsResult::resource].
19376        ///
19377        /// # Example
19378        /// ```ignore,no_run
19379        /// # use google_cloud_securitycenter_v2::model::list_findings_response::ListFindingsResult;
19380        /// use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19381        /// let x = ListFindingsResult::new().set_or_clear_resource(Some(Resource::default()/* use setters */));
19382        /// let x = ListFindingsResult::new().set_or_clear_resource(None::<Resource>);
19383        /// ```
19384        pub fn set_or_clear_resource<T>(mut self, v: std::option::Option<T>) -> Self
19385        where
19386            T: std::convert::Into<
19387                    crate::model::list_findings_response::list_findings_result::Resource,
19388                >,
19389        {
19390            self.resource = v.map(|x| x.into());
19391            self
19392        }
19393    }
19394
19395    impl wkt::message::Message for ListFindingsResult {
19396        fn typename() -> &'static str {
19397            "type.googleapis.com/google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult"
19398        }
19399    }
19400
19401    /// Defines additional types related to [ListFindingsResult].
19402    pub mod list_findings_result {
19403        #[allow(unused_imports)]
19404        use super::*;
19405
19406        /// Information related to the Google Cloud resource that is
19407        /// associated with this finding.
19408        #[derive(Clone, Default, PartialEq)]
19409        #[non_exhaustive]
19410        pub struct Resource {
19411
19412            /// The full resource name of the resource. See:
19413            /// <https://cloud.google.com/apis/design/resource_names#full_resource_name>
19414            pub name: std::string::String,
19415
19416            /// The human readable name of the resource.
19417            pub display_name: std::string::String,
19418
19419            /// The full resource type of the resource.
19420            pub r#type: std::string::String,
19421
19422            /// Indicates which cloud provider the finding is from.
19423            pub cloud_provider: crate::model::CloudProvider,
19424
19425            /// The service or resource provider associated with the resource.
19426            pub service: std::string::String,
19427
19428            /// The region or location of the service (if applicable).
19429            pub location: std::string::String,
19430
19431            /// Provides the path to the resource within the resource hierarchy.
19432            pub resource_path: std::option::Option<crate::model::ResourcePath>,
19433
19434            /// A string representation of the resource path.
19435            /// For Google Cloud, it has the format of
19436            /// `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}`
19437            /// where there can be any number of folders.
19438            /// For AWS, it has the format of
19439            /// `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}`
19440            /// where there can be any number of organizational units.
19441            /// For Azure, it has the format of
19442            /// `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}`
19443            /// where there can be any number of management groups.
19444            pub resource_path_string: std::string::String,
19445
19446            /// The metadata associated with the cloud provider.
19447            pub cloud_provider_metadata: std::option::Option<crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata>,
19448
19449            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19450        }
19451
19452        impl Resource {
19453            /// Creates a new default instance.
19454            pub fn new() -> Self {
19455                std::default::Default::default()
19456            }
19457
19458            /// Sets the value of [name][crate::model::list_findings_response::list_findings_result::Resource::name].
19459            ///
19460            /// # Example
19461            /// ```ignore,no_run
19462            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19463            /// let x = Resource::new().set_name("example");
19464            /// ```
19465            pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19466                self.name = v.into();
19467                self
19468            }
19469
19470            /// Sets the value of [display_name][crate::model::list_findings_response::list_findings_result::Resource::display_name].
19471            ///
19472            /// # Example
19473            /// ```ignore,no_run
19474            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19475            /// let x = Resource::new().set_display_name("example");
19476            /// ```
19477            pub fn set_display_name<T: std::convert::Into<std::string::String>>(
19478                mut self,
19479                v: T,
19480            ) -> Self {
19481                self.display_name = v.into();
19482                self
19483            }
19484
19485            /// Sets the value of [r#type][crate::model::list_findings_response::list_findings_result::Resource::type].
19486            ///
19487            /// # Example
19488            /// ```ignore,no_run
19489            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19490            /// let x = Resource::new().set_type("example");
19491            /// ```
19492            pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19493                self.r#type = v.into();
19494                self
19495            }
19496
19497            /// Sets the value of [cloud_provider][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider].
19498            ///
19499            /// # Example
19500            /// ```ignore,no_run
19501            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19502            /// use google_cloud_securitycenter_v2::model::CloudProvider;
19503            /// let x0 = Resource::new().set_cloud_provider(CloudProvider::GoogleCloudPlatform);
19504            /// let x1 = Resource::new().set_cloud_provider(CloudProvider::AmazonWebServices);
19505            /// let x2 = Resource::new().set_cloud_provider(CloudProvider::MicrosoftAzure);
19506            /// ```
19507            pub fn set_cloud_provider<T: std::convert::Into<crate::model::CloudProvider>>(
19508                mut self,
19509                v: T,
19510            ) -> Self {
19511                self.cloud_provider = v.into();
19512                self
19513            }
19514
19515            /// Sets the value of [service][crate::model::list_findings_response::list_findings_result::Resource::service].
19516            ///
19517            /// # Example
19518            /// ```ignore,no_run
19519            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19520            /// let x = Resource::new().set_service("example");
19521            /// ```
19522            pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19523                self.service = v.into();
19524                self
19525            }
19526
19527            /// Sets the value of [location][crate::model::list_findings_response::list_findings_result::Resource::location].
19528            ///
19529            /// # Example
19530            /// ```ignore,no_run
19531            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19532            /// let x = Resource::new().set_location("example");
19533            /// ```
19534            pub fn set_location<T: std::convert::Into<std::string::String>>(
19535                mut self,
19536                v: T,
19537            ) -> Self {
19538                self.location = v.into();
19539                self
19540            }
19541
19542            /// Sets the value of [resource_path][crate::model::list_findings_response::list_findings_result::Resource::resource_path].
19543            ///
19544            /// # Example
19545            /// ```ignore,no_run
19546            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19547            /// use google_cloud_securitycenter_v2::model::ResourcePath;
19548            /// let x = Resource::new().set_resource_path(ResourcePath::default()/* use setters */);
19549            /// ```
19550            pub fn set_resource_path<T>(mut self, v: T) -> Self
19551            where
19552                T: std::convert::Into<crate::model::ResourcePath>,
19553            {
19554                self.resource_path = std::option::Option::Some(v.into());
19555                self
19556            }
19557
19558            /// Sets or clears the value of [resource_path][crate::model::list_findings_response::list_findings_result::Resource::resource_path].
19559            ///
19560            /// # Example
19561            /// ```ignore,no_run
19562            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19563            /// use google_cloud_securitycenter_v2::model::ResourcePath;
19564            /// let x = Resource::new().set_or_clear_resource_path(Some(ResourcePath::default()/* use setters */));
19565            /// let x = Resource::new().set_or_clear_resource_path(None::<ResourcePath>);
19566            /// ```
19567            pub fn set_or_clear_resource_path<T>(mut self, v: std::option::Option<T>) -> Self
19568            where
19569                T: std::convert::Into<crate::model::ResourcePath>,
19570            {
19571                self.resource_path = v.map(|x| x.into());
19572                self
19573            }
19574
19575            /// Sets the value of [resource_path_string][crate::model::list_findings_response::list_findings_result::Resource::resource_path_string].
19576            ///
19577            /// # Example
19578            /// ```ignore,no_run
19579            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19580            /// let x = Resource::new().set_resource_path_string("example");
19581            /// ```
19582            pub fn set_resource_path_string<T: std::convert::Into<std::string::String>>(
19583                mut self,
19584                v: T,
19585            ) -> Self {
19586                self.resource_path_string = v.into();
19587                self
19588            }
19589
19590            /// Sets the value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata].
19591            ///
19592            /// Note that all the setters affecting `cloud_provider_metadata` are mutually
19593            /// exclusive.
19594            ///
19595            /// # Example
19596            /// ```ignore,no_run
19597            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19598            /// use google_cloud_securitycenter_v2::model::GcpMetadata;
19599            /// let x = Resource::new().set_cloud_provider_metadata(Some(
19600            ///     google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::GcpMetadata(GcpMetadata::default().into())));
19601            /// ```
19602            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
19603            {
19604                self.cloud_provider_metadata = v.into();
19605                self
19606            }
19607
19608            /// The value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata]
19609            /// if it holds a `GcpMetadata`, `None` if the field is not set or
19610            /// holds a different branch.
19611            pub fn gcp_metadata(
19612                &self,
19613            ) -> std::option::Option<&std::boxed::Box<crate::model::GcpMetadata>> {
19614                #[allow(unreachable_patterns)]
19615                self.cloud_provider_metadata.as_ref().and_then(|v| match v {
19616                    crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::GcpMetadata(v) => std::option::Option::Some(v),
19617                    _ => std::option::Option::None,
19618                })
19619            }
19620
19621            /// Sets the value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata]
19622            /// to hold a `GcpMetadata`.
19623            ///
19624            /// Note that all the setters affecting `cloud_provider_metadata` are
19625            /// mutually exclusive.
19626            ///
19627            /// # Example
19628            /// ```ignore,no_run
19629            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19630            /// use google_cloud_securitycenter_v2::model::GcpMetadata;
19631            /// let x = Resource::new().set_gcp_metadata(GcpMetadata::default()/* use setters */);
19632            /// assert!(x.gcp_metadata().is_some());
19633            /// assert!(x.aws_metadata().is_none());
19634            /// assert!(x.azure_metadata().is_none());
19635            /// ```
19636            pub fn set_gcp_metadata<
19637                T: std::convert::Into<std::boxed::Box<crate::model::GcpMetadata>>,
19638            >(
19639                mut self,
19640                v: T,
19641            ) -> Self {
19642                self.cloud_provider_metadata = std::option::Option::Some(
19643                    crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::GcpMetadata(
19644                        v.into()
19645                    )
19646                );
19647                self
19648            }
19649
19650            /// The value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata]
19651            /// if it holds a `AwsMetadata`, `None` if the field is not set or
19652            /// holds a different branch.
19653            pub fn aws_metadata(
19654                &self,
19655            ) -> std::option::Option<&std::boxed::Box<crate::model::AwsMetadata>> {
19656                #[allow(unreachable_patterns)]
19657                self.cloud_provider_metadata.as_ref().and_then(|v| match v {
19658                    crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::AwsMetadata(v) => std::option::Option::Some(v),
19659                    _ => std::option::Option::None,
19660                })
19661            }
19662
19663            /// Sets the value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata]
19664            /// to hold a `AwsMetadata`.
19665            ///
19666            /// Note that all the setters affecting `cloud_provider_metadata` are
19667            /// mutually exclusive.
19668            ///
19669            /// # Example
19670            /// ```ignore,no_run
19671            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19672            /// use google_cloud_securitycenter_v2::model::AwsMetadata;
19673            /// let x = Resource::new().set_aws_metadata(AwsMetadata::default()/* use setters */);
19674            /// assert!(x.aws_metadata().is_some());
19675            /// assert!(x.gcp_metadata().is_none());
19676            /// assert!(x.azure_metadata().is_none());
19677            /// ```
19678            pub fn set_aws_metadata<
19679                T: std::convert::Into<std::boxed::Box<crate::model::AwsMetadata>>,
19680            >(
19681                mut self,
19682                v: T,
19683            ) -> Self {
19684                self.cloud_provider_metadata = std::option::Option::Some(
19685                    crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::AwsMetadata(
19686                        v.into()
19687                    )
19688                );
19689                self
19690            }
19691
19692            /// The value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata]
19693            /// if it holds a `AzureMetadata`, `None` if the field is not set or
19694            /// holds a different branch.
19695            pub fn azure_metadata(
19696                &self,
19697            ) -> std::option::Option<&std::boxed::Box<crate::model::AzureMetadata>> {
19698                #[allow(unreachable_patterns)]
19699                self.cloud_provider_metadata.as_ref().and_then(|v| match v {
19700                    crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::AzureMetadata(v) => std::option::Option::Some(v),
19701                    _ => std::option::Option::None,
19702                })
19703            }
19704
19705            /// Sets the value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata]
19706            /// to hold a `AzureMetadata`.
19707            ///
19708            /// Note that all the setters affecting `cloud_provider_metadata` are
19709            /// mutually exclusive.
19710            ///
19711            /// # Example
19712            /// ```ignore,no_run
19713            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19714            /// use google_cloud_securitycenter_v2::model::AzureMetadata;
19715            /// let x = Resource::new().set_azure_metadata(AzureMetadata::default()/* use setters */);
19716            /// assert!(x.azure_metadata().is_some());
19717            /// assert!(x.gcp_metadata().is_none());
19718            /// assert!(x.aws_metadata().is_none());
19719            /// ```
19720            pub fn set_azure_metadata<
19721                T: std::convert::Into<std::boxed::Box<crate::model::AzureMetadata>>,
19722            >(
19723                mut self,
19724                v: T,
19725            ) -> Self {
19726                self.cloud_provider_metadata = std::option::Option::Some(
19727                    crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::AzureMetadata(
19728                        v.into()
19729                    )
19730                );
19731                self
19732            }
19733        }
19734
19735        impl wkt::message::Message for Resource {
19736            fn typename() -> &'static str {
19737                "type.googleapis.com/google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource"
19738            }
19739        }
19740
19741        /// Defines additional types related to [Resource].
19742        pub mod resource {
19743            #[allow(unused_imports)]
19744            use super::*;
19745
19746            /// The metadata associated with the cloud provider.
19747            #[derive(Clone, Debug, PartialEq)]
19748            #[non_exhaustive]
19749            pub enum CloudProviderMetadata {
19750                /// The GCP metadata associated with the finding.
19751                GcpMetadata(std::boxed::Box<crate::model::GcpMetadata>),
19752                /// The AWS metadata associated with the finding.
19753                AwsMetadata(std::boxed::Box<crate::model::AwsMetadata>),
19754                /// The Azure metadata associated with the finding.
19755                AzureMetadata(std::boxed::Box<crate::model::AzureMetadata>),
19756            }
19757        }
19758    }
19759}
19760
19761/// Request message for listing  mute configs at a given scope e.g. organization,
19762/// folder or project. If no location is specified, default is
19763/// global.
19764#[derive(Clone, Default, PartialEq)]
19765#[non_exhaustive]
19766pub struct ListMuteConfigsRequest {
19767    /// Required. The parent, which owns the collection of mute configs. Its format
19768    /// is `organizations/[organization_id]", "folders/[folder_id]`,
19769    /// `projects/[project_id]`,
19770    /// `organizations/[organization_id]/locations/[location_id]`,
19771    /// `folders/[folder_id]/locations/[location_id]`,
19772    /// `projects/[project_id]/locations/[location_id]`.
19773    pub parent: std::string::String,
19774
19775    /// The maximum number of configs to return. The service may return fewer than
19776    /// this value.
19777    /// If unspecified, at most 10 configs will be returned.
19778    /// The maximum value is 1000; values above 1000 will be coerced to 1000.
19779    pub page_size: i32,
19780
19781    /// A page token, received from a previous `ListMuteConfigs` call.
19782    /// Provide this to retrieve the subsequent page.
19783    ///
19784    /// When paginating, all other parameters provided to `ListMuteConfigs` must
19785    /// match the call that provided the page token.
19786    pub page_token: std::string::String,
19787
19788    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19789}
19790
19791impl ListMuteConfigsRequest {
19792    /// Creates a new default instance.
19793    pub fn new() -> Self {
19794        std::default::Default::default()
19795    }
19796
19797    /// Sets the value of [parent][crate::model::ListMuteConfigsRequest::parent].
19798    ///
19799    /// # Example
19800    /// ```ignore,no_run
19801    /// # use google_cloud_securitycenter_v2::model::ListMuteConfigsRequest;
19802    /// # let organization_id = "organization_id";
19803    /// let x = ListMuteConfigsRequest::new().set_parent(format!("organizations/{organization_id}"));
19804    /// ```
19805    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19806        self.parent = v.into();
19807        self
19808    }
19809
19810    /// Sets the value of [page_size][crate::model::ListMuteConfigsRequest::page_size].
19811    ///
19812    /// # Example
19813    /// ```ignore,no_run
19814    /// # use google_cloud_securitycenter_v2::model::ListMuteConfigsRequest;
19815    /// let x = ListMuteConfigsRequest::new().set_page_size(42);
19816    /// ```
19817    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19818        self.page_size = v.into();
19819        self
19820    }
19821
19822    /// Sets the value of [page_token][crate::model::ListMuteConfigsRequest::page_token].
19823    ///
19824    /// # Example
19825    /// ```ignore,no_run
19826    /// # use google_cloud_securitycenter_v2::model::ListMuteConfigsRequest;
19827    /// let x = ListMuteConfigsRequest::new().set_page_token("example");
19828    /// ```
19829    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19830        self.page_token = v.into();
19831        self
19832    }
19833}
19834
19835impl wkt::message::Message for ListMuteConfigsRequest {
19836    fn typename() -> &'static str {
19837        "type.googleapis.com/google.cloud.securitycenter.v2.ListMuteConfigsRequest"
19838    }
19839}
19840
19841/// Response message for listing mute configs.
19842#[derive(Clone, Default, PartialEq)]
19843#[non_exhaustive]
19844pub struct ListMuteConfigsResponse {
19845    /// The mute configs from the specified parent.
19846    pub mute_configs: std::vec::Vec<crate::model::MuteConfig>,
19847
19848    /// A token, which can be sent as `page_token` to retrieve the next page.
19849    /// If this field is omitted, there are no subsequent pages.
19850    pub next_page_token: std::string::String,
19851
19852    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19853}
19854
19855impl ListMuteConfigsResponse {
19856    /// Creates a new default instance.
19857    pub fn new() -> Self {
19858        std::default::Default::default()
19859    }
19860
19861    /// Sets the value of [mute_configs][crate::model::ListMuteConfigsResponse::mute_configs].
19862    ///
19863    /// # Example
19864    /// ```ignore,no_run
19865    /// # use google_cloud_securitycenter_v2::model::ListMuteConfigsResponse;
19866    /// use google_cloud_securitycenter_v2::model::MuteConfig;
19867    /// let x = ListMuteConfigsResponse::new()
19868    ///     .set_mute_configs([
19869    ///         MuteConfig::default()/* use setters */,
19870    ///         MuteConfig::default()/* use (different) setters */,
19871    ///     ]);
19872    /// ```
19873    pub fn set_mute_configs<T, V>(mut self, v: T) -> Self
19874    where
19875        T: std::iter::IntoIterator<Item = V>,
19876        V: std::convert::Into<crate::model::MuteConfig>,
19877    {
19878        use std::iter::Iterator;
19879        self.mute_configs = v.into_iter().map(|i| i.into()).collect();
19880        self
19881    }
19882
19883    /// Sets the value of [next_page_token][crate::model::ListMuteConfigsResponse::next_page_token].
19884    ///
19885    /// # Example
19886    /// ```ignore,no_run
19887    /// # use google_cloud_securitycenter_v2::model::ListMuteConfigsResponse;
19888    /// let x = ListMuteConfigsResponse::new().set_next_page_token("example");
19889    /// ```
19890    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19891        self.next_page_token = v.into();
19892        self
19893    }
19894}
19895
19896impl wkt::message::Message for ListMuteConfigsResponse {
19897    fn typename() -> &'static str {
19898        "type.googleapis.com/google.cloud.securitycenter.v2.ListMuteConfigsResponse"
19899    }
19900}
19901
19902#[doc(hidden)]
19903impl google_cloud_gax::paginator::internal::PageableResponse for ListMuteConfigsResponse {
19904    type PageItem = crate::model::MuteConfig;
19905
19906    fn items(self) -> std::vec::Vec<Self::PageItem> {
19907        self.mute_configs
19908    }
19909
19910    fn next_page_token(&self) -> std::string::String {
19911        use std::clone::Clone;
19912        self.next_page_token.clone()
19913    }
19914}
19915
19916/// Request message for listing notification configs.
19917#[derive(Clone, Default, PartialEq)]
19918#[non_exhaustive]
19919pub struct ListNotificationConfigsRequest {
19920    /// Required. The name of the parent in which to list the notification
19921    /// configurations. Its format is
19922    /// "organizations/[organization_id]/locations/[location_id]",
19923    /// "folders/[folder_id]/locations/[location_id]", or
19924    /// "projects/[project_id]/locations/[location_id]".
19925    pub parent: std::string::String,
19926
19927    /// The value returned by the last `ListNotificationConfigsResponse`; indicates
19928    /// that this is a continuation of a prior `ListNotificationConfigs` call, and
19929    /// that the system should return the next page of data.
19930    pub page_token: std::string::String,
19931
19932    /// The maximum number of results to return in a single response. Default is
19933    /// 10, minimum is 1, maximum is 1000.
19934    pub page_size: i32,
19935
19936    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19937}
19938
19939impl ListNotificationConfigsRequest {
19940    /// Creates a new default instance.
19941    pub fn new() -> Self {
19942        std::default::Default::default()
19943    }
19944
19945    /// Sets the value of [parent][crate::model::ListNotificationConfigsRequest::parent].
19946    ///
19947    /// # Example
19948    /// ```ignore,no_run
19949    /// # use google_cloud_securitycenter_v2::model::ListNotificationConfigsRequest;
19950    /// # let organization_id = "organization_id";
19951    /// # let location_id = "location_id";
19952    /// let x = ListNotificationConfigsRequest::new().set_parent(format!("organizations/{organization_id}/locations/{location_id}"));
19953    /// ```
19954    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19955        self.parent = v.into();
19956        self
19957    }
19958
19959    /// Sets the value of [page_token][crate::model::ListNotificationConfigsRequest::page_token].
19960    ///
19961    /// # Example
19962    /// ```ignore,no_run
19963    /// # use google_cloud_securitycenter_v2::model::ListNotificationConfigsRequest;
19964    /// let x = ListNotificationConfigsRequest::new().set_page_token("example");
19965    /// ```
19966    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19967        self.page_token = v.into();
19968        self
19969    }
19970
19971    /// Sets the value of [page_size][crate::model::ListNotificationConfigsRequest::page_size].
19972    ///
19973    /// # Example
19974    /// ```ignore,no_run
19975    /// # use google_cloud_securitycenter_v2::model::ListNotificationConfigsRequest;
19976    /// let x = ListNotificationConfigsRequest::new().set_page_size(42);
19977    /// ```
19978    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19979        self.page_size = v.into();
19980        self
19981    }
19982}
19983
19984impl wkt::message::Message for ListNotificationConfigsRequest {
19985    fn typename() -> &'static str {
19986        "type.googleapis.com/google.cloud.securitycenter.v2.ListNotificationConfigsRequest"
19987    }
19988}
19989
19990/// Response message for listing notification configs.
19991#[derive(Clone, Default, PartialEq)]
19992#[non_exhaustive]
19993pub struct ListNotificationConfigsResponse {
19994    /// Notification configs belonging to the requested parent.
19995    pub notification_configs: std::vec::Vec<crate::model::NotificationConfig>,
19996
19997    /// Token to retrieve the next page of results, or empty if there are no more
19998    /// results.
19999    pub next_page_token: std::string::String,
20000
20001    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20002}
20003
20004impl ListNotificationConfigsResponse {
20005    /// Creates a new default instance.
20006    pub fn new() -> Self {
20007        std::default::Default::default()
20008    }
20009
20010    /// Sets the value of [notification_configs][crate::model::ListNotificationConfigsResponse::notification_configs].
20011    ///
20012    /// # Example
20013    /// ```ignore,no_run
20014    /// # use google_cloud_securitycenter_v2::model::ListNotificationConfigsResponse;
20015    /// use google_cloud_securitycenter_v2::model::NotificationConfig;
20016    /// let x = ListNotificationConfigsResponse::new()
20017    ///     .set_notification_configs([
20018    ///         NotificationConfig::default()/* use setters */,
20019    ///         NotificationConfig::default()/* use (different) setters */,
20020    ///     ]);
20021    /// ```
20022    pub fn set_notification_configs<T, V>(mut self, v: T) -> Self
20023    where
20024        T: std::iter::IntoIterator<Item = V>,
20025        V: std::convert::Into<crate::model::NotificationConfig>,
20026    {
20027        use std::iter::Iterator;
20028        self.notification_configs = v.into_iter().map(|i| i.into()).collect();
20029        self
20030    }
20031
20032    /// Sets the value of [next_page_token][crate::model::ListNotificationConfigsResponse::next_page_token].
20033    ///
20034    /// # Example
20035    /// ```ignore,no_run
20036    /// # use google_cloud_securitycenter_v2::model::ListNotificationConfigsResponse;
20037    /// let x = ListNotificationConfigsResponse::new().set_next_page_token("example");
20038    /// ```
20039    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20040        self.next_page_token = v.into();
20041        self
20042    }
20043}
20044
20045impl wkt::message::Message for ListNotificationConfigsResponse {
20046    fn typename() -> &'static str {
20047        "type.googleapis.com/google.cloud.securitycenter.v2.ListNotificationConfigsResponse"
20048    }
20049}
20050
20051#[doc(hidden)]
20052impl google_cloud_gax::paginator::internal::PageableResponse for ListNotificationConfigsResponse {
20053    type PageItem = crate::model::NotificationConfig;
20054
20055    fn items(self) -> std::vec::Vec<Self::PageItem> {
20056        self.notification_configs
20057    }
20058
20059    fn next_page_token(&self) -> std::string::String {
20060        use std::clone::Clone;
20061        self.next_page_token.clone()
20062    }
20063}
20064
20065/// Request message to list resource value configs of a parent
20066#[derive(Clone, Default, PartialEq)]
20067#[non_exhaustive]
20068pub struct ListResourceValueConfigsRequest {
20069    /// Required. The parent, which owns the collection of resource value configs.
20070    /// Its format is
20071    /// `organizations/[organization_id]`
20072    pub parent: std::string::String,
20073
20074    /// The maximum number of configs to return. The service may return fewer than
20075    /// this value.
20076    /// If unspecified, at most 10 configs will be returned.
20077    /// The maximum value is 1000; values above 1000 will be coerced to 1000.
20078    pub page_size: i32,
20079
20080    /// A page token, received from a previous `ListResourceValueConfigs` call.
20081    /// Provide this to retrieve the subsequent page.
20082    ///
20083    /// When paginating, all other parameters provided to
20084    /// `ListResourceValueConfigs` must match the call that provided the
20085    /// page token.
20086    ///
20087    /// page_size can be specified, and the new page_size will be used.
20088    pub page_token: std::string::String,
20089
20090    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20091}
20092
20093impl ListResourceValueConfigsRequest {
20094    /// Creates a new default instance.
20095    pub fn new() -> Self {
20096        std::default::Default::default()
20097    }
20098
20099    /// Sets the value of [parent][crate::model::ListResourceValueConfigsRequest::parent].
20100    ///
20101    /// # Example
20102    /// ```ignore,no_run
20103    /// # use google_cloud_securitycenter_v2::model::ListResourceValueConfigsRequest;
20104    /// # let organization_id = "organization_id";
20105    /// let x = ListResourceValueConfigsRequest::new().set_parent(format!("organizations/{organization_id}"));
20106    /// ```
20107    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20108        self.parent = v.into();
20109        self
20110    }
20111
20112    /// Sets the value of [page_size][crate::model::ListResourceValueConfigsRequest::page_size].
20113    ///
20114    /// # Example
20115    /// ```ignore,no_run
20116    /// # use google_cloud_securitycenter_v2::model::ListResourceValueConfigsRequest;
20117    /// let x = ListResourceValueConfigsRequest::new().set_page_size(42);
20118    /// ```
20119    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20120        self.page_size = v.into();
20121        self
20122    }
20123
20124    /// Sets the value of [page_token][crate::model::ListResourceValueConfigsRequest::page_token].
20125    ///
20126    /// # Example
20127    /// ```ignore,no_run
20128    /// # use google_cloud_securitycenter_v2::model::ListResourceValueConfigsRequest;
20129    /// let x = ListResourceValueConfigsRequest::new().set_page_token("example");
20130    /// ```
20131    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20132        self.page_token = v.into();
20133        self
20134    }
20135}
20136
20137impl wkt::message::Message for ListResourceValueConfigsRequest {
20138    fn typename() -> &'static str {
20139        "type.googleapis.com/google.cloud.securitycenter.v2.ListResourceValueConfigsRequest"
20140    }
20141}
20142
20143/// Response message to list resource value configs
20144#[derive(Clone, Default, PartialEq)]
20145#[non_exhaustive]
20146pub struct ListResourceValueConfigsResponse {
20147    /// The resource value configs from the specified parent.
20148    pub resource_value_configs: std::vec::Vec<crate::model::ResourceValueConfig>,
20149
20150    /// A token, which can be sent as `page_token` to retrieve the next page.
20151    /// If this field is empty, there are no subsequent pages.
20152    pub next_page_token: std::string::String,
20153
20154    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20155}
20156
20157impl ListResourceValueConfigsResponse {
20158    /// Creates a new default instance.
20159    pub fn new() -> Self {
20160        std::default::Default::default()
20161    }
20162
20163    /// Sets the value of [resource_value_configs][crate::model::ListResourceValueConfigsResponse::resource_value_configs].
20164    ///
20165    /// # Example
20166    /// ```ignore,no_run
20167    /// # use google_cloud_securitycenter_v2::model::ListResourceValueConfigsResponse;
20168    /// use google_cloud_securitycenter_v2::model::ResourceValueConfig;
20169    /// let x = ListResourceValueConfigsResponse::new()
20170    ///     .set_resource_value_configs([
20171    ///         ResourceValueConfig::default()/* use setters */,
20172    ///         ResourceValueConfig::default()/* use (different) setters */,
20173    ///     ]);
20174    /// ```
20175    pub fn set_resource_value_configs<T, V>(mut self, v: T) -> Self
20176    where
20177        T: std::iter::IntoIterator<Item = V>,
20178        V: std::convert::Into<crate::model::ResourceValueConfig>,
20179    {
20180        use std::iter::Iterator;
20181        self.resource_value_configs = v.into_iter().map(|i| i.into()).collect();
20182        self
20183    }
20184
20185    /// Sets the value of [next_page_token][crate::model::ListResourceValueConfigsResponse::next_page_token].
20186    ///
20187    /// # Example
20188    /// ```ignore,no_run
20189    /// # use google_cloud_securitycenter_v2::model::ListResourceValueConfigsResponse;
20190    /// let x = ListResourceValueConfigsResponse::new().set_next_page_token("example");
20191    /// ```
20192    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20193        self.next_page_token = v.into();
20194        self
20195    }
20196}
20197
20198impl wkt::message::Message for ListResourceValueConfigsResponse {
20199    fn typename() -> &'static str {
20200        "type.googleapis.com/google.cloud.securitycenter.v2.ListResourceValueConfigsResponse"
20201    }
20202}
20203
20204#[doc(hidden)]
20205impl google_cloud_gax::paginator::internal::PageableResponse for ListResourceValueConfigsResponse {
20206    type PageItem = crate::model::ResourceValueConfig;
20207
20208    fn items(self) -> std::vec::Vec<Self::PageItem> {
20209        self.resource_value_configs
20210    }
20211
20212    fn next_page_token(&self) -> std::string::String {
20213        use std::clone::Clone;
20214        self.next_page_token.clone()
20215    }
20216}
20217
20218/// Request message for listing sources.
20219#[derive(Clone, Default, PartialEq)]
20220#[non_exhaustive]
20221pub struct ListSourcesRequest {
20222    /// Required. Resource name of the parent of sources to list. Its format should
20223    /// be `organizations/[organization_id]`, `folders/[folder_id]`, or
20224    /// `projects/[project_id]`.
20225    pub parent: std::string::String,
20226
20227    /// The value returned by the last `ListSourcesResponse`; indicates
20228    /// that this is a continuation of a prior `ListSources` call, and
20229    /// that the system should return the next page of data.
20230    pub page_token: std::string::String,
20231
20232    /// The maximum number of results to return in a single response. Default is
20233    /// 10, minimum is 1, maximum is 1000.
20234    pub page_size: i32,
20235
20236    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20237}
20238
20239impl ListSourcesRequest {
20240    /// Creates a new default instance.
20241    pub fn new() -> Self {
20242        std::default::Default::default()
20243    }
20244
20245    /// Sets the value of [parent][crate::model::ListSourcesRequest::parent].
20246    ///
20247    /// # Example
20248    /// ```ignore,no_run
20249    /// # use google_cloud_securitycenter_v2::model::ListSourcesRequest;
20250    /// # let organization_id = "organization_id";
20251    /// let x = ListSourcesRequest::new().set_parent(format!("organizations/{organization_id}"));
20252    /// ```
20253    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20254        self.parent = v.into();
20255        self
20256    }
20257
20258    /// Sets the value of [page_token][crate::model::ListSourcesRequest::page_token].
20259    ///
20260    /// # Example
20261    /// ```ignore,no_run
20262    /// # use google_cloud_securitycenter_v2::model::ListSourcesRequest;
20263    /// let x = ListSourcesRequest::new().set_page_token("example");
20264    /// ```
20265    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20266        self.page_token = v.into();
20267        self
20268    }
20269
20270    /// Sets the value of [page_size][crate::model::ListSourcesRequest::page_size].
20271    ///
20272    /// # Example
20273    /// ```ignore,no_run
20274    /// # use google_cloud_securitycenter_v2::model::ListSourcesRequest;
20275    /// let x = ListSourcesRequest::new().set_page_size(42);
20276    /// ```
20277    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20278        self.page_size = v.into();
20279        self
20280    }
20281}
20282
20283impl wkt::message::Message for ListSourcesRequest {
20284    fn typename() -> &'static str {
20285        "type.googleapis.com/google.cloud.securitycenter.v2.ListSourcesRequest"
20286    }
20287}
20288
20289/// Response message for listing sources.
20290#[derive(Clone, Default, PartialEq)]
20291#[non_exhaustive]
20292pub struct ListSourcesResponse {
20293    /// Sources belonging to the requested parent.
20294    pub sources: std::vec::Vec<crate::model::Source>,
20295
20296    /// Token to retrieve the next page of results, or empty if there are no more
20297    /// results.
20298    pub next_page_token: std::string::String,
20299
20300    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20301}
20302
20303impl ListSourcesResponse {
20304    /// Creates a new default instance.
20305    pub fn new() -> Self {
20306        std::default::Default::default()
20307    }
20308
20309    /// Sets the value of [sources][crate::model::ListSourcesResponse::sources].
20310    ///
20311    /// # Example
20312    /// ```ignore,no_run
20313    /// # use google_cloud_securitycenter_v2::model::ListSourcesResponse;
20314    /// use google_cloud_securitycenter_v2::model::Source;
20315    /// let x = ListSourcesResponse::new()
20316    ///     .set_sources([
20317    ///         Source::default()/* use setters */,
20318    ///         Source::default()/* use (different) setters */,
20319    ///     ]);
20320    /// ```
20321    pub fn set_sources<T, V>(mut self, v: T) -> Self
20322    where
20323        T: std::iter::IntoIterator<Item = V>,
20324        V: std::convert::Into<crate::model::Source>,
20325    {
20326        use std::iter::Iterator;
20327        self.sources = v.into_iter().map(|i| i.into()).collect();
20328        self
20329    }
20330
20331    /// Sets the value of [next_page_token][crate::model::ListSourcesResponse::next_page_token].
20332    ///
20333    /// # Example
20334    /// ```ignore,no_run
20335    /// # use google_cloud_securitycenter_v2::model::ListSourcesResponse;
20336    /// let x = ListSourcesResponse::new().set_next_page_token("example");
20337    /// ```
20338    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20339        self.next_page_token = v.into();
20340        self
20341    }
20342}
20343
20344impl wkt::message::Message for ListSourcesResponse {
20345    fn typename() -> &'static str {
20346        "type.googleapis.com/google.cloud.securitycenter.v2.ListSourcesResponse"
20347    }
20348}
20349
20350#[doc(hidden)]
20351impl google_cloud_gax::paginator::internal::PageableResponse for ListSourcesResponse {
20352    type PageItem = crate::model::Source;
20353
20354    fn items(self) -> std::vec::Vec<Self::PageItem> {
20355        self.sources
20356    }
20357
20358    fn next_page_token(&self) -> std::string::String {
20359        use std::clone::Clone;
20360        self.next_page_token.clone()
20361    }
20362}
20363
20364/// Request message for listing the valued resources for a given simulation.
20365#[derive(Clone, Default, PartialEq)]
20366#[non_exhaustive]
20367pub struct ListValuedResourcesRequest {
20368    /// Required. Name of parent to list exposed resources.
20369    ///
20370    /// Valid formats:
20371    /// `organizations/{organization}`,
20372    /// `organizations/{organization}/simulations/{simulation}`
20373    /// `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
20374    pub parent: std::string::String,
20375
20376    /// The filter expression that filters the valued resources in the response.
20377    /// Supported fields:
20378    ///
20379    /// * `resource_value` supports =
20380    /// * `resource_type` supports =
20381    pub filter: std::string::String,
20382
20383    /// The value returned by the last `ListValuedResourcesResponse`; indicates
20384    /// that this is a continuation of a prior `ListValuedResources` call, and
20385    /// that the system should return the next page of data.
20386    pub page_token: std::string::String,
20387
20388    /// The maximum number of results to return in a single response. Default is
20389    /// 10, minimum is 1, maximum is 1000.
20390    pub page_size: i32,
20391
20392    /// Optional. The fields by which to order the valued resources response.
20393    ///
20394    /// Supported fields:
20395    ///
20396    /// * `exposed_score`
20397    ///
20398    /// * `resource_value`
20399    ///
20400    /// * `resource_type`
20401    ///
20402    ///
20403    /// Values should be a comma separated list of fields. For example:
20404    /// `exposed_score,resource_value`.
20405    ///
20406    /// The default sorting order is descending. To specify ascending or descending
20407    /// order for a field, append a " ASC" or a " DESC" suffix, respectively; for
20408    /// example: `exposed_score DESC`.
20409    pub order_by: std::string::String,
20410
20411    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20412}
20413
20414impl ListValuedResourcesRequest {
20415    /// Creates a new default instance.
20416    pub fn new() -> Self {
20417        std::default::Default::default()
20418    }
20419
20420    /// Sets the value of [parent][crate::model::ListValuedResourcesRequest::parent].
20421    ///
20422    /// # Example
20423    /// ```ignore,no_run
20424    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesRequest;
20425    /// # let organization_id = "organization_id";
20426    /// # let simulation_id = "simulation_id";
20427    /// let x = ListValuedResourcesRequest::new().set_parent(format!("organizations/{organization_id}/simulations/{simulation_id}"));
20428    /// ```
20429    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20430        self.parent = v.into();
20431        self
20432    }
20433
20434    /// Sets the value of [filter][crate::model::ListValuedResourcesRequest::filter].
20435    ///
20436    /// # Example
20437    /// ```ignore,no_run
20438    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesRequest;
20439    /// let x = ListValuedResourcesRequest::new().set_filter("example");
20440    /// ```
20441    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20442        self.filter = v.into();
20443        self
20444    }
20445
20446    /// Sets the value of [page_token][crate::model::ListValuedResourcesRequest::page_token].
20447    ///
20448    /// # Example
20449    /// ```ignore,no_run
20450    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesRequest;
20451    /// let x = ListValuedResourcesRequest::new().set_page_token("example");
20452    /// ```
20453    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20454        self.page_token = v.into();
20455        self
20456    }
20457
20458    /// Sets the value of [page_size][crate::model::ListValuedResourcesRequest::page_size].
20459    ///
20460    /// # Example
20461    /// ```ignore,no_run
20462    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesRequest;
20463    /// let x = ListValuedResourcesRequest::new().set_page_size(42);
20464    /// ```
20465    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20466        self.page_size = v.into();
20467        self
20468    }
20469
20470    /// Sets the value of [order_by][crate::model::ListValuedResourcesRequest::order_by].
20471    ///
20472    /// # Example
20473    /// ```ignore,no_run
20474    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesRequest;
20475    /// let x = ListValuedResourcesRequest::new().set_order_by("example");
20476    /// ```
20477    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20478        self.order_by = v.into();
20479        self
20480    }
20481}
20482
20483impl wkt::message::Message for ListValuedResourcesRequest {
20484    fn typename() -> &'static str {
20485        "type.googleapis.com/google.cloud.securitycenter.v2.ListValuedResourcesRequest"
20486    }
20487}
20488
20489/// Response message for listing the valued resources for a given simulation.
20490#[derive(Clone, Default, PartialEq)]
20491#[non_exhaustive]
20492pub struct ListValuedResourcesResponse {
20493    /// The valued resources that the attack path simulation identified.
20494    pub valued_resources: std::vec::Vec<crate::model::ValuedResource>,
20495
20496    /// Token to retrieve the next page of results, or empty if there are no more
20497    /// results.
20498    pub next_page_token: std::string::String,
20499
20500    /// The estimated total number of results matching the query.
20501    pub total_size: i32,
20502
20503    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20504}
20505
20506impl ListValuedResourcesResponse {
20507    /// Creates a new default instance.
20508    pub fn new() -> Self {
20509        std::default::Default::default()
20510    }
20511
20512    /// Sets the value of [valued_resources][crate::model::ListValuedResourcesResponse::valued_resources].
20513    ///
20514    /// # Example
20515    /// ```ignore,no_run
20516    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesResponse;
20517    /// use google_cloud_securitycenter_v2::model::ValuedResource;
20518    /// let x = ListValuedResourcesResponse::new()
20519    ///     .set_valued_resources([
20520    ///         ValuedResource::default()/* use setters */,
20521    ///         ValuedResource::default()/* use (different) setters */,
20522    ///     ]);
20523    /// ```
20524    pub fn set_valued_resources<T, V>(mut self, v: T) -> Self
20525    where
20526        T: std::iter::IntoIterator<Item = V>,
20527        V: std::convert::Into<crate::model::ValuedResource>,
20528    {
20529        use std::iter::Iterator;
20530        self.valued_resources = v.into_iter().map(|i| i.into()).collect();
20531        self
20532    }
20533
20534    /// Sets the value of [next_page_token][crate::model::ListValuedResourcesResponse::next_page_token].
20535    ///
20536    /// # Example
20537    /// ```ignore,no_run
20538    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesResponse;
20539    /// let x = ListValuedResourcesResponse::new().set_next_page_token("example");
20540    /// ```
20541    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20542        self.next_page_token = v.into();
20543        self
20544    }
20545
20546    /// Sets the value of [total_size][crate::model::ListValuedResourcesResponse::total_size].
20547    ///
20548    /// # Example
20549    /// ```ignore,no_run
20550    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesResponse;
20551    /// let x = ListValuedResourcesResponse::new().set_total_size(42);
20552    /// ```
20553    pub fn set_total_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20554        self.total_size = v.into();
20555        self
20556    }
20557}
20558
20559impl wkt::message::Message for ListValuedResourcesResponse {
20560    fn typename() -> &'static str {
20561        "type.googleapis.com/google.cloud.securitycenter.v2.ListValuedResourcesResponse"
20562    }
20563}
20564
20565#[doc(hidden)]
20566impl google_cloud_gax::paginator::internal::PageableResponse for ListValuedResourcesResponse {
20567    type PageItem = crate::model::ValuedResource;
20568
20569    fn items(self) -> std::vec::Vec<Self::PageItem> {
20570        self.valued_resources
20571    }
20572
20573    fn next_page_token(&self) -> std::string::String {
20574        use std::clone::Clone;
20575        self.next_page_token.clone()
20576    }
20577}
20578
20579/// Request message for updating a finding's state.
20580#[derive(Clone, Default, PartialEq)]
20581#[non_exhaustive]
20582pub struct SetFindingStateRequest {
20583    /// Required. The [relative resource
20584    /// name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
20585    /// of the finding. If no location is specified, finding is assumed to be in
20586    /// global. The following list shows some examples:
20587    ///
20588    ///
20589    /// `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
20590    /// +
20591    /// `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
20592    ///
20593    /// + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
20594    ///
20595    /// `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
20596    ///
20597    /// + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
20598    ///
20599    /// `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
20600    pub name: std::string::String,
20601
20602    /// Required. The desired State of the finding.
20603    pub state: crate::model::finding::State,
20604
20605    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20606}
20607
20608impl SetFindingStateRequest {
20609    /// Creates a new default instance.
20610    pub fn new() -> Self {
20611        std::default::Default::default()
20612    }
20613
20614    /// Sets the value of [name][crate::model::SetFindingStateRequest::name].
20615    ///
20616    /// # Example
20617    /// ```ignore,no_run
20618    /// # use google_cloud_securitycenter_v2::model::SetFindingStateRequest;
20619    /// # let organization_id = "organization_id";
20620    /// # let source_id = "source_id";
20621    /// # let finding_id = "finding_id";
20622    /// let x = SetFindingStateRequest::new().set_name(format!("organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"));
20623    /// ```
20624    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20625        self.name = v.into();
20626        self
20627    }
20628
20629    /// Sets the value of [state][crate::model::SetFindingStateRequest::state].
20630    ///
20631    /// # Example
20632    /// ```ignore,no_run
20633    /// # use google_cloud_securitycenter_v2::model::SetFindingStateRequest;
20634    /// use google_cloud_securitycenter_v2::model::finding::State;
20635    /// let x0 = SetFindingStateRequest::new().set_state(State::Active);
20636    /// let x1 = SetFindingStateRequest::new().set_state(State::Inactive);
20637    /// ```
20638    pub fn set_state<T: std::convert::Into<crate::model::finding::State>>(mut self, v: T) -> Self {
20639        self.state = v.into();
20640        self
20641    }
20642}
20643
20644impl wkt::message::Message for SetFindingStateRequest {
20645    fn typename() -> &'static str {
20646        "type.googleapis.com/google.cloud.securitycenter.v2.SetFindingStateRequest"
20647    }
20648}
20649
20650/// Request message for updating a finding's mute status.
20651#[derive(Clone, Default, PartialEq)]
20652#[non_exhaustive]
20653pub struct SetMuteRequest {
20654    /// Required. The [relative resource
20655    /// name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
20656    /// of the finding. If no location is specified, finding is assumed to be in
20657    /// global. The following list shows some examples:
20658    ///
20659    ///
20660    /// `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
20661    /// +
20662    /// `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
20663    ///
20664    /// + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
20665    ///
20666    /// `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
20667    ///
20668    /// + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
20669    ///
20670    /// `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
20671    pub name: std::string::String,
20672
20673    /// Required. The desired state of the Mute.
20674    pub mute: crate::model::finding::Mute,
20675
20676    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20677}
20678
20679impl SetMuteRequest {
20680    /// Creates a new default instance.
20681    pub fn new() -> Self {
20682        std::default::Default::default()
20683    }
20684
20685    /// Sets the value of [name][crate::model::SetMuteRequest::name].
20686    ///
20687    /// # Example
20688    /// ```ignore,no_run
20689    /// # use google_cloud_securitycenter_v2::model::SetMuteRequest;
20690    /// # let organization_id = "organization_id";
20691    /// # let source_id = "source_id";
20692    /// # let finding_id = "finding_id";
20693    /// let x = SetMuteRequest::new().set_name(format!("organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"));
20694    /// ```
20695    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20696        self.name = v.into();
20697        self
20698    }
20699
20700    /// Sets the value of [mute][crate::model::SetMuteRequest::mute].
20701    ///
20702    /// # Example
20703    /// ```ignore,no_run
20704    /// # use google_cloud_securitycenter_v2::model::SetMuteRequest;
20705    /// use google_cloud_securitycenter_v2::model::finding::Mute;
20706    /// let x0 = SetMuteRequest::new().set_mute(Mute::Muted);
20707    /// let x1 = SetMuteRequest::new().set_mute(Mute::Unmuted);
20708    /// let x2 = SetMuteRequest::new().set_mute(Mute::Undefined);
20709    /// ```
20710    pub fn set_mute<T: std::convert::Into<crate::model::finding::Mute>>(mut self, v: T) -> Self {
20711        self.mute = v.into();
20712        self
20713    }
20714}
20715
20716impl wkt::message::Message for SetMuteRequest {
20717    fn typename() -> &'static str {
20718        "type.googleapis.com/google.cloud.securitycenter.v2.SetMuteRequest"
20719    }
20720}
20721
20722/// Request message for updating a BigQuery export.
20723#[derive(Clone, Default, PartialEq)]
20724#[non_exhaustive]
20725pub struct UpdateBigQueryExportRequest {
20726    /// Required. The BigQuery export being updated.
20727    pub big_query_export: std::option::Option<crate::model::BigQueryExport>,
20728
20729    /// The list of fields to be updated.
20730    /// If empty all mutable fields will be updated.
20731    pub update_mask: std::option::Option<wkt::FieldMask>,
20732
20733    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20734}
20735
20736impl UpdateBigQueryExportRequest {
20737    /// Creates a new default instance.
20738    pub fn new() -> Self {
20739        std::default::Default::default()
20740    }
20741
20742    /// Sets the value of [big_query_export][crate::model::UpdateBigQueryExportRequest::big_query_export].
20743    ///
20744    /// # Example
20745    /// ```ignore,no_run
20746    /// # use google_cloud_securitycenter_v2::model::UpdateBigQueryExportRequest;
20747    /// use google_cloud_securitycenter_v2::model::BigQueryExport;
20748    /// let x = UpdateBigQueryExportRequest::new().set_big_query_export(BigQueryExport::default()/* use setters */);
20749    /// ```
20750    pub fn set_big_query_export<T>(mut self, v: T) -> Self
20751    where
20752        T: std::convert::Into<crate::model::BigQueryExport>,
20753    {
20754        self.big_query_export = std::option::Option::Some(v.into());
20755        self
20756    }
20757
20758    /// Sets or clears the value of [big_query_export][crate::model::UpdateBigQueryExportRequest::big_query_export].
20759    ///
20760    /// # Example
20761    /// ```ignore,no_run
20762    /// # use google_cloud_securitycenter_v2::model::UpdateBigQueryExportRequest;
20763    /// use google_cloud_securitycenter_v2::model::BigQueryExport;
20764    /// let x = UpdateBigQueryExportRequest::new().set_or_clear_big_query_export(Some(BigQueryExport::default()/* use setters */));
20765    /// let x = UpdateBigQueryExportRequest::new().set_or_clear_big_query_export(None::<BigQueryExport>);
20766    /// ```
20767    pub fn set_or_clear_big_query_export<T>(mut self, v: std::option::Option<T>) -> Self
20768    where
20769        T: std::convert::Into<crate::model::BigQueryExport>,
20770    {
20771        self.big_query_export = v.map(|x| x.into());
20772        self
20773    }
20774
20775    /// Sets the value of [update_mask][crate::model::UpdateBigQueryExportRequest::update_mask].
20776    ///
20777    /// # Example
20778    /// ```ignore,no_run
20779    /// # use google_cloud_securitycenter_v2::model::UpdateBigQueryExportRequest;
20780    /// use wkt::FieldMask;
20781    /// let x = UpdateBigQueryExportRequest::new().set_update_mask(FieldMask::default()/* use setters */);
20782    /// ```
20783    pub fn set_update_mask<T>(mut self, v: T) -> Self
20784    where
20785        T: std::convert::Into<wkt::FieldMask>,
20786    {
20787        self.update_mask = std::option::Option::Some(v.into());
20788        self
20789    }
20790
20791    /// Sets or clears the value of [update_mask][crate::model::UpdateBigQueryExportRequest::update_mask].
20792    ///
20793    /// # Example
20794    /// ```ignore,no_run
20795    /// # use google_cloud_securitycenter_v2::model::UpdateBigQueryExportRequest;
20796    /// use wkt::FieldMask;
20797    /// let x = UpdateBigQueryExportRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
20798    /// let x = UpdateBigQueryExportRequest::new().set_or_clear_update_mask(None::<FieldMask>);
20799    /// ```
20800    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
20801    where
20802        T: std::convert::Into<wkt::FieldMask>,
20803    {
20804        self.update_mask = v.map(|x| x.into());
20805        self
20806    }
20807}
20808
20809impl wkt::message::Message for UpdateBigQueryExportRequest {
20810    fn typename() -> &'static str {
20811        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateBigQueryExportRequest"
20812    }
20813}
20814
20815/// Request message for updating a ExternalSystem resource.
20816#[derive(Clone, Default, PartialEq)]
20817#[non_exhaustive]
20818pub struct UpdateExternalSystemRequest {
20819    /// Required. The external system resource to update.
20820    pub external_system: std::option::Option<crate::model::ExternalSystem>,
20821
20822    /// The FieldMask to use when updating the external system resource.
20823    ///
20824    /// If empty all mutable fields will be updated.
20825    pub update_mask: std::option::Option<wkt::FieldMask>,
20826
20827    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20828}
20829
20830impl UpdateExternalSystemRequest {
20831    /// Creates a new default instance.
20832    pub fn new() -> Self {
20833        std::default::Default::default()
20834    }
20835
20836    /// Sets the value of [external_system][crate::model::UpdateExternalSystemRequest::external_system].
20837    ///
20838    /// # Example
20839    /// ```ignore,no_run
20840    /// # use google_cloud_securitycenter_v2::model::UpdateExternalSystemRequest;
20841    /// use google_cloud_securitycenter_v2::model::ExternalSystem;
20842    /// let x = UpdateExternalSystemRequest::new().set_external_system(ExternalSystem::default()/* use setters */);
20843    /// ```
20844    pub fn set_external_system<T>(mut self, v: T) -> Self
20845    where
20846        T: std::convert::Into<crate::model::ExternalSystem>,
20847    {
20848        self.external_system = std::option::Option::Some(v.into());
20849        self
20850    }
20851
20852    /// Sets or clears the value of [external_system][crate::model::UpdateExternalSystemRequest::external_system].
20853    ///
20854    /// # Example
20855    /// ```ignore,no_run
20856    /// # use google_cloud_securitycenter_v2::model::UpdateExternalSystemRequest;
20857    /// use google_cloud_securitycenter_v2::model::ExternalSystem;
20858    /// let x = UpdateExternalSystemRequest::new().set_or_clear_external_system(Some(ExternalSystem::default()/* use setters */));
20859    /// let x = UpdateExternalSystemRequest::new().set_or_clear_external_system(None::<ExternalSystem>);
20860    /// ```
20861    pub fn set_or_clear_external_system<T>(mut self, v: std::option::Option<T>) -> Self
20862    where
20863        T: std::convert::Into<crate::model::ExternalSystem>,
20864    {
20865        self.external_system = v.map(|x| x.into());
20866        self
20867    }
20868
20869    /// Sets the value of [update_mask][crate::model::UpdateExternalSystemRequest::update_mask].
20870    ///
20871    /// # Example
20872    /// ```ignore,no_run
20873    /// # use google_cloud_securitycenter_v2::model::UpdateExternalSystemRequest;
20874    /// use wkt::FieldMask;
20875    /// let x = UpdateExternalSystemRequest::new().set_update_mask(FieldMask::default()/* use setters */);
20876    /// ```
20877    pub fn set_update_mask<T>(mut self, v: T) -> Self
20878    where
20879        T: std::convert::Into<wkt::FieldMask>,
20880    {
20881        self.update_mask = std::option::Option::Some(v.into());
20882        self
20883    }
20884
20885    /// Sets or clears the value of [update_mask][crate::model::UpdateExternalSystemRequest::update_mask].
20886    ///
20887    /// # Example
20888    /// ```ignore,no_run
20889    /// # use google_cloud_securitycenter_v2::model::UpdateExternalSystemRequest;
20890    /// use wkt::FieldMask;
20891    /// let x = UpdateExternalSystemRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
20892    /// let x = UpdateExternalSystemRequest::new().set_or_clear_update_mask(None::<FieldMask>);
20893    /// ```
20894    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
20895    where
20896        T: std::convert::Into<wkt::FieldMask>,
20897    {
20898        self.update_mask = v.map(|x| x.into());
20899        self
20900    }
20901}
20902
20903impl wkt::message::Message for UpdateExternalSystemRequest {
20904    fn typename() -> &'static str {
20905        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateExternalSystemRequest"
20906    }
20907}
20908
20909/// Request message for updating or creating a finding.
20910#[derive(Clone, Default, PartialEq)]
20911#[non_exhaustive]
20912pub struct UpdateFindingRequest {
20913    /// Required. The finding resource to update or create if it does not already
20914    /// exist. parent, security_marks, and update_time will be ignored.
20915    ///
20916    /// In the case of creation, the finding id portion of the name must be
20917    /// alphanumeric and less than or equal to 32 characters and greater than 0
20918    /// characters in length.
20919    pub finding: std::option::Option<crate::model::Finding>,
20920
20921    /// The FieldMask to use when updating the finding resource. This field should
20922    /// not be specified when creating a finding.
20923    ///
20924    /// When updating a finding, an empty mask is treated as updating all mutable
20925    /// fields and replacing source_properties.  Individual source_properties can
20926    /// be added/updated by using "source_properties.\<property key\>" in the field
20927    /// mask.
20928    pub update_mask: std::option::Option<wkt::FieldMask>,
20929
20930    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20931}
20932
20933impl UpdateFindingRequest {
20934    /// Creates a new default instance.
20935    pub fn new() -> Self {
20936        std::default::Default::default()
20937    }
20938
20939    /// Sets the value of [finding][crate::model::UpdateFindingRequest::finding].
20940    ///
20941    /// # Example
20942    /// ```ignore,no_run
20943    /// # use google_cloud_securitycenter_v2::model::UpdateFindingRequest;
20944    /// use google_cloud_securitycenter_v2::model::Finding;
20945    /// let x = UpdateFindingRequest::new().set_finding(Finding::default()/* use setters */);
20946    /// ```
20947    pub fn set_finding<T>(mut self, v: T) -> Self
20948    where
20949        T: std::convert::Into<crate::model::Finding>,
20950    {
20951        self.finding = std::option::Option::Some(v.into());
20952        self
20953    }
20954
20955    /// Sets or clears the value of [finding][crate::model::UpdateFindingRequest::finding].
20956    ///
20957    /// # Example
20958    /// ```ignore,no_run
20959    /// # use google_cloud_securitycenter_v2::model::UpdateFindingRequest;
20960    /// use google_cloud_securitycenter_v2::model::Finding;
20961    /// let x = UpdateFindingRequest::new().set_or_clear_finding(Some(Finding::default()/* use setters */));
20962    /// let x = UpdateFindingRequest::new().set_or_clear_finding(None::<Finding>);
20963    /// ```
20964    pub fn set_or_clear_finding<T>(mut self, v: std::option::Option<T>) -> Self
20965    where
20966        T: std::convert::Into<crate::model::Finding>,
20967    {
20968        self.finding = v.map(|x| x.into());
20969        self
20970    }
20971
20972    /// Sets the value of [update_mask][crate::model::UpdateFindingRequest::update_mask].
20973    ///
20974    /// # Example
20975    /// ```ignore,no_run
20976    /// # use google_cloud_securitycenter_v2::model::UpdateFindingRequest;
20977    /// use wkt::FieldMask;
20978    /// let x = UpdateFindingRequest::new().set_update_mask(FieldMask::default()/* use setters */);
20979    /// ```
20980    pub fn set_update_mask<T>(mut self, v: T) -> Self
20981    where
20982        T: std::convert::Into<wkt::FieldMask>,
20983    {
20984        self.update_mask = std::option::Option::Some(v.into());
20985        self
20986    }
20987
20988    /// Sets or clears the value of [update_mask][crate::model::UpdateFindingRequest::update_mask].
20989    ///
20990    /// # Example
20991    /// ```ignore,no_run
20992    /// # use google_cloud_securitycenter_v2::model::UpdateFindingRequest;
20993    /// use wkt::FieldMask;
20994    /// let x = UpdateFindingRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
20995    /// let x = UpdateFindingRequest::new().set_or_clear_update_mask(None::<FieldMask>);
20996    /// ```
20997    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
20998    where
20999        T: std::convert::Into<wkt::FieldMask>,
21000    {
21001        self.update_mask = v.map(|x| x.into());
21002        self
21003    }
21004}
21005
21006impl wkt::message::Message for UpdateFindingRequest {
21007    fn typename() -> &'static str {
21008        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateFindingRequest"
21009    }
21010}
21011
21012/// Request message for updating a mute config.
21013#[derive(Clone, Default, PartialEq)]
21014#[non_exhaustive]
21015pub struct UpdateMuteConfigRequest {
21016    /// Required. The mute config being updated.
21017    pub mute_config: std::option::Option<crate::model::MuteConfig>,
21018
21019    /// The list of fields to be updated.
21020    /// If empty all mutable fields will be updated.
21021    pub update_mask: std::option::Option<wkt::FieldMask>,
21022
21023    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21024}
21025
21026impl UpdateMuteConfigRequest {
21027    /// Creates a new default instance.
21028    pub fn new() -> Self {
21029        std::default::Default::default()
21030    }
21031
21032    /// Sets the value of [mute_config][crate::model::UpdateMuteConfigRequest::mute_config].
21033    ///
21034    /// # Example
21035    /// ```ignore,no_run
21036    /// # use google_cloud_securitycenter_v2::model::UpdateMuteConfigRequest;
21037    /// use google_cloud_securitycenter_v2::model::MuteConfig;
21038    /// let x = UpdateMuteConfigRequest::new().set_mute_config(MuteConfig::default()/* use setters */);
21039    /// ```
21040    pub fn set_mute_config<T>(mut self, v: T) -> Self
21041    where
21042        T: std::convert::Into<crate::model::MuteConfig>,
21043    {
21044        self.mute_config = std::option::Option::Some(v.into());
21045        self
21046    }
21047
21048    /// Sets or clears the value of [mute_config][crate::model::UpdateMuteConfigRequest::mute_config].
21049    ///
21050    /// # Example
21051    /// ```ignore,no_run
21052    /// # use google_cloud_securitycenter_v2::model::UpdateMuteConfigRequest;
21053    /// use google_cloud_securitycenter_v2::model::MuteConfig;
21054    /// let x = UpdateMuteConfigRequest::new().set_or_clear_mute_config(Some(MuteConfig::default()/* use setters */));
21055    /// let x = UpdateMuteConfigRequest::new().set_or_clear_mute_config(None::<MuteConfig>);
21056    /// ```
21057    pub fn set_or_clear_mute_config<T>(mut self, v: std::option::Option<T>) -> Self
21058    where
21059        T: std::convert::Into<crate::model::MuteConfig>,
21060    {
21061        self.mute_config = v.map(|x| x.into());
21062        self
21063    }
21064
21065    /// Sets the value of [update_mask][crate::model::UpdateMuteConfigRequest::update_mask].
21066    ///
21067    /// # Example
21068    /// ```ignore,no_run
21069    /// # use google_cloud_securitycenter_v2::model::UpdateMuteConfigRequest;
21070    /// use wkt::FieldMask;
21071    /// let x = UpdateMuteConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21072    /// ```
21073    pub fn set_update_mask<T>(mut self, v: T) -> Self
21074    where
21075        T: std::convert::Into<wkt::FieldMask>,
21076    {
21077        self.update_mask = std::option::Option::Some(v.into());
21078        self
21079    }
21080
21081    /// Sets or clears the value of [update_mask][crate::model::UpdateMuteConfigRequest::update_mask].
21082    ///
21083    /// # Example
21084    /// ```ignore,no_run
21085    /// # use google_cloud_securitycenter_v2::model::UpdateMuteConfigRequest;
21086    /// use wkt::FieldMask;
21087    /// let x = UpdateMuteConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21088    /// let x = UpdateMuteConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21089    /// ```
21090    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21091    where
21092        T: std::convert::Into<wkt::FieldMask>,
21093    {
21094        self.update_mask = v.map(|x| x.into());
21095        self
21096    }
21097}
21098
21099impl wkt::message::Message for UpdateMuteConfigRequest {
21100    fn typename() -> &'static str {
21101        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateMuteConfigRequest"
21102    }
21103}
21104
21105/// Request message for updating a notification config.
21106#[derive(Clone, Default, PartialEq)]
21107#[non_exhaustive]
21108pub struct UpdateNotificationConfigRequest {
21109    /// Required. The notification config to update.
21110    pub notification_config: std::option::Option<crate::model::NotificationConfig>,
21111
21112    /// The FieldMask to use when updating the notification config.
21113    ///
21114    /// If empty all mutable fields will be updated.
21115    pub update_mask: std::option::Option<wkt::FieldMask>,
21116
21117    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21118}
21119
21120impl UpdateNotificationConfigRequest {
21121    /// Creates a new default instance.
21122    pub fn new() -> Self {
21123        std::default::Default::default()
21124    }
21125
21126    /// Sets the value of [notification_config][crate::model::UpdateNotificationConfigRequest::notification_config].
21127    ///
21128    /// # Example
21129    /// ```ignore,no_run
21130    /// # use google_cloud_securitycenter_v2::model::UpdateNotificationConfigRequest;
21131    /// use google_cloud_securitycenter_v2::model::NotificationConfig;
21132    /// let x = UpdateNotificationConfigRequest::new().set_notification_config(NotificationConfig::default()/* use setters */);
21133    /// ```
21134    pub fn set_notification_config<T>(mut self, v: T) -> Self
21135    where
21136        T: std::convert::Into<crate::model::NotificationConfig>,
21137    {
21138        self.notification_config = std::option::Option::Some(v.into());
21139        self
21140    }
21141
21142    /// Sets or clears the value of [notification_config][crate::model::UpdateNotificationConfigRequest::notification_config].
21143    ///
21144    /// # Example
21145    /// ```ignore,no_run
21146    /// # use google_cloud_securitycenter_v2::model::UpdateNotificationConfigRequest;
21147    /// use google_cloud_securitycenter_v2::model::NotificationConfig;
21148    /// let x = UpdateNotificationConfigRequest::new().set_or_clear_notification_config(Some(NotificationConfig::default()/* use setters */));
21149    /// let x = UpdateNotificationConfigRequest::new().set_or_clear_notification_config(None::<NotificationConfig>);
21150    /// ```
21151    pub fn set_or_clear_notification_config<T>(mut self, v: std::option::Option<T>) -> Self
21152    where
21153        T: std::convert::Into<crate::model::NotificationConfig>,
21154    {
21155        self.notification_config = v.map(|x| x.into());
21156        self
21157    }
21158
21159    /// Sets the value of [update_mask][crate::model::UpdateNotificationConfigRequest::update_mask].
21160    ///
21161    /// # Example
21162    /// ```ignore,no_run
21163    /// # use google_cloud_securitycenter_v2::model::UpdateNotificationConfigRequest;
21164    /// use wkt::FieldMask;
21165    /// let x = UpdateNotificationConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21166    /// ```
21167    pub fn set_update_mask<T>(mut self, v: T) -> Self
21168    where
21169        T: std::convert::Into<wkt::FieldMask>,
21170    {
21171        self.update_mask = std::option::Option::Some(v.into());
21172        self
21173    }
21174
21175    /// Sets or clears the value of [update_mask][crate::model::UpdateNotificationConfigRequest::update_mask].
21176    ///
21177    /// # Example
21178    /// ```ignore,no_run
21179    /// # use google_cloud_securitycenter_v2::model::UpdateNotificationConfigRequest;
21180    /// use wkt::FieldMask;
21181    /// let x = UpdateNotificationConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21182    /// let x = UpdateNotificationConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21183    /// ```
21184    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21185    where
21186        T: std::convert::Into<wkt::FieldMask>,
21187    {
21188        self.update_mask = v.map(|x| x.into());
21189        self
21190    }
21191}
21192
21193impl wkt::message::Message for UpdateNotificationConfigRequest {
21194    fn typename() -> &'static str {
21195        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateNotificationConfigRequest"
21196    }
21197}
21198
21199/// Request message to update resource value config
21200#[derive(Clone, Default, PartialEq)]
21201#[non_exhaustive]
21202pub struct UpdateResourceValueConfigRequest {
21203    /// Required. The resource value config being updated.
21204    pub resource_value_config: std::option::Option<crate::model::ResourceValueConfig>,
21205
21206    /// The list of fields to be updated.
21207    /// If empty all mutable fields will be updated.
21208    ///
21209    /// To update nested fields, include the top level field in the mask
21210    /// For example, to update gcp_metadata.resource_type, include the
21211    /// "gcp_metadata" field mask
21212    pub update_mask: std::option::Option<wkt::FieldMask>,
21213
21214    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21215}
21216
21217impl UpdateResourceValueConfigRequest {
21218    /// Creates a new default instance.
21219    pub fn new() -> Self {
21220        std::default::Default::default()
21221    }
21222
21223    /// Sets the value of [resource_value_config][crate::model::UpdateResourceValueConfigRequest::resource_value_config].
21224    ///
21225    /// # Example
21226    /// ```ignore,no_run
21227    /// # use google_cloud_securitycenter_v2::model::UpdateResourceValueConfigRequest;
21228    /// use google_cloud_securitycenter_v2::model::ResourceValueConfig;
21229    /// let x = UpdateResourceValueConfigRequest::new().set_resource_value_config(ResourceValueConfig::default()/* use setters */);
21230    /// ```
21231    pub fn set_resource_value_config<T>(mut self, v: T) -> Self
21232    where
21233        T: std::convert::Into<crate::model::ResourceValueConfig>,
21234    {
21235        self.resource_value_config = std::option::Option::Some(v.into());
21236        self
21237    }
21238
21239    /// Sets or clears the value of [resource_value_config][crate::model::UpdateResourceValueConfigRequest::resource_value_config].
21240    ///
21241    /// # Example
21242    /// ```ignore,no_run
21243    /// # use google_cloud_securitycenter_v2::model::UpdateResourceValueConfigRequest;
21244    /// use google_cloud_securitycenter_v2::model::ResourceValueConfig;
21245    /// let x = UpdateResourceValueConfigRequest::new().set_or_clear_resource_value_config(Some(ResourceValueConfig::default()/* use setters */));
21246    /// let x = UpdateResourceValueConfigRequest::new().set_or_clear_resource_value_config(None::<ResourceValueConfig>);
21247    /// ```
21248    pub fn set_or_clear_resource_value_config<T>(mut self, v: std::option::Option<T>) -> Self
21249    where
21250        T: std::convert::Into<crate::model::ResourceValueConfig>,
21251    {
21252        self.resource_value_config = v.map(|x| x.into());
21253        self
21254    }
21255
21256    /// Sets the value of [update_mask][crate::model::UpdateResourceValueConfigRequest::update_mask].
21257    ///
21258    /// # Example
21259    /// ```ignore,no_run
21260    /// # use google_cloud_securitycenter_v2::model::UpdateResourceValueConfigRequest;
21261    /// use wkt::FieldMask;
21262    /// let x = UpdateResourceValueConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21263    /// ```
21264    pub fn set_update_mask<T>(mut self, v: T) -> Self
21265    where
21266        T: std::convert::Into<wkt::FieldMask>,
21267    {
21268        self.update_mask = std::option::Option::Some(v.into());
21269        self
21270    }
21271
21272    /// Sets or clears the value of [update_mask][crate::model::UpdateResourceValueConfigRequest::update_mask].
21273    ///
21274    /// # Example
21275    /// ```ignore,no_run
21276    /// # use google_cloud_securitycenter_v2::model::UpdateResourceValueConfigRequest;
21277    /// use wkt::FieldMask;
21278    /// let x = UpdateResourceValueConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21279    /// let x = UpdateResourceValueConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21280    /// ```
21281    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21282    where
21283        T: std::convert::Into<wkt::FieldMask>,
21284    {
21285        self.update_mask = v.map(|x| x.into());
21286        self
21287    }
21288}
21289
21290impl wkt::message::Message for UpdateResourceValueConfigRequest {
21291    fn typename() -> &'static str {
21292        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest"
21293    }
21294}
21295
21296/// Request message for updating a SecurityMarks resource.
21297#[derive(Clone, Default, PartialEq)]
21298#[non_exhaustive]
21299pub struct UpdateSecurityMarksRequest {
21300    /// Required. The security marks resource to update.
21301    pub security_marks: std::option::Option<crate::model::SecurityMarks>,
21302
21303    /// The FieldMask to use when updating the security marks resource.
21304    ///
21305    /// The field mask must not contain duplicate fields.
21306    /// If empty or set to "marks", all marks will be replaced.  Individual
21307    /// marks can be updated using "marks.<mark_key>".
21308    pub update_mask: std::option::Option<wkt::FieldMask>,
21309
21310    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21311}
21312
21313impl UpdateSecurityMarksRequest {
21314    /// Creates a new default instance.
21315    pub fn new() -> Self {
21316        std::default::Default::default()
21317    }
21318
21319    /// Sets the value of [security_marks][crate::model::UpdateSecurityMarksRequest::security_marks].
21320    ///
21321    /// # Example
21322    /// ```ignore,no_run
21323    /// # use google_cloud_securitycenter_v2::model::UpdateSecurityMarksRequest;
21324    /// use google_cloud_securitycenter_v2::model::SecurityMarks;
21325    /// let x = UpdateSecurityMarksRequest::new().set_security_marks(SecurityMarks::default()/* use setters */);
21326    /// ```
21327    pub fn set_security_marks<T>(mut self, v: T) -> Self
21328    where
21329        T: std::convert::Into<crate::model::SecurityMarks>,
21330    {
21331        self.security_marks = std::option::Option::Some(v.into());
21332        self
21333    }
21334
21335    /// Sets or clears the value of [security_marks][crate::model::UpdateSecurityMarksRequest::security_marks].
21336    ///
21337    /// # Example
21338    /// ```ignore,no_run
21339    /// # use google_cloud_securitycenter_v2::model::UpdateSecurityMarksRequest;
21340    /// use google_cloud_securitycenter_v2::model::SecurityMarks;
21341    /// let x = UpdateSecurityMarksRequest::new().set_or_clear_security_marks(Some(SecurityMarks::default()/* use setters */));
21342    /// let x = UpdateSecurityMarksRequest::new().set_or_clear_security_marks(None::<SecurityMarks>);
21343    /// ```
21344    pub fn set_or_clear_security_marks<T>(mut self, v: std::option::Option<T>) -> Self
21345    where
21346        T: std::convert::Into<crate::model::SecurityMarks>,
21347    {
21348        self.security_marks = v.map(|x| x.into());
21349        self
21350    }
21351
21352    /// Sets the value of [update_mask][crate::model::UpdateSecurityMarksRequest::update_mask].
21353    ///
21354    /// # Example
21355    /// ```ignore,no_run
21356    /// # use google_cloud_securitycenter_v2::model::UpdateSecurityMarksRequest;
21357    /// use wkt::FieldMask;
21358    /// let x = UpdateSecurityMarksRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21359    /// ```
21360    pub fn set_update_mask<T>(mut self, v: T) -> Self
21361    where
21362        T: std::convert::Into<wkt::FieldMask>,
21363    {
21364        self.update_mask = std::option::Option::Some(v.into());
21365        self
21366    }
21367
21368    /// Sets or clears the value of [update_mask][crate::model::UpdateSecurityMarksRequest::update_mask].
21369    ///
21370    /// # Example
21371    /// ```ignore,no_run
21372    /// # use google_cloud_securitycenter_v2::model::UpdateSecurityMarksRequest;
21373    /// use wkt::FieldMask;
21374    /// let x = UpdateSecurityMarksRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21375    /// let x = UpdateSecurityMarksRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21376    /// ```
21377    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21378    where
21379        T: std::convert::Into<wkt::FieldMask>,
21380    {
21381        self.update_mask = v.map(|x| x.into());
21382        self
21383    }
21384}
21385
21386impl wkt::message::Message for UpdateSecurityMarksRequest {
21387    fn typename() -> &'static str {
21388        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateSecurityMarksRequest"
21389    }
21390}
21391
21392/// Request message for updating a source.
21393#[derive(Clone, Default, PartialEq)]
21394#[non_exhaustive]
21395pub struct UpdateSourceRequest {
21396    /// Required. The source resource to update.
21397    pub source: std::option::Option<crate::model::Source>,
21398
21399    /// The FieldMask to use when updating the source resource.
21400    ///
21401    /// If empty all mutable fields will be updated.
21402    pub update_mask: std::option::Option<wkt::FieldMask>,
21403
21404    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21405}
21406
21407impl UpdateSourceRequest {
21408    /// Creates a new default instance.
21409    pub fn new() -> Self {
21410        std::default::Default::default()
21411    }
21412
21413    /// Sets the value of [source][crate::model::UpdateSourceRequest::source].
21414    ///
21415    /// # Example
21416    /// ```ignore,no_run
21417    /// # use google_cloud_securitycenter_v2::model::UpdateSourceRequest;
21418    /// use google_cloud_securitycenter_v2::model::Source;
21419    /// let x = UpdateSourceRequest::new().set_source(Source::default()/* use setters */);
21420    /// ```
21421    pub fn set_source<T>(mut self, v: T) -> Self
21422    where
21423        T: std::convert::Into<crate::model::Source>,
21424    {
21425        self.source = std::option::Option::Some(v.into());
21426        self
21427    }
21428
21429    /// Sets or clears the value of [source][crate::model::UpdateSourceRequest::source].
21430    ///
21431    /// # Example
21432    /// ```ignore,no_run
21433    /// # use google_cloud_securitycenter_v2::model::UpdateSourceRequest;
21434    /// use google_cloud_securitycenter_v2::model::Source;
21435    /// let x = UpdateSourceRequest::new().set_or_clear_source(Some(Source::default()/* use setters */));
21436    /// let x = UpdateSourceRequest::new().set_or_clear_source(None::<Source>);
21437    /// ```
21438    pub fn set_or_clear_source<T>(mut self, v: std::option::Option<T>) -> Self
21439    where
21440        T: std::convert::Into<crate::model::Source>,
21441    {
21442        self.source = v.map(|x| x.into());
21443        self
21444    }
21445
21446    /// Sets the value of [update_mask][crate::model::UpdateSourceRequest::update_mask].
21447    ///
21448    /// # Example
21449    /// ```ignore,no_run
21450    /// # use google_cloud_securitycenter_v2::model::UpdateSourceRequest;
21451    /// use wkt::FieldMask;
21452    /// let x = UpdateSourceRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21453    /// ```
21454    pub fn set_update_mask<T>(mut self, v: T) -> Self
21455    where
21456        T: std::convert::Into<wkt::FieldMask>,
21457    {
21458        self.update_mask = std::option::Option::Some(v.into());
21459        self
21460    }
21461
21462    /// Sets or clears the value of [update_mask][crate::model::UpdateSourceRequest::update_mask].
21463    ///
21464    /// # Example
21465    /// ```ignore,no_run
21466    /// # use google_cloud_securitycenter_v2::model::UpdateSourceRequest;
21467    /// use wkt::FieldMask;
21468    /// let x = UpdateSourceRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21469    /// let x = UpdateSourceRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21470    /// ```
21471    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21472    where
21473        T: std::convert::Into<wkt::FieldMask>,
21474    {
21475        self.update_mask = v.map(|x| x.into());
21476        self
21477    }
21478}
21479
21480impl wkt::message::Message for UpdateSourceRequest {
21481    fn typename() -> &'static str {
21482        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateSourceRequest"
21483    }
21484}
21485
21486/// Attack path simulation
21487#[derive(Clone, Default, PartialEq)]
21488#[non_exhaustive]
21489pub struct Simulation {
21490    /// Full resource name of the Simulation:
21491    /// `organizations/123/simulations/456`
21492    pub name: std::string::String,
21493
21494    /// Output only. Time simulation was created
21495    pub create_time: std::option::Option<wkt::Timestamp>,
21496
21497    /// Resource value configurations' metadata used in this simulation. Maximum of
21498    /// 100.
21499    pub resource_value_configs_metadata: std::vec::Vec<crate::model::ResourceValueConfigMetadata>,
21500
21501    /// Indicates which cloud provider was used in this simulation.
21502    pub cloud_provider: crate::model::CloudProvider,
21503
21504    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21505}
21506
21507impl Simulation {
21508    /// Creates a new default instance.
21509    pub fn new() -> Self {
21510        std::default::Default::default()
21511    }
21512
21513    /// Sets the value of [name][crate::model::Simulation::name].
21514    ///
21515    /// # Example
21516    /// ```ignore,no_run
21517    /// # use google_cloud_securitycenter_v2::model::Simulation;
21518    /// # let organization_id = "organization_id";
21519    /// # let simulation_id = "simulation_id";
21520    /// let x = Simulation::new().set_name(format!("organizations/{organization_id}/simulations/{simulation_id}"));
21521    /// ```
21522    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21523        self.name = v.into();
21524        self
21525    }
21526
21527    /// Sets the value of [create_time][crate::model::Simulation::create_time].
21528    ///
21529    /// # Example
21530    /// ```ignore,no_run
21531    /// # use google_cloud_securitycenter_v2::model::Simulation;
21532    /// use wkt::Timestamp;
21533    /// let x = Simulation::new().set_create_time(Timestamp::default()/* use setters */);
21534    /// ```
21535    pub fn set_create_time<T>(mut self, v: T) -> Self
21536    where
21537        T: std::convert::Into<wkt::Timestamp>,
21538    {
21539        self.create_time = std::option::Option::Some(v.into());
21540        self
21541    }
21542
21543    /// Sets or clears the value of [create_time][crate::model::Simulation::create_time].
21544    ///
21545    /// # Example
21546    /// ```ignore,no_run
21547    /// # use google_cloud_securitycenter_v2::model::Simulation;
21548    /// use wkt::Timestamp;
21549    /// let x = Simulation::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
21550    /// let x = Simulation::new().set_or_clear_create_time(None::<Timestamp>);
21551    /// ```
21552    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
21553    where
21554        T: std::convert::Into<wkt::Timestamp>,
21555    {
21556        self.create_time = v.map(|x| x.into());
21557        self
21558    }
21559
21560    /// Sets the value of [resource_value_configs_metadata][crate::model::Simulation::resource_value_configs_metadata].
21561    ///
21562    /// # Example
21563    /// ```ignore,no_run
21564    /// # use google_cloud_securitycenter_v2::model::Simulation;
21565    /// use google_cloud_securitycenter_v2::model::ResourceValueConfigMetadata;
21566    /// let x = Simulation::new()
21567    ///     .set_resource_value_configs_metadata([
21568    ///         ResourceValueConfigMetadata::default()/* use setters */,
21569    ///         ResourceValueConfigMetadata::default()/* use (different) setters */,
21570    ///     ]);
21571    /// ```
21572    pub fn set_resource_value_configs_metadata<T, V>(mut self, v: T) -> Self
21573    where
21574        T: std::iter::IntoIterator<Item = V>,
21575        V: std::convert::Into<crate::model::ResourceValueConfigMetadata>,
21576    {
21577        use std::iter::Iterator;
21578        self.resource_value_configs_metadata = v.into_iter().map(|i| i.into()).collect();
21579        self
21580    }
21581
21582    /// Sets the value of [cloud_provider][crate::model::Simulation::cloud_provider].
21583    ///
21584    /// # Example
21585    /// ```ignore,no_run
21586    /// # use google_cloud_securitycenter_v2::model::Simulation;
21587    /// use google_cloud_securitycenter_v2::model::CloudProvider;
21588    /// let x0 = Simulation::new().set_cloud_provider(CloudProvider::GoogleCloudPlatform);
21589    /// let x1 = Simulation::new().set_cloud_provider(CloudProvider::AmazonWebServices);
21590    /// let x2 = Simulation::new().set_cloud_provider(CloudProvider::MicrosoftAzure);
21591    /// ```
21592    pub fn set_cloud_provider<T: std::convert::Into<crate::model::CloudProvider>>(
21593        mut self,
21594        v: T,
21595    ) -> Self {
21596        self.cloud_provider = v.into();
21597        self
21598    }
21599}
21600
21601impl wkt::message::Message for Simulation {
21602    fn typename() -> &'static str {
21603        "type.googleapis.com/google.cloud.securitycenter.v2.Simulation"
21604    }
21605}
21606
21607/// Security Command Center finding source. A finding source
21608/// is an entity or a mechanism that can produce a finding. A source is like a
21609/// container of findings that come from the same scanner, logger, monitor, and
21610/// other tools.
21611#[derive(Clone, Default, PartialEq)]
21612#[non_exhaustive]
21613pub struct Source {
21614    /// The relative resource name of this source. See:
21615    /// <https://cloud.google.com/apis/design/resource_names#relative_resource_name>
21616    /// Example:
21617    /// "organizations/{organization_id}/sources/{source_id}"
21618    pub name: std::string::String,
21619
21620    /// The source's display name.
21621    /// A source's display name must be unique amongst its siblings, for example,
21622    /// two sources with the same parent can't share the same display name.
21623    /// The display name must have a length between 1 and 64 characters
21624    /// (inclusive).
21625    pub display_name: std::string::String,
21626
21627    /// The description of the source (max of 1024 characters).
21628    /// Example:
21629    /// "Web Security Scanner is a web security scanner for common
21630    /// vulnerabilities in App Engine applications. It can automatically
21631    /// scan and detect four common vulnerabilities, including cross-site-scripting
21632    /// (XSS), Flash injection, mixed content (HTTP in HTTPS), and
21633    /// outdated or insecure libraries."
21634    pub description: std::string::String,
21635
21636    /// The canonical name of the finding source. It's either
21637    /// "organizations/{organization_id}/sources/{source_id}",
21638    /// "folders/{folder_id}/sources/{source_id}", or
21639    /// "projects/{project_number}/sources/{source_id}",
21640    /// depending on the closest CRM ancestor of the resource associated with the
21641    /// finding.
21642    pub canonical_name: std::string::String,
21643
21644    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21645}
21646
21647impl Source {
21648    /// Creates a new default instance.
21649    pub fn new() -> Self {
21650        std::default::Default::default()
21651    }
21652
21653    /// Sets the value of [name][crate::model::Source::name].
21654    ///
21655    /// # Example
21656    /// ```ignore,no_run
21657    /// # use google_cloud_securitycenter_v2::model::Source;
21658    /// # let organization_id = "organization_id";
21659    /// # let source_id = "source_id";
21660    /// let x = Source::new().set_name(format!("organizations/{organization_id}/sources/{source_id}"));
21661    /// ```
21662    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21663        self.name = v.into();
21664        self
21665    }
21666
21667    /// Sets the value of [display_name][crate::model::Source::display_name].
21668    ///
21669    /// # Example
21670    /// ```ignore,no_run
21671    /// # use google_cloud_securitycenter_v2::model::Source;
21672    /// let x = Source::new().set_display_name("example");
21673    /// ```
21674    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21675        self.display_name = v.into();
21676        self
21677    }
21678
21679    /// Sets the value of [description][crate::model::Source::description].
21680    ///
21681    /// # Example
21682    /// ```ignore,no_run
21683    /// # use google_cloud_securitycenter_v2::model::Source;
21684    /// let x = Source::new().set_description("example");
21685    /// ```
21686    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21687        self.description = v.into();
21688        self
21689    }
21690
21691    /// Sets the value of [canonical_name][crate::model::Source::canonical_name].
21692    ///
21693    /// # Example
21694    /// ```ignore,no_run
21695    /// # use google_cloud_securitycenter_v2::model::Source;
21696    /// let x = Source::new().set_canonical_name("example");
21697    /// ```
21698    pub fn set_canonical_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21699        self.canonical_name = v.into();
21700        self
21701    }
21702}
21703
21704impl wkt::message::Message for Source {
21705    fn typename() -> &'static str {
21706        "type.googleapis.com/google.cloud.securitycenter.v2.Source"
21707    }
21708}
21709
21710/// Contains details about a group of security issues that, when the issues
21711/// occur together, represent a greater risk than when the issues occur
21712/// independently. A group of such issues is referred to as a toxic
21713/// combination.
21714#[derive(Clone, Default, PartialEq)]
21715#[non_exhaustive]
21716pub struct ToxicCombination {
21717    /// The
21718    /// [Attack exposure
21719    /// score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores)
21720    /// of this toxic combination. The score is a measure of how much this toxic
21721    /// combination exposes one or more high-value resources to potential attack.
21722    pub attack_exposure_score: f64,
21723
21724    /// List of resource names of findings associated with this toxic combination.
21725    /// For example, `organizations/123/sources/456/findings/789`.
21726    pub related_findings: std::vec::Vec<std::string::String>,
21727
21728    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21729}
21730
21731impl ToxicCombination {
21732    /// Creates a new default instance.
21733    pub fn new() -> Self {
21734        std::default::Default::default()
21735    }
21736
21737    /// Sets the value of [attack_exposure_score][crate::model::ToxicCombination::attack_exposure_score].
21738    ///
21739    /// # Example
21740    /// ```ignore,no_run
21741    /// # use google_cloud_securitycenter_v2::model::ToxicCombination;
21742    /// let x = ToxicCombination::new().set_attack_exposure_score(42.0);
21743    /// ```
21744    pub fn set_attack_exposure_score<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
21745        self.attack_exposure_score = v.into();
21746        self
21747    }
21748
21749    /// Sets the value of [related_findings][crate::model::ToxicCombination::related_findings].
21750    ///
21751    /// # Example
21752    /// ```ignore,no_run
21753    /// # use google_cloud_securitycenter_v2::model::ToxicCombination;
21754    /// let x = ToxicCombination::new().set_related_findings(["a", "b", "c"]);
21755    /// ```
21756    pub fn set_related_findings<T, V>(mut self, v: T) -> Self
21757    where
21758        T: std::iter::IntoIterator<Item = V>,
21759        V: std::convert::Into<std::string::String>,
21760    {
21761        use std::iter::Iterator;
21762        self.related_findings = v.into_iter().map(|i| i.into()).collect();
21763        self
21764    }
21765}
21766
21767impl wkt::message::Message for ToxicCombination {
21768    fn typename() -> &'static str {
21769        "type.googleapis.com/google.cloud.securitycenter.v2.ToxicCombination"
21770    }
21771}
21772
21773/// A resource that is determined to have value to a user's system
21774#[derive(Clone, Default, PartialEq)]
21775#[non_exhaustive]
21776pub struct ValuedResource {
21777    /// Valued resource name, for example,
21778    /// e.g.:
21779    /// `organizations/123/simulations/456/valuedResources/789`
21780    pub name: std::string::String,
21781
21782    /// The
21783    /// [full resource
21784    /// name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
21785    /// of the valued resource.
21786    pub resource: std::string::String,
21787
21788    /// The [resource
21789    /// type](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
21790    /// of the valued resource.
21791    pub resource_type: std::string::String,
21792
21793    /// Human-readable name of the valued resource.
21794    pub display_name: std::string::String,
21795
21796    /// How valuable this resource is.
21797    pub resource_value: crate::model::valued_resource::ResourceValue,
21798
21799    /// Exposed score for this valued resource. A value of 0 means no exposure was
21800    /// detected exposure.
21801    pub exposed_score: f64,
21802
21803    /// List of resource value configurations' metadata used to determine the value
21804    /// of this resource. Maximum of 100.
21805    pub resource_value_configs_used: std::vec::Vec<crate::model::ResourceValueConfigMetadata>,
21806
21807    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21808}
21809
21810impl ValuedResource {
21811    /// Creates a new default instance.
21812    pub fn new() -> Self {
21813        std::default::Default::default()
21814    }
21815
21816    /// Sets the value of [name][crate::model::ValuedResource::name].
21817    ///
21818    /// # Example
21819    /// ```ignore,no_run
21820    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
21821    /// # let organization_id = "organization_id";
21822    /// # let simulation_id = "simulation_id";
21823    /// # let valued_resource_id = "valued_resource_id";
21824    /// let x = ValuedResource::new().set_name(format!("organizations/{organization_id}/simulations/{simulation_id}/valuedResources/{valued_resource_id}"));
21825    /// ```
21826    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21827        self.name = v.into();
21828        self
21829    }
21830
21831    /// Sets the value of [resource][crate::model::ValuedResource::resource].
21832    ///
21833    /// # Example
21834    /// ```ignore,no_run
21835    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
21836    /// let x = ValuedResource::new().set_resource("example");
21837    /// ```
21838    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21839        self.resource = v.into();
21840        self
21841    }
21842
21843    /// Sets the value of [resource_type][crate::model::ValuedResource::resource_type].
21844    ///
21845    /// # Example
21846    /// ```ignore,no_run
21847    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
21848    /// let x = ValuedResource::new().set_resource_type("example");
21849    /// ```
21850    pub fn set_resource_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21851        self.resource_type = v.into();
21852        self
21853    }
21854
21855    /// Sets the value of [display_name][crate::model::ValuedResource::display_name].
21856    ///
21857    /// # Example
21858    /// ```ignore,no_run
21859    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
21860    /// let x = ValuedResource::new().set_display_name("example");
21861    /// ```
21862    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21863        self.display_name = v.into();
21864        self
21865    }
21866
21867    /// Sets the value of [resource_value][crate::model::ValuedResource::resource_value].
21868    ///
21869    /// # Example
21870    /// ```ignore,no_run
21871    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
21872    /// use google_cloud_securitycenter_v2::model::valued_resource::ResourceValue;
21873    /// let x0 = ValuedResource::new().set_resource_value(ResourceValue::Low);
21874    /// let x1 = ValuedResource::new().set_resource_value(ResourceValue::Medium);
21875    /// let x2 = ValuedResource::new().set_resource_value(ResourceValue::High);
21876    /// ```
21877    pub fn set_resource_value<
21878        T: std::convert::Into<crate::model::valued_resource::ResourceValue>,
21879    >(
21880        mut self,
21881        v: T,
21882    ) -> Self {
21883        self.resource_value = v.into();
21884        self
21885    }
21886
21887    /// Sets the value of [exposed_score][crate::model::ValuedResource::exposed_score].
21888    ///
21889    /// # Example
21890    /// ```ignore,no_run
21891    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
21892    /// let x = ValuedResource::new().set_exposed_score(42.0);
21893    /// ```
21894    pub fn set_exposed_score<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
21895        self.exposed_score = v.into();
21896        self
21897    }
21898
21899    /// Sets the value of [resource_value_configs_used][crate::model::ValuedResource::resource_value_configs_used].
21900    ///
21901    /// # Example
21902    /// ```ignore,no_run
21903    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
21904    /// use google_cloud_securitycenter_v2::model::ResourceValueConfigMetadata;
21905    /// let x = ValuedResource::new()
21906    ///     .set_resource_value_configs_used([
21907    ///         ResourceValueConfigMetadata::default()/* use setters */,
21908    ///         ResourceValueConfigMetadata::default()/* use (different) setters */,
21909    ///     ]);
21910    /// ```
21911    pub fn set_resource_value_configs_used<T, V>(mut self, v: T) -> Self
21912    where
21913        T: std::iter::IntoIterator<Item = V>,
21914        V: std::convert::Into<crate::model::ResourceValueConfigMetadata>,
21915    {
21916        use std::iter::Iterator;
21917        self.resource_value_configs_used = v.into_iter().map(|i| i.into()).collect();
21918        self
21919    }
21920}
21921
21922impl wkt::message::Message for ValuedResource {
21923    fn typename() -> &'static str {
21924        "type.googleapis.com/google.cloud.securitycenter.v2.ValuedResource"
21925    }
21926}
21927
21928/// Defines additional types related to [ValuedResource].
21929pub mod valued_resource {
21930    #[allow(unused_imports)]
21931    use super::*;
21932
21933    /// How valuable the resource is.
21934    ///
21935    /// # Working with unknown values
21936    ///
21937    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
21938    /// additional enum variants at any time. Adding new variants is not considered
21939    /// a breaking change. Applications should write their code in anticipation of:
21940    ///
21941    /// - New values appearing in future releases of the client library, **and**
21942    /// - New values received dynamically, without application changes.
21943    ///
21944    /// Please consult the [Working with enums] section in the user guide for some
21945    /// guidelines.
21946    ///
21947    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
21948    #[derive(Clone, Debug, PartialEq)]
21949    #[non_exhaustive]
21950    pub enum ResourceValue {
21951        /// The resource value isn't specified.
21952        Unspecified,
21953        /// This is a low-value resource.
21954        Low,
21955        /// This is a medium-value resource.
21956        Medium,
21957        /// This is a high-value resource.
21958        High,
21959        /// If set, the enum was initialized with an unknown value.
21960        ///
21961        /// Applications can examine the value using [ResourceValue::value] or
21962        /// [ResourceValue::name].
21963        UnknownValue(resource_value::UnknownValue),
21964    }
21965
21966    #[doc(hidden)]
21967    pub mod resource_value {
21968        #[allow(unused_imports)]
21969        use super::*;
21970        #[derive(Clone, Debug, PartialEq)]
21971        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21972    }
21973
21974    impl ResourceValue {
21975        /// Gets the enum value.
21976        ///
21977        /// Returns `None` if the enum contains an unknown value deserialized from
21978        /// the string representation of enums.
21979        pub fn value(&self) -> std::option::Option<i32> {
21980            match self {
21981                Self::Unspecified => std::option::Option::Some(0),
21982                Self::Low => std::option::Option::Some(1),
21983                Self::Medium => std::option::Option::Some(2),
21984                Self::High => std::option::Option::Some(3),
21985                Self::UnknownValue(u) => u.0.value(),
21986            }
21987        }
21988
21989        /// Gets the enum value as a string.
21990        ///
21991        /// Returns `None` if the enum contains an unknown value deserialized from
21992        /// the integer representation of enums.
21993        pub fn name(&self) -> std::option::Option<&str> {
21994            match self {
21995                Self::Unspecified => std::option::Option::Some("RESOURCE_VALUE_UNSPECIFIED"),
21996                Self::Low => std::option::Option::Some("RESOURCE_VALUE_LOW"),
21997                Self::Medium => std::option::Option::Some("RESOURCE_VALUE_MEDIUM"),
21998                Self::High => std::option::Option::Some("RESOURCE_VALUE_HIGH"),
21999                Self::UnknownValue(u) => u.0.name(),
22000            }
22001        }
22002    }
22003
22004    impl std::default::Default for ResourceValue {
22005        fn default() -> Self {
22006            use std::convert::From;
22007            Self::from(0)
22008        }
22009    }
22010
22011    impl std::fmt::Display for ResourceValue {
22012        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22013            wkt::internal::display_enum(f, self.name(), self.value())
22014        }
22015    }
22016
22017    impl std::convert::From<i32> for ResourceValue {
22018        fn from(value: i32) -> Self {
22019            match value {
22020                0 => Self::Unspecified,
22021                1 => Self::Low,
22022                2 => Self::Medium,
22023                3 => Self::High,
22024                _ => Self::UnknownValue(resource_value::UnknownValue(
22025                    wkt::internal::UnknownEnumValue::Integer(value),
22026                )),
22027            }
22028        }
22029    }
22030
22031    impl std::convert::From<&str> for ResourceValue {
22032        fn from(value: &str) -> Self {
22033            use std::string::ToString;
22034            match value {
22035                "RESOURCE_VALUE_UNSPECIFIED" => Self::Unspecified,
22036                "RESOURCE_VALUE_LOW" => Self::Low,
22037                "RESOURCE_VALUE_MEDIUM" => Self::Medium,
22038                "RESOURCE_VALUE_HIGH" => Self::High,
22039                _ => Self::UnknownValue(resource_value::UnknownValue(
22040                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22041                )),
22042            }
22043        }
22044    }
22045
22046    impl serde::ser::Serialize for ResourceValue {
22047        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22048        where
22049            S: serde::Serializer,
22050        {
22051            match self {
22052                Self::Unspecified => serializer.serialize_i32(0),
22053                Self::Low => serializer.serialize_i32(1),
22054                Self::Medium => serializer.serialize_i32(2),
22055                Self::High => serializer.serialize_i32(3),
22056                Self::UnknownValue(u) => u.0.serialize(serializer),
22057            }
22058        }
22059    }
22060
22061    impl<'de> serde::de::Deserialize<'de> for ResourceValue {
22062        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22063        where
22064            D: serde::Deserializer<'de>,
22065        {
22066            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResourceValue>::new(
22067                ".google.cloud.securitycenter.v2.ValuedResource.ResourceValue",
22068            ))
22069        }
22070    }
22071}
22072
22073/// Metadata about a ResourceValueConfig. For example, id and name.
22074#[derive(Clone, Default, PartialEq)]
22075#[non_exhaustive]
22076pub struct ResourceValueConfigMetadata {
22077    /// Resource value config name
22078    pub name: std::string::String,
22079
22080    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22081}
22082
22083impl ResourceValueConfigMetadata {
22084    /// Creates a new default instance.
22085    pub fn new() -> Self {
22086        std::default::Default::default()
22087    }
22088
22089    /// Sets the value of [name][crate::model::ResourceValueConfigMetadata::name].
22090    ///
22091    /// # Example
22092    /// ```ignore,no_run
22093    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfigMetadata;
22094    /// let x = ResourceValueConfigMetadata::new().set_name("example");
22095    /// ```
22096    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22097        self.name = v.into();
22098        self
22099    }
22100}
22101
22102impl wkt::message::Message for ResourceValueConfigMetadata {
22103    fn typename() -> &'static str {
22104        "type.googleapis.com/google.cloud.securitycenter.v2.ResourceValueConfigMetadata"
22105    }
22106}
22107
22108/// Vertex AI-related information associated with the finding.
22109#[derive(Clone, Default, PartialEq)]
22110#[non_exhaustive]
22111pub struct VertexAi {
22112    /// Datasets associated with the finding.
22113    pub datasets: std::vec::Vec<crate::model::vertex_ai::Dataset>,
22114
22115    /// Pipelines associated with the finding.
22116    pub pipelines: std::vec::Vec<crate::model::vertex_ai::Pipeline>,
22117
22118    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22119}
22120
22121impl VertexAi {
22122    /// Creates a new default instance.
22123    pub fn new() -> Self {
22124        std::default::Default::default()
22125    }
22126
22127    /// Sets the value of [datasets][crate::model::VertexAi::datasets].
22128    ///
22129    /// # Example
22130    /// ```ignore,no_run
22131    /// # use google_cloud_securitycenter_v2::model::VertexAi;
22132    /// use google_cloud_securitycenter_v2::model::vertex_ai::Dataset;
22133    /// let x = VertexAi::new()
22134    ///     .set_datasets([
22135    ///         Dataset::default()/* use setters */,
22136    ///         Dataset::default()/* use (different) setters */,
22137    ///     ]);
22138    /// ```
22139    pub fn set_datasets<T, V>(mut self, v: T) -> Self
22140    where
22141        T: std::iter::IntoIterator<Item = V>,
22142        V: std::convert::Into<crate::model::vertex_ai::Dataset>,
22143    {
22144        use std::iter::Iterator;
22145        self.datasets = v.into_iter().map(|i| i.into()).collect();
22146        self
22147    }
22148
22149    /// Sets the value of [pipelines][crate::model::VertexAi::pipelines].
22150    ///
22151    /// # Example
22152    /// ```ignore,no_run
22153    /// # use google_cloud_securitycenter_v2::model::VertexAi;
22154    /// use google_cloud_securitycenter_v2::model::vertex_ai::Pipeline;
22155    /// let x = VertexAi::new()
22156    ///     .set_pipelines([
22157    ///         Pipeline::default()/* use setters */,
22158    ///         Pipeline::default()/* use (different) setters */,
22159    ///     ]);
22160    /// ```
22161    pub fn set_pipelines<T, V>(mut self, v: T) -> Self
22162    where
22163        T: std::iter::IntoIterator<Item = V>,
22164        V: std::convert::Into<crate::model::vertex_ai::Pipeline>,
22165    {
22166        use std::iter::Iterator;
22167        self.pipelines = v.into_iter().map(|i| i.into()).collect();
22168        self
22169    }
22170}
22171
22172impl wkt::message::Message for VertexAi {
22173    fn typename() -> &'static str {
22174        "type.googleapis.com/google.cloud.securitycenter.v2.VertexAi"
22175    }
22176}
22177
22178/// Defines additional types related to [VertexAi].
22179pub mod vertex_ai {
22180    #[allow(unused_imports)]
22181    use super::*;
22182
22183    /// Vertex AI dataset associated with the finding.
22184    #[derive(Clone, Default, PartialEq)]
22185    #[non_exhaustive]
22186    pub struct Dataset {
22187        /// Resource name of the dataset, e.g.
22188        /// projects/{project}/locations/{location}/datasets/2094040236064505856
22189        pub name: std::string::String,
22190
22191        /// The user defined display name of dataset, e.g. plants-dataset
22192        pub display_name: std::string::String,
22193
22194        /// Data source, such as a BigQuery source URI, e.g.
22195        /// bq://scc-nexus-test.AIPPtest.gsod
22196        pub source: std::string::String,
22197
22198        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22199    }
22200
22201    impl Dataset {
22202        /// Creates a new default instance.
22203        pub fn new() -> Self {
22204            std::default::Default::default()
22205        }
22206
22207        /// Sets the value of [name][crate::model::vertex_ai::Dataset::name].
22208        ///
22209        /// # Example
22210        /// ```ignore,no_run
22211        /// # use google_cloud_securitycenter_v2::model::vertex_ai::Dataset;
22212        /// let x = Dataset::new().set_name("example");
22213        /// ```
22214        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22215            self.name = v.into();
22216            self
22217        }
22218
22219        /// Sets the value of [display_name][crate::model::vertex_ai::Dataset::display_name].
22220        ///
22221        /// # Example
22222        /// ```ignore,no_run
22223        /// # use google_cloud_securitycenter_v2::model::vertex_ai::Dataset;
22224        /// let x = Dataset::new().set_display_name("example");
22225        /// ```
22226        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
22227            mut self,
22228            v: T,
22229        ) -> Self {
22230            self.display_name = v.into();
22231            self
22232        }
22233
22234        /// Sets the value of [source][crate::model::vertex_ai::Dataset::source].
22235        ///
22236        /// # Example
22237        /// ```ignore,no_run
22238        /// # use google_cloud_securitycenter_v2::model::vertex_ai::Dataset;
22239        /// let x = Dataset::new().set_source("example");
22240        /// ```
22241        pub fn set_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22242            self.source = v.into();
22243            self
22244        }
22245    }
22246
22247    impl wkt::message::Message for Dataset {
22248        fn typename() -> &'static str {
22249            "type.googleapis.com/google.cloud.securitycenter.v2.VertexAi.Dataset"
22250        }
22251    }
22252
22253    /// Vertex AI training pipeline associated with the finding.
22254    #[derive(Clone, Default, PartialEq)]
22255    #[non_exhaustive]
22256    pub struct Pipeline {
22257        /// Resource name of the pipeline, e.g.
22258        /// projects/{project}/locations/{location}/trainingPipelines/5253428229225578496
22259        pub name: std::string::String,
22260
22261        /// The user-defined display name of pipeline, e.g. plants-classification
22262        pub display_name: std::string::String,
22263
22264        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22265    }
22266
22267    impl Pipeline {
22268        /// Creates a new default instance.
22269        pub fn new() -> Self {
22270            std::default::Default::default()
22271        }
22272
22273        /// Sets the value of [name][crate::model::vertex_ai::Pipeline::name].
22274        ///
22275        /// # Example
22276        /// ```ignore,no_run
22277        /// # use google_cloud_securitycenter_v2::model::vertex_ai::Pipeline;
22278        /// let x = Pipeline::new().set_name("example");
22279        /// ```
22280        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22281            self.name = v.into();
22282            self
22283        }
22284
22285        /// Sets the value of [display_name][crate::model::vertex_ai::Pipeline::display_name].
22286        ///
22287        /// # Example
22288        /// ```ignore,no_run
22289        /// # use google_cloud_securitycenter_v2::model::vertex_ai::Pipeline;
22290        /// let x = Pipeline::new().set_display_name("example");
22291        /// ```
22292        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
22293            mut self,
22294            v: T,
22295        ) -> Self {
22296            self.display_name = v.into();
22297            self
22298        }
22299    }
22300
22301    impl wkt::message::Message for Pipeline {
22302        fn typename() -> &'static str {
22303            "type.googleapis.com/google.cloud.securitycenter.v2.VertexAi.Pipeline"
22304        }
22305    }
22306}
22307
22308/// Refers to common vulnerability fields e.g. cve, cvss, cwe etc.
22309#[derive(Clone, Default, PartialEq)]
22310#[non_exhaustive]
22311pub struct Vulnerability {
22312    /// CVE stands for Common Vulnerabilities and Exposures
22313    /// (<https://cve.mitre.org/about/>)
22314    pub cve: std::option::Option<crate::model::Cve>,
22315
22316    /// The offending package is relevant to the finding.
22317    pub offending_package: std::option::Option<crate::model::Package>,
22318
22319    /// The fixed package is relevant to the finding.
22320    pub fixed_package: std::option::Option<crate::model::Package>,
22321
22322    /// The security bulletin is relevant to this finding.
22323    pub security_bulletin: std::option::Option<crate::model::SecurityBulletin>,
22324
22325    /// Provider provided risk_score based on multiple factors. The higher the risk
22326    /// score, the more risky the vulnerability is.
22327    pub provider_risk_score: i64,
22328
22329    /// Represents whether the vulnerability is reachable (detected via static
22330    /// analysis)
22331    pub reachable: bool,
22332
22333    /// Represents one or more Common Weakness Enumeration (CWE) information on
22334    /// this vulnerability.
22335    pub cwes: std::vec::Vec<crate::model::Cwe>,
22336
22337    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22338}
22339
22340impl Vulnerability {
22341    /// Creates a new default instance.
22342    pub fn new() -> Self {
22343        std::default::Default::default()
22344    }
22345
22346    /// Sets the value of [cve][crate::model::Vulnerability::cve].
22347    ///
22348    /// # Example
22349    /// ```ignore,no_run
22350    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22351    /// use google_cloud_securitycenter_v2::model::Cve;
22352    /// let x = Vulnerability::new().set_cve(Cve::default()/* use setters */);
22353    /// ```
22354    pub fn set_cve<T>(mut self, v: T) -> Self
22355    where
22356        T: std::convert::Into<crate::model::Cve>,
22357    {
22358        self.cve = std::option::Option::Some(v.into());
22359        self
22360    }
22361
22362    /// Sets or clears the value of [cve][crate::model::Vulnerability::cve].
22363    ///
22364    /// # Example
22365    /// ```ignore,no_run
22366    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22367    /// use google_cloud_securitycenter_v2::model::Cve;
22368    /// let x = Vulnerability::new().set_or_clear_cve(Some(Cve::default()/* use setters */));
22369    /// let x = Vulnerability::new().set_or_clear_cve(None::<Cve>);
22370    /// ```
22371    pub fn set_or_clear_cve<T>(mut self, v: std::option::Option<T>) -> Self
22372    where
22373        T: std::convert::Into<crate::model::Cve>,
22374    {
22375        self.cve = v.map(|x| x.into());
22376        self
22377    }
22378
22379    /// Sets the value of [offending_package][crate::model::Vulnerability::offending_package].
22380    ///
22381    /// # Example
22382    /// ```ignore,no_run
22383    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22384    /// use google_cloud_securitycenter_v2::model::Package;
22385    /// let x = Vulnerability::new().set_offending_package(Package::default()/* use setters */);
22386    /// ```
22387    pub fn set_offending_package<T>(mut self, v: T) -> Self
22388    where
22389        T: std::convert::Into<crate::model::Package>,
22390    {
22391        self.offending_package = std::option::Option::Some(v.into());
22392        self
22393    }
22394
22395    /// Sets or clears the value of [offending_package][crate::model::Vulnerability::offending_package].
22396    ///
22397    /// # Example
22398    /// ```ignore,no_run
22399    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22400    /// use google_cloud_securitycenter_v2::model::Package;
22401    /// let x = Vulnerability::new().set_or_clear_offending_package(Some(Package::default()/* use setters */));
22402    /// let x = Vulnerability::new().set_or_clear_offending_package(None::<Package>);
22403    /// ```
22404    pub fn set_or_clear_offending_package<T>(mut self, v: std::option::Option<T>) -> Self
22405    where
22406        T: std::convert::Into<crate::model::Package>,
22407    {
22408        self.offending_package = v.map(|x| x.into());
22409        self
22410    }
22411
22412    /// Sets the value of [fixed_package][crate::model::Vulnerability::fixed_package].
22413    ///
22414    /// # Example
22415    /// ```ignore,no_run
22416    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22417    /// use google_cloud_securitycenter_v2::model::Package;
22418    /// let x = Vulnerability::new().set_fixed_package(Package::default()/* use setters */);
22419    /// ```
22420    pub fn set_fixed_package<T>(mut self, v: T) -> Self
22421    where
22422        T: std::convert::Into<crate::model::Package>,
22423    {
22424        self.fixed_package = std::option::Option::Some(v.into());
22425        self
22426    }
22427
22428    /// Sets or clears the value of [fixed_package][crate::model::Vulnerability::fixed_package].
22429    ///
22430    /// # Example
22431    /// ```ignore,no_run
22432    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22433    /// use google_cloud_securitycenter_v2::model::Package;
22434    /// let x = Vulnerability::new().set_or_clear_fixed_package(Some(Package::default()/* use setters */));
22435    /// let x = Vulnerability::new().set_or_clear_fixed_package(None::<Package>);
22436    /// ```
22437    pub fn set_or_clear_fixed_package<T>(mut self, v: std::option::Option<T>) -> Self
22438    where
22439        T: std::convert::Into<crate::model::Package>,
22440    {
22441        self.fixed_package = v.map(|x| x.into());
22442        self
22443    }
22444
22445    /// Sets the value of [security_bulletin][crate::model::Vulnerability::security_bulletin].
22446    ///
22447    /// # Example
22448    /// ```ignore,no_run
22449    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22450    /// use google_cloud_securitycenter_v2::model::SecurityBulletin;
22451    /// let x = Vulnerability::new().set_security_bulletin(SecurityBulletin::default()/* use setters */);
22452    /// ```
22453    pub fn set_security_bulletin<T>(mut self, v: T) -> Self
22454    where
22455        T: std::convert::Into<crate::model::SecurityBulletin>,
22456    {
22457        self.security_bulletin = std::option::Option::Some(v.into());
22458        self
22459    }
22460
22461    /// Sets or clears the value of [security_bulletin][crate::model::Vulnerability::security_bulletin].
22462    ///
22463    /// # Example
22464    /// ```ignore,no_run
22465    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22466    /// use google_cloud_securitycenter_v2::model::SecurityBulletin;
22467    /// let x = Vulnerability::new().set_or_clear_security_bulletin(Some(SecurityBulletin::default()/* use setters */));
22468    /// let x = Vulnerability::new().set_or_clear_security_bulletin(None::<SecurityBulletin>);
22469    /// ```
22470    pub fn set_or_clear_security_bulletin<T>(mut self, v: std::option::Option<T>) -> Self
22471    where
22472        T: std::convert::Into<crate::model::SecurityBulletin>,
22473    {
22474        self.security_bulletin = v.map(|x| x.into());
22475        self
22476    }
22477
22478    /// Sets the value of [provider_risk_score][crate::model::Vulnerability::provider_risk_score].
22479    ///
22480    /// # Example
22481    /// ```ignore,no_run
22482    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22483    /// let x = Vulnerability::new().set_provider_risk_score(42);
22484    /// ```
22485    pub fn set_provider_risk_score<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
22486        self.provider_risk_score = v.into();
22487        self
22488    }
22489
22490    /// Sets the value of [reachable][crate::model::Vulnerability::reachable].
22491    ///
22492    /// # Example
22493    /// ```ignore,no_run
22494    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22495    /// let x = Vulnerability::new().set_reachable(true);
22496    /// ```
22497    pub fn set_reachable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22498        self.reachable = v.into();
22499        self
22500    }
22501
22502    /// Sets the value of [cwes][crate::model::Vulnerability::cwes].
22503    ///
22504    /// # Example
22505    /// ```ignore,no_run
22506    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22507    /// use google_cloud_securitycenter_v2::model::Cwe;
22508    /// let x = Vulnerability::new()
22509    ///     .set_cwes([
22510    ///         Cwe::default()/* use setters */,
22511    ///         Cwe::default()/* use (different) setters */,
22512    ///     ]);
22513    /// ```
22514    pub fn set_cwes<T, V>(mut self, v: T) -> Self
22515    where
22516        T: std::iter::IntoIterator<Item = V>,
22517        V: std::convert::Into<crate::model::Cwe>,
22518    {
22519        use std::iter::Iterator;
22520        self.cwes = v.into_iter().map(|i| i.into()).collect();
22521        self
22522    }
22523}
22524
22525impl wkt::message::Message for Vulnerability {
22526    fn typename() -> &'static str {
22527        "type.googleapis.com/google.cloud.securitycenter.v2.Vulnerability"
22528    }
22529}
22530
22531/// CVE stands for Common Vulnerabilities and Exposures.
22532/// Information from the [CVE
22533/// record](https://www.cve.org/ResourcesSupport/Glossary) that describes this
22534/// vulnerability.
22535#[derive(Clone, Default, PartialEq)]
22536#[non_exhaustive]
22537pub struct Cve {
22538    /// The unique identifier for the vulnerability. e.g. CVE-2021-34527
22539    pub id: std::string::String,
22540
22541    /// Additional information about the CVE.
22542    /// e.g. <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527>
22543    pub references: std::vec::Vec<crate::model::Reference>,
22544
22545    /// Describe Common Vulnerability Scoring System specified at
22546    /// <https://www.first.org/cvss/v3.1/specification-document>
22547    pub cvssv3: std::option::Option<crate::model::Cvssv3>,
22548
22549    /// Whether upstream fix is available for the CVE.
22550    pub upstream_fix_available: bool,
22551
22552    /// The potential impact of the vulnerability if it was to be exploited.
22553    pub impact: crate::model::cve::RiskRating,
22554
22555    /// The exploitation activity of the vulnerability in the wild.
22556    pub exploitation_activity: crate::model::cve::ExploitationActivity,
22557
22558    /// Whether or not the vulnerability has been observed in the wild.
22559    pub observed_in_the_wild: bool,
22560
22561    /// Whether or not the vulnerability was zero day when the finding was
22562    /// published.
22563    pub zero_day: bool,
22564
22565    /// Date the first publicly available exploit or PoC was released.
22566    pub exploit_release_date: std::option::Option<wkt::Timestamp>,
22567
22568    /// Date of the earliest known exploitation.
22569    pub first_exploitation_date: std::option::Option<wkt::Timestamp>,
22570
22571    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22572}
22573
22574impl Cve {
22575    /// Creates a new default instance.
22576    pub fn new() -> Self {
22577        std::default::Default::default()
22578    }
22579
22580    /// Sets the value of [id][crate::model::Cve::id].
22581    ///
22582    /// # Example
22583    /// ```ignore,no_run
22584    /// # use google_cloud_securitycenter_v2::model::Cve;
22585    /// let x = Cve::new().set_id("example");
22586    /// ```
22587    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22588        self.id = v.into();
22589        self
22590    }
22591
22592    /// Sets the value of [references][crate::model::Cve::references].
22593    ///
22594    /// # Example
22595    /// ```ignore,no_run
22596    /// # use google_cloud_securitycenter_v2::model::Cve;
22597    /// use google_cloud_securitycenter_v2::model::Reference;
22598    /// let x = Cve::new()
22599    ///     .set_references([
22600    ///         Reference::default()/* use setters */,
22601    ///         Reference::default()/* use (different) setters */,
22602    ///     ]);
22603    /// ```
22604    pub fn set_references<T, V>(mut self, v: T) -> Self
22605    where
22606        T: std::iter::IntoIterator<Item = V>,
22607        V: std::convert::Into<crate::model::Reference>,
22608    {
22609        use std::iter::Iterator;
22610        self.references = v.into_iter().map(|i| i.into()).collect();
22611        self
22612    }
22613
22614    /// Sets the value of [cvssv3][crate::model::Cve::cvssv3].
22615    ///
22616    /// # Example
22617    /// ```ignore,no_run
22618    /// # use google_cloud_securitycenter_v2::model::Cve;
22619    /// use google_cloud_securitycenter_v2::model::Cvssv3;
22620    /// let x = Cve::new().set_cvssv3(Cvssv3::default()/* use setters */);
22621    /// ```
22622    pub fn set_cvssv3<T>(mut self, v: T) -> Self
22623    where
22624        T: std::convert::Into<crate::model::Cvssv3>,
22625    {
22626        self.cvssv3 = std::option::Option::Some(v.into());
22627        self
22628    }
22629
22630    /// Sets or clears the value of [cvssv3][crate::model::Cve::cvssv3].
22631    ///
22632    /// # Example
22633    /// ```ignore,no_run
22634    /// # use google_cloud_securitycenter_v2::model::Cve;
22635    /// use google_cloud_securitycenter_v2::model::Cvssv3;
22636    /// let x = Cve::new().set_or_clear_cvssv3(Some(Cvssv3::default()/* use setters */));
22637    /// let x = Cve::new().set_or_clear_cvssv3(None::<Cvssv3>);
22638    /// ```
22639    pub fn set_or_clear_cvssv3<T>(mut self, v: std::option::Option<T>) -> Self
22640    where
22641        T: std::convert::Into<crate::model::Cvssv3>,
22642    {
22643        self.cvssv3 = v.map(|x| x.into());
22644        self
22645    }
22646
22647    /// Sets the value of [upstream_fix_available][crate::model::Cve::upstream_fix_available].
22648    ///
22649    /// # Example
22650    /// ```ignore,no_run
22651    /// # use google_cloud_securitycenter_v2::model::Cve;
22652    /// let x = Cve::new().set_upstream_fix_available(true);
22653    /// ```
22654    pub fn set_upstream_fix_available<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22655        self.upstream_fix_available = v.into();
22656        self
22657    }
22658
22659    /// Sets the value of [impact][crate::model::Cve::impact].
22660    ///
22661    /// # Example
22662    /// ```ignore,no_run
22663    /// # use google_cloud_securitycenter_v2::model::Cve;
22664    /// use google_cloud_securitycenter_v2::model::cve::RiskRating;
22665    /// let x0 = Cve::new().set_impact(RiskRating::Low);
22666    /// let x1 = Cve::new().set_impact(RiskRating::Medium);
22667    /// let x2 = Cve::new().set_impact(RiskRating::High);
22668    /// ```
22669    pub fn set_impact<T: std::convert::Into<crate::model::cve::RiskRating>>(
22670        mut self,
22671        v: T,
22672    ) -> Self {
22673        self.impact = v.into();
22674        self
22675    }
22676
22677    /// Sets the value of [exploitation_activity][crate::model::Cve::exploitation_activity].
22678    ///
22679    /// # Example
22680    /// ```ignore,no_run
22681    /// # use google_cloud_securitycenter_v2::model::Cve;
22682    /// use google_cloud_securitycenter_v2::model::cve::ExploitationActivity;
22683    /// let x0 = Cve::new().set_exploitation_activity(ExploitationActivity::Wide);
22684    /// let x1 = Cve::new().set_exploitation_activity(ExploitationActivity::Confirmed);
22685    /// let x2 = Cve::new().set_exploitation_activity(ExploitationActivity::Available);
22686    /// ```
22687    pub fn set_exploitation_activity<
22688        T: std::convert::Into<crate::model::cve::ExploitationActivity>,
22689    >(
22690        mut self,
22691        v: T,
22692    ) -> Self {
22693        self.exploitation_activity = v.into();
22694        self
22695    }
22696
22697    /// Sets the value of [observed_in_the_wild][crate::model::Cve::observed_in_the_wild].
22698    ///
22699    /// # Example
22700    /// ```ignore,no_run
22701    /// # use google_cloud_securitycenter_v2::model::Cve;
22702    /// let x = Cve::new().set_observed_in_the_wild(true);
22703    /// ```
22704    pub fn set_observed_in_the_wild<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22705        self.observed_in_the_wild = v.into();
22706        self
22707    }
22708
22709    /// Sets the value of [zero_day][crate::model::Cve::zero_day].
22710    ///
22711    /// # Example
22712    /// ```ignore,no_run
22713    /// # use google_cloud_securitycenter_v2::model::Cve;
22714    /// let x = Cve::new().set_zero_day(true);
22715    /// ```
22716    pub fn set_zero_day<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22717        self.zero_day = v.into();
22718        self
22719    }
22720
22721    /// Sets the value of [exploit_release_date][crate::model::Cve::exploit_release_date].
22722    ///
22723    /// # Example
22724    /// ```ignore,no_run
22725    /// # use google_cloud_securitycenter_v2::model::Cve;
22726    /// use wkt::Timestamp;
22727    /// let x = Cve::new().set_exploit_release_date(Timestamp::default()/* use setters */);
22728    /// ```
22729    pub fn set_exploit_release_date<T>(mut self, v: T) -> Self
22730    where
22731        T: std::convert::Into<wkt::Timestamp>,
22732    {
22733        self.exploit_release_date = std::option::Option::Some(v.into());
22734        self
22735    }
22736
22737    /// Sets or clears the value of [exploit_release_date][crate::model::Cve::exploit_release_date].
22738    ///
22739    /// # Example
22740    /// ```ignore,no_run
22741    /// # use google_cloud_securitycenter_v2::model::Cve;
22742    /// use wkt::Timestamp;
22743    /// let x = Cve::new().set_or_clear_exploit_release_date(Some(Timestamp::default()/* use setters */));
22744    /// let x = Cve::new().set_or_clear_exploit_release_date(None::<Timestamp>);
22745    /// ```
22746    pub fn set_or_clear_exploit_release_date<T>(mut self, v: std::option::Option<T>) -> Self
22747    where
22748        T: std::convert::Into<wkt::Timestamp>,
22749    {
22750        self.exploit_release_date = v.map(|x| x.into());
22751        self
22752    }
22753
22754    /// Sets the value of [first_exploitation_date][crate::model::Cve::first_exploitation_date].
22755    ///
22756    /// # Example
22757    /// ```ignore,no_run
22758    /// # use google_cloud_securitycenter_v2::model::Cve;
22759    /// use wkt::Timestamp;
22760    /// let x = Cve::new().set_first_exploitation_date(Timestamp::default()/* use setters */);
22761    /// ```
22762    pub fn set_first_exploitation_date<T>(mut self, v: T) -> Self
22763    where
22764        T: std::convert::Into<wkt::Timestamp>,
22765    {
22766        self.first_exploitation_date = std::option::Option::Some(v.into());
22767        self
22768    }
22769
22770    /// Sets or clears the value of [first_exploitation_date][crate::model::Cve::first_exploitation_date].
22771    ///
22772    /// # Example
22773    /// ```ignore,no_run
22774    /// # use google_cloud_securitycenter_v2::model::Cve;
22775    /// use wkt::Timestamp;
22776    /// let x = Cve::new().set_or_clear_first_exploitation_date(Some(Timestamp::default()/* use setters */));
22777    /// let x = Cve::new().set_or_clear_first_exploitation_date(None::<Timestamp>);
22778    /// ```
22779    pub fn set_or_clear_first_exploitation_date<T>(mut self, v: std::option::Option<T>) -> Self
22780    where
22781        T: std::convert::Into<wkt::Timestamp>,
22782    {
22783        self.first_exploitation_date = v.map(|x| x.into());
22784        self
22785    }
22786}
22787
22788impl wkt::message::Message for Cve {
22789    fn typename() -> &'static str {
22790        "type.googleapis.com/google.cloud.securitycenter.v2.Cve"
22791    }
22792}
22793
22794/// Defines additional types related to [Cve].
22795pub mod cve {
22796    #[allow(unused_imports)]
22797    use super::*;
22798
22799    /// The possible values of impact of the vulnerability if it was to be
22800    /// exploited.
22801    ///
22802    /// # Working with unknown values
22803    ///
22804    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22805    /// additional enum variants at any time. Adding new variants is not considered
22806    /// a breaking change. Applications should write their code in anticipation of:
22807    ///
22808    /// - New values appearing in future releases of the client library, **and**
22809    /// - New values received dynamically, without application changes.
22810    ///
22811    /// Please consult the [Working with enums] section in the user guide for some
22812    /// guidelines.
22813    ///
22814    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
22815    #[derive(Clone, Debug, PartialEq)]
22816    #[non_exhaustive]
22817    pub enum RiskRating {
22818        /// Invalid or empty value.
22819        Unspecified,
22820        /// Exploitation would have little to no security impact.
22821        Low,
22822        /// Exploitation would enable attackers to perform activities, or could allow
22823        /// attackers to have a direct impact, but would require additional steps.
22824        Medium,
22825        /// Exploitation would enable attackers to have a notable direct impact
22826        /// without needing to overcome any major mitigating factors.
22827        High,
22828        /// Exploitation would fundamentally undermine the security of affected
22829        /// systems, enable actors to perform significant attacks with minimal
22830        /// effort, with little to no mitigating factors to overcome.
22831        Critical,
22832        /// If set, the enum was initialized with an unknown value.
22833        ///
22834        /// Applications can examine the value using [RiskRating::value] or
22835        /// [RiskRating::name].
22836        UnknownValue(risk_rating::UnknownValue),
22837    }
22838
22839    #[doc(hidden)]
22840    pub mod risk_rating {
22841        #[allow(unused_imports)]
22842        use super::*;
22843        #[derive(Clone, Debug, PartialEq)]
22844        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22845    }
22846
22847    impl RiskRating {
22848        /// Gets the enum value.
22849        ///
22850        /// Returns `None` if the enum contains an unknown value deserialized from
22851        /// the string representation of enums.
22852        pub fn value(&self) -> std::option::Option<i32> {
22853            match self {
22854                Self::Unspecified => std::option::Option::Some(0),
22855                Self::Low => std::option::Option::Some(1),
22856                Self::Medium => std::option::Option::Some(2),
22857                Self::High => std::option::Option::Some(3),
22858                Self::Critical => std::option::Option::Some(4),
22859                Self::UnknownValue(u) => u.0.value(),
22860            }
22861        }
22862
22863        /// Gets the enum value as a string.
22864        ///
22865        /// Returns `None` if the enum contains an unknown value deserialized from
22866        /// the integer representation of enums.
22867        pub fn name(&self) -> std::option::Option<&str> {
22868            match self {
22869                Self::Unspecified => std::option::Option::Some("RISK_RATING_UNSPECIFIED"),
22870                Self::Low => std::option::Option::Some("LOW"),
22871                Self::Medium => std::option::Option::Some("MEDIUM"),
22872                Self::High => std::option::Option::Some("HIGH"),
22873                Self::Critical => std::option::Option::Some("CRITICAL"),
22874                Self::UnknownValue(u) => u.0.name(),
22875            }
22876        }
22877    }
22878
22879    impl std::default::Default for RiskRating {
22880        fn default() -> Self {
22881            use std::convert::From;
22882            Self::from(0)
22883        }
22884    }
22885
22886    impl std::fmt::Display for RiskRating {
22887        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22888            wkt::internal::display_enum(f, self.name(), self.value())
22889        }
22890    }
22891
22892    impl std::convert::From<i32> for RiskRating {
22893        fn from(value: i32) -> Self {
22894            match value {
22895                0 => Self::Unspecified,
22896                1 => Self::Low,
22897                2 => Self::Medium,
22898                3 => Self::High,
22899                4 => Self::Critical,
22900                _ => Self::UnknownValue(risk_rating::UnknownValue(
22901                    wkt::internal::UnknownEnumValue::Integer(value),
22902                )),
22903            }
22904        }
22905    }
22906
22907    impl std::convert::From<&str> for RiskRating {
22908        fn from(value: &str) -> Self {
22909            use std::string::ToString;
22910            match value {
22911                "RISK_RATING_UNSPECIFIED" => Self::Unspecified,
22912                "LOW" => Self::Low,
22913                "MEDIUM" => Self::Medium,
22914                "HIGH" => Self::High,
22915                "CRITICAL" => Self::Critical,
22916                _ => Self::UnknownValue(risk_rating::UnknownValue(
22917                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22918                )),
22919            }
22920        }
22921    }
22922
22923    impl serde::ser::Serialize for RiskRating {
22924        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22925        where
22926            S: serde::Serializer,
22927        {
22928            match self {
22929                Self::Unspecified => serializer.serialize_i32(0),
22930                Self::Low => serializer.serialize_i32(1),
22931                Self::Medium => serializer.serialize_i32(2),
22932                Self::High => serializer.serialize_i32(3),
22933                Self::Critical => serializer.serialize_i32(4),
22934                Self::UnknownValue(u) => u.0.serialize(serializer),
22935            }
22936        }
22937    }
22938
22939    impl<'de> serde::de::Deserialize<'de> for RiskRating {
22940        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22941        where
22942            D: serde::Deserializer<'de>,
22943        {
22944            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RiskRating>::new(
22945                ".google.cloud.securitycenter.v2.Cve.RiskRating",
22946            ))
22947        }
22948    }
22949
22950    /// The possible values of exploitation activity of the vulnerability in the
22951    /// wild.
22952    ///
22953    /// # Working with unknown values
22954    ///
22955    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22956    /// additional enum variants at any time. Adding new variants is not considered
22957    /// a breaking change. Applications should write their code in anticipation of:
22958    ///
22959    /// - New values appearing in future releases of the client library, **and**
22960    /// - New values received dynamically, without application changes.
22961    ///
22962    /// Please consult the [Working with enums] section in the user guide for some
22963    /// guidelines.
22964    ///
22965    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
22966    #[derive(Clone, Debug, PartialEq)]
22967    #[non_exhaustive]
22968    pub enum ExploitationActivity {
22969        /// Invalid or empty value.
22970        Unspecified,
22971        /// Exploitation has been reported or confirmed to widely occur.
22972        Wide,
22973        /// Limited reported or confirmed exploitation activities.
22974        Confirmed,
22975        /// Exploit is publicly available.
22976        Available,
22977        /// No known exploitation activity, but has a high potential for
22978        /// exploitation.
22979        Anticipated,
22980        /// No known exploitation activity.
22981        NoKnown,
22982        /// If set, the enum was initialized with an unknown value.
22983        ///
22984        /// Applications can examine the value using [ExploitationActivity::value] or
22985        /// [ExploitationActivity::name].
22986        UnknownValue(exploitation_activity::UnknownValue),
22987    }
22988
22989    #[doc(hidden)]
22990    pub mod exploitation_activity {
22991        #[allow(unused_imports)]
22992        use super::*;
22993        #[derive(Clone, Debug, PartialEq)]
22994        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22995    }
22996
22997    impl ExploitationActivity {
22998        /// Gets the enum value.
22999        ///
23000        /// Returns `None` if the enum contains an unknown value deserialized from
23001        /// the string representation of enums.
23002        pub fn value(&self) -> std::option::Option<i32> {
23003            match self {
23004                Self::Unspecified => std::option::Option::Some(0),
23005                Self::Wide => std::option::Option::Some(1),
23006                Self::Confirmed => std::option::Option::Some(2),
23007                Self::Available => std::option::Option::Some(3),
23008                Self::Anticipated => std::option::Option::Some(4),
23009                Self::NoKnown => std::option::Option::Some(5),
23010                Self::UnknownValue(u) => u.0.value(),
23011            }
23012        }
23013
23014        /// Gets the enum value as a string.
23015        ///
23016        /// Returns `None` if the enum contains an unknown value deserialized from
23017        /// the integer representation of enums.
23018        pub fn name(&self) -> std::option::Option<&str> {
23019            match self {
23020                Self::Unspecified => std::option::Option::Some("EXPLOITATION_ACTIVITY_UNSPECIFIED"),
23021                Self::Wide => std::option::Option::Some("WIDE"),
23022                Self::Confirmed => std::option::Option::Some("CONFIRMED"),
23023                Self::Available => std::option::Option::Some("AVAILABLE"),
23024                Self::Anticipated => std::option::Option::Some("ANTICIPATED"),
23025                Self::NoKnown => std::option::Option::Some("NO_KNOWN"),
23026                Self::UnknownValue(u) => u.0.name(),
23027            }
23028        }
23029    }
23030
23031    impl std::default::Default for ExploitationActivity {
23032        fn default() -> Self {
23033            use std::convert::From;
23034            Self::from(0)
23035        }
23036    }
23037
23038    impl std::fmt::Display for ExploitationActivity {
23039        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23040            wkt::internal::display_enum(f, self.name(), self.value())
23041        }
23042    }
23043
23044    impl std::convert::From<i32> for ExploitationActivity {
23045        fn from(value: i32) -> Self {
23046            match value {
23047                0 => Self::Unspecified,
23048                1 => Self::Wide,
23049                2 => Self::Confirmed,
23050                3 => Self::Available,
23051                4 => Self::Anticipated,
23052                5 => Self::NoKnown,
23053                _ => Self::UnknownValue(exploitation_activity::UnknownValue(
23054                    wkt::internal::UnknownEnumValue::Integer(value),
23055                )),
23056            }
23057        }
23058    }
23059
23060    impl std::convert::From<&str> for ExploitationActivity {
23061        fn from(value: &str) -> Self {
23062            use std::string::ToString;
23063            match value {
23064                "EXPLOITATION_ACTIVITY_UNSPECIFIED" => Self::Unspecified,
23065                "WIDE" => Self::Wide,
23066                "CONFIRMED" => Self::Confirmed,
23067                "AVAILABLE" => Self::Available,
23068                "ANTICIPATED" => Self::Anticipated,
23069                "NO_KNOWN" => Self::NoKnown,
23070                _ => Self::UnknownValue(exploitation_activity::UnknownValue(
23071                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23072                )),
23073            }
23074        }
23075    }
23076
23077    impl serde::ser::Serialize for ExploitationActivity {
23078        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23079        where
23080            S: serde::Serializer,
23081        {
23082            match self {
23083                Self::Unspecified => serializer.serialize_i32(0),
23084                Self::Wide => serializer.serialize_i32(1),
23085                Self::Confirmed => serializer.serialize_i32(2),
23086                Self::Available => serializer.serialize_i32(3),
23087                Self::Anticipated => serializer.serialize_i32(4),
23088                Self::NoKnown => serializer.serialize_i32(5),
23089                Self::UnknownValue(u) => u.0.serialize(serializer),
23090            }
23091        }
23092    }
23093
23094    impl<'de> serde::de::Deserialize<'de> for ExploitationActivity {
23095        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23096        where
23097            D: serde::Deserializer<'de>,
23098        {
23099            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ExploitationActivity>::new(
23100                ".google.cloud.securitycenter.v2.Cve.ExploitationActivity",
23101            ))
23102        }
23103    }
23104}
23105
23106/// Additional Links
23107#[derive(Clone, Default, PartialEq)]
23108#[non_exhaustive]
23109pub struct Reference {
23110    /// Source of the reference e.g. NVD
23111    pub source: std::string::String,
23112
23113    /// Uri for the mentioned source e.g.
23114    /// <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527>.
23115    pub uri: std::string::String,
23116
23117    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23118}
23119
23120impl Reference {
23121    /// Creates a new default instance.
23122    pub fn new() -> Self {
23123        std::default::Default::default()
23124    }
23125
23126    /// Sets the value of [source][crate::model::Reference::source].
23127    ///
23128    /// # Example
23129    /// ```ignore,no_run
23130    /// # use google_cloud_securitycenter_v2::model::Reference;
23131    /// let x = Reference::new().set_source("example");
23132    /// ```
23133    pub fn set_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23134        self.source = v.into();
23135        self
23136    }
23137
23138    /// Sets the value of [uri][crate::model::Reference::uri].
23139    ///
23140    /// # Example
23141    /// ```ignore,no_run
23142    /// # use google_cloud_securitycenter_v2::model::Reference;
23143    /// let x = Reference::new().set_uri("example");
23144    /// ```
23145    pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23146        self.uri = v.into();
23147        self
23148    }
23149}
23150
23151impl wkt::message::Message for Reference {
23152    fn typename() -> &'static str {
23153        "type.googleapis.com/google.cloud.securitycenter.v2.Reference"
23154    }
23155}
23156
23157/// Common Vulnerability Scoring System version 3.
23158#[derive(Clone, Default, PartialEq)]
23159#[non_exhaustive]
23160pub struct Cvssv3 {
23161    /// The base score is a function of the base metric scores.
23162    pub base_score: f64,
23163
23164    /// Base Metrics
23165    /// Represents the intrinsic characteristics of a vulnerability that are
23166    /// constant over time and across user environments.
23167    /// This metric reflects the context by which vulnerability exploitation is
23168    /// possible.
23169    pub attack_vector: crate::model::cvssv_3::AttackVector,
23170
23171    /// This metric describes the conditions beyond the attacker's control that
23172    /// must exist in order to exploit the vulnerability.
23173    pub attack_complexity: crate::model::cvssv_3::AttackComplexity,
23174
23175    /// This metric describes the level of privileges an attacker must possess
23176    /// before successfully exploiting the vulnerability.
23177    pub privileges_required: crate::model::cvssv_3::PrivilegesRequired,
23178
23179    /// This metric captures the requirement for a human user, other than the
23180    /// attacker, to participate in the successful compromise of the vulnerable
23181    /// component.
23182    pub user_interaction: crate::model::cvssv_3::UserInteraction,
23183
23184    /// The Scope metric captures whether a vulnerability in one vulnerable
23185    /// component impacts resources in components beyond its security scope.
23186    pub scope: crate::model::cvssv_3::Scope,
23187
23188    /// This metric measures the impact to the confidentiality of the information
23189    /// resources managed by a software component due to a successfully exploited
23190    /// vulnerability.
23191    pub confidentiality_impact: crate::model::cvssv_3::Impact,
23192
23193    /// This metric measures the impact to integrity of a successfully exploited
23194    /// vulnerability.
23195    pub integrity_impact: crate::model::cvssv_3::Impact,
23196
23197    /// This metric measures the impact to the availability of the impacted
23198    /// component resulting from a successfully exploited vulnerability.
23199    pub availability_impact: crate::model::cvssv_3::Impact,
23200
23201    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23202}
23203
23204impl Cvssv3 {
23205    /// Creates a new default instance.
23206    pub fn new() -> Self {
23207        std::default::Default::default()
23208    }
23209
23210    /// Sets the value of [base_score][crate::model::Cvssv3::base_score].
23211    ///
23212    /// # Example
23213    /// ```ignore,no_run
23214    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23215    /// let x = Cvssv3::new().set_base_score(42.0);
23216    /// ```
23217    pub fn set_base_score<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
23218        self.base_score = v.into();
23219        self
23220    }
23221
23222    /// Sets the value of [attack_vector][crate::model::Cvssv3::attack_vector].
23223    ///
23224    /// # Example
23225    /// ```ignore,no_run
23226    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23227    /// use google_cloud_securitycenter_v2::model::cvssv_3::AttackVector;
23228    /// let x0 = Cvssv3::new().set_attack_vector(AttackVector::Network);
23229    /// let x1 = Cvssv3::new().set_attack_vector(AttackVector::Adjacent);
23230    /// let x2 = Cvssv3::new().set_attack_vector(AttackVector::Local);
23231    /// ```
23232    pub fn set_attack_vector<T: std::convert::Into<crate::model::cvssv_3::AttackVector>>(
23233        mut self,
23234        v: T,
23235    ) -> Self {
23236        self.attack_vector = v.into();
23237        self
23238    }
23239
23240    /// Sets the value of [attack_complexity][crate::model::Cvssv3::attack_complexity].
23241    ///
23242    /// # Example
23243    /// ```ignore,no_run
23244    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23245    /// use google_cloud_securitycenter_v2::model::cvssv_3::AttackComplexity;
23246    /// let x0 = Cvssv3::new().set_attack_complexity(AttackComplexity::Low);
23247    /// let x1 = Cvssv3::new().set_attack_complexity(AttackComplexity::High);
23248    /// ```
23249    pub fn set_attack_complexity<T: std::convert::Into<crate::model::cvssv_3::AttackComplexity>>(
23250        mut self,
23251        v: T,
23252    ) -> Self {
23253        self.attack_complexity = v.into();
23254        self
23255    }
23256
23257    /// Sets the value of [privileges_required][crate::model::Cvssv3::privileges_required].
23258    ///
23259    /// # Example
23260    /// ```ignore,no_run
23261    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23262    /// use google_cloud_securitycenter_v2::model::cvssv_3::PrivilegesRequired;
23263    /// let x0 = Cvssv3::new().set_privileges_required(PrivilegesRequired::None);
23264    /// let x1 = Cvssv3::new().set_privileges_required(PrivilegesRequired::Low);
23265    /// let x2 = Cvssv3::new().set_privileges_required(PrivilegesRequired::High);
23266    /// ```
23267    pub fn set_privileges_required<
23268        T: std::convert::Into<crate::model::cvssv_3::PrivilegesRequired>,
23269    >(
23270        mut self,
23271        v: T,
23272    ) -> Self {
23273        self.privileges_required = v.into();
23274        self
23275    }
23276
23277    /// Sets the value of [user_interaction][crate::model::Cvssv3::user_interaction].
23278    ///
23279    /// # Example
23280    /// ```ignore,no_run
23281    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23282    /// use google_cloud_securitycenter_v2::model::cvssv_3::UserInteraction;
23283    /// let x0 = Cvssv3::new().set_user_interaction(UserInteraction::None);
23284    /// let x1 = Cvssv3::new().set_user_interaction(UserInteraction::Required);
23285    /// ```
23286    pub fn set_user_interaction<T: std::convert::Into<crate::model::cvssv_3::UserInteraction>>(
23287        mut self,
23288        v: T,
23289    ) -> Self {
23290        self.user_interaction = v.into();
23291        self
23292    }
23293
23294    /// Sets the value of [scope][crate::model::Cvssv3::scope].
23295    ///
23296    /// # Example
23297    /// ```ignore,no_run
23298    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23299    /// use google_cloud_securitycenter_v2::model::cvssv_3::Scope;
23300    /// let x0 = Cvssv3::new().set_scope(Scope::Unchanged);
23301    /// let x1 = Cvssv3::new().set_scope(Scope::Changed);
23302    /// ```
23303    pub fn set_scope<T: std::convert::Into<crate::model::cvssv_3::Scope>>(mut self, v: T) -> Self {
23304        self.scope = v.into();
23305        self
23306    }
23307
23308    /// Sets the value of [confidentiality_impact][crate::model::Cvssv3::confidentiality_impact].
23309    ///
23310    /// # Example
23311    /// ```ignore,no_run
23312    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23313    /// use google_cloud_securitycenter_v2::model::cvssv_3::Impact;
23314    /// let x0 = Cvssv3::new().set_confidentiality_impact(Impact::High);
23315    /// let x1 = Cvssv3::new().set_confidentiality_impact(Impact::Low);
23316    /// let x2 = Cvssv3::new().set_confidentiality_impact(Impact::None);
23317    /// ```
23318    pub fn set_confidentiality_impact<T: std::convert::Into<crate::model::cvssv_3::Impact>>(
23319        mut self,
23320        v: T,
23321    ) -> Self {
23322        self.confidentiality_impact = v.into();
23323        self
23324    }
23325
23326    /// Sets the value of [integrity_impact][crate::model::Cvssv3::integrity_impact].
23327    ///
23328    /// # Example
23329    /// ```ignore,no_run
23330    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23331    /// use google_cloud_securitycenter_v2::model::cvssv_3::Impact;
23332    /// let x0 = Cvssv3::new().set_integrity_impact(Impact::High);
23333    /// let x1 = Cvssv3::new().set_integrity_impact(Impact::Low);
23334    /// let x2 = Cvssv3::new().set_integrity_impact(Impact::None);
23335    /// ```
23336    pub fn set_integrity_impact<T: std::convert::Into<crate::model::cvssv_3::Impact>>(
23337        mut self,
23338        v: T,
23339    ) -> Self {
23340        self.integrity_impact = v.into();
23341        self
23342    }
23343
23344    /// Sets the value of [availability_impact][crate::model::Cvssv3::availability_impact].
23345    ///
23346    /// # Example
23347    /// ```ignore,no_run
23348    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23349    /// use google_cloud_securitycenter_v2::model::cvssv_3::Impact;
23350    /// let x0 = Cvssv3::new().set_availability_impact(Impact::High);
23351    /// let x1 = Cvssv3::new().set_availability_impact(Impact::Low);
23352    /// let x2 = Cvssv3::new().set_availability_impact(Impact::None);
23353    /// ```
23354    pub fn set_availability_impact<T: std::convert::Into<crate::model::cvssv_3::Impact>>(
23355        mut self,
23356        v: T,
23357    ) -> Self {
23358        self.availability_impact = v.into();
23359        self
23360    }
23361}
23362
23363impl wkt::message::Message for Cvssv3 {
23364    fn typename() -> &'static str {
23365        "type.googleapis.com/google.cloud.securitycenter.v2.Cvssv3"
23366    }
23367}
23368
23369/// Defines additional types related to [Cvssv3].
23370pub mod cvssv_3 {
23371    #[allow(unused_imports)]
23372    use super::*;
23373
23374    /// This metric reflects the context by which vulnerability exploitation is
23375    /// possible.
23376    ///
23377    /// # Working with unknown values
23378    ///
23379    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23380    /// additional enum variants at any time. Adding new variants is not considered
23381    /// a breaking change. Applications should write their code in anticipation of:
23382    ///
23383    /// - New values appearing in future releases of the client library, **and**
23384    /// - New values received dynamically, without application changes.
23385    ///
23386    /// Please consult the [Working with enums] section in the user guide for some
23387    /// guidelines.
23388    ///
23389    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23390    #[derive(Clone, Debug, PartialEq)]
23391    #[non_exhaustive]
23392    pub enum AttackVector {
23393        /// Invalid value.
23394        Unspecified,
23395        /// The vulnerable component is bound to the network stack and the set of
23396        /// possible attackers extends beyond the other options listed below, up to
23397        /// and including the entire Internet.
23398        Network,
23399        /// The vulnerable component is bound to the network stack, but the attack is
23400        /// limited at the protocol level to a logically adjacent topology.
23401        Adjacent,
23402        /// The vulnerable component is not bound to the network stack and the
23403        /// attacker's path is via read/write/execute capabilities.
23404        Local,
23405        /// The attack requires the attacker to physically touch or manipulate the
23406        /// vulnerable component.
23407        Physical,
23408        /// If set, the enum was initialized with an unknown value.
23409        ///
23410        /// Applications can examine the value using [AttackVector::value] or
23411        /// [AttackVector::name].
23412        UnknownValue(attack_vector::UnknownValue),
23413    }
23414
23415    #[doc(hidden)]
23416    pub mod attack_vector {
23417        #[allow(unused_imports)]
23418        use super::*;
23419        #[derive(Clone, Debug, PartialEq)]
23420        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23421    }
23422
23423    impl AttackVector {
23424        /// Gets the enum value.
23425        ///
23426        /// Returns `None` if the enum contains an unknown value deserialized from
23427        /// the string representation of enums.
23428        pub fn value(&self) -> std::option::Option<i32> {
23429            match self {
23430                Self::Unspecified => std::option::Option::Some(0),
23431                Self::Network => std::option::Option::Some(1),
23432                Self::Adjacent => std::option::Option::Some(2),
23433                Self::Local => std::option::Option::Some(3),
23434                Self::Physical => std::option::Option::Some(4),
23435                Self::UnknownValue(u) => u.0.value(),
23436            }
23437        }
23438
23439        /// Gets the enum value as a string.
23440        ///
23441        /// Returns `None` if the enum contains an unknown value deserialized from
23442        /// the integer representation of enums.
23443        pub fn name(&self) -> std::option::Option<&str> {
23444            match self {
23445                Self::Unspecified => std::option::Option::Some("ATTACK_VECTOR_UNSPECIFIED"),
23446                Self::Network => std::option::Option::Some("ATTACK_VECTOR_NETWORK"),
23447                Self::Adjacent => std::option::Option::Some("ATTACK_VECTOR_ADJACENT"),
23448                Self::Local => std::option::Option::Some("ATTACK_VECTOR_LOCAL"),
23449                Self::Physical => std::option::Option::Some("ATTACK_VECTOR_PHYSICAL"),
23450                Self::UnknownValue(u) => u.0.name(),
23451            }
23452        }
23453    }
23454
23455    impl std::default::Default for AttackVector {
23456        fn default() -> Self {
23457            use std::convert::From;
23458            Self::from(0)
23459        }
23460    }
23461
23462    impl std::fmt::Display for AttackVector {
23463        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23464            wkt::internal::display_enum(f, self.name(), self.value())
23465        }
23466    }
23467
23468    impl std::convert::From<i32> for AttackVector {
23469        fn from(value: i32) -> Self {
23470            match value {
23471                0 => Self::Unspecified,
23472                1 => Self::Network,
23473                2 => Self::Adjacent,
23474                3 => Self::Local,
23475                4 => Self::Physical,
23476                _ => Self::UnknownValue(attack_vector::UnknownValue(
23477                    wkt::internal::UnknownEnumValue::Integer(value),
23478                )),
23479            }
23480        }
23481    }
23482
23483    impl std::convert::From<&str> for AttackVector {
23484        fn from(value: &str) -> Self {
23485            use std::string::ToString;
23486            match value {
23487                "ATTACK_VECTOR_UNSPECIFIED" => Self::Unspecified,
23488                "ATTACK_VECTOR_NETWORK" => Self::Network,
23489                "ATTACK_VECTOR_ADJACENT" => Self::Adjacent,
23490                "ATTACK_VECTOR_LOCAL" => Self::Local,
23491                "ATTACK_VECTOR_PHYSICAL" => Self::Physical,
23492                _ => Self::UnknownValue(attack_vector::UnknownValue(
23493                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23494                )),
23495            }
23496        }
23497    }
23498
23499    impl serde::ser::Serialize for AttackVector {
23500        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23501        where
23502            S: serde::Serializer,
23503        {
23504            match self {
23505                Self::Unspecified => serializer.serialize_i32(0),
23506                Self::Network => serializer.serialize_i32(1),
23507                Self::Adjacent => serializer.serialize_i32(2),
23508                Self::Local => serializer.serialize_i32(3),
23509                Self::Physical => serializer.serialize_i32(4),
23510                Self::UnknownValue(u) => u.0.serialize(serializer),
23511            }
23512        }
23513    }
23514
23515    impl<'de> serde::de::Deserialize<'de> for AttackVector {
23516        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23517        where
23518            D: serde::Deserializer<'de>,
23519        {
23520            deserializer.deserialize_any(wkt::internal::EnumVisitor::<AttackVector>::new(
23521                ".google.cloud.securitycenter.v2.Cvssv3.AttackVector",
23522            ))
23523        }
23524    }
23525
23526    /// This metric describes the conditions beyond the attacker's control that
23527    /// must exist in order to exploit the vulnerability.
23528    ///
23529    /// # Working with unknown values
23530    ///
23531    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23532    /// additional enum variants at any time. Adding new variants is not considered
23533    /// a breaking change. Applications should write their code in anticipation of:
23534    ///
23535    /// - New values appearing in future releases of the client library, **and**
23536    /// - New values received dynamically, without application changes.
23537    ///
23538    /// Please consult the [Working with enums] section in the user guide for some
23539    /// guidelines.
23540    ///
23541    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23542    #[derive(Clone, Debug, PartialEq)]
23543    #[non_exhaustive]
23544    pub enum AttackComplexity {
23545        /// Invalid value.
23546        Unspecified,
23547        /// Specialized access conditions or extenuating circumstances do not exist.
23548        /// An attacker can expect repeatable success when attacking the vulnerable
23549        /// component.
23550        Low,
23551        /// A successful attack depends on conditions beyond the attacker's control.
23552        /// That is, a successful attack cannot be accomplished at will, but requires
23553        /// the attacker to invest in some measurable amount of effort in preparation
23554        /// or execution against the vulnerable component before a successful attack
23555        /// can be expected.
23556        High,
23557        /// If set, the enum was initialized with an unknown value.
23558        ///
23559        /// Applications can examine the value using [AttackComplexity::value] or
23560        /// [AttackComplexity::name].
23561        UnknownValue(attack_complexity::UnknownValue),
23562    }
23563
23564    #[doc(hidden)]
23565    pub mod attack_complexity {
23566        #[allow(unused_imports)]
23567        use super::*;
23568        #[derive(Clone, Debug, PartialEq)]
23569        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23570    }
23571
23572    impl AttackComplexity {
23573        /// Gets the enum value.
23574        ///
23575        /// Returns `None` if the enum contains an unknown value deserialized from
23576        /// the string representation of enums.
23577        pub fn value(&self) -> std::option::Option<i32> {
23578            match self {
23579                Self::Unspecified => std::option::Option::Some(0),
23580                Self::Low => std::option::Option::Some(1),
23581                Self::High => std::option::Option::Some(2),
23582                Self::UnknownValue(u) => u.0.value(),
23583            }
23584        }
23585
23586        /// Gets the enum value as a string.
23587        ///
23588        /// Returns `None` if the enum contains an unknown value deserialized from
23589        /// the integer representation of enums.
23590        pub fn name(&self) -> std::option::Option<&str> {
23591            match self {
23592                Self::Unspecified => std::option::Option::Some("ATTACK_COMPLEXITY_UNSPECIFIED"),
23593                Self::Low => std::option::Option::Some("ATTACK_COMPLEXITY_LOW"),
23594                Self::High => std::option::Option::Some("ATTACK_COMPLEXITY_HIGH"),
23595                Self::UnknownValue(u) => u.0.name(),
23596            }
23597        }
23598    }
23599
23600    impl std::default::Default for AttackComplexity {
23601        fn default() -> Self {
23602            use std::convert::From;
23603            Self::from(0)
23604        }
23605    }
23606
23607    impl std::fmt::Display for AttackComplexity {
23608        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23609            wkt::internal::display_enum(f, self.name(), self.value())
23610        }
23611    }
23612
23613    impl std::convert::From<i32> for AttackComplexity {
23614        fn from(value: i32) -> Self {
23615            match value {
23616                0 => Self::Unspecified,
23617                1 => Self::Low,
23618                2 => Self::High,
23619                _ => Self::UnknownValue(attack_complexity::UnknownValue(
23620                    wkt::internal::UnknownEnumValue::Integer(value),
23621                )),
23622            }
23623        }
23624    }
23625
23626    impl std::convert::From<&str> for AttackComplexity {
23627        fn from(value: &str) -> Self {
23628            use std::string::ToString;
23629            match value {
23630                "ATTACK_COMPLEXITY_UNSPECIFIED" => Self::Unspecified,
23631                "ATTACK_COMPLEXITY_LOW" => Self::Low,
23632                "ATTACK_COMPLEXITY_HIGH" => Self::High,
23633                _ => Self::UnknownValue(attack_complexity::UnknownValue(
23634                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23635                )),
23636            }
23637        }
23638    }
23639
23640    impl serde::ser::Serialize for AttackComplexity {
23641        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23642        where
23643            S: serde::Serializer,
23644        {
23645            match self {
23646                Self::Unspecified => serializer.serialize_i32(0),
23647                Self::Low => serializer.serialize_i32(1),
23648                Self::High => serializer.serialize_i32(2),
23649                Self::UnknownValue(u) => u.0.serialize(serializer),
23650            }
23651        }
23652    }
23653
23654    impl<'de> serde::de::Deserialize<'de> for AttackComplexity {
23655        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23656        where
23657            D: serde::Deserializer<'de>,
23658        {
23659            deserializer.deserialize_any(wkt::internal::EnumVisitor::<AttackComplexity>::new(
23660                ".google.cloud.securitycenter.v2.Cvssv3.AttackComplexity",
23661            ))
23662        }
23663    }
23664
23665    /// This metric describes the level of privileges an attacker must possess
23666    /// before successfully exploiting the vulnerability.
23667    ///
23668    /// # Working with unknown values
23669    ///
23670    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23671    /// additional enum variants at any time. Adding new variants is not considered
23672    /// a breaking change. Applications should write their code in anticipation of:
23673    ///
23674    /// - New values appearing in future releases of the client library, **and**
23675    /// - New values received dynamically, without application changes.
23676    ///
23677    /// Please consult the [Working with enums] section in the user guide for some
23678    /// guidelines.
23679    ///
23680    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23681    #[derive(Clone, Debug, PartialEq)]
23682    #[non_exhaustive]
23683    pub enum PrivilegesRequired {
23684        /// Invalid value.
23685        Unspecified,
23686        /// The attacker is unauthorized prior to attack, and therefore does not
23687        /// require any access to settings or files of the vulnerable system to
23688        /// carry out an attack.
23689        None,
23690        /// The attacker requires privileges that provide basic user capabilities
23691        /// that could normally affect only settings and files owned by a user.
23692        /// Alternatively, an attacker with Low privileges has the ability to access
23693        /// only non-sensitive resources.
23694        Low,
23695        /// The attacker requires privileges that provide significant (e.g.,
23696        /// administrative) control over the vulnerable component allowing access to
23697        /// component-wide settings and files.
23698        High,
23699        /// If set, the enum was initialized with an unknown value.
23700        ///
23701        /// Applications can examine the value using [PrivilegesRequired::value] or
23702        /// [PrivilegesRequired::name].
23703        UnknownValue(privileges_required::UnknownValue),
23704    }
23705
23706    #[doc(hidden)]
23707    pub mod privileges_required {
23708        #[allow(unused_imports)]
23709        use super::*;
23710        #[derive(Clone, Debug, PartialEq)]
23711        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23712    }
23713
23714    impl PrivilegesRequired {
23715        /// Gets the enum value.
23716        ///
23717        /// Returns `None` if the enum contains an unknown value deserialized from
23718        /// the string representation of enums.
23719        pub fn value(&self) -> std::option::Option<i32> {
23720            match self {
23721                Self::Unspecified => std::option::Option::Some(0),
23722                Self::None => std::option::Option::Some(1),
23723                Self::Low => std::option::Option::Some(2),
23724                Self::High => std::option::Option::Some(3),
23725                Self::UnknownValue(u) => u.0.value(),
23726            }
23727        }
23728
23729        /// Gets the enum value as a string.
23730        ///
23731        /// Returns `None` if the enum contains an unknown value deserialized from
23732        /// the integer representation of enums.
23733        pub fn name(&self) -> std::option::Option<&str> {
23734            match self {
23735                Self::Unspecified => std::option::Option::Some("PRIVILEGES_REQUIRED_UNSPECIFIED"),
23736                Self::None => std::option::Option::Some("PRIVILEGES_REQUIRED_NONE"),
23737                Self::Low => std::option::Option::Some("PRIVILEGES_REQUIRED_LOW"),
23738                Self::High => std::option::Option::Some("PRIVILEGES_REQUIRED_HIGH"),
23739                Self::UnknownValue(u) => u.0.name(),
23740            }
23741        }
23742    }
23743
23744    impl std::default::Default for PrivilegesRequired {
23745        fn default() -> Self {
23746            use std::convert::From;
23747            Self::from(0)
23748        }
23749    }
23750
23751    impl std::fmt::Display for PrivilegesRequired {
23752        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23753            wkt::internal::display_enum(f, self.name(), self.value())
23754        }
23755    }
23756
23757    impl std::convert::From<i32> for PrivilegesRequired {
23758        fn from(value: i32) -> Self {
23759            match value {
23760                0 => Self::Unspecified,
23761                1 => Self::None,
23762                2 => Self::Low,
23763                3 => Self::High,
23764                _ => Self::UnknownValue(privileges_required::UnknownValue(
23765                    wkt::internal::UnknownEnumValue::Integer(value),
23766                )),
23767            }
23768        }
23769    }
23770
23771    impl std::convert::From<&str> for PrivilegesRequired {
23772        fn from(value: &str) -> Self {
23773            use std::string::ToString;
23774            match value {
23775                "PRIVILEGES_REQUIRED_UNSPECIFIED" => Self::Unspecified,
23776                "PRIVILEGES_REQUIRED_NONE" => Self::None,
23777                "PRIVILEGES_REQUIRED_LOW" => Self::Low,
23778                "PRIVILEGES_REQUIRED_HIGH" => Self::High,
23779                _ => Self::UnknownValue(privileges_required::UnknownValue(
23780                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23781                )),
23782            }
23783        }
23784    }
23785
23786    impl serde::ser::Serialize for PrivilegesRequired {
23787        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23788        where
23789            S: serde::Serializer,
23790        {
23791            match self {
23792                Self::Unspecified => serializer.serialize_i32(0),
23793                Self::None => serializer.serialize_i32(1),
23794                Self::Low => serializer.serialize_i32(2),
23795                Self::High => serializer.serialize_i32(3),
23796                Self::UnknownValue(u) => u.0.serialize(serializer),
23797            }
23798        }
23799    }
23800
23801    impl<'de> serde::de::Deserialize<'de> for PrivilegesRequired {
23802        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23803        where
23804            D: serde::Deserializer<'de>,
23805        {
23806            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PrivilegesRequired>::new(
23807                ".google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired",
23808            ))
23809        }
23810    }
23811
23812    /// This metric captures the requirement for a human user, other than the
23813    /// attacker, to participate in the successful compromise of the vulnerable
23814    /// component.
23815    ///
23816    /// # Working with unknown values
23817    ///
23818    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23819    /// additional enum variants at any time. Adding new variants is not considered
23820    /// a breaking change. Applications should write their code in anticipation of:
23821    ///
23822    /// - New values appearing in future releases of the client library, **and**
23823    /// - New values received dynamically, without application changes.
23824    ///
23825    /// Please consult the [Working with enums] section in the user guide for some
23826    /// guidelines.
23827    ///
23828    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23829    #[derive(Clone, Debug, PartialEq)]
23830    #[non_exhaustive]
23831    pub enum UserInteraction {
23832        /// Invalid value.
23833        Unspecified,
23834        /// The vulnerable system can be exploited without interaction from any user.
23835        None,
23836        /// Successful exploitation of this vulnerability requires a user to take
23837        /// some action before the vulnerability can be exploited.
23838        Required,
23839        /// If set, the enum was initialized with an unknown value.
23840        ///
23841        /// Applications can examine the value using [UserInteraction::value] or
23842        /// [UserInteraction::name].
23843        UnknownValue(user_interaction::UnknownValue),
23844    }
23845
23846    #[doc(hidden)]
23847    pub mod user_interaction {
23848        #[allow(unused_imports)]
23849        use super::*;
23850        #[derive(Clone, Debug, PartialEq)]
23851        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23852    }
23853
23854    impl UserInteraction {
23855        /// Gets the enum value.
23856        ///
23857        /// Returns `None` if the enum contains an unknown value deserialized from
23858        /// the string representation of enums.
23859        pub fn value(&self) -> std::option::Option<i32> {
23860            match self {
23861                Self::Unspecified => std::option::Option::Some(0),
23862                Self::None => std::option::Option::Some(1),
23863                Self::Required => std::option::Option::Some(2),
23864                Self::UnknownValue(u) => u.0.value(),
23865            }
23866        }
23867
23868        /// Gets the enum value as a string.
23869        ///
23870        /// Returns `None` if the enum contains an unknown value deserialized from
23871        /// the integer representation of enums.
23872        pub fn name(&self) -> std::option::Option<&str> {
23873            match self {
23874                Self::Unspecified => std::option::Option::Some("USER_INTERACTION_UNSPECIFIED"),
23875                Self::None => std::option::Option::Some("USER_INTERACTION_NONE"),
23876                Self::Required => std::option::Option::Some("USER_INTERACTION_REQUIRED"),
23877                Self::UnknownValue(u) => u.0.name(),
23878            }
23879        }
23880    }
23881
23882    impl std::default::Default for UserInteraction {
23883        fn default() -> Self {
23884            use std::convert::From;
23885            Self::from(0)
23886        }
23887    }
23888
23889    impl std::fmt::Display for UserInteraction {
23890        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23891            wkt::internal::display_enum(f, self.name(), self.value())
23892        }
23893    }
23894
23895    impl std::convert::From<i32> for UserInteraction {
23896        fn from(value: i32) -> Self {
23897            match value {
23898                0 => Self::Unspecified,
23899                1 => Self::None,
23900                2 => Self::Required,
23901                _ => Self::UnknownValue(user_interaction::UnknownValue(
23902                    wkt::internal::UnknownEnumValue::Integer(value),
23903                )),
23904            }
23905        }
23906    }
23907
23908    impl std::convert::From<&str> for UserInteraction {
23909        fn from(value: &str) -> Self {
23910            use std::string::ToString;
23911            match value {
23912                "USER_INTERACTION_UNSPECIFIED" => Self::Unspecified,
23913                "USER_INTERACTION_NONE" => Self::None,
23914                "USER_INTERACTION_REQUIRED" => Self::Required,
23915                _ => Self::UnknownValue(user_interaction::UnknownValue(
23916                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23917                )),
23918            }
23919        }
23920    }
23921
23922    impl serde::ser::Serialize for UserInteraction {
23923        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23924        where
23925            S: serde::Serializer,
23926        {
23927            match self {
23928                Self::Unspecified => serializer.serialize_i32(0),
23929                Self::None => serializer.serialize_i32(1),
23930                Self::Required => serializer.serialize_i32(2),
23931                Self::UnknownValue(u) => u.0.serialize(serializer),
23932            }
23933        }
23934    }
23935
23936    impl<'de> serde::de::Deserialize<'de> for UserInteraction {
23937        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23938        where
23939            D: serde::Deserializer<'de>,
23940        {
23941            deserializer.deserialize_any(wkt::internal::EnumVisitor::<UserInteraction>::new(
23942                ".google.cloud.securitycenter.v2.Cvssv3.UserInteraction",
23943            ))
23944        }
23945    }
23946
23947    /// The Scope metric captures whether a vulnerability in one vulnerable
23948    /// component impacts resources in components beyond its security scope.
23949    ///
23950    /// # Working with unknown values
23951    ///
23952    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23953    /// additional enum variants at any time. Adding new variants is not considered
23954    /// a breaking change. Applications should write their code in anticipation of:
23955    ///
23956    /// - New values appearing in future releases of the client library, **and**
23957    /// - New values received dynamically, without application changes.
23958    ///
23959    /// Please consult the [Working with enums] section in the user guide for some
23960    /// guidelines.
23961    ///
23962    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23963    #[derive(Clone, Debug, PartialEq)]
23964    #[non_exhaustive]
23965    pub enum Scope {
23966        /// Invalid value.
23967        Unspecified,
23968        /// An exploited vulnerability can only affect resources managed by the same
23969        /// security authority.
23970        Unchanged,
23971        /// An exploited vulnerability can affect resources beyond the security scope
23972        /// managed by the security authority of the vulnerable component.
23973        Changed,
23974        /// If set, the enum was initialized with an unknown value.
23975        ///
23976        /// Applications can examine the value using [Scope::value] or
23977        /// [Scope::name].
23978        UnknownValue(scope::UnknownValue),
23979    }
23980
23981    #[doc(hidden)]
23982    pub mod scope {
23983        #[allow(unused_imports)]
23984        use super::*;
23985        #[derive(Clone, Debug, PartialEq)]
23986        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23987    }
23988
23989    impl Scope {
23990        /// Gets the enum value.
23991        ///
23992        /// Returns `None` if the enum contains an unknown value deserialized from
23993        /// the string representation of enums.
23994        pub fn value(&self) -> std::option::Option<i32> {
23995            match self {
23996                Self::Unspecified => std::option::Option::Some(0),
23997                Self::Unchanged => std::option::Option::Some(1),
23998                Self::Changed => std::option::Option::Some(2),
23999                Self::UnknownValue(u) => u.0.value(),
24000            }
24001        }
24002
24003        /// Gets the enum value as a string.
24004        ///
24005        /// Returns `None` if the enum contains an unknown value deserialized from
24006        /// the integer representation of enums.
24007        pub fn name(&self) -> std::option::Option<&str> {
24008            match self {
24009                Self::Unspecified => std::option::Option::Some("SCOPE_UNSPECIFIED"),
24010                Self::Unchanged => std::option::Option::Some("SCOPE_UNCHANGED"),
24011                Self::Changed => std::option::Option::Some("SCOPE_CHANGED"),
24012                Self::UnknownValue(u) => u.0.name(),
24013            }
24014        }
24015    }
24016
24017    impl std::default::Default for Scope {
24018        fn default() -> Self {
24019            use std::convert::From;
24020            Self::from(0)
24021        }
24022    }
24023
24024    impl std::fmt::Display for Scope {
24025        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24026            wkt::internal::display_enum(f, self.name(), self.value())
24027        }
24028    }
24029
24030    impl std::convert::From<i32> for Scope {
24031        fn from(value: i32) -> Self {
24032            match value {
24033                0 => Self::Unspecified,
24034                1 => Self::Unchanged,
24035                2 => Self::Changed,
24036                _ => Self::UnknownValue(scope::UnknownValue(
24037                    wkt::internal::UnknownEnumValue::Integer(value),
24038                )),
24039            }
24040        }
24041    }
24042
24043    impl std::convert::From<&str> for Scope {
24044        fn from(value: &str) -> Self {
24045            use std::string::ToString;
24046            match value {
24047                "SCOPE_UNSPECIFIED" => Self::Unspecified,
24048                "SCOPE_UNCHANGED" => Self::Unchanged,
24049                "SCOPE_CHANGED" => Self::Changed,
24050                _ => Self::UnknownValue(scope::UnknownValue(
24051                    wkt::internal::UnknownEnumValue::String(value.to_string()),
24052                )),
24053            }
24054        }
24055    }
24056
24057    impl serde::ser::Serialize for Scope {
24058        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24059        where
24060            S: serde::Serializer,
24061        {
24062            match self {
24063                Self::Unspecified => serializer.serialize_i32(0),
24064                Self::Unchanged => serializer.serialize_i32(1),
24065                Self::Changed => serializer.serialize_i32(2),
24066                Self::UnknownValue(u) => u.0.serialize(serializer),
24067            }
24068        }
24069    }
24070
24071    impl<'de> serde::de::Deserialize<'de> for Scope {
24072        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24073        where
24074            D: serde::Deserializer<'de>,
24075        {
24076            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Scope>::new(
24077                ".google.cloud.securitycenter.v2.Cvssv3.Scope",
24078            ))
24079        }
24080    }
24081
24082    /// The Impact metrics capture the effects of a successfully exploited
24083    /// vulnerability on the component that suffers the worst outcome that is most
24084    /// directly and predictably associated with the attack.
24085    ///
24086    /// # Working with unknown values
24087    ///
24088    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24089    /// additional enum variants at any time. Adding new variants is not considered
24090    /// a breaking change. Applications should write their code in anticipation of:
24091    ///
24092    /// - New values appearing in future releases of the client library, **and**
24093    /// - New values received dynamically, without application changes.
24094    ///
24095    /// Please consult the [Working with enums] section in the user guide for some
24096    /// guidelines.
24097    ///
24098    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24099    #[derive(Clone, Debug, PartialEq)]
24100    #[non_exhaustive]
24101    pub enum Impact {
24102        /// Invalid value.
24103        Unspecified,
24104        /// High impact.
24105        High,
24106        /// Low impact.
24107        Low,
24108        /// No impact.
24109        None,
24110        /// If set, the enum was initialized with an unknown value.
24111        ///
24112        /// Applications can examine the value using [Impact::value] or
24113        /// [Impact::name].
24114        UnknownValue(impact::UnknownValue),
24115    }
24116
24117    #[doc(hidden)]
24118    pub mod impact {
24119        #[allow(unused_imports)]
24120        use super::*;
24121        #[derive(Clone, Debug, PartialEq)]
24122        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24123    }
24124
24125    impl Impact {
24126        /// Gets the enum value.
24127        ///
24128        /// Returns `None` if the enum contains an unknown value deserialized from
24129        /// the string representation of enums.
24130        pub fn value(&self) -> std::option::Option<i32> {
24131            match self {
24132                Self::Unspecified => std::option::Option::Some(0),
24133                Self::High => std::option::Option::Some(1),
24134                Self::Low => std::option::Option::Some(2),
24135                Self::None => std::option::Option::Some(3),
24136                Self::UnknownValue(u) => u.0.value(),
24137            }
24138        }
24139
24140        /// Gets the enum value as a string.
24141        ///
24142        /// Returns `None` if the enum contains an unknown value deserialized from
24143        /// the integer representation of enums.
24144        pub fn name(&self) -> std::option::Option<&str> {
24145            match self {
24146                Self::Unspecified => std::option::Option::Some("IMPACT_UNSPECIFIED"),
24147                Self::High => std::option::Option::Some("IMPACT_HIGH"),
24148                Self::Low => std::option::Option::Some("IMPACT_LOW"),
24149                Self::None => std::option::Option::Some("IMPACT_NONE"),
24150                Self::UnknownValue(u) => u.0.name(),
24151            }
24152        }
24153    }
24154
24155    impl std::default::Default for Impact {
24156        fn default() -> Self {
24157            use std::convert::From;
24158            Self::from(0)
24159        }
24160    }
24161
24162    impl std::fmt::Display for Impact {
24163        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24164            wkt::internal::display_enum(f, self.name(), self.value())
24165        }
24166    }
24167
24168    impl std::convert::From<i32> for Impact {
24169        fn from(value: i32) -> Self {
24170            match value {
24171                0 => Self::Unspecified,
24172                1 => Self::High,
24173                2 => Self::Low,
24174                3 => Self::None,
24175                _ => Self::UnknownValue(impact::UnknownValue(
24176                    wkt::internal::UnknownEnumValue::Integer(value),
24177                )),
24178            }
24179        }
24180    }
24181
24182    impl std::convert::From<&str> for Impact {
24183        fn from(value: &str) -> Self {
24184            use std::string::ToString;
24185            match value {
24186                "IMPACT_UNSPECIFIED" => Self::Unspecified,
24187                "IMPACT_HIGH" => Self::High,
24188                "IMPACT_LOW" => Self::Low,
24189                "IMPACT_NONE" => Self::None,
24190                _ => Self::UnknownValue(impact::UnknownValue(
24191                    wkt::internal::UnknownEnumValue::String(value.to_string()),
24192                )),
24193            }
24194        }
24195    }
24196
24197    impl serde::ser::Serialize for Impact {
24198        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24199        where
24200            S: serde::Serializer,
24201        {
24202            match self {
24203                Self::Unspecified => serializer.serialize_i32(0),
24204                Self::High => serializer.serialize_i32(1),
24205                Self::Low => serializer.serialize_i32(2),
24206                Self::None => serializer.serialize_i32(3),
24207                Self::UnknownValue(u) => u.0.serialize(serializer),
24208            }
24209        }
24210    }
24211
24212    impl<'de> serde::de::Deserialize<'de> for Impact {
24213        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24214        where
24215            D: serde::Deserializer<'de>,
24216        {
24217            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Impact>::new(
24218                ".google.cloud.securitycenter.v2.Cvssv3.Impact",
24219            ))
24220        }
24221    }
24222}
24223
24224/// Package is a generic definition of a package.
24225#[derive(Clone, Default, PartialEq)]
24226#[non_exhaustive]
24227pub struct Package {
24228    /// The name of the package where the vulnerability was detected.
24229    pub package_name: std::string::String,
24230
24231    /// The CPE URI where the vulnerability was detected.
24232    pub cpe_uri: std::string::String,
24233
24234    /// Type of package, for example, os, maven, or go.
24235    pub package_type: std::string::String,
24236
24237    /// The version of the package.
24238    pub package_version: std::string::String,
24239
24240    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24241}
24242
24243impl Package {
24244    /// Creates a new default instance.
24245    pub fn new() -> Self {
24246        std::default::Default::default()
24247    }
24248
24249    /// Sets the value of [package_name][crate::model::Package::package_name].
24250    ///
24251    /// # Example
24252    /// ```ignore,no_run
24253    /// # use google_cloud_securitycenter_v2::model::Package;
24254    /// let x = Package::new().set_package_name("example");
24255    /// ```
24256    pub fn set_package_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24257        self.package_name = v.into();
24258        self
24259    }
24260
24261    /// Sets the value of [cpe_uri][crate::model::Package::cpe_uri].
24262    ///
24263    /// # Example
24264    /// ```ignore,no_run
24265    /// # use google_cloud_securitycenter_v2::model::Package;
24266    /// let x = Package::new().set_cpe_uri("example");
24267    /// ```
24268    pub fn set_cpe_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24269        self.cpe_uri = v.into();
24270        self
24271    }
24272
24273    /// Sets the value of [package_type][crate::model::Package::package_type].
24274    ///
24275    /// # Example
24276    /// ```ignore,no_run
24277    /// # use google_cloud_securitycenter_v2::model::Package;
24278    /// let x = Package::new().set_package_type("example");
24279    /// ```
24280    pub fn set_package_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24281        self.package_type = v.into();
24282        self
24283    }
24284
24285    /// Sets the value of [package_version][crate::model::Package::package_version].
24286    ///
24287    /// # Example
24288    /// ```ignore,no_run
24289    /// # use google_cloud_securitycenter_v2::model::Package;
24290    /// let x = Package::new().set_package_version("example");
24291    /// ```
24292    pub fn set_package_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24293        self.package_version = v.into();
24294        self
24295    }
24296}
24297
24298impl wkt::message::Message for Package {
24299    fn typename() -> &'static str {
24300        "type.googleapis.com/google.cloud.securitycenter.v2.Package"
24301    }
24302}
24303
24304/// SecurityBulletin are notifications of vulnerabilities of Google products.
24305#[derive(Clone, Default, PartialEq)]
24306#[non_exhaustive]
24307pub struct SecurityBulletin {
24308    /// ID of the bulletin corresponding to the vulnerability.
24309    pub bulletin_id: std::string::String,
24310
24311    /// Submission time of this Security Bulletin.
24312    pub submission_time: std::option::Option<wkt::Timestamp>,
24313
24314    /// This represents a version that the cluster receiving this notification
24315    /// should be upgraded to, based on its current version. For example, 1.15.0
24316    pub suggested_upgrade_version: std::string::String,
24317
24318    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24319}
24320
24321impl SecurityBulletin {
24322    /// Creates a new default instance.
24323    pub fn new() -> Self {
24324        std::default::Default::default()
24325    }
24326
24327    /// Sets the value of [bulletin_id][crate::model::SecurityBulletin::bulletin_id].
24328    ///
24329    /// # Example
24330    /// ```ignore,no_run
24331    /// # use google_cloud_securitycenter_v2::model::SecurityBulletin;
24332    /// let x = SecurityBulletin::new().set_bulletin_id("example");
24333    /// ```
24334    pub fn set_bulletin_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24335        self.bulletin_id = v.into();
24336        self
24337    }
24338
24339    /// Sets the value of [submission_time][crate::model::SecurityBulletin::submission_time].
24340    ///
24341    /// # Example
24342    /// ```ignore,no_run
24343    /// # use google_cloud_securitycenter_v2::model::SecurityBulletin;
24344    /// use wkt::Timestamp;
24345    /// let x = SecurityBulletin::new().set_submission_time(Timestamp::default()/* use setters */);
24346    /// ```
24347    pub fn set_submission_time<T>(mut self, v: T) -> Self
24348    where
24349        T: std::convert::Into<wkt::Timestamp>,
24350    {
24351        self.submission_time = std::option::Option::Some(v.into());
24352        self
24353    }
24354
24355    /// Sets or clears the value of [submission_time][crate::model::SecurityBulletin::submission_time].
24356    ///
24357    /// # Example
24358    /// ```ignore,no_run
24359    /// # use google_cloud_securitycenter_v2::model::SecurityBulletin;
24360    /// use wkt::Timestamp;
24361    /// let x = SecurityBulletin::new().set_or_clear_submission_time(Some(Timestamp::default()/* use setters */));
24362    /// let x = SecurityBulletin::new().set_or_clear_submission_time(None::<Timestamp>);
24363    /// ```
24364    pub fn set_or_clear_submission_time<T>(mut self, v: std::option::Option<T>) -> Self
24365    where
24366        T: std::convert::Into<wkt::Timestamp>,
24367    {
24368        self.submission_time = v.map(|x| x.into());
24369        self
24370    }
24371
24372    /// Sets the value of [suggested_upgrade_version][crate::model::SecurityBulletin::suggested_upgrade_version].
24373    ///
24374    /// # Example
24375    /// ```ignore,no_run
24376    /// # use google_cloud_securitycenter_v2::model::SecurityBulletin;
24377    /// let x = SecurityBulletin::new().set_suggested_upgrade_version("example");
24378    /// ```
24379    pub fn set_suggested_upgrade_version<T: std::convert::Into<std::string::String>>(
24380        mut self,
24381        v: T,
24382    ) -> Self {
24383        self.suggested_upgrade_version = v.into();
24384        self
24385    }
24386}
24387
24388impl wkt::message::Message for SecurityBulletin {
24389    fn typename() -> &'static str {
24390        "type.googleapis.com/google.cloud.securitycenter.v2.SecurityBulletin"
24391    }
24392}
24393
24394/// CWE stands for Common Weakness Enumeration. Information about this weakness,
24395/// as described by [CWE](https://cwe.mitre.org/).
24396#[derive(Clone, Default, PartialEq)]
24397#[non_exhaustive]
24398pub struct Cwe {
24399    /// The CWE identifier, e.g. CWE-94
24400    pub id: std::string::String,
24401
24402    /// Any reference to the details on the CWE, for example,
24403    /// <https://cwe.mitre.org/data/definitions/94.html>
24404    pub references: std::vec::Vec<crate::model::Reference>,
24405
24406    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24407}
24408
24409impl Cwe {
24410    /// Creates a new default instance.
24411    pub fn new() -> Self {
24412        std::default::Default::default()
24413    }
24414
24415    /// Sets the value of [id][crate::model::Cwe::id].
24416    ///
24417    /// # Example
24418    /// ```ignore,no_run
24419    /// # use google_cloud_securitycenter_v2::model::Cwe;
24420    /// let x = Cwe::new().set_id("example");
24421    /// ```
24422    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24423        self.id = v.into();
24424        self
24425    }
24426
24427    /// Sets the value of [references][crate::model::Cwe::references].
24428    ///
24429    /// # Example
24430    /// ```ignore,no_run
24431    /// # use google_cloud_securitycenter_v2::model::Cwe;
24432    /// use google_cloud_securitycenter_v2::model::Reference;
24433    /// let x = Cwe::new()
24434    ///     .set_references([
24435    ///         Reference::default()/* use setters */,
24436    ///         Reference::default()/* use (different) setters */,
24437    ///     ]);
24438    /// ```
24439    pub fn set_references<T, V>(mut self, v: T) -> Self
24440    where
24441        T: std::iter::IntoIterator<Item = V>,
24442        V: std::convert::Into<crate::model::Reference>,
24443    {
24444        use std::iter::Iterator;
24445        self.references = v.into_iter().map(|i| i.into()).collect();
24446        self
24447    }
24448}
24449
24450impl wkt::message::Message for Cwe {
24451    fn typename() -> &'static str {
24452        "type.googleapis.com/google.cloud.securitycenter.v2.Cwe"
24453    }
24454}
24455
24456/// JobState represents the state of the job.
24457///
24458/// # Working with unknown values
24459///
24460/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24461/// additional enum variants at any time. Adding new variants is not considered
24462/// a breaking change. Applications should write their code in anticipation of:
24463///
24464/// - New values appearing in future releases of the client library, **and**
24465/// - New values received dynamically, without application changes.
24466///
24467/// Please consult the [Working with enums] section in the user guide for some
24468/// guidelines.
24469///
24470/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24471#[derive(Clone, Debug, PartialEq)]
24472#[non_exhaustive]
24473pub enum JobState {
24474    /// Unspecified represents an unknown state and should not be used.
24475    Unspecified,
24476    /// Job is scheduled and pending for run
24477    Pending,
24478    /// Job in progress
24479    Running,
24480    /// Job has completed with success
24481    Succeeded,
24482    /// Job has completed but with failure
24483    Failed,
24484    /// If set, the enum was initialized with an unknown value.
24485    ///
24486    /// Applications can examine the value using [JobState::value] or
24487    /// [JobState::name].
24488    UnknownValue(job_state::UnknownValue),
24489}
24490
24491#[doc(hidden)]
24492pub mod job_state {
24493    #[allow(unused_imports)]
24494    use super::*;
24495    #[derive(Clone, Debug, PartialEq)]
24496    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24497}
24498
24499impl JobState {
24500    /// Gets the enum value.
24501    ///
24502    /// Returns `None` if the enum contains an unknown value deserialized from
24503    /// the string representation of enums.
24504    pub fn value(&self) -> std::option::Option<i32> {
24505        match self {
24506            Self::Unspecified => std::option::Option::Some(0),
24507            Self::Pending => std::option::Option::Some(1),
24508            Self::Running => std::option::Option::Some(2),
24509            Self::Succeeded => std::option::Option::Some(3),
24510            Self::Failed => std::option::Option::Some(4),
24511            Self::UnknownValue(u) => u.0.value(),
24512        }
24513    }
24514
24515    /// Gets the enum value as a string.
24516    ///
24517    /// Returns `None` if the enum contains an unknown value deserialized from
24518    /// the integer representation of enums.
24519    pub fn name(&self) -> std::option::Option<&str> {
24520        match self {
24521            Self::Unspecified => std::option::Option::Some("JOB_STATE_UNSPECIFIED"),
24522            Self::Pending => std::option::Option::Some("PENDING"),
24523            Self::Running => std::option::Option::Some("RUNNING"),
24524            Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
24525            Self::Failed => std::option::Option::Some("FAILED"),
24526            Self::UnknownValue(u) => u.0.name(),
24527        }
24528    }
24529}
24530
24531impl std::default::Default for JobState {
24532    fn default() -> Self {
24533        use std::convert::From;
24534        Self::from(0)
24535    }
24536}
24537
24538impl std::fmt::Display for JobState {
24539    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24540        wkt::internal::display_enum(f, self.name(), self.value())
24541    }
24542}
24543
24544impl std::convert::From<i32> for JobState {
24545    fn from(value: i32) -> Self {
24546        match value {
24547            0 => Self::Unspecified,
24548            1 => Self::Pending,
24549            2 => Self::Running,
24550            3 => Self::Succeeded,
24551            4 => Self::Failed,
24552            _ => Self::UnknownValue(job_state::UnknownValue(
24553                wkt::internal::UnknownEnumValue::Integer(value),
24554            )),
24555        }
24556    }
24557}
24558
24559impl std::convert::From<&str> for JobState {
24560    fn from(value: &str) -> Self {
24561        use std::string::ToString;
24562        match value {
24563            "JOB_STATE_UNSPECIFIED" => Self::Unspecified,
24564            "PENDING" => Self::Pending,
24565            "RUNNING" => Self::Running,
24566            "SUCCEEDED" => Self::Succeeded,
24567            "FAILED" => Self::Failed,
24568            _ => Self::UnknownValue(job_state::UnknownValue(
24569                wkt::internal::UnknownEnumValue::String(value.to_string()),
24570            )),
24571        }
24572    }
24573}
24574
24575impl serde::ser::Serialize for JobState {
24576    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24577    where
24578        S: serde::Serializer,
24579    {
24580        match self {
24581            Self::Unspecified => serializer.serialize_i32(0),
24582            Self::Pending => serializer.serialize_i32(1),
24583            Self::Running => serializer.serialize_i32(2),
24584            Self::Succeeded => serializer.serialize_i32(3),
24585            Self::Failed => serializer.serialize_i32(4),
24586            Self::UnknownValue(u) => u.0.serialize(serializer),
24587        }
24588    }
24589}
24590
24591impl<'de> serde::de::Deserialize<'de> for JobState {
24592    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24593    where
24594        D: serde::Deserializer<'de>,
24595    {
24596        deserializer.deserialize_any(wkt::internal::EnumVisitor::<JobState>::new(
24597            ".google.cloud.securitycenter.v2.JobState",
24598        ))
24599    }
24600}
24601
24602/// The cloud provider the finding pertains to.
24603///
24604/// # Working with unknown values
24605///
24606/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24607/// additional enum variants at any time. Adding new variants is not considered
24608/// a breaking change. Applications should write their code in anticipation of:
24609///
24610/// - New values appearing in future releases of the client library, **and**
24611/// - New values received dynamically, without application changes.
24612///
24613/// Please consult the [Working with enums] section in the user guide for some
24614/// guidelines.
24615///
24616/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24617#[derive(Clone, Debug, PartialEq)]
24618#[non_exhaustive]
24619pub enum CloudProvider {
24620    /// The cloud provider is unspecified.
24621    Unspecified,
24622    /// The cloud provider is Google Cloud.
24623    GoogleCloudPlatform,
24624    /// The cloud provider is Amazon Web Services.
24625    AmazonWebServices,
24626    /// The cloud provider is Microsoft Azure.
24627    MicrosoftAzure,
24628    /// If set, the enum was initialized with an unknown value.
24629    ///
24630    /// Applications can examine the value using [CloudProvider::value] or
24631    /// [CloudProvider::name].
24632    UnknownValue(cloud_provider::UnknownValue),
24633}
24634
24635#[doc(hidden)]
24636pub mod cloud_provider {
24637    #[allow(unused_imports)]
24638    use super::*;
24639    #[derive(Clone, Debug, PartialEq)]
24640    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24641}
24642
24643impl CloudProvider {
24644    /// Gets the enum value.
24645    ///
24646    /// Returns `None` if the enum contains an unknown value deserialized from
24647    /// the string representation of enums.
24648    pub fn value(&self) -> std::option::Option<i32> {
24649        match self {
24650            Self::Unspecified => std::option::Option::Some(0),
24651            Self::GoogleCloudPlatform => std::option::Option::Some(1),
24652            Self::AmazonWebServices => std::option::Option::Some(2),
24653            Self::MicrosoftAzure => std::option::Option::Some(3),
24654            Self::UnknownValue(u) => u.0.value(),
24655        }
24656    }
24657
24658    /// Gets the enum value as a string.
24659    ///
24660    /// Returns `None` if the enum contains an unknown value deserialized from
24661    /// the integer representation of enums.
24662    pub fn name(&self) -> std::option::Option<&str> {
24663        match self {
24664            Self::Unspecified => std::option::Option::Some("CLOUD_PROVIDER_UNSPECIFIED"),
24665            Self::GoogleCloudPlatform => std::option::Option::Some("GOOGLE_CLOUD_PLATFORM"),
24666            Self::AmazonWebServices => std::option::Option::Some("AMAZON_WEB_SERVICES"),
24667            Self::MicrosoftAzure => std::option::Option::Some("MICROSOFT_AZURE"),
24668            Self::UnknownValue(u) => u.0.name(),
24669        }
24670    }
24671}
24672
24673impl std::default::Default for CloudProvider {
24674    fn default() -> Self {
24675        use std::convert::From;
24676        Self::from(0)
24677    }
24678}
24679
24680impl std::fmt::Display for CloudProvider {
24681    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24682        wkt::internal::display_enum(f, self.name(), self.value())
24683    }
24684}
24685
24686impl std::convert::From<i32> for CloudProvider {
24687    fn from(value: i32) -> Self {
24688        match value {
24689            0 => Self::Unspecified,
24690            1 => Self::GoogleCloudPlatform,
24691            2 => Self::AmazonWebServices,
24692            3 => Self::MicrosoftAzure,
24693            _ => Self::UnknownValue(cloud_provider::UnknownValue(
24694                wkt::internal::UnknownEnumValue::Integer(value),
24695            )),
24696        }
24697    }
24698}
24699
24700impl std::convert::From<&str> for CloudProvider {
24701    fn from(value: &str) -> Self {
24702        use std::string::ToString;
24703        match value {
24704            "CLOUD_PROVIDER_UNSPECIFIED" => Self::Unspecified,
24705            "GOOGLE_CLOUD_PLATFORM" => Self::GoogleCloudPlatform,
24706            "AMAZON_WEB_SERVICES" => Self::AmazonWebServices,
24707            "MICROSOFT_AZURE" => Self::MicrosoftAzure,
24708            _ => Self::UnknownValue(cloud_provider::UnknownValue(
24709                wkt::internal::UnknownEnumValue::String(value.to_string()),
24710            )),
24711        }
24712    }
24713}
24714
24715impl serde::ser::Serialize for CloudProvider {
24716    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24717    where
24718        S: serde::Serializer,
24719    {
24720        match self {
24721            Self::Unspecified => serializer.serialize_i32(0),
24722            Self::GoogleCloudPlatform => serializer.serialize_i32(1),
24723            Self::AmazonWebServices => serializer.serialize_i32(2),
24724            Self::MicrosoftAzure => serializer.serialize_i32(3),
24725            Self::UnknownValue(u) => u.0.serialize(serializer),
24726        }
24727    }
24728}
24729
24730impl<'de> serde::de::Deserialize<'de> for CloudProvider {
24731    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24732    where
24733        D: serde::Deserializer<'de>,
24734    {
24735        deserializer.deserialize_any(wkt::internal::EnumVisitor::<CloudProvider>::new(
24736            ".google.cloud.securitycenter.v2.CloudProvider",
24737        ))
24738    }
24739}
24740
24741/// Value enum to map to a resource
24742///
24743/// # Working with unknown values
24744///
24745/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24746/// additional enum variants at any time. Adding new variants is not considered
24747/// a breaking change. Applications should write their code in anticipation of:
24748///
24749/// - New values appearing in future releases of the client library, **and**
24750/// - New values received dynamically, without application changes.
24751///
24752/// Please consult the [Working with enums] section in the user guide for some
24753/// guidelines.
24754///
24755/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24756#[derive(Clone, Debug, PartialEq)]
24757#[non_exhaustive]
24758pub enum ResourceValue {
24759    /// Unspecific value
24760    Unspecified,
24761    /// High resource value
24762    High,
24763    /// Medium resource value
24764    Medium,
24765    /// Low resource value
24766    Low,
24767    /// No resource value, e.g. ignore these resources
24768    None,
24769    /// If set, the enum was initialized with an unknown value.
24770    ///
24771    /// Applications can examine the value using [ResourceValue::value] or
24772    /// [ResourceValue::name].
24773    UnknownValue(resource_value::UnknownValue),
24774}
24775
24776#[doc(hidden)]
24777pub mod resource_value {
24778    #[allow(unused_imports)]
24779    use super::*;
24780    #[derive(Clone, Debug, PartialEq)]
24781    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24782}
24783
24784impl ResourceValue {
24785    /// Gets the enum value.
24786    ///
24787    /// Returns `None` if the enum contains an unknown value deserialized from
24788    /// the string representation of enums.
24789    pub fn value(&self) -> std::option::Option<i32> {
24790        match self {
24791            Self::Unspecified => std::option::Option::Some(0),
24792            Self::High => std::option::Option::Some(1),
24793            Self::Medium => std::option::Option::Some(2),
24794            Self::Low => std::option::Option::Some(3),
24795            Self::None => std::option::Option::Some(4),
24796            Self::UnknownValue(u) => u.0.value(),
24797        }
24798    }
24799
24800    /// Gets the enum value as a string.
24801    ///
24802    /// Returns `None` if the enum contains an unknown value deserialized from
24803    /// the integer representation of enums.
24804    pub fn name(&self) -> std::option::Option<&str> {
24805        match self {
24806            Self::Unspecified => std::option::Option::Some("RESOURCE_VALUE_UNSPECIFIED"),
24807            Self::High => std::option::Option::Some("HIGH"),
24808            Self::Medium => std::option::Option::Some("MEDIUM"),
24809            Self::Low => std::option::Option::Some("LOW"),
24810            Self::None => std::option::Option::Some("NONE"),
24811            Self::UnknownValue(u) => u.0.name(),
24812        }
24813    }
24814}
24815
24816impl std::default::Default for ResourceValue {
24817    fn default() -> Self {
24818        use std::convert::From;
24819        Self::from(0)
24820    }
24821}
24822
24823impl std::fmt::Display for ResourceValue {
24824    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24825        wkt::internal::display_enum(f, self.name(), self.value())
24826    }
24827}
24828
24829impl std::convert::From<i32> for ResourceValue {
24830    fn from(value: i32) -> Self {
24831        match value {
24832            0 => Self::Unspecified,
24833            1 => Self::High,
24834            2 => Self::Medium,
24835            3 => Self::Low,
24836            4 => Self::None,
24837            _ => Self::UnknownValue(resource_value::UnknownValue(
24838                wkt::internal::UnknownEnumValue::Integer(value),
24839            )),
24840        }
24841    }
24842}
24843
24844impl std::convert::From<&str> for ResourceValue {
24845    fn from(value: &str) -> Self {
24846        use std::string::ToString;
24847        match value {
24848            "RESOURCE_VALUE_UNSPECIFIED" => Self::Unspecified,
24849            "HIGH" => Self::High,
24850            "MEDIUM" => Self::Medium,
24851            "LOW" => Self::Low,
24852            "NONE" => Self::None,
24853            _ => Self::UnknownValue(resource_value::UnknownValue(
24854                wkt::internal::UnknownEnumValue::String(value.to_string()),
24855            )),
24856        }
24857    }
24858}
24859
24860impl serde::ser::Serialize for ResourceValue {
24861    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24862    where
24863        S: serde::Serializer,
24864    {
24865        match self {
24866            Self::Unspecified => serializer.serialize_i32(0),
24867            Self::High => serializer.serialize_i32(1),
24868            Self::Medium => serializer.serialize_i32(2),
24869            Self::Low => serializer.serialize_i32(3),
24870            Self::None => serializer.serialize_i32(4),
24871            Self::UnknownValue(u) => u.0.serialize(serializer),
24872        }
24873    }
24874}
24875
24876impl<'de> serde::de::Deserialize<'de> for ResourceValue {
24877    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24878    where
24879        D: serde::Deserializer<'de>,
24880    {
24881        deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResourceValue>::new(
24882            ".google.cloud.securitycenter.v2.ResourceValue",
24883        ))
24884    }
24885}