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::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gaxi;
23extern crate google_cloud_gax;
24extern crate google_cloud_iam_v1;
25extern crate google_cloud_longrunning;
26extern crate google_cloud_lro;
27extern crate serde;
28extern crate serde_json;
29extern crate serde_with;
30extern crate std;
31extern crate tracing;
32extern crate wkt;
33
34mod debug;
35mod deserialize;
36mod serialize;
37
38/// Represents an access event.
39#[derive(Clone, Default, PartialEq)]
40#[non_exhaustive]
41pub struct Access {
42    /// Associated email, such as "foo@google.com".
43    ///
44    /// The email address of the authenticated user or a service account acting on
45    /// behalf of a third party principal making the request. For third party
46    /// identity callers, the `principal_subject` field is populated instead of
47    /// this field. For privacy reasons, the principal email address is sometimes
48    /// redacted. For more information, see [Caller identities in audit
49    /// logs](https://cloud.google.com/logging/docs/audit#user-id).
50    pub principal_email: std::string::String,
51
52    /// Caller's IP address, such as "1.1.1.1".
53    pub caller_ip: std::string::String,
54
55    /// The caller IP's geolocation, which identifies where the call came from.
56    pub caller_ip_geo: std::option::Option<crate::model::Geolocation>,
57
58    /// Type of user agent associated with the finding. For example, an operating
59    /// system shell or an embedded or standalone application.
60    pub user_agent_family: std::string::String,
61
62    /// The caller's user agent string associated with the finding.
63    pub user_agent: std::string::String,
64
65    /// This is the API service that the service account made a call to, e.g.
66    /// "iam.googleapis.com"
67    pub service_name: std::string::String,
68
69    /// The method that the service account called, e.g. "SetIamPolicy".
70    pub method_name: std::string::String,
71
72    /// A string that represents the principal_subject that is associated with the
73    /// identity. Unlike `principal_email`, `principal_subject` supports principals
74    /// that aren't associated with email addresses, such as third party
75    /// principals. For most identities, the format is
76    /// `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`.
77    /// Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD,
78    /// still use the legacy format `serviceAccount:{identity pool
79    /// name}[{subject}]`.
80    pub principal_subject: std::string::String,
81
82    /// The name of the service account key that was used to create or exchange
83    /// credentials when authenticating the service account that made the request.
84    /// This is a scheme-less URI full resource name. For example:
85    ///
86    /// "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}".
87    pub service_account_key_name: std::string::String,
88
89    /// The identity delegation history of an authenticated service account that
90    /// made the request. The `serviceAccountDelegationInfo[]` object contains
91    /// information about the real authorities that try to access Google Cloud
92    /// resources by delegating on a service account. When multiple authorities are
93    /// present, they are guaranteed to be sorted based on the original ordering of
94    /// the identity delegation events.
95    pub service_account_delegation_info: std::vec::Vec<crate::model::ServiceAccountDelegationInfo>,
96
97    /// A string that represents a username. The username provided depends on the
98    /// type of the finding and is likely not an IAM principal. For example, this
99    /// can be a system username if the finding is related to a virtual machine, or
100    /// it can be an application login username.
101    pub user_name: std::string::String,
102
103    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
104}
105
106impl Access {
107    pub fn new() -> Self {
108        std::default::Default::default()
109    }
110
111    /// Sets the value of [principal_email][crate::model::Access::principal_email].
112    ///
113    /// # Example
114    /// ```ignore,no_run
115    /// # use google_cloud_securitycenter_v2::model::Access;
116    /// let x = Access::new().set_principal_email("example");
117    /// ```
118    pub fn set_principal_email<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
119        self.principal_email = v.into();
120        self
121    }
122
123    /// Sets the value of [caller_ip][crate::model::Access::caller_ip].
124    ///
125    /// # Example
126    /// ```ignore,no_run
127    /// # use google_cloud_securitycenter_v2::model::Access;
128    /// let x = Access::new().set_caller_ip("example");
129    /// ```
130    pub fn set_caller_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
131        self.caller_ip = v.into();
132        self
133    }
134
135    /// Sets the value of [caller_ip_geo][crate::model::Access::caller_ip_geo].
136    ///
137    /// # Example
138    /// ```ignore,no_run
139    /// # use google_cloud_securitycenter_v2::model::Access;
140    /// use google_cloud_securitycenter_v2::model::Geolocation;
141    /// let x = Access::new().set_caller_ip_geo(Geolocation::default()/* use setters */);
142    /// ```
143    pub fn set_caller_ip_geo<T>(mut self, v: T) -> Self
144    where
145        T: std::convert::Into<crate::model::Geolocation>,
146    {
147        self.caller_ip_geo = std::option::Option::Some(v.into());
148        self
149    }
150
151    /// Sets or clears the value of [caller_ip_geo][crate::model::Access::caller_ip_geo].
152    ///
153    /// # Example
154    /// ```ignore,no_run
155    /// # use google_cloud_securitycenter_v2::model::Access;
156    /// use google_cloud_securitycenter_v2::model::Geolocation;
157    /// let x = Access::new().set_or_clear_caller_ip_geo(Some(Geolocation::default()/* use setters */));
158    /// let x = Access::new().set_or_clear_caller_ip_geo(None::<Geolocation>);
159    /// ```
160    pub fn set_or_clear_caller_ip_geo<T>(mut self, v: std::option::Option<T>) -> Self
161    where
162        T: std::convert::Into<crate::model::Geolocation>,
163    {
164        self.caller_ip_geo = v.map(|x| x.into());
165        self
166    }
167
168    /// Sets the value of [user_agent_family][crate::model::Access::user_agent_family].
169    ///
170    /// # Example
171    /// ```ignore,no_run
172    /// # use google_cloud_securitycenter_v2::model::Access;
173    /// let x = Access::new().set_user_agent_family("example");
174    /// ```
175    pub fn set_user_agent_family<T: std::convert::Into<std::string::String>>(
176        mut self,
177        v: T,
178    ) -> Self {
179        self.user_agent_family = v.into();
180        self
181    }
182
183    /// Sets the value of [user_agent][crate::model::Access::user_agent].
184    ///
185    /// # Example
186    /// ```ignore,no_run
187    /// # use google_cloud_securitycenter_v2::model::Access;
188    /// let x = Access::new().set_user_agent("example");
189    /// ```
190    pub fn set_user_agent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
191        self.user_agent = v.into();
192        self
193    }
194
195    /// Sets the value of [service_name][crate::model::Access::service_name].
196    ///
197    /// # Example
198    /// ```ignore,no_run
199    /// # use google_cloud_securitycenter_v2::model::Access;
200    /// let x = Access::new().set_service_name("example");
201    /// ```
202    pub fn set_service_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
203        self.service_name = v.into();
204        self
205    }
206
207    /// Sets the value of [method_name][crate::model::Access::method_name].
208    ///
209    /// # Example
210    /// ```ignore,no_run
211    /// # use google_cloud_securitycenter_v2::model::Access;
212    /// let x = Access::new().set_method_name("example");
213    /// ```
214    pub fn set_method_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
215        self.method_name = v.into();
216        self
217    }
218
219    /// Sets the value of [principal_subject][crate::model::Access::principal_subject].
220    ///
221    /// # Example
222    /// ```ignore,no_run
223    /// # use google_cloud_securitycenter_v2::model::Access;
224    /// let x = Access::new().set_principal_subject("example");
225    /// ```
226    pub fn set_principal_subject<T: std::convert::Into<std::string::String>>(
227        mut self,
228        v: T,
229    ) -> Self {
230        self.principal_subject = v.into();
231        self
232    }
233
234    /// Sets the value of [service_account_key_name][crate::model::Access::service_account_key_name].
235    ///
236    /// # Example
237    /// ```ignore,no_run
238    /// # use google_cloud_securitycenter_v2::model::Access;
239    /// let x = Access::new().set_service_account_key_name("example");
240    /// ```
241    pub fn set_service_account_key_name<T: std::convert::Into<std::string::String>>(
242        mut self,
243        v: T,
244    ) -> Self {
245        self.service_account_key_name = v.into();
246        self
247    }
248
249    /// Sets the value of [service_account_delegation_info][crate::model::Access::service_account_delegation_info].
250    ///
251    /// # Example
252    /// ```ignore,no_run
253    /// # use google_cloud_securitycenter_v2::model::Access;
254    /// use google_cloud_securitycenter_v2::model::ServiceAccountDelegationInfo;
255    /// let x = Access::new()
256    ///     .set_service_account_delegation_info([
257    ///         ServiceAccountDelegationInfo::default()/* use setters */,
258    ///         ServiceAccountDelegationInfo::default()/* use (different) setters */,
259    ///     ]);
260    /// ```
261    pub fn set_service_account_delegation_info<T, V>(mut self, v: T) -> Self
262    where
263        T: std::iter::IntoIterator<Item = V>,
264        V: std::convert::Into<crate::model::ServiceAccountDelegationInfo>,
265    {
266        use std::iter::Iterator;
267        self.service_account_delegation_info = v.into_iter().map(|i| i.into()).collect();
268        self
269    }
270
271    /// Sets the value of [user_name][crate::model::Access::user_name].
272    ///
273    /// # Example
274    /// ```ignore,no_run
275    /// # use google_cloud_securitycenter_v2::model::Access;
276    /// let x = Access::new().set_user_name("example");
277    /// ```
278    pub fn set_user_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
279        self.user_name = v.into();
280        self
281    }
282}
283
284impl wkt::message::Message for Access {
285    fn typename() -> &'static str {
286        "type.googleapis.com/google.cloud.securitycenter.v2.Access"
287    }
288}
289
290/// Identity delegation history of an authenticated service account.
291#[derive(Clone, Default, PartialEq)]
292#[non_exhaustive]
293pub struct ServiceAccountDelegationInfo {
294    /// The email address of a Google account.
295    pub principal_email: std::string::String,
296
297    /// A string representing the principal_subject associated with the identity.
298    /// As compared to `principal_email`, supports principals that aren't
299    /// associated with email addresses, such as third party principals. For most
300    /// identities, the format will be `principal://iam.googleapis.com/{identity
301    /// pool name}/subjects/{subject}` except for some GKE identities
302    /// (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy
303    /// format `serviceAccount:{identity pool name}[{subject}]`
304    pub principal_subject: std::string::String,
305
306    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
307}
308
309impl ServiceAccountDelegationInfo {
310    pub fn new() -> Self {
311        std::default::Default::default()
312    }
313
314    /// Sets the value of [principal_email][crate::model::ServiceAccountDelegationInfo::principal_email].
315    ///
316    /// # Example
317    /// ```ignore,no_run
318    /// # use google_cloud_securitycenter_v2::model::ServiceAccountDelegationInfo;
319    /// let x = ServiceAccountDelegationInfo::new().set_principal_email("example");
320    /// ```
321    pub fn set_principal_email<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
322        self.principal_email = v.into();
323        self
324    }
325
326    /// Sets the value of [principal_subject][crate::model::ServiceAccountDelegationInfo::principal_subject].
327    ///
328    /// # Example
329    /// ```ignore,no_run
330    /// # use google_cloud_securitycenter_v2::model::ServiceAccountDelegationInfo;
331    /// let x = ServiceAccountDelegationInfo::new().set_principal_subject("example");
332    /// ```
333    pub fn set_principal_subject<T: std::convert::Into<std::string::String>>(
334        mut self,
335        v: T,
336    ) -> Self {
337        self.principal_subject = v.into();
338        self
339    }
340}
341
342impl wkt::message::Message for ServiceAccountDelegationInfo {
343    fn typename() -> &'static str {
344        "type.googleapis.com/google.cloud.securitycenter.v2.ServiceAccountDelegationInfo"
345    }
346}
347
348/// Represents a geographical location for a given access.
349#[derive(Clone, Default, PartialEq)]
350#[non_exhaustive]
351pub struct Geolocation {
352    /// A CLDR.
353    pub region_code: std::string::String,
354
355    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
356}
357
358impl Geolocation {
359    pub fn new() -> Self {
360        std::default::Default::default()
361    }
362
363    /// Sets the value of [region_code][crate::model::Geolocation::region_code].
364    ///
365    /// # Example
366    /// ```ignore,no_run
367    /// # use google_cloud_securitycenter_v2::model::Geolocation;
368    /// let x = Geolocation::new().set_region_code("example");
369    /// ```
370    pub fn set_region_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
371        self.region_code = v.into();
372        self
373    }
374}
375
376impl wkt::message::Message for Geolocation {
377    fn typename() -> &'static str {
378        "type.googleapis.com/google.cloud.securitycenter.v2.Geolocation"
379    }
380}
381
382/// Details about resources affected by this finding.
383#[derive(Clone, Default, PartialEq)]
384#[non_exhaustive]
385pub struct AffectedResources {
386    /// The count of resources affected by the finding.
387    pub count: i64,
388
389    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
390}
391
392impl AffectedResources {
393    pub fn new() -> Self {
394        std::default::Default::default()
395    }
396
397    /// Sets the value of [count][crate::model::AffectedResources::count].
398    ///
399    /// # Example
400    /// ```ignore,no_run
401    /// # use google_cloud_securitycenter_v2::model::AffectedResources;
402    /// let x = AffectedResources::new().set_count(42);
403    /// ```
404    pub fn set_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
405        self.count = v.into();
406        self
407    }
408}
409
410impl wkt::message::Message for AffectedResources {
411    fn typename() -> &'static str {
412        "type.googleapis.com/google.cloud.securitycenter.v2.AffectedResources"
413    }
414}
415
416/// Contains information about the AI model associated with the finding.
417#[derive(Clone, Default, PartialEq)]
418#[non_exhaustive]
419pub struct AiModel {
420    /// The name of the AI model, for example, "gemini:1.0.0".
421    pub name: std::string::String,
422
423    /// The domain of the model, for example, “image-classification”.
424    pub domain: std::string::String,
425
426    /// The name of the model library, for example, “transformers”.
427    pub library: std::string::String,
428
429    /// The region in which the model is used, for example, “us-central1”.
430    pub location: std::string::String,
431
432    /// The publisher of the model, for example, “google” or “nvidia”.
433    pub publisher: std::string::String,
434
435    /// The platform on which the model is deployed.
436    pub deployment_platform: crate::model::ai_model::DeploymentPlatform,
437
438    /// The user defined display name of model. Ex. baseline-classification-model
439    pub display_name: std::string::String,
440
441    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
442}
443
444impl AiModel {
445    pub fn new() -> Self {
446        std::default::Default::default()
447    }
448
449    /// Sets the value of [name][crate::model::AiModel::name].
450    ///
451    /// # Example
452    /// ```ignore,no_run
453    /// # use google_cloud_securitycenter_v2::model::AiModel;
454    /// let x = AiModel::new().set_name("example");
455    /// ```
456    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
457        self.name = v.into();
458        self
459    }
460
461    /// Sets the value of [domain][crate::model::AiModel::domain].
462    ///
463    /// # Example
464    /// ```ignore,no_run
465    /// # use google_cloud_securitycenter_v2::model::AiModel;
466    /// let x = AiModel::new().set_domain("example");
467    /// ```
468    pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
469        self.domain = v.into();
470        self
471    }
472
473    /// Sets the value of [library][crate::model::AiModel::library].
474    ///
475    /// # Example
476    /// ```ignore,no_run
477    /// # use google_cloud_securitycenter_v2::model::AiModel;
478    /// let x = AiModel::new().set_library("example");
479    /// ```
480    pub fn set_library<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
481        self.library = v.into();
482        self
483    }
484
485    /// Sets the value of [location][crate::model::AiModel::location].
486    ///
487    /// # Example
488    /// ```ignore,no_run
489    /// # use google_cloud_securitycenter_v2::model::AiModel;
490    /// let x = AiModel::new().set_location("example");
491    /// ```
492    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
493        self.location = v.into();
494        self
495    }
496
497    /// Sets the value of [publisher][crate::model::AiModel::publisher].
498    ///
499    /// # Example
500    /// ```ignore,no_run
501    /// # use google_cloud_securitycenter_v2::model::AiModel;
502    /// let x = AiModel::new().set_publisher("example");
503    /// ```
504    pub fn set_publisher<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
505        self.publisher = v.into();
506        self
507    }
508
509    /// Sets the value of [deployment_platform][crate::model::AiModel::deployment_platform].
510    ///
511    /// # Example
512    /// ```ignore,no_run
513    /// # use google_cloud_securitycenter_v2::model::AiModel;
514    /// use google_cloud_securitycenter_v2::model::ai_model::DeploymentPlatform;
515    /// let x0 = AiModel::new().set_deployment_platform(DeploymentPlatform::VertexAi);
516    /// let x1 = AiModel::new().set_deployment_platform(DeploymentPlatform::Gke);
517    /// let x2 = AiModel::new().set_deployment_platform(DeploymentPlatform::Gce);
518    /// ```
519    pub fn set_deployment_platform<
520        T: std::convert::Into<crate::model::ai_model::DeploymentPlatform>,
521    >(
522        mut self,
523        v: T,
524    ) -> Self {
525        self.deployment_platform = v.into();
526        self
527    }
528
529    /// Sets the value of [display_name][crate::model::AiModel::display_name].
530    ///
531    /// # Example
532    /// ```ignore,no_run
533    /// # use google_cloud_securitycenter_v2::model::AiModel;
534    /// let x = AiModel::new().set_display_name("example");
535    /// ```
536    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
537        self.display_name = v.into();
538        self
539    }
540}
541
542impl wkt::message::Message for AiModel {
543    fn typename() -> &'static str {
544        "type.googleapis.com/google.cloud.securitycenter.v2.AiModel"
545    }
546}
547
548/// Defines additional types related to [AiModel].
549pub mod ai_model {
550    #[allow(unused_imports)]
551    use super::*;
552
553    /// The platform on which the model is deployed.
554    ///
555    /// # Working with unknown values
556    ///
557    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
558    /// additional enum variants at any time. Adding new variants is not considered
559    /// a breaking change. Applications should write their code in anticipation of:
560    ///
561    /// - New values appearing in future releases of the client library, **and**
562    /// - New values received dynamically, without application changes.
563    ///
564    /// Please consult the [Working with enums] section in the user guide for some
565    /// guidelines.
566    ///
567    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
568    #[derive(Clone, Debug, PartialEq)]
569    #[non_exhaustive]
570    pub enum DeploymentPlatform {
571        /// Unspecified deployment platform.
572        Unspecified,
573        /// Vertex AI.
574        VertexAi,
575        /// Google Kubernetes Engine.
576        Gke,
577        /// Google Compute Engine.
578        Gce,
579        /// Fine tuned model.
580        FineTunedModel,
581        /// If set, the enum was initialized with an unknown value.
582        ///
583        /// Applications can examine the value using [DeploymentPlatform::value] or
584        /// [DeploymentPlatform::name].
585        UnknownValue(deployment_platform::UnknownValue),
586    }
587
588    #[doc(hidden)]
589    pub mod deployment_platform {
590        #[allow(unused_imports)]
591        use super::*;
592        #[derive(Clone, Debug, PartialEq)]
593        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
594    }
595
596    impl DeploymentPlatform {
597        /// Gets the enum value.
598        ///
599        /// Returns `None` if the enum contains an unknown value deserialized from
600        /// the string representation of enums.
601        pub fn value(&self) -> std::option::Option<i32> {
602            match self {
603                Self::Unspecified => std::option::Option::Some(0),
604                Self::VertexAi => std::option::Option::Some(1),
605                Self::Gke => std::option::Option::Some(2),
606                Self::Gce => std::option::Option::Some(3),
607                Self::FineTunedModel => std::option::Option::Some(4),
608                Self::UnknownValue(u) => u.0.value(),
609            }
610        }
611
612        /// Gets the enum value as a string.
613        ///
614        /// Returns `None` if the enum contains an unknown value deserialized from
615        /// the integer representation of enums.
616        pub fn name(&self) -> std::option::Option<&str> {
617            match self {
618                Self::Unspecified => std::option::Option::Some("DEPLOYMENT_PLATFORM_UNSPECIFIED"),
619                Self::VertexAi => std::option::Option::Some("VERTEX_AI"),
620                Self::Gke => std::option::Option::Some("GKE"),
621                Self::Gce => std::option::Option::Some("GCE"),
622                Self::FineTunedModel => std::option::Option::Some("FINE_TUNED_MODEL"),
623                Self::UnknownValue(u) => u.0.name(),
624            }
625        }
626    }
627
628    impl std::default::Default for DeploymentPlatform {
629        fn default() -> Self {
630            use std::convert::From;
631            Self::from(0)
632        }
633    }
634
635    impl std::fmt::Display for DeploymentPlatform {
636        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
637            wkt::internal::display_enum(f, self.name(), self.value())
638        }
639    }
640
641    impl std::convert::From<i32> for DeploymentPlatform {
642        fn from(value: i32) -> Self {
643            match value {
644                0 => Self::Unspecified,
645                1 => Self::VertexAi,
646                2 => Self::Gke,
647                3 => Self::Gce,
648                4 => Self::FineTunedModel,
649                _ => Self::UnknownValue(deployment_platform::UnknownValue(
650                    wkt::internal::UnknownEnumValue::Integer(value),
651                )),
652            }
653        }
654    }
655
656    impl std::convert::From<&str> for DeploymentPlatform {
657        fn from(value: &str) -> Self {
658            use std::string::ToString;
659            match value {
660                "DEPLOYMENT_PLATFORM_UNSPECIFIED" => Self::Unspecified,
661                "VERTEX_AI" => Self::VertexAi,
662                "GKE" => Self::Gke,
663                "GCE" => Self::Gce,
664                "FINE_TUNED_MODEL" => Self::FineTunedModel,
665                _ => Self::UnknownValue(deployment_platform::UnknownValue(
666                    wkt::internal::UnknownEnumValue::String(value.to_string()),
667                )),
668            }
669        }
670    }
671
672    impl serde::ser::Serialize for DeploymentPlatform {
673        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
674        where
675            S: serde::Serializer,
676        {
677            match self {
678                Self::Unspecified => serializer.serialize_i32(0),
679                Self::VertexAi => serializer.serialize_i32(1),
680                Self::Gke => serializer.serialize_i32(2),
681                Self::Gce => serializer.serialize_i32(3),
682                Self::FineTunedModel => serializer.serialize_i32(4),
683                Self::UnknownValue(u) => u.0.serialize(serializer),
684            }
685        }
686    }
687
688    impl<'de> serde::de::Deserialize<'de> for DeploymentPlatform {
689        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
690        where
691            D: serde::Deserializer<'de>,
692        {
693            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DeploymentPlatform>::new(
694                ".google.cloud.securitycenter.v2.AiModel.DeploymentPlatform",
695            ))
696        }
697    }
698}
699
700/// Represents an application associated with a finding.
701#[derive(Clone, Default, PartialEq)]
702#[non_exhaustive]
703pub struct Application {
704    /// The base URI that identifies the network location of the application in
705    /// which the vulnerability was detected. For example, `<http://example.com>`.
706    pub base_uri: std::string::String,
707
708    /// The full URI with payload that could be used to reproduce the
709    /// vulnerability. For example, `<http://example.com>?p=aMmYgI6H`.
710    pub full_uri: std::string::String,
711
712    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
713}
714
715impl Application {
716    pub fn new() -> Self {
717        std::default::Default::default()
718    }
719
720    /// Sets the value of [base_uri][crate::model::Application::base_uri].
721    ///
722    /// # Example
723    /// ```ignore,no_run
724    /// # use google_cloud_securitycenter_v2::model::Application;
725    /// let x = Application::new().set_base_uri("example");
726    /// ```
727    pub fn set_base_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
728        self.base_uri = v.into();
729        self
730    }
731
732    /// Sets the value of [full_uri][crate::model::Application::full_uri].
733    ///
734    /// # Example
735    /// ```ignore,no_run
736    /// # use google_cloud_securitycenter_v2::model::Application;
737    /// let x = Application::new().set_full_uri("example");
738    /// ```
739    pub fn set_full_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
740        self.full_uri = v.into();
741        self
742    }
743}
744
745impl wkt::message::Message for Application {
746    fn typename() -> &'static str {
747        "type.googleapis.com/google.cloud.securitycenter.v2.Application"
748    }
749}
750
751/// An attack exposure contains the results of an attack path simulation run.
752#[derive(Clone, Default, PartialEq)]
753#[non_exhaustive]
754pub struct AttackExposure {
755    /// A number between 0 (inclusive) and infinity that represents how important
756    /// this finding is to remediate. The higher the score, the more important it
757    /// is to remediate.
758    pub score: f64,
759
760    /// The most recent time the attack exposure was updated on this finding.
761    pub latest_calculation_time: std::option::Option<wkt::Timestamp>,
762
763    /// The resource name of the attack path simulation result that contains the
764    /// details regarding this attack exposure score.
765    /// Example: `organizations/123/simulations/456/attackExposureResults/789`
766    pub attack_exposure_result: std::string::String,
767
768    /// Output only. What state this AttackExposure is in. This captures whether or
769    /// not an attack exposure has been calculated or not.
770    pub state: crate::model::attack_exposure::State,
771
772    /// The number of high value resources that are exposed as a result of this
773    /// finding.
774    pub exposed_high_value_resources_count: i32,
775
776    /// The number of medium value resources that are exposed as a result of this
777    /// finding.
778    pub exposed_medium_value_resources_count: i32,
779
780    /// The number of high value resources that are exposed as a result of this
781    /// finding.
782    pub exposed_low_value_resources_count: i32,
783
784    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
785}
786
787impl AttackExposure {
788    pub fn new() -> Self {
789        std::default::Default::default()
790    }
791
792    /// Sets the value of [score][crate::model::AttackExposure::score].
793    ///
794    /// # Example
795    /// ```ignore,no_run
796    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
797    /// let x = AttackExposure::new().set_score(42.0);
798    /// ```
799    pub fn set_score<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
800        self.score = v.into();
801        self
802    }
803
804    /// Sets the value of [latest_calculation_time][crate::model::AttackExposure::latest_calculation_time].
805    ///
806    /// # Example
807    /// ```ignore,no_run
808    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
809    /// use wkt::Timestamp;
810    /// let x = AttackExposure::new().set_latest_calculation_time(Timestamp::default()/* use setters */);
811    /// ```
812    pub fn set_latest_calculation_time<T>(mut self, v: T) -> Self
813    where
814        T: std::convert::Into<wkt::Timestamp>,
815    {
816        self.latest_calculation_time = std::option::Option::Some(v.into());
817        self
818    }
819
820    /// Sets or clears the value of [latest_calculation_time][crate::model::AttackExposure::latest_calculation_time].
821    ///
822    /// # Example
823    /// ```ignore,no_run
824    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
825    /// use wkt::Timestamp;
826    /// let x = AttackExposure::new().set_or_clear_latest_calculation_time(Some(Timestamp::default()/* use setters */));
827    /// let x = AttackExposure::new().set_or_clear_latest_calculation_time(None::<Timestamp>);
828    /// ```
829    pub fn set_or_clear_latest_calculation_time<T>(mut self, v: std::option::Option<T>) -> Self
830    where
831        T: std::convert::Into<wkt::Timestamp>,
832    {
833        self.latest_calculation_time = v.map(|x| x.into());
834        self
835    }
836
837    /// Sets the value of [attack_exposure_result][crate::model::AttackExposure::attack_exposure_result].
838    ///
839    /// # Example
840    /// ```ignore,no_run
841    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
842    /// let x = AttackExposure::new().set_attack_exposure_result("example");
843    /// ```
844    pub fn set_attack_exposure_result<T: std::convert::Into<std::string::String>>(
845        mut self,
846        v: T,
847    ) -> Self {
848        self.attack_exposure_result = v.into();
849        self
850    }
851
852    /// Sets the value of [state][crate::model::AttackExposure::state].
853    ///
854    /// # Example
855    /// ```ignore,no_run
856    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
857    /// use google_cloud_securitycenter_v2::model::attack_exposure::State;
858    /// let x0 = AttackExposure::new().set_state(State::Calculated);
859    /// let x1 = AttackExposure::new().set_state(State::NotCalculated);
860    /// ```
861    pub fn set_state<T: std::convert::Into<crate::model::attack_exposure::State>>(
862        mut self,
863        v: T,
864    ) -> Self {
865        self.state = v.into();
866        self
867    }
868
869    /// Sets the value of [exposed_high_value_resources_count][crate::model::AttackExposure::exposed_high_value_resources_count].
870    ///
871    /// # Example
872    /// ```ignore,no_run
873    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
874    /// let x = AttackExposure::new().set_exposed_high_value_resources_count(42);
875    /// ```
876    pub fn set_exposed_high_value_resources_count<T: std::convert::Into<i32>>(
877        mut self,
878        v: T,
879    ) -> Self {
880        self.exposed_high_value_resources_count = v.into();
881        self
882    }
883
884    /// Sets the value of [exposed_medium_value_resources_count][crate::model::AttackExposure::exposed_medium_value_resources_count].
885    ///
886    /// # Example
887    /// ```ignore,no_run
888    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
889    /// let x = AttackExposure::new().set_exposed_medium_value_resources_count(42);
890    /// ```
891    pub fn set_exposed_medium_value_resources_count<T: std::convert::Into<i32>>(
892        mut self,
893        v: T,
894    ) -> Self {
895        self.exposed_medium_value_resources_count = v.into();
896        self
897    }
898
899    /// Sets the value of [exposed_low_value_resources_count][crate::model::AttackExposure::exposed_low_value_resources_count].
900    ///
901    /// # Example
902    /// ```ignore,no_run
903    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
904    /// let x = AttackExposure::new().set_exposed_low_value_resources_count(42);
905    /// ```
906    pub fn set_exposed_low_value_resources_count<T: std::convert::Into<i32>>(
907        mut self,
908        v: T,
909    ) -> Self {
910        self.exposed_low_value_resources_count = v.into();
911        self
912    }
913}
914
915impl wkt::message::Message for AttackExposure {
916    fn typename() -> &'static str {
917        "type.googleapis.com/google.cloud.securitycenter.v2.AttackExposure"
918    }
919}
920
921/// Defines additional types related to [AttackExposure].
922pub mod attack_exposure {
923    #[allow(unused_imports)]
924    use super::*;
925
926    /// This enum defines the various states an AttackExposure can be in.
927    ///
928    /// # Working with unknown values
929    ///
930    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
931    /// additional enum variants at any time. Adding new variants is not considered
932    /// a breaking change. Applications should write their code in anticipation of:
933    ///
934    /// - New values appearing in future releases of the client library, **and**
935    /// - New values received dynamically, without application changes.
936    ///
937    /// Please consult the [Working with enums] section in the user guide for some
938    /// guidelines.
939    ///
940    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
941    #[derive(Clone, Debug, PartialEq)]
942    #[non_exhaustive]
943    pub enum State {
944        /// The state is not specified.
945        Unspecified,
946        /// The attack exposure has been calculated.
947        Calculated,
948        /// The attack exposure has not been calculated.
949        NotCalculated,
950        /// If set, the enum was initialized with an unknown value.
951        ///
952        /// Applications can examine the value using [State::value] or
953        /// [State::name].
954        UnknownValue(state::UnknownValue),
955    }
956
957    #[doc(hidden)]
958    pub mod state {
959        #[allow(unused_imports)]
960        use super::*;
961        #[derive(Clone, Debug, PartialEq)]
962        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
963    }
964
965    impl State {
966        /// Gets the enum value.
967        ///
968        /// Returns `None` if the enum contains an unknown value deserialized from
969        /// the string representation of enums.
970        pub fn value(&self) -> std::option::Option<i32> {
971            match self {
972                Self::Unspecified => std::option::Option::Some(0),
973                Self::Calculated => std::option::Option::Some(1),
974                Self::NotCalculated => std::option::Option::Some(2),
975                Self::UnknownValue(u) => u.0.value(),
976            }
977        }
978
979        /// Gets the enum value as a string.
980        ///
981        /// Returns `None` if the enum contains an unknown value deserialized from
982        /// the integer representation of enums.
983        pub fn name(&self) -> std::option::Option<&str> {
984            match self {
985                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
986                Self::Calculated => std::option::Option::Some("CALCULATED"),
987                Self::NotCalculated => std::option::Option::Some("NOT_CALCULATED"),
988                Self::UnknownValue(u) => u.0.name(),
989            }
990        }
991    }
992
993    impl std::default::Default for State {
994        fn default() -> Self {
995            use std::convert::From;
996            Self::from(0)
997        }
998    }
999
1000    impl std::fmt::Display for State {
1001        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1002            wkt::internal::display_enum(f, self.name(), self.value())
1003        }
1004    }
1005
1006    impl std::convert::From<i32> for State {
1007        fn from(value: i32) -> Self {
1008            match value {
1009                0 => Self::Unspecified,
1010                1 => Self::Calculated,
1011                2 => Self::NotCalculated,
1012                _ => Self::UnknownValue(state::UnknownValue(
1013                    wkt::internal::UnknownEnumValue::Integer(value),
1014                )),
1015            }
1016        }
1017    }
1018
1019    impl std::convert::From<&str> for State {
1020        fn from(value: &str) -> Self {
1021            use std::string::ToString;
1022            match value {
1023                "STATE_UNSPECIFIED" => Self::Unspecified,
1024                "CALCULATED" => Self::Calculated,
1025                "NOT_CALCULATED" => Self::NotCalculated,
1026                _ => Self::UnknownValue(state::UnknownValue(
1027                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1028                )),
1029            }
1030        }
1031    }
1032
1033    impl serde::ser::Serialize for State {
1034        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1035        where
1036            S: serde::Serializer,
1037        {
1038            match self {
1039                Self::Unspecified => serializer.serialize_i32(0),
1040                Self::Calculated => serializer.serialize_i32(1),
1041                Self::NotCalculated => serializer.serialize_i32(2),
1042                Self::UnknownValue(u) => u.0.serialize(serializer),
1043            }
1044        }
1045    }
1046
1047    impl<'de> serde::de::Deserialize<'de> for State {
1048        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1049        where
1050            D: serde::Deserializer<'de>,
1051        {
1052            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
1053                ".google.cloud.securitycenter.v2.AttackExposure.State",
1054            ))
1055        }
1056    }
1057}
1058
1059/// A path that an attacker could take to reach an exposed resource.
1060#[derive(Clone, Default, PartialEq)]
1061#[non_exhaustive]
1062pub struct AttackPath {
1063    /// The attack path name, for example,
1064    /// `organizations/12/simulations/34/valuedResources/56/attackPaths/78`
1065    pub name: std::string::String,
1066
1067    /// A list of nodes that exist in this attack path.
1068    pub path_nodes: std::vec::Vec<crate::model::attack_path::AttackPathNode>,
1069
1070    /// A list of the edges between nodes in this attack path.
1071    pub edges: std::vec::Vec<crate::model::attack_path::AttackPathEdge>,
1072
1073    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1074}
1075
1076impl AttackPath {
1077    pub fn new() -> Self {
1078        std::default::Default::default()
1079    }
1080
1081    /// Sets the value of [name][crate::model::AttackPath::name].
1082    ///
1083    /// # Example
1084    /// ```ignore,no_run
1085    /// # use google_cloud_securitycenter_v2::model::AttackPath;
1086    /// let x = AttackPath::new().set_name("example");
1087    /// ```
1088    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1089        self.name = v.into();
1090        self
1091    }
1092
1093    /// Sets the value of [path_nodes][crate::model::AttackPath::path_nodes].
1094    ///
1095    /// # Example
1096    /// ```ignore,no_run
1097    /// # use google_cloud_securitycenter_v2::model::AttackPath;
1098    /// use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1099    /// let x = AttackPath::new()
1100    ///     .set_path_nodes([
1101    ///         AttackPathNode::default()/* use setters */,
1102    ///         AttackPathNode::default()/* use (different) setters */,
1103    ///     ]);
1104    /// ```
1105    pub fn set_path_nodes<T, V>(mut self, v: T) -> Self
1106    where
1107        T: std::iter::IntoIterator<Item = V>,
1108        V: std::convert::Into<crate::model::attack_path::AttackPathNode>,
1109    {
1110        use std::iter::Iterator;
1111        self.path_nodes = v.into_iter().map(|i| i.into()).collect();
1112        self
1113    }
1114
1115    /// Sets the value of [edges][crate::model::AttackPath::edges].
1116    ///
1117    /// # Example
1118    /// ```ignore,no_run
1119    /// # use google_cloud_securitycenter_v2::model::AttackPath;
1120    /// use google_cloud_securitycenter_v2::model::attack_path::AttackPathEdge;
1121    /// let x = AttackPath::new()
1122    ///     .set_edges([
1123    ///         AttackPathEdge::default()/* use setters */,
1124    ///         AttackPathEdge::default()/* use (different) setters */,
1125    ///     ]);
1126    /// ```
1127    pub fn set_edges<T, V>(mut self, v: T) -> Self
1128    where
1129        T: std::iter::IntoIterator<Item = V>,
1130        V: std::convert::Into<crate::model::attack_path::AttackPathEdge>,
1131    {
1132        use std::iter::Iterator;
1133        self.edges = v.into_iter().map(|i| i.into()).collect();
1134        self
1135    }
1136}
1137
1138impl wkt::message::Message for AttackPath {
1139    fn typename() -> &'static str {
1140        "type.googleapis.com/google.cloud.securitycenter.v2.AttackPath"
1141    }
1142}
1143
1144/// Defines additional types related to [AttackPath].
1145pub mod attack_path {
1146    #[allow(unused_imports)]
1147    use super::*;
1148
1149    /// Represents one point that an attacker passes through in this attack path.
1150    #[derive(Clone, Default, PartialEq)]
1151    #[non_exhaustive]
1152    pub struct AttackPathNode {
1153        /// The name of the resource at this point in the attack path.
1154        /// The format of the name follows the Cloud Asset Inventory [resource
1155        /// name
1156        /// format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
1157        pub resource: std::string::String,
1158
1159        /// The [supported resource
1160        /// type](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
1161        pub resource_type: std::string::String,
1162
1163        /// Human-readable name of this resource.
1164        pub display_name: std::string::String,
1165
1166        /// The findings associated with this node in the attack path.
1167        pub associated_findings:
1168            std::vec::Vec<crate::model::attack_path::attack_path_node::PathNodeAssociatedFinding>,
1169
1170        /// Unique id of the attack path node.
1171        pub uuid: std::string::String,
1172
1173        /// A list of attack step nodes that exist in this attack path node.
1174        pub attack_steps:
1175            std::vec::Vec<crate::model::attack_path::attack_path_node::AttackStepNode>,
1176
1177        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1178    }
1179
1180    impl AttackPathNode {
1181        pub fn new() -> Self {
1182            std::default::Default::default()
1183        }
1184
1185        /// Sets the value of [resource][crate::model::attack_path::AttackPathNode::resource].
1186        ///
1187        /// # Example
1188        /// ```ignore,no_run
1189        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1190        /// let x = AttackPathNode::new().set_resource("example");
1191        /// ```
1192        pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1193            self.resource = v.into();
1194            self
1195        }
1196
1197        /// Sets the value of [resource_type][crate::model::attack_path::AttackPathNode::resource_type].
1198        ///
1199        /// # Example
1200        /// ```ignore,no_run
1201        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1202        /// let x = AttackPathNode::new().set_resource_type("example");
1203        /// ```
1204        pub fn set_resource_type<T: std::convert::Into<std::string::String>>(
1205            mut self,
1206            v: T,
1207        ) -> Self {
1208            self.resource_type = v.into();
1209            self
1210        }
1211
1212        /// Sets the value of [display_name][crate::model::attack_path::AttackPathNode::display_name].
1213        ///
1214        /// # Example
1215        /// ```ignore,no_run
1216        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1217        /// let x = AttackPathNode::new().set_display_name("example");
1218        /// ```
1219        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
1220            mut self,
1221            v: T,
1222        ) -> Self {
1223            self.display_name = v.into();
1224            self
1225        }
1226
1227        /// Sets the value of [associated_findings][crate::model::attack_path::AttackPathNode::associated_findings].
1228        ///
1229        /// # Example
1230        /// ```ignore,no_run
1231        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1232        /// use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::PathNodeAssociatedFinding;
1233        /// let x = AttackPathNode::new()
1234        ///     .set_associated_findings([
1235        ///         PathNodeAssociatedFinding::default()/* use setters */,
1236        ///         PathNodeAssociatedFinding::default()/* use (different) setters */,
1237        ///     ]);
1238        /// ```
1239        pub fn set_associated_findings<T, V>(mut self, v: T) -> Self
1240        where
1241            T: std::iter::IntoIterator<Item = V>,
1242            V: std::convert::Into<
1243                    crate::model::attack_path::attack_path_node::PathNodeAssociatedFinding,
1244                >,
1245        {
1246            use std::iter::Iterator;
1247            self.associated_findings = v.into_iter().map(|i| i.into()).collect();
1248            self
1249        }
1250
1251        /// Sets the value of [uuid][crate::model::attack_path::AttackPathNode::uuid].
1252        ///
1253        /// # Example
1254        /// ```ignore,no_run
1255        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1256        /// let x = AttackPathNode::new().set_uuid("example");
1257        /// ```
1258        pub fn set_uuid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1259            self.uuid = v.into();
1260            self
1261        }
1262
1263        /// Sets the value of [attack_steps][crate::model::attack_path::AttackPathNode::attack_steps].
1264        ///
1265        /// # Example
1266        /// ```ignore,no_run
1267        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1268        /// use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::AttackStepNode;
1269        /// let x = AttackPathNode::new()
1270        ///     .set_attack_steps([
1271        ///         AttackStepNode::default()/* use setters */,
1272        ///         AttackStepNode::default()/* use (different) setters */,
1273        ///     ]);
1274        /// ```
1275        pub fn set_attack_steps<T, V>(mut self, v: T) -> Self
1276        where
1277            T: std::iter::IntoIterator<Item = V>,
1278            V: std::convert::Into<crate::model::attack_path::attack_path_node::AttackStepNode>,
1279        {
1280            use std::iter::Iterator;
1281            self.attack_steps = v.into_iter().map(|i| i.into()).collect();
1282            self
1283        }
1284    }
1285
1286    impl wkt::message::Message for AttackPathNode {
1287        fn typename() -> &'static str {
1288            "type.googleapis.com/google.cloud.securitycenter.v2.AttackPath.AttackPathNode"
1289        }
1290    }
1291
1292    /// Defines additional types related to [AttackPathNode].
1293    pub mod attack_path_node {
1294        #[allow(unused_imports)]
1295        use super::*;
1296
1297        /// A finding that is associated with this node in the attack path.
1298        #[derive(Clone, Default, PartialEq)]
1299        #[non_exhaustive]
1300        pub struct PathNodeAssociatedFinding {
1301            /// Canonical name of the associated findings. Example:
1302            /// `organizations/123/sources/456/findings/789`
1303            pub canonical_finding: std::string::String,
1304
1305            /// The additional taxonomy group within findings from a given source.
1306            pub finding_category: std::string::String,
1307
1308            /// Full resource name of the finding.
1309            pub name: std::string::String,
1310
1311            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1312        }
1313
1314        impl PathNodeAssociatedFinding {
1315            pub fn new() -> Self {
1316                std::default::Default::default()
1317            }
1318
1319            /// Sets the value of [canonical_finding][crate::model::attack_path::attack_path_node::PathNodeAssociatedFinding::canonical_finding].
1320            ///
1321            /// # Example
1322            /// ```ignore,no_run
1323            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::PathNodeAssociatedFinding;
1324            /// let x = PathNodeAssociatedFinding::new().set_canonical_finding("example");
1325            /// ```
1326            pub fn set_canonical_finding<T: std::convert::Into<std::string::String>>(
1327                mut self,
1328                v: T,
1329            ) -> Self {
1330                self.canonical_finding = v.into();
1331                self
1332            }
1333
1334            /// Sets the value of [finding_category][crate::model::attack_path::attack_path_node::PathNodeAssociatedFinding::finding_category].
1335            ///
1336            /// # Example
1337            /// ```ignore,no_run
1338            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::PathNodeAssociatedFinding;
1339            /// let x = PathNodeAssociatedFinding::new().set_finding_category("example");
1340            /// ```
1341            pub fn set_finding_category<T: std::convert::Into<std::string::String>>(
1342                mut self,
1343                v: T,
1344            ) -> Self {
1345                self.finding_category = v.into();
1346                self
1347            }
1348
1349            /// Sets the value of [name][crate::model::attack_path::attack_path_node::PathNodeAssociatedFinding::name].
1350            ///
1351            /// # Example
1352            /// ```ignore,no_run
1353            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::PathNodeAssociatedFinding;
1354            /// let x = PathNodeAssociatedFinding::new().set_name("example");
1355            /// ```
1356            pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1357                self.name = v.into();
1358                self
1359            }
1360        }
1361
1362        impl wkt::message::Message for PathNodeAssociatedFinding {
1363            fn typename() -> &'static str {
1364                "type.googleapis.com/google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding"
1365            }
1366        }
1367
1368        /// Detailed steps the attack can take between path nodes.
1369        #[derive(Clone, Default, PartialEq)]
1370        #[non_exhaustive]
1371        pub struct AttackStepNode {
1372            /// Unique ID for one Node
1373            pub uuid: std::string::String,
1374
1375            /// Attack step type. Can be either AND, OR or DEFENSE
1376            pub r#type: crate::model::attack_path::attack_path_node::NodeType,
1377
1378            /// User friendly name of the attack step
1379            pub display_name: std::string::String,
1380
1381            /// Attack step labels for metadata
1382            pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1383
1384            /// Attack step description
1385            pub description: std::string::String,
1386
1387            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1388        }
1389
1390        impl AttackStepNode {
1391            pub fn new() -> Self {
1392                std::default::Default::default()
1393            }
1394
1395            /// Sets the value of [uuid][crate::model::attack_path::attack_path_node::AttackStepNode::uuid].
1396            ///
1397            /// # Example
1398            /// ```ignore,no_run
1399            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::AttackStepNode;
1400            /// let x = AttackStepNode::new().set_uuid("example");
1401            /// ```
1402            pub fn set_uuid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1403                self.uuid = v.into();
1404                self
1405            }
1406
1407            /// Sets the value of [r#type][crate::model::attack_path::attack_path_node::AttackStepNode::type].
1408            ///
1409            /// # Example
1410            /// ```ignore,no_run
1411            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::AttackStepNode;
1412            /// use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::NodeType;
1413            /// let x0 = AttackStepNode::new().set_type(NodeType::And);
1414            /// let x1 = AttackStepNode::new().set_type(NodeType::Or);
1415            /// let x2 = AttackStepNode::new().set_type(NodeType::Defense);
1416            /// ```
1417            pub fn set_type<
1418                T: std::convert::Into<crate::model::attack_path::attack_path_node::NodeType>,
1419            >(
1420                mut self,
1421                v: T,
1422            ) -> Self {
1423                self.r#type = v.into();
1424                self
1425            }
1426
1427            /// Sets the value of [display_name][crate::model::attack_path::attack_path_node::AttackStepNode::display_name].
1428            ///
1429            /// # Example
1430            /// ```ignore,no_run
1431            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::AttackStepNode;
1432            /// let x = AttackStepNode::new().set_display_name("example");
1433            /// ```
1434            pub fn set_display_name<T: std::convert::Into<std::string::String>>(
1435                mut self,
1436                v: T,
1437            ) -> Self {
1438                self.display_name = v.into();
1439                self
1440            }
1441
1442            /// Sets the value of [labels][crate::model::attack_path::attack_path_node::AttackStepNode::labels].
1443            ///
1444            /// # Example
1445            /// ```ignore,no_run
1446            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::AttackStepNode;
1447            /// let x = AttackStepNode::new().set_labels([
1448            ///     ("key0", "abc"),
1449            ///     ("key1", "xyz"),
1450            /// ]);
1451            /// ```
1452            pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1453            where
1454                T: std::iter::IntoIterator<Item = (K, V)>,
1455                K: std::convert::Into<std::string::String>,
1456                V: std::convert::Into<std::string::String>,
1457            {
1458                use std::iter::Iterator;
1459                self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1460                self
1461            }
1462
1463            /// Sets the value of [description][crate::model::attack_path::attack_path_node::AttackStepNode::description].
1464            ///
1465            /// # Example
1466            /// ```ignore,no_run
1467            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::AttackStepNode;
1468            /// let x = AttackStepNode::new().set_description("example");
1469            /// ```
1470            pub fn set_description<T: std::convert::Into<std::string::String>>(
1471                mut self,
1472                v: T,
1473            ) -> Self {
1474                self.description = v.into();
1475                self
1476            }
1477        }
1478
1479        impl wkt::message::Message for AttackStepNode {
1480            fn typename() -> &'static str {
1481                "type.googleapis.com/google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode"
1482            }
1483        }
1484
1485        /// The type of the incoming attack step node.
1486        ///
1487        /// # Working with unknown values
1488        ///
1489        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1490        /// additional enum variants at any time. Adding new variants is not considered
1491        /// a breaking change. Applications should write their code in anticipation of:
1492        ///
1493        /// - New values appearing in future releases of the client library, **and**
1494        /// - New values received dynamically, without application changes.
1495        ///
1496        /// Please consult the [Working with enums] section in the user guide for some
1497        /// guidelines.
1498        ///
1499        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1500        #[derive(Clone, Debug, PartialEq)]
1501        #[non_exhaustive]
1502        pub enum NodeType {
1503            /// Type not specified
1504            Unspecified,
1505            /// Incoming edge joined with AND
1506            And,
1507            /// Incoming edge joined with OR
1508            Or,
1509            /// Incoming edge is defense
1510            Defense,
1511            /// Incoming edge is attacker
1512            Attacker,
1513            /// If set, the enum was initialized with an unknown value.
1514            ///
1515            /// Applications can examine the value using [NodeType::value] or
1516            /// [NodeType::name].
1517            UnknownValue(node_type::UnknownValue),
1518        }
1519
1520        #[doc(hidden)]
1521        pub mod node_type {
1522            #[allow(unused_imports)]
1523            use super::*;
1524            #[derive(Clone, Debug, PartialEq)]
1525            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1526        }
1527
1528        impl NodeType {
1529            /// Gets the enum value.
1530            ///
1531            /// Returns `None` if the enum contains an unknown value deserialized from
1532            /// the string representation of enums.
1533            pub fn value(&self) -> std::option::Option<i32> {
1534                match self {
1535                    Self::Unspecified => std::option::Option::Some(0),
1536                    Self::And => std::option::Option::Some(1),
1537                    Self::Or => std::option::Option::Some(2),
1538                    Self::Defense => std::option::Option::Some(3),
1539                    Self::Attacker => std::option::Option::Some(4),
1540                    Self::UnknownValue(u) => u.0.value(),
1541                }
1542            }
1543
1544            /// Gets the enum value as a string.
1545            ///
1546            /// Returns `None` if the enum contains an unknown value deserialized from
1547            /// the integer representation of enums.
1548            pub fn name(&self) -> std::option::Option<&str> {
1549                match self {
1550                    Self::Unspecified => std::option::Option::Some("NODE_TYPE_UNSPECIFIED"),
1551                    Self::And => std::option::Option::Some("NODE_TYPE_AND"),
1552                    Self::Or => std::option::Option::Some("NODE_TYPE_OR"),
1553                    Self::Defense => std::option::Option::Some("NODE_TYPE_DEFENSE"),
1554                    Self::Attacker => std::option::Option::Some("NODE_TYPE_ATTACKER"),
1555                    Self::UnknownValue(u) => u.0.name(),
1556                }
1557            }
1558        }
1559
1560        impl std::default::Default for NodeType {
1561            fn default() -> Self {
1562                use std::convert::From;
1563                Self::from(0)
1564            }
1565        }
1566
1567        impl std::fmt::Display for NodeType {
1568            fn fmt(
1569                &self,
1570                f: &mut std::fmt::Formatter<'_>,
1571            ) -> std::result::Result<(), std::fmt::Error> {
1572                wkt::internal::display_enum(f, self.name(), self.value())
1573            }
1574        }
1575
1576        impl std::convert::From<i32> for NodeType {
1577            fn from(value: i32) -> Self {
1578                match value {
1579                    0 => Self::Unspecified,
1580                    1 => Self::And,
1581                    2 => Self::Or,
1582                    3 => Self::Defense,
1583                    4 => Self::Attacker,
1584                    _ => Self::UnknownValue(node_type::UnknownValue(
1585                        wkt::internal::UnknownEnumValue::Integer(value),
1586                    )),
1587                }
1588            }
1589        }
1590
1591        impl std::convert::From<&str> for NodeType {
1592            fn from(value: &str) -> Self {
1593                use std::string::ToString;
1594                match value {
1595                    "NODE_TYPE_UNSPECIFIED" => Self::Unspecified,
1596                    "NODE_TYPE_AND" => Self::And,
1597                    "NODE_TYPE_OR" => Self::Or,
1598                    "NODE_TYPE_DEFENSE" => Self::Defense,
1599                    "NODE_TYPE_ATTACKER" => Self::Attacker,
1600                    _ => Self::UnknownValue(node_type::UnknownValue(
1601                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1602                    )),
1603                }
1604            }
1605        }
1606
1607        impl serde::ser::Serialize for NodeType {
1608            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1609            where
1610                S: serde::Serializer,
1611            {
1612                match self {
1613                    Self::Unspecified => serializer.serialize_i32(0),
1614                    Self::And => serializer.serialize_i32(1),
1615                    Self::Or => serializer.serialize_i32(2),
1616                    Self::Defense => serializer.serialize_i32(3),
1617                    Self::Attacker => serializer.serialize_i32(4),
1618                    Self::UnknownValue(u) => u.0.serialize(serializer),
1619                }
1620            }
1621        }
1622
1623        impl<'de> serde::de::Deserialize<'de> for NodeType {
1624            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1625            where
1626                D: serde::Deserializer<'de>,
1627            {
1628                deserializer.deserialize_any(wkt::internal::EnumVisitor::<NodeType>::new(
1629                    ".google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType",
1630                ))
1631            }
1632        }
1633    }
1634
1635    /// Represents a connection between a source node and a destination node in
1636    /// this attack path.
1637    #[derive(Clone, Default, PartialEq)]
1638    #[non_exhaustive]
1639    pub struct AttackPathEdge {
1640        /// The attack node uuid of the source node.
1641        pub source: std::string::String,
1642
1643        /// The attack node uuid of the destination node.
1644        pub destination: std::string::String,
1645
1646        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1647    }
1648
1649    impl AttackPathEdge {
1650        pub fn new() -> Self {
1651            std::default::Default::default()
1652        }
1653
1654        /// Sets the value of [source][crate::model::attack_path::AttackPathEdge::source].
1655        ///
1656        /// # Example
1657        /// ```ignore,no_run
1658        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathEdge;
1659        /// let x = AttackPathEdge::new().set_source("example");
1660        /// ```
1661        pub fn set_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1662            self.source = v.into();
1663            self
1664        }
1665
1666        /// Sets the value of [destination][crate::model::attack_path::AttackPathEdge::destination].
1667        ///
1668        /// # Example
1669        /// ```ignore,no_run
1670        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathEdge;
1671        /// let x = AttackPathEdge::new().set_destination("example");
1672        /// ```
1673        pub fn set_destination<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1674            self.destination = v.into();
1675            self
1676        }
1677    }
1678
1679    impl wkt::message::Message for AttackPathEdge {
1680        fn typename() -> &'static str {
1681            "type.googleapis.com/google.cloud.securitycenter.v2.AttackPath.AttackPathEdge"
1682        }
1683    }
1684}
1685
1686/// Information related to Google Cloud Backup and DR Service findings.
1687#[derive(Clone, Default, PartialEq)]
1688#[non_exhaustive]
1689pub struct BackupDisasterRecovery {
1690    /// The name of a Backup and DR template which comprises one or more backup
1691    /// policies. See the [Backup and DR
1692    /// documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp)
1693    /// for more information. For example, `snap-ov`.
1694    pub backup_template: std::string::String,
1695
1696    /// The names of Backup and DR policies that are associated with a template
1697    /// and that define when to run a backup, how frequently to run a backup, and
1698    /// how long to retain the backup image. For example, `onvaults`.
1699    pub policies: std::vec::Vec<std::string::String>,
1700
1701    /// The name of a Backup and DR host, which is managed by the backup and
1702    /// recovery appliance and known to the management console. The host can be of
1703    /// type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file
1704    /// system, etc.), vCenter, or an ESX server. See the [Backup and DR
1705    /// documentation on
1706    /// hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications)
1707    /// for more information. For example, `centos7-01`.
1708    pub host: std::string::String,
1709
1710    /// The names of Backup and DR applications. An application is a VM, database,
1711    /// or file system on a managed host monitored by a backup and recovery
1712    /// appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
1713    /// `centos7-01-vol02`.
1714    pub applications: std::vec::Vec<std::string::String>,
1715
1716    /// The name of the Backup and DR storage pool that the backup and recovery
1717    /// appliance is storing data in. The storage pool could be of type Cloud,
1718    /// Primary, Snapshot, or OnVault. See the [Backup and DR documentation on
1719    /// storage
1720    /// pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools).
1721    /// For example, `DiskPoolOne`.
1722    pub storage_pool: std::string::String,
1723
1724    /// The names of Backup and DR advanced policy options of a policy applying to
1725    /// an application. See the [Backup and DR documentation on policy
1726    /// options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
1727    /// For example, `skipofflineappsincongrp, nounmap`.
1728    pub policy_options: std::vec::Vec<std::string::String>,
1729
1730    /// The name of the Backup and DR resource profile that specifies the storage
1731    /// media for backups of application and VM data. See the [Backup and DR
1732    /// documentation on
1733    /// profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile).
1734    /// For example, `GCP`.
1735    pub profile: std::string::String,
1736
1737    /// The name of the Backup and DR appliance that captures, moves, and manages
1738    /// the lifecycle of backup data. For example, `backup-server-57137`.
1739    pub appliance: std::string::String,
1740
1741    /// The backup type of the Backup and DR image.
1742    /// For example, `Snapshot`, `Remote Snapshot`, `OnVault`.
1743    pub backup_type: std::string::String,
1744
1745    /// The timestamp at which the Backup and DR backup was created.
1746    pub backup_create_time: std::option::Option<wkt::Timestamp>,
1747
1748    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1749}
1750
1751impl BackupDisasterRecovery {
1752    pub fn new() -> Self {
1753        std::default::Default::default()
1754    }
1755
1756    /// Sets the value of [backup_template][crate::model::BackupDisasterRecovery::backup_template].
1757    ///
1758    /// # Example
1759    /// ```ignore,no_run
1760    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1761    /// let x = BackupDisasterRecovery::new().set_backup_template("example");
1762    /// ```
1763    pub fn set_backup_template<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1764        self.backup_template = v.into();
1765        self
1766    }
1767
1768    /// Sets the value of [policies][crate::model::BackupDisasterRecovery::policies].
1769    ///
1770    /// # Example
1771    /// ```ignore,no_run
1772    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1773    /// let x = BackupDisasterRecovery::new().set_policies(["a", "b", "c"]);
1774    /// ```
1775    pub fn set_policies<T, V>(mut self, v: T) -> Self
1776    where
1777        T: std::iter::IntoIterator<Item = V>,
1778        V: std::convert::Into<std::string::String>,
1779    {
1780        use std::iter::Iterator;
1781        self.policies = v.into_iter().map(|i| i.into()).collect();
1782        self
1783    }
1784
1785    /// Sets the value of [host][crate::model::BackupDisasterRecovery::host].
1786    ///
1787    /// # Example
1788    /// ```ignore,no_run
1789    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1790    /// let x = BackupDisasterRecovery::new().set_host("example");
1791    /// ```
1792    pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1793        self.host = v.into();
1794        self
1795    }
1796
1797    /// Sets the value of [applications][crate::model::BackupDisasterRecovery::applications].
1798    ///
1799    /// # Example
1800    /// ```ignore,no_run
1801    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1802    /// let x = BackupDisasterRecovery::new().set_applications(["a", "b", "c"]);
1803    /// ```
1804    pub fn set_applications<T, V>(mut self, v: T) -> Self
1805    where
1806        T: std::iter::IntoIterator<Item = V>,
1807        V: std::convert::Into<std::string::String>,
1808    {
1809        use std::iter::Iterator;
1810        self.applications = v.into_iter().map(|i| i.into()).collect();
1811        self
1812    }
1813
1814    /// Sets the value of [storage_pool][crate::model::BackupDisasterRecovery::storage_pool].
1815    ///
1816    /// # Example
1817    /// ```ignore,no_run
1818    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1819    /// let x = BackupDisasterRecovery::new().set_storage_pool("example");
1820    /// ```
1821    pub fn set_storage_pool<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1822        self.storage_pool = v.into();
1823        self
1824    }
1825
1826    /// Sets the value of [policy_options][crate::model::BackupDisasterRecovery::policy_options].
1827    ///
1828    /// # Example
1829    /// ```ignore,no_run
1830    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1831    /// let x = BackupDisasterRecovery::new().set_policy_options(["a", "b", "c"]);
1832    /// ```
1833    pub fn set_policy_options<T, V>(mut self, v: T) -> Self
1834    where
1835        T: std::iter::IntoIterator<Item = V>,
1836        V: std::convert::Into<std::string::String>,
1837    {
1838        use std::iter::Iterator;
1839        self.policy_options = v.into_iter().map(|i| i.into()).collect();
1840        self
1841    }
1842
1843    /// Sets the value of [profile][crate::model::BackupDisasterRecovery::profile].
1844    ///
1845    /// # Example
1846    /// ```ignore,no_run
1847    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1848    /// let x = BackupDisasterRecovery::new().set_profile("example");
1849    /// ```
1850    pub fn set_profile<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1851        self.profile = v.into();
1852        self
1853    }
1854
1855    /// Sets the value of [appliance][crate::model::BackupDisasterRecovery::appliance].
1856    ///
1857    /// # Example
1858    /// ```ignore,no_run
1859    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1860    /// let x = BackupDisasterRecovery::new().set_appliance("example");
1861    /// ```
1862    pub fn set_appliance<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1863        self.appliance = v.into();
1864        self
1865    }
1866
1867    /// Sets the value of [backup_type][crate::model::BackupDisasterRecovery::backup_type].
1868    ///
1869    /// # Example
1870    /// ```ignore,no_run
1871    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1872    /// let x = BackupDisasterRecovery::new().set_backup_type("example");
1873    /// ```
1874    pub fn set_backup_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1875        self.backup_type = v.into();
1876        self
1877    }
1878
1879    /// Sets the value of [backup_create_time][crate::model::BackupDisasterRecovery::backup_create_time].
1880    ///
1881    /// # Example
1882    /// ```ignore,no_run
1883    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1884    /// use wkt::Timestamp;
1885    /// let x = BackupDisasterRecovery::new().set_backup_create_time(Timestamp::default()/* use setters */);
1886    /// ```
1887    pub fn set_backup_create_time<T>(mut self, v: T) -> Self
1888    where
1889        T: std::convert::Into<wkt::Timestamp>,
1890    {
1891        self.backup_create_time = std::option::Option::Some(v.into());
1892        self
1893    }
1894
1895    /// Sets or clears the value of [backup_create_time][crate::model::BackupDisasterRecovery::backup_create_time].
1896    ///
1897    /// # Example
1898    /// ```ignore,no_run
1899    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
1900    /// use wkt::Timestamp;
1901    /// let x = BackupDisasterRecovery::new().set_or_clear_backup_create_time(Some(Timestamp::default()/* use setters */));
1902    /// let x = BackupDisasterRecovery::new().set_or_clear_backup_create_time(None::<Timestamp>);
1903    /// ```
1904    pub fn set_or_clear_backup_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1905    where
1906        T: std::convert::Into<wkt::Timestamp>,
1907    {
1908        self.backup_create_time = v.map(|x| x.into());
1909        self
1910    }
1911}
1912
1913impl wkt::message::Message for BackupDisasterRecovery {
1914    fn typename() -> &'static str {
1915        "type.googleapis.com/google.cloud.securitycenter.v2.BackupDisasterRecovery"
1916    }
1917}
1918
1919/// Configures how to deliver Findings to BigQuery Instance.
1920#[derive(Clone, Default, PartialEq)]
1921#[non_exhaustive]
1922pub struct BigQueryExport {
1923    /// Identifier. The relative resource name of this export. See:
1924    /// <https://cloud.google.com/apis/design/resource_names#relative_resource_name>.
1925    /// The following list shows some examples:
1926    ///
1927    ///
1928    /// `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}`
1929    ///
1930    /// + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}`
1931    ///
1932    /// `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}`
1933    ///
1934    /// This field is provided in responses, and is ignored when provided in create
1935    /// requests.
1936    pub name: std::string::String,
1937
1938    /// The description of the export (max of 1024 characters).
1939    pub description: std::string::String,
1940
1941    /// Expression that defines the filter to apply across create/update events
1942    /// of findings. The expression is a list of zero or more restrictions combined
1943    /// via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
1944    /// has higher precedence than `AND`.
1945    ///
1946    /// Restrictions have the form `<field> <operator> <value>` and may have a
1947    /// `-` character in front of them to indicate negation. The fields map to
1948    /// those defined in the corresponding resource.
1949    ///
1950    /// The supported operators are:
1951    ///
1952    /// * `=` for all value types.
1953    /// * `>`, `<`, `>=`, `<=` for integer values.
1954    /// * `:`, meaning substring matching, for strings.
1955    ///
1956    /// The supported value types are:
1957    ///
1958    /// * string literals in quotes.
1959    /// * integer literals without quotes.
1960    /// * boolean literals `true` and `false` without quotes.
1961    pub filter: std::string::String,
1962
1963    /// The dataset to write findings' updates to. Its format is
1964    /// "projects/[project_id]/datasets/[bigquery_dataset_id]".
1965    /// BigQuery dataset unique ID  must contain only letters (a-z, A-Z), numbers
1966    /// (0-9), or underscores (_).
1967    pub dataset: std::string::String,
1968
1969    /// Output only. The time at which the BigQuery export was created.
1970    /// This field is set by the server and will be ignored if provided on export
1971    /// on creation.
1972    pub create_time: std::option::Option<wkt::Timestamp>,
1973
1974    /// Output only. The most recent time at which the BigQuery export was updated.
1975    /// This field is set by the server and will be ignored if provided on export
1976    /// creation or update.
1977    pub update_time: std::option::Option<wkt::Timestamp>,
1978
1979    /// Output only. Email address of the user who last edited the BigQuery export.
1980    /// This field is set by the server and will be ignored if provided on export
1981    /// creation or update.
1982    pub most_recent_editor: std::string::String,
1983
1984    /// Output only. The service account that needs permission to create table and
1985    /// upload data to the BigQuery dataset.
1986    pub principal: std::string::String,
1987
1988    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1989}
1990
1991impl BigQueryExport {
1992    pub fn new() -> Self {
1993        std::default::Default::default()
1994    }
1995
1996    /// Sets the value of [name][crate::model::BigQueryExport::name].
1997    ///
1998    /// # Example
1999    /// ```ignore,no_run
2000    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2001    /// let x = BigQueryExport::new().set_name("example");
2002    /// ```
2003    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2004        self.name = v.into();
2005        self
2006    }
2007
2008    /// Sets the value of [description][crate::model::BigQueryExport::description].
2009    ///
2010    /// # Example
2011    /// ```ignore,no_run
2012    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2013    /// let x = BigQueryExport::new().set_description("example");
2014    /// ```
2015    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2016        self.description = v.into();
2017        self
2018    }
2019
2020    /// Sets the value of [filter][crate::model::BigQueryExport::filter].
2021    ///
2022    /// # Example
2023    /// ```ignore,no_run
2024    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2025    /// let x = BigQueryExport::new().set_filter("example");
2026    /// ```
2027    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2028        self.filter = v.into();
2029        self
2030    }
2031
2032    /// Sets the value of [dataset][crate::model::BigQueryExport::dataset].
2033    ///
2034    /// # Example
2035    /// ```ignore,no_run
2036    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2037    /// let x = BigQueryExport::new().set_dataset("example");
2038    /// ```
2039    pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2040        self.dataset = v.into();
2041        self
2042    }
2043
2044    /// Sets the value of [create_time][crate::model::BigQueryExport::create_time].
2045    ///
2046    /// # Example
2047    /// ```ignore,no_run
2048    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2049    /// use wkt::Timestamp;
2050    /// let x = BigQueryExport::new().set_create_time(Timestamp::default()/* use setters */);
2051    /// ```
2052    pub fn set_create_time<T>(mut self, v: T) -> Self
2053    where
2054        T: std::convert::Into<wkt::Timestamp>,
2055    {
2056        self.create_time = std::option::Option::Some(v.into());
2057        self
2058    }
2059
2060    /// Sets or clears the value of [create_time][crate::model::BigQueryExport::create_time].
2061    ///
2062    /// # Example
2063    /// ```ignore,no_run
2064    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2065    /// use wkt::Timestamp;
2066    /// let x = BigQueryExport::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
2067    /// let x = BigQueryExport::new().set_or_clear_create_time(None::<Timestamp>);
2068    /// ```
2069    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2070    where
2071        T: std::convert::Into<wkt::Timestamp>,
2072    {
2073        self.create_time = v.map(|x| x.into());
2074        self
2075    }
2076
2077    /// Sets the value of [update_time][crate::model::BigQueryExport::update_time].
2078    ///
2079    /// # Example
2080    /// ```ignore,no_run
2081    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2082    /// use wkt::Timestamp;
2083    /// let x = BigQueryExport::new().set_update_time(Timestamp::default()/* use setters */);
2084    /// ```
2085    pub fn set_update_time<T>(mut self, v: T) -> Self
2086    where
2087        T: std::convert::Into<wkt::Timestamp>,
2088    {
2089        self.update_time = std::option::Option::Some(v.into());
2090        self
2091    }
2092
2093    /// Sets or clears the value of [update_time][crate::model::BigQueryExport::update_time].
2094    ///
2095    /// # Example
2096    /// ```ignore,no_run
2097    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2098    /// use wkt::Timestamp;
2099    /// let x = BigQueryExport::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
2100    /// let x = BigQueryExport::new().set_or_clear_update_time(None::<Timestamp>);
2101    /// ```
2102    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
2103    where
2104        T: std::convert::Into<wkt::Timestamp>,
2105    {
2106        self.update_time = v.map(|x| x.into());
2107        self
2108    }
2109
2110    /// Sets the value of [most_recent_editor][crate::model::BigQueryExport::most_recent_editor].
2111    ///
2112    /// # Example
2113    /// ```ignore,no_run
2114    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2115    /// let x = BigQueryExport::new().set_most_recent_editor("example");
2116    /// ```
2117    pub fn set_most_recent_editor<T: std::convert::Into<std::string::String>>(
2118        mut self,
2119        v: T,
2120    ) -> Self {
2121        self.most_recent_editor = v.into();
2122        self
2123    }
2124
2125    /// Sets the value of [principal][crate::model::BigQueryExport::principal].
2126    ///
2127    /// # Example
2128    /// ```ignore,no_run
2129    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2130    /// let x = BigQueryExport::new().set_principal("example");
2131    /// ```
2132    pub fn set_principal<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2133        self.principal = v.into();
2134        self
2135    }
2136}
2137
2138impl wkt::message::Message for BigQueryExport {
2139    fn typename() -> &'static str {
2140        "type.googleapis.com/google.cloud.securitycenter.v2.BigQueryExport"
2141    }
2142}
2143
2144/// Contains details about a chokepoint, which is a resource or resource group
2145/// where high-risk attack paths converge, based on [attack path simulations]
2146/// (<https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations>).
2147#[derive(Clone, Default, PartialEq)]
2148#[non_exhaustive]
2149pub struct Chokepoint {
2150    /// List of resource names of findings associated with this chokepoint.
2151    /// For example, organizations/123/sources/456/findings/789.
2152    /// This list will have at most 100 findings.
2153    pub related_findings: std::vec::Vec<std::string::String>,
2154
2155    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2156}
2157
2158impl Chokepoint {
2159    pub fn new() -> Self {
2160        std::default::Default::default()
2161    }
2162
2163    /// Sets the value of [related_findings][crate::model::Chokepoint::related_findings].
2164    ///
2165    /// # Example
2166    /// ```ignore,no_run
2167    /// # use google_cloud_securitycenter_v2::model::Chokepoint;
2168    /// let x = Chokepoint::new().set_related_findings(["a", "b", "c"]);
2169    /// ```
2170    pub fn set_related_findings<T, V>(mut self, v: T) -> Self
2171    where
2172        T: std::iter::IntoIterator<Item = V>,
2173        V: std::convert::Into<std::string::String>,
2174    {
2175        use std::iter::Iterator;
2176        self.related_findings = v.into_iter().map(|i| i.into()).collect();
2177        self
2178    }
2179}
2180
2181impl wkt::message::Message for Chokepoint {
2182    fn typename() -> &'static str {
2183        "type.googleapis.com/google.cloud.securitycenter.v2.Chokepoint"
2184    }
2185}
2186
2187/// Fields related to Google Cloud Armor findings.
2188#[derive(Clone, Default, PartialEq)]
2189#[non_exhaustive]
2190pub struct CloudArmor {
2191    /// Information about the [Google Cloud Armor security
2192    /// policy](https://cloud.google.com/armor/docs/security-policy-overview)
2193    /// relevant to the finding.
2194    pub security_policy: std::option::Option<crate::model::SecurityPolicy>,
2195
2196    /// Information about incoming requests evaluated by [Google Cloud Armor
2197    /// security
2198    /// policies](https://cloud.google.com/armor/docs/security-policy-overview).
2199    pub requests: std::option::Option<crate::model::Requests>,
2200
2201    /// Information about potential Layer 7 DDoS attacks identified by [Google
2202    /// Cloud Armor Adaptive
2203    /// Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview).
2204    pub adaptive_protection: std::option::Option<crate::model::AdaptiveProtection>,
2205
2206    /// Information about DDoS attack volume and classification.
2207    pub attack: std::option::Option<crate::model::Attack>,
2208
2209    /// Distinguish between volumetric & protocol DDoS attack and
2210    /// application layer attacks. For example, "L3_4" for Layer 3 and Layer 4 DDoS
2211    /// attacks, or "L_7" for Layer 7 DDoS attacks.
2212    pub threat_vector: std::string::String,
2213
2214    /// Duration of attack from the start until the current moment (updated every 5
2215    /// minutes).
2216    pub duration: std::option::Option<wkt::Duration>,
2217
2218    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2219}
2220
2221impl CloudArmor {
2222    pub fn new() -> Self {
2223        std::default::Default::default()
2224    }
2225
2226    /// Sets the value of [security_policy][crate::model::CloudArmor::security_policy].
2227    ///
2228    /// # Example
2229    /// ```ignore,no_run
2230    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2231    /// use google_cloud_securitycenter_v2::model::SecurityPolicy;
2232    /// let x = CloudArmor::new().set_security_policy(SecurityPolicy::default()/* use setters */);
2233    /// ```
2234    pub fn set_security_policy<T>(mut self, v: T) -> Self
2235    where
2236        T: std::convert::Into<crate::model::SecurityPolicy>,
2237    {
2238        self.security_policy = std::option::Option::Some(v.into());
2239        self
2240    }
2241
2242    /// Sets or clears the value of [security_policy][crate::model::CloudArmor::security_policy].
2243    ///
2244    /// # Example
2245    /// ```ignore,no_run
2246    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2247    /// use google_cloud_securitycenter_v2::model::SecurityPolicy;
2248    /// let x = CloudArmor::new().set_or_clear_security_policy(Some(SecurityPolicy::default()/* use setters */));
2249    /// let x = CloudArmor::new().set_or_clear_security_policy(None::<SecurityPolicy>);
2250    /// ```
2251    pub fn set_or_clear_security_policy<T>(mut self, v: std::option::Option<T>) -> Self
2252    where
2253        T: std::convert::Into<crate::model::SecurityPolicy>,
2254    {
2255        self.security_policy = v.map(|x| x.into());
2256        self
2257    }
2258
2259    /// Sets the value of [requests][crate::model::CloudArmor::requests].
2260    ///
2261    /// # Example
2262    /// ```ignore,no_run
2263    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2264    /// use google_cloud_securitycenter_v2::model::Requests;
2265    /// let x = CloudArmor::new().set_requests(Requests::default()/* use setters */);
2266    /// ```
2267    pub fn set_requests<T>(mut self, v: T) -> Self
2268    where
2269        T: std::convert::Into<crate::model::Requests>,
2270    {
2271        self.requests = std::option::Option::Some(v.into());
2272        self
2273    }
2274
2275    /// Sets or clears the value of [requests][crate::model::CloudArmor::requests].
2276    ///
2277    /// # Example
2278    /// ```ignore,no_run
2279    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2280    /// use google_cloud_securitycenter_v2::model::Requests;
2281    /// let x = CloudArmor::new().set_or_clear_requests(Some(Requests::default()/* use setters */));
2282    /// let x = CloudArmor::new().set_or_clear_requests(None::<Requests>);
2283    /// ```
2284    pub fn set_or_clear_requests<T>(mut self, v: std::option::Option<T>) -> Self
2285    where
2286        T: std::convert::Into<crate::model::Requests>,
2287    {
2288        self.requests = v.map(|x| x.into());
2289        self
2290    }
2291
2292    /// Sets the value of [adaptive_protection][crate::model::CloudArmor::adaptive_protection].
2293    ///
2294    /// # Example
2295    /// ```ignore,no_run
2296    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2297    /// use google_cloud_securitycenter_v2::model::AdaptiveProtection;
2298    /// let x = CloudArmor::new().set_adaptive_protection(AdaptiveProtection::default()/* use setters */);
2299    /// ```
2300    pub fn set_adaptive_protection<T>(mut self, v: T) -> Self
2301    where
2302        T: std::convert::Into<crate::model::AdaptiveProtection>,
2303    {
2304        self.adaptive_protection = std::option::Option::Some(v.into());
2305        self
2306    }
2307
2308    /// Sets or clears the value of [adaptive_protection][crate::model::CloudArmor::adaptive_protection].
2309    ///
2310    /// # Example
2311    /// ```ignore,no_run
2312    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2313    /// use google_cloud_securitycenter_v2::model::AdaptiveProtection;
2314    /// let x = CloudArmor::new().set_or_clear_adaptive_protection(Some(AdaptiveProtection::default()/* use setters */));
2315    /// let x = CloudArmor::new().set_or_clear_adaptive_protection(None::<AdaptiveProtection>);
2316    /// ```
2317    pub fn set_or_clear_adaptive_protection<T>(mut self, v: std::option::Option<T>) -> Self
2318    where
2319        T: std::convert::Into<crate::model::AdaptiveProtection>,
2320    {
2321        self.adaptive_protection = v.map(|x| x.into());
2322        self
2323    }
2324
2325    /// Sets the value of [attack][crate::model::CloudArmor::attack].
2326    ///
2327    /// # Example
2328    /// ```ignore,no_run
2329    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2330    /// use google_cloud_securitycenter_v2::model::Attack;
2331    /// let x = CloudArmor::new().set_attack(Attack::default()/* use setters */);
2332    /// ```
2333    pub fn set_attack<T>(mut self, v: T) -> Self
2334    where
2335        T: std::convert::Into<crate::model::Attack>,
2336    {
2337        self.attack = std::option::Option::Some(v.into());
2338        self
2339    }
2340
2341    /// Sets or clears the value of [attack][crate::model::CloudArmor::attack].
2342    ///
2343    /// # Example
2344    /// ```ignore,no_run
2345    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2346    /// use google_cloud_securitycenter_v2::model::Attack;
2347    /// let x = CloudArmor::new().set_or_clear_attack(Some(Attack::default()/* use setters */));
2348    /// let x = CloudArmor::new().set_or_clear_attack(None::<Attack>);
2349    /// ```
2350    pub fn set_or_clear_attack<T>(mut self, v: std::option::Option<T>) -> Self
2351    where
2352        T: std::convert::Into<crate::model::Attack>,
2353    {
2354        self.attack = v.map(|x| x.into());
2355        self
2356    }
2357
2358    /// Sets the value of [threat_vector][crate::model::CloudArmor::threat_vector].
2359    ///
2360    /// # Example
2361    /// ```ignore,no_run
2362    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2363    /// let x = CloudArmor::new().set_threat_vector("example");
2364    /// ```
2365    pub fn set_threat_vector<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2366        self.threat_vector = v.into();
2367        self
2368    }
2369
2370    /// Sets the value of [duration][crate::model::CloudArmor::duration].
2371    ///
2372    /// # Example
2373    /// ```ignore,no_run
2374    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2375    /// use wkt::Duration;
2376    /// let x = CloudArmor::new().set_duration(Duration::default()/* use setters */);
2377    /// ```
2378    pub fn set_duration<T>(mut self, v: T) -> Self
2379    where
2380        T: std::convert::Into<wkt::Duration>,
2381    {
2382        self.duration = std::option::Option::Some(v.into());
2383        self
2384    }
2385
2386    /// Sets or clears the value of [duration][crate::model::CloudArmor::duration].
2387    ///
2388    /// # Example
2389    /// ```ignore,no_run
2390    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2391    /// use wkt::Duration;
2392    /// let x = CloudArmor::new().set_or_clear_duration(Some(Duration::default()/* use setters */));
2393    /// let x = CloudArmor::new().set_or_clear_duration(None::<Duration>);
2394    /// ```
2395    pub fn set_or_clear_duration<T>(mut self, v: std::option::Option<T>) -> Self
2396    where
2397        T: std::convert::Into<wkt::Duration>,
2398    {
2399        self.duration = v.map(|x| x.into());
2400        self
2401    }
2402}
2403
2404impl wkt::message::Message for CloudArmor {
2405    fn typename() -> &'static str {
2406        "type.googleapis.com/google.cloud.securitycenter.v2.CloudArmor"
2407    }
2408}
2409
2410/// Information about the [Google Cloud Armor security
2411/// policy](https://cloud.google.com/armor/docs/security-policy-overview)
2412/// relevant to the finding.
2413#[derive(Clone, Default, PartialEq)]
2414#[non_exhaustive]
2415pub struct SecurityPolicy {
2416    /// The name of the Google Cloud Armor security policy, for example,
2417    /// "my-security-policy".
2418    pub name: std::string::String,
2419
2420    /// The type of Google Cloud Armor security policy for example, 'backend
2421    /// security policy', 'edge security policy', 'network edge security policy',
2422    /// or 'always-on DDoS protection'.
2423    pub r#type: std::string::String,
2424
2425    /// Whether or not the associated rule or policy is in preview mode.
2426    pub preview: bool,
2427
2428    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2429}
2430
2431impl SecurityPolicy {
2432    pub fn new() -> Self {
2433        std::default::Default::default()
2434    }
2435
2436    /// Sets the value of [name][crate::model::SecurityPolicy::name].
2437    ///
2438    /// # Example
2439    /// ```ignore,no_run
2440    /// # use google_cloud_securitycenter_v2::model::SecurityPolicy;
2441    /// let x = SecurityPolicy::new().set_name("example");
2442    /// ```
2443    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2444        self.name = v.into();
2445        self
2446    }
2447
2448    /// Sets the value of [r#type][crate::model::SecurityPolicy::type].
2449    ///
2450    /// # Example
2451    /// ```ignore,no_run
2452    /// # use google_cloud_securitycenter_v2::model::SecurityPolicy;
2453    /// let x = SecurityPolicy::new().set_type("example");
2454    /// ```
2455    pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2456        self.r#type = v.into();
2457        self
2458    }
2459
2460    /// Sets the value of [preview][crate::model::SecurityPolicy::preview].
2461    ///
2462    /// # Example
2463    /// ```ignore,no_run
2464    /// # use google_cloud_securitycenter_v2::model::SecurityPolicy;
2465    /// let x = SecurityPolicy::new().set_preview(true);
2466    /// ```
2467    pub fn set_preview<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2468        self.preview = v.into();
2469        self
2470    }
2471}
2472
2473impl wkt::message::Message for SecurityPolicy {
2474    fn typename() -> &'static str {
2475        "type.googleapis.com/google.cloud.securitycenter.v2.SecurityPolicy"
2476    }
2477}
2478
2479/// Information about the requests relevant to the finding.
2480#[derive(Clone, Default, PartialEq)]
2481#[non_exhaustive]
2482pub struct Requests {
2483    /// For 'Increasing deny ratio', the ratio is the denied traffic divided by the
2484    /// allowed traffic. For 'Allowed traffic spike', the ratio is the allowed
2485    /// traffic in the short term divided by allowed traffic in the long term.
2486    pub ratio: f64,
2487
2488    /// Allowed RPS (requests per second) in the short term.
2489    pub short_term_allowed: i32,
2490
2491    /// Allowed RPS (requests per second) over the long term.
2492    pub long_term_allowed: i32,
2493
2494    /// Denied RPS (requests per second) over the long term.
2495    pub long_term_denied: i32,
2496
2497    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2498}
2499
2500impl Requests {
2501    pub fn new() -> Self {
2502        std::default::Default::default()
2503    }
2504
2505    /// Sets the value of [ratio][crate::model::Requests::ratio].
2506    ///
2507    /// # Example
2508    /// ```ignore,no_run
2509    /// # use google_cloud_securitycenter_v2::model::Requests;
2510    /// let x = Requests::new().set_ratio(42.0);
2511    /// ```
2512    pub fn set_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
2513        self.ratio = v.into();
2514        self
2515    }
2516
2517    /// Sets the value of [short_term_allowed][crate::model::Requests::short_term_allowed].
2518    ///
2519    /// # Example
2520    /// ```ignore,no_run
2521    /// # use google_cloud_securitycenter_v2::model::Requests;
2522    /// let x = Requests::new().set_short_term_allowed(42);
2523    /// ```
2524    pub fn set_short_term_allowed<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2525        self.short_term_allowed = v.into();
2526        self
2527    }
2528
2529    /// Sets the value of [long_term_allowed][crate::model::Requests::long_term_allowed].
2530    ///
2531    /// # Example
2532    /// ```ignore,no_run
2533    /// # use google_cloud_securitycenter_v2::model::Requests;
2534    /// let x = Requests::new().set_long_term_allowed(42);
2535    /// ```
2536    pub fn set_long_term_allowed<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2537        self.long_term_allowed = v.into();
2538        self
2539    }
2540
2541    /// Sets the value of [long_term_denied][crate::model::Requests::long_term_denied].
2542    ///
2543    /// # Example
2544    /// ```ignore,no_run
2545    /// # use google_cloud_securitycenter_v2::model::Requests;
2546    /// let x = Requests::new().set_long_term_denied(42);
2547    /// ```
2548    pub fn set_long_term_denied<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2549        self.long_term_denied = v.into();
2550        self
2551    }
2552}
2553
2554impl wkt::message::Message for Requests {
2555    fn typename() -> &'static str {
2556        "type.googleapis.com/google.cloud.securitycenter.v2.Requests"
2557    }
2558}
2559
2560/// Information about [Google Cloud Armor Adaptive
2561/// Protection](https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection).
2562#[derive(Clone, Default, PartialEq)]
2563#[non_exhaustive]
2564pub struct AdaptiveProtection {
2565    /// A score of 0 means that there is low confidence that the detected event is
2566    /// an actual attack. A score of 1 means that there is high confidence that the
2567    /// detected event is an attack. See the [Adaptive Protection
2568    /// documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning)
2569    /// for further explanation.
2570    pub confidence: f64,
2571
2572    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2573}
2574
2575impl AdaptiveProtection {
2576    pub fn new() -> Self {
2577        std::default::Default::default()
2578    }
2579
2580    /// Sets the value of [confidence][crate::model::AdaptiveProtection::confidence].
2581    ///
2582    /// # Example
2583    /// ```ignore,no_run
2584    /// # use google_cloud_securitycenter_v2::model::AdaptiveProtection;
2585    /// let x = AdaptiveProtection::new().set_confidence(42.0);
2586    /// ```
2587    pub fn set_confidence<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
2588        self.confidence = v.into();
2589        self
2590    }
2591}
2592
2593impl wkt::message::Message for AdaptiveProtection {
2594    fn typename() -> &'static str {
2595        "type.googleapis.com/google.cloud.securitycenter.v2.AdaptiveProtection"
2596    }
2597}
2598
2599/// Information about DDoS attack volume and classification.
2600#[derive(Clone, Default, PartialEq)]
2601#[non_exhaustive]
2602pub struct Attack {
2603    /// Total PPS (packets per second) volume of attack.
2604    pub volume_pps_long: i64,
2605
2606    /// Total BPS (bytes per second) volume of attack.
2607    pub volume_bps_long: i64,
2608
2609    /// Type of attack, for example, 'SYN-flood', 'NTP-udp', or 'CHARGEN-udp'.
2610    pub classification: std::string::String,
2611
2612    /// Total PPS (packets per second) volume of attack. Deprecated - refer to
2613    /// volume_pps_long instead.
2614    #[deprecated]
2615    pub volume_pps: i32,
2616
2617    /// Total BPS (bytes per second) volume of attack. Deprecated - refer to
2618    /// volume_bps_long instead.
2619    #[deprecated]
2620    pub volume_bps: i32,
2621
2622    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2623}
2624
2625impl Attack {
2626    pub fn new() -> Self {
2627        std::default::Default::default()
2628    }
2629
2630    /// Sets the value of [volume_pps_long][crate::model::Attack::volume_pps_long].
2631    ///
2632    /// # Example
2633    /// ```ignore,no_run
2634    /// # use google_cloud_securitycenter_v2::model::Attack;
2635    /// let x = Attack::new().set_volume_pps_long(42);
2636    /// ```
2637    pub fn set_volume_pps_long<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2638        self.volume_pps_long = v.into();
2639        self
2640    }
2641
2642    /// Sets the value of [volume_bps_long][crate::model::Attack::volume_bps_long].
2643    ///
2644    /// # Example
2645    /// ```ignore,no_run
2646    /// # use google_cloud_securitycenter_v2::model::Attack;
2647    /// let x = Attack::new().set_volume_bps_long(42);
2648    /// ```
2649    pub fn set_volume_bps_long<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2650        self.volume_bps_long = v.into();
2651        self
2652    }
2653
2654    /// Sets the value of [classification][crate::model::Attack::classification].
2655    ///
2656    /// # Example
2657    /// ```ignore,no_run
2658    /// # use google_cloud_securitycenter_v2::model::Attack;
2659    /// let x = Attack::new().set_classification("example");
2660    /// ```
2661    pub fn set_classification<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2662        self.classification = v.into();
2663        self
2664    }
2665
2666    /// Sets the value of [volume_pps][crate::model::Attack::volume_pps].
2667    ///
2668    /// # Example
2669    /// ```ignore,no_run
2670    /// # use google_cloud_securitycenter_v2::model::Attack;
2671    /// let x = Attack::new().set_volume_pps(42);
2672    /// ```
2673    #[deprecated]
2674    pub fn set_volume_pps<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2675        self.volume_pps = v.into();
2676        self
2677    }
2678
2679    /// Sets the value of [volume_bps][crate::model::Attack::volume_bps].
2680    ///
2681    /// # Example
2682    /// ```ignore,no_run
2683    /// # use google_cloud_securitycenter_v2::model::Attack;
2684    /// let x = Attack::new().set_volume_bps(42);
2685    /// ```
2686    #[deprecated]
2687    pub fn set_volume_bps<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2688        self.volume_bps = v.into();
2689        self
2690    }
2691}
2692
2693impl wkt::message::Message for Attack {
2694    fn typename() -> &'static str {
2695        "type.googleapis.com/google.cloud.securitycenter.v2.Attack"
2696    }
2697}
2698
2699/// The [data profile](https://cloud.google.com/dlp/docs/data-profiles)
2700/// associated with the finding.
2701#[derive(Clone, Default, PartialEq)]
2702#[non_exhaustive]
2703pub struct CloudDlpDataProfile {
2704    /// Name of the data profile, for example,
2705    /// `projects/123/locations/europe/tableProfiles/8383929`.
2706    pub data_profile: std::string::String,
2707
2708    /// The resource hierarchy level at which the data profile was generated.
2709    pub parent_type: crate::model::cloud_dlp_data_profile::ParentType,
2710
2711    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2712}
2713
2714impl CloudDlpDataProfile {
2715    pub fn new() -> Self {
2716        std::default::Default::default()
2717    }
2718
2719    /// Sets the value of [data_profile][crate::model::CloudDlpDataProfile::data_profile].
2720    ///
2721    /// # Example
2722    /// ```ignore,no_run
2723    /// # use google_cloud_securitycenter_v2::model::CloudDlpDataProfile;
2724    /// let x = CloudDlpDataProfile::new().set_data_profile("example");
2725    /// ```
2726    pub fn set_data_profile<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2727        self.data_profile = v.into();
2728        self
2729    }
2730
2731    /// Sets the value of [parent_type][crate::model::CloudDlpDataProfile::parent_type].
2732    ///
2733    /// # Example
2734    /// ```ignore,no_run
2735    /// # use google_cloud_securitycenter_v2::model::CloudDlpDataProfile;
2736    /// use google_cloud_securitycenter_v2::model::cloud_dlp_data_profile::ParentType;
2737    /// let x0 = CloudDlpDataProfile::new().set_parent_type(ParentType::Organization);
2738    /// let x1 = CloudDlpDataProfile::new().set_parent_type(ParentType::Project);
2739    /// ```
2740    pub fn set_parent_type<
2741        T: std::convert::Into<crate::model::cloud_dlp_data_profile::ParentType>,
2742    >(
2743        mut self,
2744        v: T,
2745    ) -> Self {
2746        self.parent_type = v.into();
2747        self
2748    }
2749}
2750
2751impl wkt::message::Message for CloudDlpDataProfile {
2752    fn typename() -> &'static str {
2753        "type.googleapis.com/google.cloud.securitycenter.v2.CloudDlpDataProfile"
2754    }
2755}
2756
2757/// Defines additional types related to [CloudDlpDataProfile].
2758pub mod cloud_dlp_data_profile {
2759    #[allow(unused_imports)]
2760    use super::*;
2761
2762    /// Parents for configurations that produce data profile findings.
2763    ///
2764    /// # Working with unknown values
2765    ///
2766    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2767    /// additional enum variants at any time. Adding new variants is not considered
2768    /// a breaking change. Applications should write their code in anticipation of:
2769    ///
2770    /// - New values appearing in future releases of the client library, **and**
2771    /// - New values received dynamically, without application changes.
2772    ///
2773    /// Please consult the [Working with enums] section in the user guide for some
2774    /// guidelines.
2775    ///
2776    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
2777    #[derive(Clone, Debug, PartialEq)]
2778    #[non_exhaustive]
2779    pub enum ParentType {
2780        /// Unspecified parent type.
2781        Unspecified,
2782        /// Organization-level configurations.
2783        Organization,
2784        /// Project-level configurations.
2785        Project,
2786        /// If set, the enum was initialized with an unknown value.
2787        ///
2788        /// Applications can examine the value using [ParentType::value] or
2789        /// [ParentType::name].
2790        UnknownValue(parent_type::UnknownValue),
2791    }
2792
2793    #[doc(hidden)]
2794    pub mod parent_type {
2795        #[allow(unused_imports)]
2796        use super::*;
2797        #[derive(Clone, Debug, PartialEq)]
2798        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2799    }
2800
2801    impl ParentType {
2802        /// Gets the enum value.
2803        ///
2804        /// Returns `None` if the enum contains an unknown value deserialized from
2805        /// the string representation of enums.
2806        pub fn value(&self) -> std::option::Option<i32> {
2807            match self {
2808                Self::Unspecified => std::option::Option::Some(0),
2809                Self::Organization => std::option::Option::Some(1),
2810                Self::Project => std::option::Option::Some(2),
2811                Self::UnknownValue(u) => u.0.value(),
2812            }
2813        }
2814
2815        /// Gets the enum value as a string.
2816        ///
2817        /// Returns `None` if the enum contains an unknown value deserialized from
2818        /// the integer representation of enums.
2819        pub fn name(&self) -> std::option::Option<&str> {
2820            match self {
2821                Self::Unspecified => std::option::Option::Some("PARENT_TYPE_UNSPECIFIED"),
2822                Self::Organization => std::option::Option::Some("ORGANIZATION"),
2823                Self::Project => std::option::Option::Some("PROJECT"),
2824                Self::UnknownValue(u) => u.0.name(),
2825            }
2826        }
2827    }
2828
2829    impl std::default::Default for ParentType {
2830        fn default() -> Self {
2831            use std::convert::From;
2832            Self::from(0)
2833        }
2834    }
2835
2836    impl std::fmt::Display for ParentType {
2837        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2838            wkt::internal::display_enum(f, self.name(), self.value())
2839        }
2840    }
2841
2842    impl std::convert::From<i32> for ParentType {
2843        fn from(value: i32) -> Self {
2844            match value {
2845                0 => Self::Unspecified,
2846                1 => Self::Organization,
2847                2 => Self::Project,
2848                _ => Self::UnknownValue(parent_type::UnknownValue(
2849                    wkt::internal::UnknownEnumValue::Integer(value),
2850                )),
2851            }
2852        }
2853    }
2854
2855    impl std::convert::From<&str> for ParentType {
2856        fn from(value: &str) -> Self {
2857            use std::string::ToString;
2858            match value {
2859                "PARENT_TYPE_UNSPECIFIED" => Self::Unspecified,
2860                "ORGANIZATION" => Self::Organization,
2861                "PROJECT" => Self::Project,
2862                _ => Self::UnknownValue(parent_type::UnknownValue(
2863                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2864                )),
2865            }
2866        }
2867    }
2868
2869    impl serde::ser::Serialize for ParentType {
2870        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2871        where
2872            S: serde::Serializer,
2873        {
2874            match self {
2875                Self::Unspecified => serializer.serialize_i32(0),
2876                Self::Organization => serializer.serialize_i32(1),
2877                Self::Project => serializer.serialize_i32(2),
2878                Self::UnknownValue(u) => u.0.serialize(serializer),
2879            }
2880        }
2881    }
2882
2883    impl<'de> serde::de::Deserialize<'de> for ParentType {
2884        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2885        where
2886            D: serde::Deserializer<'de>,
2887        {
2888            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ParentType>::new(
2889                ".google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType",
2890            ))
2891        }
2892    }
2893}
2894
2895/// Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection
2896/// job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced
2897/// the finding.
2898#[derive(Clone, Default, PartialEq)]
2899#[non_exhaustive]
2900pub struct CloudDlpInspection {
2901    /// Name of the inspection job, for example,
2902    /// `projects/123/locations/europe/dlpJobs/i-8383929`.
2903    pub inspect_job: std::string::String,
2904
2905    /// The type of information (or
2906    /// *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found,
2907    /// for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`.
2908    pub info_type: std::string::String,
2909
2910    /// The number of times Cloud DLP found this infoType within this job
2911    /// and resource.
2912    pub info_type_count: i64,
2913
2914    /// Whether Cloud DLP scanned the complete resource or a sampled subset.
2915    pub full_scan: bool,
2916
2917    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2918}
2919
2920impl CloudDlpInspection {
2921    pub fn new() -> Self {
2922        std::default::Default::default()
2923    }
2924
2925    /// Sets the value of [inspect_job][crate::model::CloudDlpInspection::inspect_job].
2926    ///
2927    /// # Example
2928    /// ```ignore,no_run
2929    /// # use google_cloud_securitycenter_v2::model::CloudDlpInspection;
2930    /// let x = CloudDlpInspection::new().set_inspect_job("example");
2931    /// ```
2932    pub fn set_inspect_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2933        self.inspect_job = v.into();
2934        self
2935    }
2936
2937    /// Sets the value of [info_type][crate::model::CloudDlpInspection::info_type].
2938    ///
2939    /// # Example
2940    /// ```ignore,no_run
2941    /// # use google_cloud_securitycenter_v2::model::CloudDlpInspection;
2942    /// let x = CloudDlpInspection::new().set_info_type("example");
2943    /// ```
2944    pub fn set_info_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2945        self.info_type = v.into();
2946        self
2947    }
2948
2949    /// Sets the value of [info_type_count][crate::model::CloudDlpInspection::info_type_count].
2950    ///
2951    /// # Example
2952    /// ```ignore,no_run
2953    /// # use google_cloud_securitycenter_v2::model::CloudDlpInspection;
2954    /// let x = CloudDlpInspection::new().set_info_type_count(42);
2955    /// ```
2956    pub fn set_info_type_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2957        self.info_type_count = v.into();
2958        self
2959    }
2960
2961    /// Sets the value of [full_scan][crate::model::CloudDlpInspection::full_scan].
2962    ///
2963    /// # Example
2964    /// ```ignore,no_run
2965    /// # use google_cloud_securitycenter_v2::model::CloudDlpInspection;
2966    /// let x = CloudDlpInspection::new().set_full_scan(true);
2967    /// ```
2968    pub fn set_full_scan<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2969        self.full_scan = v.into();
2970        self
2971    }
2972}
2973
2974impl wkt::message::Message for CloudDlpInspection {
2975    fn typename() -> &'static str {
2976        "type.googleapis.com/google.cloud.securitycenter.v2.CloudDlpInspection"
2977    }
2978}
2979
2980/// Contains compliance information about a security standard indicating unmet
2981/// recommendations.
2982#[derive(Clone, Default, PartialEq)]
2983#[non_exhaustive]
2984pub struct Compliance {
2985    /// Industry-wide compliance standards or benchmarks, such as CIS, PCI, and
2986    /// OWASP.
2987    pub standard: std::string::String,
2988
2989    /// Version of the standard or benchmark, for example, 1.1
2990    pub version: std::string::String,
2991
2992    /// Policies within the standard or benchmark, for example, A.12.4.1
2993    pub ids: std::vec::Vec<std::string::String>,
2994
2995    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2996}
2997
2998impl Compliance {
2999    pub fn new() -> Self {
3000        std::default::Default::default()
3001    }
3002
3003    /// Sets the value of [standard][crate::model::Compliance::standard].
3004    ///
3005    /// # Example
3006    /// ```ignore,no_run
3007    /// # use google_cloud_securitycenter_v2::model::Compliance;
3008    /// let x = Compliance::new().set_standard("example");
3009    /// ```
3010    pub fn set_standard<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3011        self.standard = v.into();
3012        self
3013    }
3014
3015    /// Sets the value of [version][crate::model::Compliance::version].
3016    ///
3017    /// # Example
3018    /// ```ignore,no_run
3019    /// # use google_cloud_securitycenter_v2::model::Compliance;
3020    /// let x = Compliance::new().set_version("example");
3021    /// ```
3022    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3023        self.version = v.into();
3024        self
3025    }
3026
3027    /// Sets the value of [ids][crate::model::Compliance::ids].
3028    ///
3029    /// # Example
3030    /// ```ignore,no_run
3031    /// # use google_cloud_securitycenter_v2::model::Compliance;
3032    /// let x = Compliance::new().set_ids(["a", "b", "c"]);
3033    /// ```
3034    pub fn set_ids<T, V>(mut self, v: T) -> Self
3035    where
3036        T: std::iter::IntoIterator<Item = V>,
3037        V: std::convert::Into<std::string::String>,
3038    {
3039        use std::iter::Iterator;
3040        self.ids = v.into_iter().map(|i| i.into()).collect();
3041        self
3042    }
3043}
3044
3045impl wkt::message::Message for Compliance {
3046    fn typename() -> &'static str {
3047        "type.googleapis.com/google.cloud.securitycenter.v2.Compliance"
3048    }
3049}
3050
3051/// Contains information about the IP connection associated with the finding.
3052#[derive(Clone, Default, PartialEq)]
3053#[non_exhaustive]
3054pub struct Connection {
3055    /// Destination IP address. Not present for sockets that are listening and not
3056    /// connected.
3057    pub destination_ip: std::string::String,
3058
3059    /// Destination port. Not present for sockets that are listening and not
3060    /// connected.
3061    pub destination_port: i32,
3062
3063    /// Source IP address.
3064    pub source_ip: std::string::String,
3065
3066    /// Source port.
3067    pub source_port: i32,
3068
3069    /// IANA Internet Protocol Number such as TCP(6) and UDP(17).
3070    pub protocol: crate::model::connection::Protocol,
3071
3072    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3073}
3074
3075impl Connection {
3076    pub fn new() -> Self {
3077        std::default::Default::default()
3078    }
3079
3080    /// Sets the value of [destination_ip][crate::model::Connection::destination_ip].
3081    ///
3082    /// # Example
3083    /// ```ignore,no_run
3084    /// # use google_cloud_securitycenter_v2::model::Connection;
3085    /// let x = Connection::new().set_destination_ip("example");
3086    /// ```
3087    pub fn set_destination_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3088        self.destination_ip = v.into();
3089        self
3090    }
3091
3092    /// Sets the value of [destination_port][crate::model::Connection::destination_port].
3093    ///
3094    /// # Example
3095    /// ```ignore,no_run
3096    /// # use google_cloud_securitycenter_v2::model::Connection;
3097    /// let x = Connection::new().set_destination_port(42);
3098    /// ```
3099    pub fn set_destination_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3100        self.destination_port = v.into();
3101        self
3102    }
3103
3104    /// Sets the value of [source_ip][crate::model::Connection::source_ip].
3105    ///
3106    /// # Example
3107    /// ```ignore,no_run
3108    /// # use google_cloud_securitycenter_v2::model::Connection;
3109    /// let x = Connection::new().set_source_ip("example");
3110    /// ```
3111    pub fn set_source_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3112        self.source_ip = v.into();
3113        self
3114    }
3115
3116    /// Sets the value of [source_port][crate::model::Connection::source_port].
3117    ///
3118    /// # Example
3119    /// ```ignore,no_run
3120    /// # use google_cloud_securitycenter_v2::model::Connection;
3121    /// let x = Connection::new().set_source_port(42);
3122    /// ```
3123    pub fn set_source_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3124        self.source_port = v.into();
3125        self
3126    }
3127
3128    /// Sets the value of [protocol][crate::model::Connection::protocol].
3129    ///
3130    /// # Example
3131    /// ```ignore,no_run
3132    /// # use google_cloud_securitycenter_v2::model::Connection;
3133    /// use google_cloud_securitycenter_v2::model::connection::Protocol;
3134    /// let x0 = Connection::new().set_protocol(Protocol::Icmp);
3135    /// let x1 = Connection::new().set_protocol(Protocol::Tcp);
3136    /// let x2 = Connection::new().set_protocol(Protocol::Udp);
3137    /// ```
3138    pub fn set_protocol<T: std::convert::Into<crate::model::connection::Protocol>>(
3139        mut self,
3140        v: T,
3141    ) -> Self {
3142        self.protocol = v.into();
3143        self
3144    }
3145}
3146
3147impl wkt::message::Message for Connection {
3148    fn typename() -> &'static str {
3149        "type.googleapis.com/google.cloud.securitycenter.v2.Connection"
3150    }
3151}
3152
3153/// Defines additional types related to [Connection].
3154pub mod connection {
3155    #[allow(unused_imports)]
3156    use super::*;
3157
3158    /// IANA Internet Protocol Number such as TCP(6) and UDP(17).
3159    ///
3160    /// # Working with unknown values
3161    ///
3162    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3163    /// additional enum variants at any time. Adding new variants is not considered
3164    /// a breaking change. Applications should write their code in anticipation of:
3165    ///
3166    /// - New values appearing in future releases of the client library, **and**
3167    /// - New values received dynamically, without application changes.
3168    ///
3169    /// Please consult the [Working with enums] section in the user guide for some
3170    /// guidelines.
3171    ///
3172    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
3173    #[derive(Clone, Debug, PartialEq)]
3174    #[non_exhaustive]
3175    pub enum Protocol {
3176        /// Unspecified protocol (not HOPOPT).
3177        Unspecified,
3178        /// Internet Control Message Protocol.
3179        Icmp,
3180        /// Transmission Control Protocol.
3181        Tcp,
3182        /// User Datagram Protocol.
3183        Udp,
3184        /// Generic Routing Encapsulation.
3185        Gre,
3186        /// Encap Security Payload.
3187        Esp,
3188        /// If set, the enum was initialized with an unknown value.
3189        ///
3190        /// Applications can examine the value using [Protocol::value] or
3191        /// [Protocol::name].
3192        UnknownValue(protocol::UnknownValue),
3193    }
3194
3195    #[doc(hidden)]
3196    pub mod protocol {
3197        #[allow(unused_imports)]
3198        use super::*;
3199        #[derive(Clone, Debug, PartialEq)]
3200        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3201    }
3202
3203    impl Protocol {
3204        /// Gets the enum value.
3205        ///
3206        /// Returns `None` if the enum contains an unknown value deserialized from
3207        /// the string representation of enums.
3208        pub fn value(&self) -> std::option::Option<i32> {
3209            match self {
3210                Self::Unspecified => std::option::Option::Some(0),
3211                Self::Icmp => std::option::Option::Some(1),
3212                Self::Tcp => std::option::Option::Some(6),
3213                Self::Udp => std::option::Option::Some(17),
3214                Self::Gre => std::option::Option::Some(47),
3215                Self::Esp => std::option::Option::Some(50),
3216                Self::UnknownValue(u) => u.0.value(),
3217            }
3218        }
3219
3220        /// Gets the enum value as a string.
3221        ///
3222        /// Returns `None` if the enum contains an unknown value deserialized from
3223        /// the integer representation of enums.
3224        pub fn name(&self) -> std::option::Option<&str> {
3225            match self {
3226                Self::Unspecified => std::option::Option::Some("PROTOCOL_UNSPECIFIED"),
3227                Self::Icmp => std::option::Option::Some("ICMP"),
3228                Self::Tcp => std::option::Option::Some("TCP"),
3229                Self::Udp => std::option::Option::Some("UDP"),
3230                Self::Gre => std::option::Option::Some("GRE"),
3231                Self::Esp => std::option::Option::Some("ESP"),
3232                Self::UnknownValue(u) => u.0.name(),
3233            }
3234        }
3235    }
3236
3237    impl std::default::Default for Protocol {
3238        fn default() -> Self {
3239            use std::convert::From;
3240            Self::from(0)
3241        }
3242    }
3243
3244    impl std::fmt::Display for Protocol {
3245        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3246            wkt::internal::display_enum(f, self.name(), self.value())
3247        }
3248    }
3249
3250    impl std::convert::From<i32> for Protocol {
3251        fn from(value: i32) -> Self {
3252            match value {
3253                0 => Self::Unspecified,
3254                1 => Self::Icmp,
3255                6 => Self::Tcp,
3256                17 => Self::Udp,
3257                47 => Self::Gre,
3258                50 => Self::Esp,
3259                _ => Self::UnknownValue(protocol::UnknownValue(
3260                    wkt::internal::UnknownEnumValue::Integer(value),
3261                )),
3262            }
3263        }
3264    }
3265
3266    impl std::convert::From<&str> for Protocol {
3267        fn from(value: &str) -> Self {
3268            use std::string::ToString;
3269            match value {
3270                "PROTOCOL_UNSPECIFIED" => Self::Unspecified,
3271                "ICMP" => Self::Icmp,
3272                "TCP" => Self::Tcp,
3273                "UDP" => Self::Udp,
3274                "GRE" => Self::Gre,
3275                "ESP" => Self::Esp,
3276                _ => Self::UnknownValue(protocol::UnknownValue(
3277                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3278                )),
3279            }
3280        }
3281    }
3282
3283    impl serde::ser::Serialize for Protocol {
3284        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3285        where
3286            S: serde::Serializer,
3287        {
3288            match self {
3289                Self::Unspecified => serializer.serialize_i32(0),
3290                Self::Icmp => serializer.serialize_i32(1),
3291                Self::Tcp => serializer.serialize_i32(6),
3292                Self::Udp => serializer.serialize_i32(17),
3293                Self::Gre => serializer.serialize_i32(47),
3294                Self::Esp => serializer.serialize_i32(50),
3295                Self::UnknownValue(u) => u.0.serialize(serializer),
3296            }
3297        }
3298    }
3299
3300    impl<'de> serde::de::Deserialize<'de> for Protocol {
3301        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3302        where
3303            D: serde::Deserializer<'de>,
3304        {
3305            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Protocol>::new(
3306                ".google.cloud.securitycenter.v2.Connection.Protocol",
3307            ))
3308        }
3309    }
3310}
3311
3312/// Details about specific contacts
3313#[derive(Clone, Default, PartialEq)]
3314#[non_exhaustive]
3315pub struct ContactDetails {
3316    /// A list of contacts
3317    pub contacts: std::vec::Vec<crate::model::Contact>,
3318
3319    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3320}
3321
3322impl ContactDetails {
3323    pub fn new() -> Self {
3324        std::default::Default::default()
3325    }
3326
3327    /// Sets the value of [contacts][crate::model::ContactDetails::contacts].
3328    ///
3329    /// # Example
3330    /// ```ignore,no_run
3331    /// # use google_cloud_securitycenter_v2::model::ContactDetails;
3332    /// use google_cloud_securitycenter_v2::model::Contact;
3333    /// let x = ContactDetails::new()
3334    ///     .set_contacts([
3335    ///         Contact::default()/* use setters */,
3336    ///         Contact::default()/* use (different) setters */,
3337    ///     ]);
3338    /// ```
3339    pub fn set_contacts<T, V>(mut self, v: T) -> Self
3340    where
3341        T: std::iter::IntoIterator<Item = V>,
3342        V: std::convert::Into<crate::model::Contact>,
3343    {
3344        use std::iter::Iterator;
3345        self.contacts = v.into_iter().map(|i| i.into()).collect();
3346        self
3347    }
3348}
3349
3350impl wkt::message::Message for ContactDetails {
3351    fn typename() -> &'static str {
3352        "type.googleapis.com/google.cloud.securitycenter.v2.ContactDetails"
3353    }
3354}
3355
3356/// The email address of a contact.
3357#[derive(Clone, Default, PartialEq)]
3358#[non_exhaustive]
3359pub struct Contact {
3360    /// An email address. For example, "`person123@company.com`".
3361    pub email: std::string::String,
3362
3363    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3364}
3365
3366impl Contact {
3367    pub fn new() -> Self {
3368        std::default::Default::default()
3369    }
3370
3371    /// Sets the value of [email][crate::model::Contact::email].
3372    ///
3373    /// # Example
3374    /// ```ignore,no_run
3375    /// # use google_cloud_securitycenter_v2::model::Contact;
3376    /// let x = Contact::new().set_email("example");
3377    /// ```
3378    pub fn set_email<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3379        self.email = v.into();
3380        self
3381    }
3382}
3383
3384impl wkt::message::Message for Contact {
3385    fn typename() -> &'static str {
3386        "type.googleapis.com/google.cloud.securitycenter.v2.Contact"
3387    }
3388}
3389
3390/// Container associated with the finding.
3391#[derive(Clone, Default, PartialEq)]
3392#[non_exhaustive]
3393pub struct Container {
3394    /// Name of the container.
3395    pub name: std::string::String,
3396
3397    /// Container image URI provided when configuring a pod or container. This
3398    /// string can identify a container image version using mutable tags.
3399    pub uri: std::string::String,
3400
3401    /// Optional container image ID, if provided by the container runtime. Uniquely
3402    /// identifies the container image launched using a container image digest.
3403    pub image_id: std::string::String,
3404
3405    /// Container labels, as provided by the container runtime.
3406    pub labels: std::vec::Vec<crate::model::Label>,
3407
3408    /// The time that the container was created.
3409    pub create_time: std::option::Option<wkt::Timestamp>,
3410
3411    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3412}
3413
3414impl Container {
3415    pub fn new() -> Self {
3416        std::default::Default::default()
3417    }
3418
3419    /// Sets the value of [name][crate::model::Container::name].
3420    ///
3421    /// # Example
3422    /// ```ignore,no_run
3423    /// # use google_cloud_securitycenter_v2::model::Container;
3424    /// let x = Container::new().set_name("example");
3425    /// ```
3426    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3427        self.name = v.into();
3428        self
3429    }
3430
3431    /// Sets the value of [uri][crate::model::Container::uri].
3432    ///
3433    /// # Example
3434    /// ```ignore,no_run
3435    /// # use google_cloud_securitycenter_v2::model::Container;
3436    /// let x = Container::new().set_uri("example");
3437    /// ```
3438    pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3439        self.uri = v.into();
3440        self
3441    }
3442
3443    /// Sets the value of [image_id][crate::model::Container::image_id].
3444    ///
3445    /// # Example
3446    /// ```ignore,no_run
3447    /// # use google_cloud_securitycenter_v2::model::Container;
3448    /// let x = Container::new().set_image_id("example");
3449    /// ```
3450    pub fn set_image_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3451        self.image_id = v.into();
3452        self
3453    }
3454
3455    /// Sets the value of [labels][crate::model::Container::labels].
3456    ///
3457    /// # Example
3458    /// ```ignore,no_run
3459    /// # use google_cloud_securitycenter_v2::model::Container;
3460    /// use google_cloud_securitycenter_v2::model::Label;
3461    /// let x = Container::new()
3462    ///     .set_labels([
3463    ///         Label::default()/* use setters */,
3464    ///         Label::default()/* use (different) setters */,
3465    ///     ]);
3466    /// ```
3467    pub fn set_labels<T, V>(mut self, v: T) -> Self
3468    where
3469        T: std::iter::IntoIterator<Item = V>,
3470        V: std::convert::Into<crate::model::Label>,
3471    {
3472        use std::iter::Iterator;
3473        self.labels = v.into_iter().map(|i| i.into()).collect();
3474        self
3475    }
3476
3477    /// Sets the value of [create_time][crate::model::Container::create_time].
3478    ///
3479    /// # Example
3480    /// ```ignore,no_run
3481    /// # use google_cloud_securitycenter_v2::model::Container;
3482    /// use wkt::Timestamp;
3483    /// let x = Container::new().set_create_time(Timestamp::default()/* use setters */);
3484    /// ```
3485    pub fn set_create_time<T>(mut self, v: T) -> Self
3486    where
3487        T: std::convert::Into<wkt::Timestamp>,
3488    {
3489        self.create_time = std::option::Option::Some(v.into());
3490        self
3491    }
3492
3493    /// Sets or clears the value of [create_time][crate::model::Container::create_time].
3494    ///
3495    /// # Example
3496    /// ```ignore,no_run
3497    /// # use google_cloud_securitycenter_v2::model::Container;
3498    /// use wkt::Timestamp;
3499    /// let x = Container::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
3500    /// let x = Container::new().set_or_clear_create_time(None::<Timestamp>);
3501    /// ```
3502    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3503    where
3504        T: std::convert::Into<wkt::Timestamp>,
3505    {
3506        self.create_time = v.map(|x| x.into());
3507        self
3508    }
3509}
3510
3511impl wkt::message::Message for Container {
3512    fn typename() -> &'static str {
3513        "type.googleapis.com/google.cloud.securitycenter.v2.Container"
3514    }
3515}
3516
3517/// Details about a data access attempt made by a principal not authorized under
3518/// applicable data security policy.
3519#[derive(Clone, Default, PartialEq)]
3520#[non_exhaustive]
3521pub struct DataAccessEvent {
3522    /// Unique identifier for data access event.
3523    pub event_id: std::string::String,
3524
3525    /// The email address of the principal that accessed the data. The principal
3526    /// could be a user account, service account, Google group, or other.
3527    pub principal_email: std::string::String,
3528
3529    /// The operation performed by the principal to access the data.
3530    pub operation: crate::model::data_access_event::Operation,
3531
3532    /// Timestamp of data access event.
3533    pub event_time: std::option::Option<wkt::Timestamp>,
3534
3535    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3536}
3537
3538impl DataAccessEvent {
3539    pub fn new() -> Self {
3540        std::default::Default::default()
3541    }
3542
3543    /// Sets the value of [event_id][crate::model::DataAccessEvent::event_id].
3544    ///
3545    /// # Example
3546    /// ```ignore,no_run
3547    /// # use google_cloud_securitycenter_v2::model::DataAccessEvent;
3548    /// let x = DataAccessEvent::new().set_event_id("example");
3549    /// ```
3550    pub fn set_event_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3551        self.event_id = v.into();
3552        self
3553    }
3554
3555    /// Sets the value of [principal_email][crate::model::DataAccessEvent::principal_email].
3556    ///
3557    /// # Example
3558    /// ```ignore,no_run
3559    /// # use google_cloud_securitycenter_v2::model::DataAccessEvent;
3560    /// let x = DataAccessEvent::new().set_principal_email("example");
3561    /// ```
3562    pub fn set_principal_email<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3563        self.principal_email = v.into();
3564        self
3565    }
3566
3567    /// Sets the value of [operation][crate::model::DataAccessEvent::operation].
3568    ///
3569    /// # Example
3570    /// ```ignore,no_run
3571    /// # use google_cloud_securitycenter_v2::model::DataAccessEvent;
3572    /// use google_cloud_securitycenter_v2::model::data_access_event::Operation;
3573    /// let x0 = DataAccessEvent::new().set_operation(Operation::Read);
3574    /// let x1 = DataAccessEvent::new().set_operation(Operation::Move);
3575    /// let x2 = DataAccessEvent::new().set_operation(Operation::Copy);
3576    /// ```
3577    pub fn set_operation<T: std::convert::Into<crate::model::data_access_event::Operation>>(
3578        mut self,
3579        v: T,
3580    ) -> Self {
3581        self.operation = v.into();
3582        self
3583    }
3584
3585    /// Sets the value of [event_time][crate::model::DataAccessEvent::event_time].
3586    ///
3587    /// # Example
3588    /// ```ignore,no_run
3589    /// # use google_cloud_securitycenter_v2::model::DataAccessEvent;
3590    /// use wkt::Timestamp;
3591    /// let x = DataAccessEvent::new().set_event_time(Timestamp::default()/* use setters */);
3592    /// ```
3593    pub fn set_event_time<T>(mut self, v: T) -> Self
3594    where
3595        T: std::convert::Into<wkt::Timestamp>,
3596    {
3597        self.event_time = std::option::Option::Some(v.into());
3598        self
3599    }
3600
3601    /// Sets or clears the value of [event_time][crate::model::DataAccessEvent::event_time].
3602    ///
3603    /// # Example
3604    /// ```ignore,no_run
3605    /// # use google_cloud_securitycenter_v2::model::DataAccessEvent;
3606    /// use wkt::Timestamp;
3607    /// let x = DataAccessEvent::new().set_or_clear_event_time(Some(Timestamp::default()/* use setters */));
3608    /// let x = DataAccessEvent::new().set_or_clear_event_time(None::<Timestamp>);
3609    /// ```
3610    pub fn set_or_clear_event_time<T>(mut self, v: std::option::Option<T>) -> Self
3611    where
3612        T: std::convert::Into<wkt::Timestamp>,
3613    {
3614        self.event_time = v.map(|x| x.into());
3615        self
3616    }
3617}
3618
3619impl wkt::message::Message for DataAccessEvent {
3620    fn typename() -> &'static str {
3621        "type.googleapis.com/google.cloud.securitycenter.v2.DataAccessEvent"
3622    }
3623}
3624
3625/// Defines additional types related to [DataAccessEvent].
3626pub mod data_access_event {
3627    #[allow(unused_imports)]
3628    use super::*;
3629
3630    /// The operation of a data access event.
3631    ///
3632    /// # Working with unknown values
3633    ///
3634    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3635    /// additional enum variants at any time. Adding new variants is not considered
3636    /// a breaking change. Applications should write their code in anticipation of:
3637    ///
3638    /// - New values appearing in future releases of the client library, **and**
3639    /// - New values received dynamically, without application changes.
3640    ///
3641    /// Please consult the [Working with enums] section in the user guide for some
3642    /// guidelines.
3643    ///
3644    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
3645    #[derive(Clone, Debug, PartialEq)]
3646    #[non_exhaustive]
3647    pub enum Operation {
3648        /// The operation is unspecified.
3649        Unspecified,
3650        /// Represents a read operation.
3651        Read,
3652        /// Represents a move operation.
3653        Move,
3654        /// Represents a copy operation.
3655        Copy,
3656        /// If set, the enum was initialized with an unknown value.
3657        ///
3658        /// Applications can examine the value using [Operation::value] or
3659        /// [Operation::name].
3660        UnknownValue(operation::UnknownValue),
3661    }
3662
3663    #[doc(hidden)]
3664    pub mod operation {
3665        #[allow(unused_imports)]
3666        use super::*;
3667        #[derive(Clone, Debug, PartialEq)]
3668        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3669    }
3670
3671    impl Operation {
3672        /// Gets the enum value.
3673        ///
3674        /// Returns `None` if the enum contains an unknown value deserialized from
3675        /// the string representation of enums.
3676        pub fn value(&self) -> std::option::Option<i32> {
3677            match self {
3678                Self::Unspecified => std::option::Option::Some(0),
3679                Self::Read => std::option::Option::Some(1),
3680                Self::Move => std::option::Option::Some(2),
3681                Self::Copy => std::option::Option::Some(3),
3682                Self::UnknownValue(u) => u.0.value(),
3683            }
3684        }
3685
3686        /// Gets the enum value as a string.
3687        ///
3688        /// Returns `None` if the enum contains an unknown value deserialized from
3689        /// the integer representation of enums.
3690        pub fn name(&self) -> std::option::Option<&str> {
3691            match self {
3692                Self::Unspecified => std::option::Option::Some("OPERATION_UNSPECIFIED"),
3693                Self::Read => std::option::Option::Some("READ"),
3694                Self::Move => std::option::Option::Some("MOVE"),
3695                Self::Copy => std::option::Option::Some("COPY"),
3696                Self::UnknownValue(u) => u.0.name(),
3697            }
3698        }
3699    }
3700
3701    impl std::default::Default for Operation {
3702        fn default() -> Self {
3703            use std::convert::From;
3704            Self::from(0)
3705        }
3706    }
3707
3708    impl std::fmt::Display for Operation {
3709        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3710            wkt::internal::display_enum(f, self.name(), self.value())
3711        }
3712    }
3713
3714    impl std::convert::From<i32> for Operation {
3715        fn from(value: i32) -> Self {
3716            match value {
3717                0 => Self::Unspecified,
3718                1 => Self::Read,
3719                2 => Self::Move,
3720                3 => Self::Copy,
3721                _ => Self::UnknownValue(operation::UnknownValue(
3722                    wkt::internal::UnknownEnumValue::Integer(value),
3723                )),
3724            }
3725        }
3726    }
3727
3728    impl std::convert::From<&str> for Operation {
3729        fn from(value: &str) -> Self {
3730            use std::string::ToString;
3731            match value {
3732                "OPERATION_UNSPECIFIED" => Self::Unspecified,
3733                "READ" => Self::Read,
3734                "MOVE" => Self::Move,
3735                "COPY" => Self::Copy,
3736                _ => Self::UnknownValue(operation::UnknownValue(
3737                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3738                )),
3739            }
3740        }
3741    }
3742
3743    impl serde::ser::Serialize for Operation {
3744        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3745        where
3746            S: serde::Serializer,
3747        {
3748            match self {
3749                Self::Unspecified => serializer.serialize_i32(0),
3750                Self::Read => serializer.serialize_i32(1),
3751                Self::Move => serializer.serialize_i32(2),
3752                Self::Copy => serializer.serialize_i32(3),
3753                Self::UnknownValue(u) => u.0.serialize(serializer),
3754            }
3755        }
3756    }
3757
3758    impl<'de> serde::de::Deserialize<'de> for Operation {
3759        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3760        where
3761            D: serde::Deserializer<'de>,
3762        {
3763            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Operation>::new(
3764                ".google.cloud.securitycenter.v2.DataAccessEvent.Operation",
3765            ))
3766        }
3767    }
3768}
3769
3770/// Details about a data flow event, in which either the data is moved to or is
3771/// accessed from a non-compliant geo-location, as defined in the applicable data
3772/// security policy.
3773#[derive(Clone, Default, PartialEq)]
3774#[non_exhaustive]
3775pub struct DataFlowEvent {
3776    /// Unique identifier for data flow event.
3777    pub event_id: std::string::String,
3778
3779    /// The email address of the principal that initiated the data flow event. The
3780    /// principal could be a user account, service account, Google group, or other.
3781    pub principal_email: std::string::String,
3782
3783    /// The operation performed by the principal for the data flow event.
3784    pub operation: crate::model::data_flow_event::Operation,
3785
3786    /// Non-compliant location of the principal or the data destination.
3787    pub violated_location: std::string::String,
3788
3789    /// Timestamp of data flow event.
3790    pub event_time: std::option::Option<wkt::Timestamp>,
3791
3792    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3793}
3794
3795impl DataFlowEvent {
3796    pub fn new() -> Self {
3797        std::default::Default::default()
3798    }
3799
3800    /// Sets the value of [event_id][crate::model::DataFlowEvent::event_id].
3801    ///
3802    /// # Example
3803    /// ```ignore,no_run
3804    /// # use google_cloud_securitycenter_v2::model::DataFlowEvent;
3805    /// let x = DataFlowEvent::new().set_event_id("example");
3806    /// ```
3807    pub fn set_event_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3808        self.event_id = v.into();
3809        self
3810    }
3811
3812    /// Sets the value of [principal_email][crate::model::DataFlowEvent::principal_email].
3813    ///
3814    /// # Example
3815    /// ```ignore,no_run
3816    /// # use google_cloud_securitycenter_v2::model::DataFlowEvent;
3817    /// let x = DataFlowEvent::new().set_principal_email("example");
3818    /// ```
3819    pub fn set_principal_email<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3820        self.principal_email = v.into();
3821        self
3822    }
3823
3824    /// Sets the value of [operation][crate::model::DataFlowEvent::operation].
3825    ///
3826    /// # Example
3827    /// ```ignore,no_run
3828    /// # use google_cloud_securitycenter_v2::model::DataFlowEvent;
3829    /// use google_cloud_securitycenter_v2::model::data_flow_event::Operation;
3830    /// let x0 = DataFlowEvent::new().set_operation(Operation::Read);
3831    /// let x1 = DataFlowEvent::new().set_operation(Operation::Move);
3832    /// let x2 = DataFlowEvent::new().set_operation(Operation::Copy);
3833    /// ```
3834    pub fn set_operation<T: std::convert::Into<crate::model::data_flow_event::Operation>>(
3835        mut self,
3836        v: T,
3837    ) -> Self {
3838        self.operation = v.into();
3839        self
3840    }
3841
3842    /// Sets the value of [violated_location][crate::model::DataFlowEvent::violated_location].
3843    ///
3844    /// # Example
3845    /// ```ignore,no_run
3846    /// # use google_cloud_securitycenter_v2::model::DataFlowEvent;
3847    /// let x = DataFlowEvent::new().set_violated_location("example");
3848    /// ```
3849    pub fn set_violated_location<T: std::convert::Into<std::string::String>>(
3850        mut self,
3851        v: T,
3852    ) -> Self {
3853        self.violated_location = v.into();
3854        self
3855    }
3856
3857    /// Sets the value of [event_time][crate::model::DataFlowEvent::event_time].
3858    ///
3859    /// # Example
3860    /// ```ignore,no_run
3861    /// # use google_cloud_securitycenter_v2::model::DataFlowEvent;
3862    /// use wkt::Timestamp;
3863    /// let x = DataFlowEvent::new().set_event_time(Timestamp::default()/* use setters */);
3864    /// ```
3865    pub fn set_event_time<T>(mut self, v: T) -> Self
3866    where
3867        T: std::convert::Into<wkt::Timestamp>,
3868    {
3869        self.event_time = std::option::Option::Some(v.into());
3870        self
3871    }
3872
3873    /// Sets or clears the value of [event_time][crate::model::DataFlowEvent::event_time].
3874    ///
3875    /// # Example
3876    /// ```ignore,no_run
3877    /// # use google_cloud_securitycenter_v2::model::DataFlowEvent;
3878    /// use wkt::Timestamp;
3879    /// let x = DataFlowEvent::new().set_or_clear_event_time(Some(Timestamp::default()/* use setters */));
3880    /// let x = DataFlowEvent::new().set_or_clear_event_time(None::<Timestamp>);
3881    /// ```
3882    pub fn set_or_clear_event_time<T>(mut self, v: std::option::Option<T>) -> Self
3883    where
3884        T: std::convert::Into<wkt::Timestamp>,
3885    {
3886        self.event_time = v.map(|x| x.into());
3887        self
3888    }
3889}
3890
3891impl wkt::message::Message for DataFlowEvent {
3892    fn typename() -> &'static str {
3893        "type.googleapis.com/google.cloud.securitycenter.v2.DataFlowEvent"
3894    }
3895}
3896
3897/// Defines additional types related to [DataFlowEvent].
3898pub mod data_flow_event {
3899    #[allow(unused_imports)]
3900    use super::*;
3901
3902    /// The operation of a data flow event.
3903    ///
3904    /// # Working with unknown values
3905    ///
3906    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3907    /// additional enum variants at any time. Adding new variants is not considered
3908    /// a breaking change. Applications should write their code in anticipation of:
3909    ///
3910    /// - New values appearing in future releases of the client library, **and**
3911    /// - New values received dynamically, without application changes.
3912    ///
3913    /// Please consult the [Working with enums] section in the user guide for some
3914    /// guidelines.
3915    ///
3916    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
3917    #[derive(Clone, Debug, PartialEq)]
3918    #[non_exhaustive]
3919    pub enum Operation {
3920        /// The operation is unspecified.
3921        Unspecified,
3922        /// Represents a read operation.
3923        Read,
3924        /// Represents a move operation.
3925        Move,
3926        /// Represents a copy operation.
3927        Copy,
3928        /// If set, the enum was initialized with an unknown value.
3929        ///
3930        /// Applications can examine the value using [Operation::value] or
3931        /// [Operation::name].
3932        UnknownValue(operation::UnknownValue),
3933    }
3934
3935    #[doc(hidden)]
3936    pub mod operation {
3937        #[allow(unused_imports)]
3938        use super::*;
3939        #[derive(Clone, Debug, PartialEq)]
3940        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3941    }
3942
3943    impl Operation {
3944        /// Gets the enum value.
3945        ///
3946        /// Returns `None` if the enum contains an unknown value deserialized from
3947        /// the string representation of enums.
3948        pub fn value(&self) -> std::option::Option<i32> {
3949            match self {
3950                Self::Unspecified => std::option::Option::Some(0),
3951                Self::Read => std::option::Option::Some(1),
3952                Self::Move => std::option::Option::Some(2),
3953                Self::Copy => std::option::Option::Some(3),
3954                Self::UnknownValue(u) => u.0.value(),
3955            }
3956        }
3957
3958        /// Gets the enum value as a string.
3959        ///
3960        /// Returns `None` if the enum contains an unknown value deserialized from
3961        /// the integer representation of enums.
3962        pub fn name(&self) -> std::option::Option<&str> {
3963            match self {
3964                Self::Unspecified => std::option::Option::Some("OPERATION_UNSPECIFIED"),
3965                Self::Read => std::option::Option::Some("READ"),
3966                Self::Move => std::option::Option::Some("MOVE"),
3967                Self::Copy => std::option::Option::Some("COPY"),
3968                Self::UnknownValue(u) => u.0.name(),
3969            }
3970        }
3971    }
3972
3973    impl std::default::Default for Operation {
3974        fn default() -> Self {
3975            use std::convert::From;
3976            Self::from(0)
3977        }
3978    }
3979
3980    impl std::fmt::Display for Operation {
3981        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3982            wkt::internal::display_enum(f, self.name(), self.value())
3983        }
3984    }
3985
3986    impl std::convert::From<i32> for Operation {
3987        fn from(value: i32) -> Self {
3988            match value {
3989                0 => Self::Unspecified,
3990                1 => Self::Read,
3991                2 => Self::Move,
3992                3 => Self::Copy,
3993                _ => Self::UnknownValue(operation::UnknownValue(
3994                    wkt::internal::UnknownEnumValue::Integer(value),
3995                )),
3996            }
3997        }
3998    }
3999
4000    impl std::convert::From<&str> for Operation {
4001        fn from(value: &str) -> Self {
4002            use std::string::ToString;
4003            match value {
4004                "OPERATION_UNSPECIFIED" => Self::Unspecified,
4005                "READ" => Self::Read,
4006                "MOVE" => Self::Move,
4007                "COPY" => Self::Copy,
4008                _ => Self::UnknownValue(operation::UnknownValue(
4009                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4010                )),
4011            }
4012        }
4013    }
4014
4015    impl serde::ser::Serialize for Operation {
4016        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4017        where
4018            S: serde::Serializer,
4019        {
4020            match self {
4021                Self::Unspecified => serializer.serialize_i32(0),
4022                Self::Read => serializer.serialize_i32(1),
4023                Self::Move => serializer.serialize_i32(2),
4024                Self::Copy => serializer.serialize_i32(3),
4025                Self::UnknownValue(u) => u.0.serialize(serializer),
4026            }
4027        }
4028    }
4029
4030    impl<'de> serde::de::Deserialize<'de> for Operation {
4031        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4032        where
4033            D: serde::Deserializer<'de>,
4034        {
4035            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Operation>::new(
4036                ".google.cloud.securitycenter.v2.DataFlowEvent.Operation",
4037            ))
4038        }
4039    }
4040}
4041
4042/// Details about data retention deletion violations, in which the data is
4043/// non-compliant based on their retention or deletion time, as defined in the
4044/// applicable data security policy. The Data Retention Deletion (DRD) control is
4045/// a control of the DSPM (Data Security Posture Management) suite that enables
4046/// organizations to manage data retention and deletion policies in compliance
4047/// with regulations, such as GDPR and CRPA. DRD supports two primary policy
4048/// types: maximum storage length (max TTL) and minimum storage length (min TTL).
4049/// Both are aimed at helping organizations meet regulatory and data management
4050/// commitments.
4051#[derive(Clone, Default, PartialEq)]
4052#[non_exhaustive]
4053pub struct DataRetentionDeletionEvent {
4054    /// Timestamp indicating when the event was detected.
4055    pub event_detection_time: std::option::Option<wkt::Timestamp>,
4056
4057    /// Number of objects that violated the policy for this resource. If the number
4058    /// is less than 1,000, then the value of this field is the exact number. If
4059    /// the number of objects that violated the policy is greater than or equal to
4060    /// 1,000, then the value of this field is 1000.
4061    pub data_object_count: i64,
4062
4063    /// Maximum duration of retention allowed from the DRD control. This comes
4064    /// from the DRD control where users set a max TTL for their data. For example,
4065    /// suppose that a user sets the max TTL for a Cloud Storage bucket to 90 days.
4066    /// However, an object in that bucket is 100 days old. In this case, a
4067    /// DataRetentionDeletionEvent will be generated for that Cloud Storage bucket,
4068    /// and the max_retention_allowed is 90 days.
4069    pub max_retention_allowed: std::option::Option<wkt::Duration>,
4070
4071    /// Type of the DRD event.
4072    pub event_type: crate::model::data_retention_deletion_event::EventType,
4073
4074    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4075}
4076
4077impl DataRetentionDeletionEvent {
4078    pub fn new() -> Self {
4079        std::default::Default::default()
4080    }
4081
4082    /// Sets the value of [event_detection_time][crate::model::DataRetentionDeletionEvent::event_detection_time].
4083    ///
4084    /// # Example
4085    /// ```ignore,no_run
4086    /// # use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
4087    /// use wkt::Timestamp;
4088    /// let x = DataRetentionDeletionEvent::new().set_event_detection_time(Timestamp::default()/* use setters */);
4089    /// ```
4090    pub fn set_event_detection_time<T>(mut self, v: T) -> Self
4091    where
4092        T: std::convert::Into<wkt::Timestamp>,
4093    {
4094        self.event_detection_time = std::option::Option::Some(v.into());
4095        self
4096    }
4097
4098    /// Sets or clears the value of [event_detection_time][crate::model::DataRetentionDeletionEvent::event_detection_time].
4099    ///
4100    /// # Example
4101    /// ```ignore,no_run
4102    /// # use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
4103    /// use wkt::Timestamp;
4104    /// let x = DataRetentionDeletionEvent::new().set_or_clear_event_detection_time(Some(Timestamp::default()/* use setters */));
4105    /// let x = DataRetentionDeletionEvent::new().set_or_clear_event_detection_time(None::<Timestamp>);
4106    /// ```
4107    pub fn set_or_clear_event_detection_time<T>(mut self, v: std::option::Option<T>) -> Self
4108    where
4109        T: std::convert::Into<wkt::Timestamp>,
4110    {
4111        self.event_detection_time = v.map(|x| x.into());
4112        self
4113    }
4114
4115    /// Sets the value of [data_object_count][crate::model::DataRetentionDeletionEvent::data_object_count].
4116    ///
4117    /// # Example
4118    /// ```ignore,no_run
4119    /// # use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
4120    /// let x = DataRetentionDeletionEvent::new().set_data_object_count(42);
4121    /// ```
4122    pub fn set_data_object_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
4123        self.data_object_count = v.into();
4124        self
4125    }
4126
4127    /// Sets the value of [max_retention_allowed][crate::model::DataRetentionDeletionEvent::max_retention_allowed].
4128    ///
4129    /// # Example
4130    /// ```ignore,no_run
4131    /// # use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
4132    /// use wkt::Duration;
4133    /// let x = DataRetentionDeletionEvent::new().set_max_retention_allowed(Duration::default()/* use setters */);
4134    /// ```
4135    pub fn set_max_retention_allowed<T>(mut self, v: T) -> Self
4136    where
4137        T: std::convert::Into<wkt::Duration>,
4138    {
4139        self.max_retention_allowed = std::option::Option::Some(v.into());
4140        self
4141    }
4142
4143    /// Sets or clears the value of [max_retention_allowed][crate::model::DataRetentionDeletionEvent::max_retention_allowed].
4144    ///
4145    /// # Example
4146    /// ```ignore,no_run
4147    /// # use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
4148    /// use wkt::Duration;
4149    /// let x = DataRetentionDeletionEvent::new().set_or_clear_max_retention_allowed(Some(Duration::default()/* use setters */));
4150    /// let x = DataRetentionDeletionEvent::new().set_or_clear_max_retention_allowed(None::<Duration>);
4151    /// ```
4152    pub fn set_or_clear_max_retention_allowed<T>(mut self, v: std::option::Option<T>) -> Self
4153    where
4154        T: std::convert::Into<wkt::Duration>,
4155    {
4156        self.max_retention_allowed = v.map(|x| x.into());
4157        self
4158    }
4159
4160    /// Sets the value of [event_type][crate::model::DataRetentionDeletionEvent::event_type].
4161    ///
4162    /// # Example
4163    /// ```ignore,no_run
4164    /// # use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
4165    /// use google_cloud_securitycenter_v2::model::data_retention_deletion_event::EventType;
4166    /// let x0 = DataRetentionDeletionEvent::new().set_event_type(EventType::MaxTtlExceeded);
4167    /// ```
4168    pub fn set_event_type<
4169        T: std::convert::Into<crate::model::data_retention_deletion_event::EventType>,
4170    >(
4171        mut self,
4172        v: T,
4173    ) -> Self {
4174        self.event_type = v.into();
4175        self
4176    }
4177}
4178
4179impl wkt::message::Message for DataRetentionDeletionEvent {
4180    fn typename() -> &'static str {
4181        "type.googleapis.com/google.cloud.securitycenter.v2.DataRetentionDeletionEvent"
4182    }
4183}
4184
4185/// Defines additional types related to [DataRetentionDeletionEvent].
4186pub mod data_retention_deletion_event {
4187    #[allow(unused_imports)]
4188    use super::*;
4189
4190    /// Type of the DRD event.
4191    ///
4192    /// # Working with unknown values
4193    ///
4194    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4195    /// additional enum variants at any time. Adding new variants is not considered
4196    /// a breaking change. Applications should write their code in anticipation of:
4197    ///
4198    /// - New values appearing in future releases of the client library, **and**
4199    /// - New values received dynamically, without application changes.
4200    ///
4201    /// Please consult the [Working with enums] section in the user guide for some
4202    /// guidelines.
4203    ///
4204    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
4205    #[derive(Clone, Debug, PartialEq)]
4206    #[non_exhaustive]
4207    pub enum EventType {
4208        /// Unspecified event type.
4209        Unspecified,
4210        /// The maximum retention time has been exceeded.
4211        MaxTtlExceeded,
4212        /// If set, the enum was initialized with an unknown value.
4213        ///
4214        /// Applications can examine the value using [EventType::value] or
4215        /// [EventType::name].
4216        UnknownValue(event_type::UnknownValue),
4217    }
4218
4219    #[doc(hidden)]
4220    pub mod event_type {
4221        #[allow(unused_imports)]
4222        use super::*;
4223        #[derive(Clone, Debug, PartialEq)]
4224        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4225    }
4226
4227    impl EventType {
4228        /// Gets the enum value.
4229        ///
4230        /// Returns `None` if the enum contains an unknown value deserialized from
4231        /// the string representation of enums.
4232        pub fn value(&self) -> std::option::Option<i32> {
4233            match self {
4234                Self::Unspecified => std::option::Option::Some(0),
4235                Self::MaxTtlExceeded => std::option::Option::Some(1),
4236                Self::UnknownValue(u) => u.0.value(),
4237            }
4238        }
4239
4240        /// Gets the enum value as a string.
4241        ///
4242        /// Returns `None` if the enum contains an unknown value deserialized from
4243        /// the integer representation of enums.
4244        pub fn name(&self) -> std::option::Option<&str> {
4245            match self {
4246                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
4247                Self::MaxTtlExceeded => std::option::Option::Some("EVENT_TYPE_MAX_TTL_EXCEEDED"),
4248                Self::UnknownValue(u) => u.0.name(),
4249            }
4250        }
4251    }
4252
4253    impl std::default::Default for EventType {
4254        fn default() -> Self {
4255            use std::convert::From;
4256            Self::from(0)
4257        }
4258    }
4259
4260    impl std::fmt::Display for EventType {
4261        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4262            wkt::internal::display_enum(f, self.name(), self.value())
4263        }
4264    }
4265
4266    impl std::convert::From<i32> for EventType {
4267        fn from(value: i32) -> Self {
4268            match value {
4269                0 => Self::Unspecified,
4270                1 => Self::MaxTtlExceeded,
4271                _ => Self::UnknownValue(event_type::UnknownValue(
4272                    wkt::internal::UnknownEnumValue::Integer(value),
4273                )),
4274            }
4275        }
4276    }
4277
4278    impl std::convert::From<&str> for EventType {
4279        fn from(value: &str) -> Self {
4280            use std::string::ToString;
4281            match value {
4282                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
4283                "EVENT_TYPE_MAX_TTL_EXCEEDED" => Self::MaxTtlExceeded,
4284                _ => Self::UnknownValue(event_type::UnknownValue(
4285                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4286                )),
4287            }
4288        }
4289    }
4290
4291    impl serde::ser::Serialize for EventType {
4292        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4293        where
4294            S: serde::Serializer,
4295        {
4296            match self {
4297                Self::Unspecified => serializer.serialize_i32(0),
4298                Self::MaxTtlExceeded => serializer.serialize_i32(1),
4299                Self::UnknownValue(u) => u.0.serialize(serializer),
4300            }
4301        }
4302    }
4303
4304    impl<'de> serde::de::Deserialize<'de> for EventType {
4305        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4306        where
4307            D: serde::Deserializer<'de>,
4308        {
4309            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
4310                ".google.cloud.securitycenter.v2.DataRetentionDeletionEvent.EventType",
4311            ))
4312        }
4313    }
4314}
4315
4316/// Represents database access information, such as queries. A database may be a
4317/// sub-resource of an instance (as in the case of Cloud SQL instances or Cloud
4318/// Spanner instances), or the database instance itself. Some database resources
4319/// might not have the [full resource
4320/// name](https://google.aip.dev/122#full-resource-names) populated because these
4321/// resource types, such as Cloud SQL databases, are not yet supported by Cloud
4322/// Asset Inventory. In these cases only the display name is provided.
4323#[derive(Clone, Default, PartialEq)]
4324#[non_exhaustive]
4325pub struct Database {
4326    /// Some database resources may not have the [full resource
4327    /// name](https://google.aip.dev/122#full-resource-names) populated because
4328    /// these resource types are not yet supported by Cloud Asset Inventory (e.g.
4329    /// Cloud SQL databases). In these cases only the display name will be
4330    /// provided.
4331    /// The [full resource name](https://google.aip.dev/122#full-resource-names) of
4332    /// the database that the user connected to, if it is supported by Cloud Asset
4333    /// Inventory.
4334    pub name: std::string::String,
4335
4336    /// The human-readable name of the database that the user connected to.
4337    pub display_name: std::string::String,
4338
4339    /// The username used to connect to the database. The username might not be an
4340    /// IAM principal and does not have a set format.
4341    pub user_name: std::string::String,
4342
4343    /// The SQL statement that is associated with the database access.
4344    pub query: std::string::String,
4345
4346    /// The target usernames, roles, or groups of an SQL privilege grant, which is
4347    /// not an IAM policy change.
4348    pub grantees: std::vec::Vec<std::string::String>,
4349
4350    /// The version of the database, for example, POSTGRES_14.
4351    /// See [the complete
4352    /// list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).
4353    pub version: std::string::String,
4354
4355    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4356}
4357
4358impl Database {
4359    pub fn new() -> Self {
4360        std::default::Default::default()
4361    }
4362
4363    /// Sets the value of [name][crate::model::Database::name].
4364    ///
4365    /// # Example
4366    /// ```ignore,no_run
4367    /// # use google_cloud_securitycenter_v2::model::Database;
4368    /// let x = Database::new().set_name("example");
4369    /// ```
4370    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4371        self.name = v.into();
4372        self
4373    }
4374
4375    /// Sets the value of [display_name][crate::model::Database::display_name].
4376    ///
4377    /// # Example
4378    /// ```ignore,no_run
4379    /// # use google_cloud_securitycenter_v2::model::Database;
4380    /// let x = Database::new().set_display_name("example");
4381    /// ```
4382    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4383        self.display_name = v.into();
4384        self
4385    }
4386
4387    /// Sets the value of [user_name][crate::model::Database::user_name].
4388    ///
4389    /// # Example
4390    /// ```ignore,no_run
4391    /// # use google_cloud_securitycenter_v2::model::Database;
4392    /// let x = Database::new().set_user_name("example");
4393    /// ```
4394    pub fn set_user_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4395        self.user_name = v.into();
4396        self
4397    }
4398
4399    /// Sets the value of [query][crate::model::Database::query].
4400    ///
4401    /// # Example
4402    /// ```ignore,no_run
4403    /// # use google_cloud_securitycenter_v2::model::Database;
4404    /// let x = Database::new().set_query("example");
4405    /// ```
4406    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4407        self.query = v.into();
4408        self
4409    }
4410
4411    /// Sets the value of [grantees][crate::model::Database::grantees].
4412    ///
4413    /// # Example
4414    /// ```ignore,no_run
4415    /// # use google_cloud_securitycenter_v2::model::Database;
4416    /// let x = Database::new().set_grantees(["a", "b", "c"]);
4417    /// ```
4418    pub fn set_grantees<T, V>(mut self, v: T) -> Self
4419    where
4420        T: std::iter::IntoIterator<Item = V>,
4421        V: std::convert::Into<std::string::String>,
4422    {
4423        use std::iter::Iterator;
4424        self.grantees = v.into_iter().map(|i| i.into()).collect();
4425        self
4426    }
4427
4428    /// Sets the value of [version][crate::model::Database::version].
4429    ///
4430    /// # Example
4431    /// ```ignore,no_run
4432    /// # use google_cloud_securitycenter_v2::model::Database;
4433    /// let x = Database::new().set_version("example");
4434    /// ```
4435    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4436        self.version = v.into();
4437        self
4438    }
4439}
4440
4441impl wkt::message::Message for Database {
4442    fn typename() -> &'static str {
4443        "type.googleapis.com/google.cloud.securitycenter.v2.Database"
4444    }
4445}
4446
4447/// Contains information about the disk associated with the finding.
4448#[derive(Clone, Default, PartialEq)]
4449#[non_exhaustive]
4450pub struct Disk {
4451    /// The name of the disk, for example,
4452    /// `https://www.googleapis.com/compute/v1/projects/{project-id}/zones/{zone-id}/disks/{disk-id}`.
4453    pub name: std::string::String,
4454
4455    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4456}
4457
4458impl Disk {
4459    pub fn new() -> Self {
4460        std::default::Default::default()
4461    }
4462
4463    /// Sets the value of [name][crate::model::Disk::name].
4464    ///
4465    /// # Example
4466    /// ```ignore,no_run
4467    /// # use google_cloud_securitycenter_v2::model::Disk;
4468    /// let x = Disk::new().set_name("example");
4469    /// ```
4470    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4471        self.name = v.into();
4472        self
4473    }
4474}
4475
4476impl wkt::message::Message for Disk {
4477    fn typename() -> &'static str {
4478        "type.googleapis.com/google.cloud.securitycenter.v2.Disk"
4479    }
4480}
4481
4482/// Exfiltration represents a data exfiltration attempt from one or more sources
4483/// to one or more targets. The `sources` attribute lists the sources of the
4484/// exfiltrated data. The `targets` attribute lists the destinations the data was
4485/// copied to.
4486#[derive(Clone, Default, PartialEq)]
4487#[non_exhaustive]
4488pub struct Exfiltration {
4489    /// If there are multiple sources, then the data is considered "joined" between
4490    /// them. For instance, BigQuery can join multiple tables, and each
4491    /// table would be considered a source.
4492    pub sources: std::vec::Vec<crate::model::ExfilResource>,
4493
4494    /// If there are multiple targets, each target would get a complete copy of the
4495    /// "joined" source data.
4496    pub targets: std::vec::Vec<crate::model::ExfilResource>,
4497
4498    /// Total exfiltrated bytes processed for the entire job.
4499    pub total_exfiltrated_bytes: i64,
4500
4501    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4502}
4503
4504impl Exfiltration {
4505    pub fn new() -> Self {
4506        std::default::Default::default()
4507    }
4508
4509    /// Sets the value of [sources][crate::model::Exfiltration::sources].
4510    ///
4511    /// # Example
4512    /// ```ignore,no_run
4513    /// # use google_cloud_securitycenter_v2::model::Exfiltration;
4514    /// use google_cloud_securitycenter_v2::model::ExfilResource;
4515    /// let x = Exfiltration::new()
4516    ///     .set_sources([
4517    ///         ExfilResource::default()/* use setters */,
4518    ///         ExfilResource::default()/* use (different) setters */,
4519    ///     ]);
4520    /// ```
4521    pub fn set_sources<T, V>(mut self, v: T) -> Self
4522    where
4523        T: std::iter::IntoIterator<Item = V>,
4524        V: std::convert::Into<crate::model::ExfilResource>,
4525    {
4526        use std::iter::Iterator;
4527        self.sources = v.into_iter().map(|i| i.into()).collect();
4528        self
4529    }
4530
4531    /// Sets the value of [targets][crate::model::Exfiltration::targets].
4532    ///
4533    /// # Example
4534    /// ```ignore,no_run
4535    /// # use google_cloud_securitycenter_v2::model::Exfiltration;
4536    /// use google_cloud_securitycenter_v2::model::ExfilResource;
4537    /// let x = Exfiltration::new()
4538    ///     .set_targets([
4539    ///         ExfilResource::default()/* use setters */,
4540    ///         ExfilResource::default()/* use (different) setters */,
4541    ///     ]);
4542    /// ```
4543    pub fn set_targets<T, V>(mut self, v: T) -> Self
4544    where
4545        T: std::iter::IntoIterator<Item = V>,
4546        V: std::convert::Into<crate::model::ExfilResource>,
4547    {
4548        use std::iter::Iterator;
4549        self.targets = v.into_iter().map(|i| i.into()).collect();
4550        self
4551    }
4552
4553    /// Sets the value of [total_exfiltrated_bytes][crate::model::Exfiltration::total_exfiltrated_bytes].
4554    ///
4555    /// # Example
4556    /// ```ignore,no_run
4557    /// # use google_cloud_securitycenter_v2::model::Exfiltration;
4558    /// let x = Exfiltration::new().set_total_exfiltrated_bytes(42);
4559    /// ```
4560    pub fn set_total_exfiltrated_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
4561        self.total_exfiltrated_bytes = v.into();
4562        self
4563    }
4564}
4565
4566impl wkt::message::Message for Exfiltration {
4567    fn typename() -> &'static str {
4568        "type.googleapis.com/google.cloud.securitycenter.v2.Exfiltration"
4569    }
4570}
4571
4572/// Resource where data was exfiltrated from or exfiltrated to.
4573#[derive(Clone, Default, PartialEq)]
4574#[non_exhaustive]
4575pub struct ExfilResource {
4576    /// The resource's [full resource
4577    /// name](https://cloud.google.com/apis/design/resource_names#full_resource_name).
4578    pub name: std::string::String,
4579
4580    /// Subcomponents of the asset that was exfiltrated, like URIs used during
4581    /// exfiltration, table names, databases, and filenames. For example, multiple
4582    /// tables might have been exfiltrated from the same Cloud SQL instance, or
4583    /// multiple files might have been exfiltrated from the same Cloud Storage
4584    /// bucket.
4585    pub components: std::vec::Vec<std::string::String>,
4586
4587    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4588}
4589
4590impl ExfilResource {
4591    pub fn new() -> Self {
4592        std::default::Default::default()
4593    }
4594
4595    /// Sets the value of [name][crate::model::ExfilResource::name].
4596    ///
4597    /// # Example
4598    /// ```ignore,no_run
4599    /// # use google_cloud_securitycenter_v2::model::ExfilResource;
4600    /// let x = ExfilResource::new().set_name("example");
4601    /// ```
4602    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4603        self.name = v.into();
4604        self
4605    }
4606
4607    /// Sets the value of [components][crate::model::ExfilResource::components].
4608    ///
4609    /// # Example
4610    /// ```ignore,no_run
4611    /// # use google_cloud_securitycenter_v2::model::ExfilResource;
4612    /// let x = ExfilResource::new().set_components(["a", "b", "c"]);
4613    /// ```
4614    pub fn set_components<T, V>(mut self, v: T) -> Self
4615    where
4616        T: std::iter::IntoIterator<Item = V>,
4617        V: std::convert::Into<std::string::String>,
4618    {
4619        use std::iter::Iterator;
4620        self.components = v.into_iter().map(|i| i.into()).collect();
4621        self
4622    }
4623}
4624
4625impl wkt::message::Message for ExfilResource {
4626    fn typename() -> &'static str {
4627        "type.googleapis.com/google.cloud.securitycenter.v2.ExfilResource"
4628    }
4629}
4630
4631/// Representation of third party SIEM/SOAR fields within SCC.
4632#[derive(Clone, Default, PartialEq)]
4633#[non_exhaustive]
4634pub struct ExternalSystem {
4635    /// Full resource name of the external system. The following list
4636    /// shows some examples:
4637    ///
4638    /// + `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
4639    ///
4640    /// `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
4641    ///
4642    /// + `folders/1234/sources/5678/findings/123456/externalSystems/jira`
4643    ///
4644    /// `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
4645    ///
4646    /// + `projects/1234/sources/5678/findings/123456/externalSystems/jira`
4647    ///
4648    /// `projects/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
4649    pub name: std::string::String,
4650
4651    /// References primary/secondary etc assignees in the external system.
4652    pub assignees: std::vec::Vec<std::string::String>,
4653
4654    /// The identifier that's used to track the finding's corresponding case in the
4655    /// external system.
4656    pub external_uid: std::string::String,
4657
4658    /// The most recent status of the finding's corresponding case, as reported by
4659    /// the external system.
4660    pub status: std::string::String,
4661
4662    /// The time when the case was last updated, as reported by the external
4663    /// system.
4664    pub external_system_update_time: std::option::Option<wkt::Timestamp>,
4665
4666    /// The link to the finding's corresponding case in the external system.
4667    pub case_uri: std::string::String,
4668
4669    /// The priority of the finding's corresponding case in the external system.
4670    pub case_priority: std::string::String,
4671
4672    /// The SLA of the finding's corresponding case in the external system.
4673    pub case_sla: std::option::Option<wkt::Timestamp>,
4674
4675    /// The time when the case was created, as reported by the external system.
4676    pub case_create_time: std::option::Option<wkt::Timestamp>,
4677
4678    /// The time when the case was closed, as reported by the external system.
4679    pub case_close_time: std::option::Option<wkt::Timestamp>,
4680
4681    /// Information about the ticket, if any, that is being used to track the
4682    /// resolution of the issue that is identified by this finding.
4683    pub ticket_info: std::option::Option<crate::model::external_system::TicketInfo>,
4684
4685    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4686}
4687
4688impl ExternalSystem {
4689    pub fn new() -> Self {
4690        std::default::Default::default()
4691    }
4692
4693    /// Sets the value of [name][crate::model::ExternalSystem::name].
4694    ///
4695    /// # Example
4696    /// ```ignore,no_run
4697    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4698    /// let x = ExternalSystem::new().set_name("example");
4699    /// ```
4700    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4701        self.name = v.into();
4702        self
4703    }
4704
4705    /// Sets the value of [assignees][crate::model::ExternalSystem::assignees].
4706    ///
4707    /// # Example
4708    /// ```ignore,no_run
4709    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4710    /// let x = ExternalSystem::new().set_assignees(["a", "b", "c"]);
4711    /// ```
4712    pub fn set_assignees<T, V>(mut self, v: T) -> Self
4713    where
4714        T: std::iter::IntoIterator<Item = V>,
4715        V: std::convert::Into<std::string::String>,
4716    {
4717        use std::iter::Iterator;
4718        self.assignees = v.into_iter().map(|i| i.into()).collect();
4719        self
4720    }
4721
4722    /// Sets the value of [external_uid][crate::model::ExternalSystem::external_uid].
4723    ///
4724    /// # Example
4725    /// ```ignore,no_run
4726    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4727    /// let x = ExternalSystem::new().set_external_uid("example");
4728    /// ```
4729    pub fn set_external_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4730        self.external_uid = v.into();
4731        self
4732    }
4733
4734    /// Sets the value of [status][crate::model::ExternalSystem::status].
4735    ///
4736    /// # Example
4737    /// ```ignore,no_run
4738    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4739    /// let x = ExternalSystem::new().set_status("example");
4740    /// ```
4741    pub fn set_status<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4742        self.status = v.into();
4743        self
4744    }
4745
4746    /// Sets the value of [external_system_update_time][crate::model::ExternalSystem::external_system_update_time].
4747    ///
4748    /// # Example
4749    /// ```ignore,no_run
4750    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4751    /// use wkt::Timestamp;
4752    /// let x = ExternalSystem::new().set_external_system_update_time(Timestamp::default()/* use setters */);
4753    /// ```
4754    pub fn set_external_system_update_time<T>(mut self, v: T) -> Self
4755    where
4756        T: std::convert::Into<wkt::Timestamp>,
4757    {
4758        self.external_system_update_time = std::option::Option::Some(v.into());
4759        self
4760    }
4761
4762    /// Sets or clears the value of [external_system_update_time][crate::model::ExternalSystem::external_system_update_time].
4763    ///
4764    /// # Example
4765    /// ```ignore,no_run
4766    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4767    /// use wkt::Timestamp;
4768    /// let x = ExternalSystem::new().set_or_clear_external_system_update_time(Some(Timestamp::default()/* use setters */));
4769    /// let x = ExternalSystem::new().set_or_clear_external_system_update_time(None::<Timestamp>);
4770    /// ```
4771    pub fn set_or_clear_external_system_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4772    where
4773        T: std::convert::Into<wkt::Timestamp>,
4774    {
4775        self.external_system_update_time = v.map(|x| x.into());
4776        self
4777    }
4778
4779    /// Sets the value of [case_uri][crate::model::ExternalSystem::case_uri].
4780    ///
4781    /// # Example
4782    /// ```ignore,no_run
4783    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4784    /// let x = ExternalSystem::new().set_case_uri("example");
4785    /// ```
4786    pub fn set_case_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4787        self.case_uri = v.into();
4788        self
4789    }
4790
4791    /// Sets the value of [case_priority][crate::model::ExternalSystem::case_priority].
4792    ///
4793    /// # Example
4794    /// ```ignore,no_run
4795    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4796    /// let x = ExternalSystem::new().set_case_priority("example");
4797    /// ```
4798    pub fn set_case_priority<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4799        self.case_priority = v.into();
4800        self
4801    }
4802
4803    /// Sets the value of [case_sla][crate::model::ExternalSystem::case_sla].
4804    ///
4805    /// # Example
4806    /// ```ignore,no_run
4807    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4808    /// use wkt::Timestamp;
4809    /// let x = ExternalSystem::new().set_case_sla(Timestamp::default()/* use setters */);
4810    /// ```
4811    pub fn set_case_sla<T>(mut self, v: T) -> Self
4812    where
4813        T: std::convert::Into<wkt::Timestamp>,
4814    {
4815        self.case_sla = std::option::Option::Some(v.into());
4816        self
4817    }
4818
4819    /// Sets or clears the value of [case_sla][crate::model::ExternalSystem::case_sla].
4820    ///
4821    /// # Example
4822    /// ```ignore,no_run
4823    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4824    /// use wkt::Timestamp;
4825    /// let x = ExternalSystem::new().set_or_clear_case_sla(Some(Timestamp::default()/* use setters */));
4826    /// let x = ExternalSystem::new().set_or_clear_case_sla(None::<Timestamp>);
4827    /// ```
4828    pub fn set_or_clear_case_sla<T>(mut self, v: std::option::Option<T>) -> Self
4829    where
4830        T: std::convert::Into<wkt::Timestamp>,
4831    {
4832        self.case_sla = v.map(|x| x.into());
4833        self
4834    }
4835
4836    /// Sets the value of [case_create_time][crate::model::ExternalSystem::case_create_time].
4837    ///
4838    /// # Example
4839    /// ```ignore,no_run
4840    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4841    /// use wkt::Timestamp;
4842    /// let x = ExternalSystem::new().set_case_create_time(Timestamp::default()/* use setters */);
4843    /// ```
4844    pub fn set_case_create_time<T>(mut self, v: T) -> Self
4845    where
4846        T: std::convert::Into<wkt::Timestamp>,
4847    {
4848        self.case_create_time = std::option::Option::Some(v.into());
4849        self
4850    }
4851
4852    /// Sets or clears the value of [case_create_time][crate::model::ExternalSystem::case_create_time].
4853    ///
4854    /// # Example
4855    /// ```ignore,no_run
4856    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4857    /// use wkt::Timestamp;
4858    /// let x = ExternalSystem::new().set_or_clear_case_create_time(Some(Timestamp::default()/* use setters */));
4859    /// let x = ExternalSystem::new().set_or_clear_case_create_time(None::<Timestamp>);
4860    /// ```
4861    pub fn set_or_clear_case_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4862    where
4863        T: std::convert::Into<wkt::Timestamp>,
4864    {
4865        self.case_create_time = v.map(|x| x.into());
4866        self
4867    }
4868
4869    /// Sets the value of [case_close_time][crate::model::ExternalSystem::case_close_time].
4870    ///
4871    /// # Example
4872    /// ```ignore,no_run
4873    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4874    /// use wkt::Timestamp;
4875    /// let x = ExternalSystem::new().set_case_close_time(Timestamp::default()/* use setters */);
4876    /// ```
4877    pub fn set_case_close_time<T>(mut self, v: T) -> Self
4878    where
4879        T: std::convert::Into<wkt::Timestamp>,
4880    {
4881        self.case_close_time = std::option::Option::Some(v.into());
4882        self
4883    }
4884
4885    /// Sets or clears the value of [case_close_time][crate::model::ExternalSystem::case_close_time].
4886    ///
4887    /// # Example
4888    /// ```ignore,no_run
4889    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4890    /// use wkt::Timestamp;
4891    /// let x = ExternalSystem::new().set_or_clear_case_close_time(Some(Timestamp::default()/* use setters */));
4892    /// let x = ExternalSystem::new().set_or_clear_case_close_time(None::<Timestamp>);
4893    /// ```
4894    pub fn set_or_clear_case_close_time<T>(mut self, v: std::option::Option<T>) -> Self
4895    where
4896        T: std::convert::Into<wkt::Timestamp>,
4897    {
4898        self.case_close_time = v.map(|x| x.into());
4899        self
4900    }
4901
4902    /// Sets the value of [ticket_info][crate::model::ExternalSystem::ticket_info].
4903    ///
4904    /// # Example
4905    /// ```ignore,no_run
4906    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4907    /// use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
4908    /// let x = ExternalSystem::new().set_ticket_info(TicketInfo::default()/* use setters */);
4909    /// ```
4910    pub fn set_ticket_info<T>(mut self, v: T) -> Self
4911    where
4912        T: std::convert::Into<crate::model::external_system::TicketInfo>,
4913    {
4914        self.ticket_info = std::option::Option::Some(v.into());
4915        self
4916    }
4917
4918    /// Sets or clears the value of [ticket_info][crate::model::ExternalSystem::ticket_info].
4919    ///
4920    /// # Example
4921    /// ```ignore,no_run
4922    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
4923    /// use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
4924    /// let x = ExternalSystem::new().set_or_clear_ticket_info(Some(TicketInfo::default()/* use setters */));
4925    /// let x = ExternalSystem::new().set_or_clear_ticket_info(None::<TicketInfo>);
4926    /// ```
4927    pub fn set_or_clear_ticket_info<T>(mut self, v: std::option::Option<T>) -> Self
4928    where
4929        T: std::convert::Into<crate::model::external_system::TicketInfo>,
4930    {
4931        self.ticket_info = v.map(|x| x.into());
4932        self
4933    }
4934}
4935
4936impl wkt::message::Message for ExternalSystem {
4937    fn typename() -> &'static str {
4938        "type.googleapis.com/google.cloud.securitycenter.v2.ExternalSystem"
4939    }
4940}
4941
4942/// Defines additional types related to [ExternalSystem].
4943pub mod external_system {
4944    #[allow(unused_imports)]
4945    use super::*;
4946
4947    /// Information about the ticket, if any, that is being used to track the
4948    /// resolution of the issue that is identified by this finding.
4949    #[derive(Clone, Default, PartialEq)]
4950    #[non_exhaustive]
4951    pub struct TicketInfo {
4952        /// The identifier of the ticket in the ticket system.
4953        pub id: std::string::String,
4954
4955        /// The assignee of the ticket in the ticket system.
4956        pub assignee: std::string::String,
4957
4958        /// The description of the ticket in the ticket system.
4959        pub description: std::string::String,
4960
4961        /// The link to the ticket in the ticket system.
4962        pub uri: std::string::String,
4963
4964        /// The latest status of the ticket, as reported by the ticket system.
4965        pub status: std::string::String,
4966
4967        /// The time when the ticket was last updated, as reported by the ticket
4968        /// system.
4969        pub update_time: std::option::Option<wkt::Timestamp>,
4970
4971        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4972    }
4973
4974    impl TicketInfo {
4975        pub fn new() -> Self {
4976            std::default::Default::default()
4977        }
4978
4979        /// Sets the value of [id][crate::model::external_system::TicketInfo::id].
4980        ///
4981        /// # Example
4982        /// ```ignore,no_run
4983        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
4984        /// let x = TicketInfo::new().set_id("example");
4985        /// ```
4986        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4987            self.id = v.into();
4988            self
4989        }
4990
4991        /// Sets the value of [assignee][crate::model::external_system::TicketInfo::assignee].
4992        ///
4993        /// # Example
4994        /// ```ignore,no_run
4995        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
4996        /// let x = TicketInfo::new().set_assignee("example");
4997        /// ```
4998        pub fn set_assignee<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4999            self.assignee = v.into();
5000            self
5001        }
5002
5003        /// Sets the value of [description][crate::model::external_system::TicketInfo::description].
5004        ///
5005        /// # Example
5006        /// ```ignore,no_run
5007        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5008        /// let x = TicketInfo::new().set_description("example");
5009        /// ```
5010        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5011            self.description = v.into();
5012            self
5013        }
5014
5015        /// Sets the value of [uri][crate::model::external_system::TicketInfo::uri].
5016        ///
5017        /// # Example
5018        /// ```ignore,no_run
5019        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5020        /// let x = TicketInfo::new().set_uri("example");
5021        /// ```
5022        pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5023            self.uri = v.into();
5024            self
5025        }
5026
5027        /// Sets the value of [status][crate::model::external_system::TicketInfo::status].
5028        ///
5029        /// # Example
5030        /// ```ignore,no_run
5031        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5032        /// let x = TicketInfo::new().set_status("example");
5033        /// ```
5034        pub fn set_status<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5035            self.status = v.into();
5036            self
5037        }
5038
5039        /// Sets the value of [update_time][crate::model::external_system::TicketInfo::update_time].
5040        ///
5041        /// # Example
5042        /// ```ignore,no_run
5043        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5044        /// use wkt::Timestamp;
5045        /// let x = TicketInfo::new().set_update_time(Timestamp::default()/* use setters */);
5046        /// ```
5047        pub fn set_update_time<T>(mut self, v: T) -> Self
5048        where
5049            T: std::convert::Into<wkt::Timestamp>,
5050        {
5051            self.update_time = std::option::Option::Some(v.into());
5052            self
5053        }
5054
5055        /// Sets or clears the value of [update_time][crate::model::external_system::TicketInfo::update_time].
5056        ///
5057        /// # Example
5058        /// ```ignore,no_run
5059        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5060        /// use wkt::Timestamp;
5061        /// let x = TicketInfo::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
5062        /// let x = TicketInfo::new().set_or_clear_update_time(None::<Timestamp>);
5063        /// ```
5064        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
5065        where
5066            T: std::convert::Into<wkt::Timestamp>,
5067        {
5068            self.update_time = v.map(|x| x.into());
5069            self
5070        }
5071    }
5072
5073    impl wkt::message::Message for TicketInfo {
5074        fn typename() -> &'static str {
5075            "type.googleapis.com/google.cloud.securitycenter.v2.ExternalSystem.TicketInfo"
5076        }
5077    }
5078}
5079
5080/// File information about the related binary/library used by an executable, or
5081/// the script used by a script interpreter
5082#[derive(Clone, Default, PartialEq)]
5083#[non_exhaustive]
5084pub struct File {
5085    /// Absolute path of the file as a JSON encoded string.
5086    pub path: std::string::String,
5087
5088    /// Size of the file in bytes.
5089    pub size: i64,
5090
5091    /// SHA256 hash of the first hashed_size bytes of the file encoded as a
5092    /// hex string.  If hashed_size == size, sha256 represents the SHA256 hash
5093    /// of the entire file.
5094    pub sha256: std::string::String,
5095
5096    /// The length in bytes of the file prefix that was hashed.  If
5097    /// hashed_size == size, any hashes reported represent the entire
5098    /// file.
5099    pub hashed_size: i64,
5100
5101    /// True when the hash covers only a prefix of the file.
5102    pub partially_hashed: bool,
5103
5104    /// Prefix of the file contents as a JSON-encoded string.
5105    pub contents: std::string::String,
5106
5107    /// Path of the file in terms of underlying disk/partition identifiers.
5108    pub disk_path: std::option::Option<crate::model::file::DiskPath>,
5109
5110    /// Operation(s) performed on a file.
5111    pub operations: std::vec::Vec<crate::model::file::FileOperation>,
5112
5113    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5114}
5115
5116impl File {
5117    pub fn new() -> Self {
5118        std::default::Default::default()
5119    }
5120
5121    /// Sets the value of [path][crate::model::File::path].
5122    ///
5123    /// # Example
5124    /// ```ignore,no_run
5125    /// # use google_cloud_securitycenter_v2::model::File;
5126    /// let x = File::new().set_path("example");
5127    /// ```
5128    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5129        self.path = v.into();
5130        self
5131    }
5132
5133    /// Sets the value of [size][crate::model::File::size].
5134    ///
5135    /// # Example
5136    /// ```ignore,no_run
5137    /// # use google_cloud_securitycenter_v2::model::File;
5138    /// let x = File::new().set_size(42);
5139    /// ```
5140    pub fn set_size<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5141        self.size = v.into();
5142        self
5143    }
5144
5145    /// Sets the value of [sha256][crate::model::File::sha256].
5146    ///
5147    /// # Example
5148    /// ```ignore,no_run
5149    /// # use google_cloud_securitycenter_v2::model::File;
5150    /// let x = File::new().set_sha256("example");
5151    /// ```
5152    pub fn set_sha256<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5153        self.sha256 = v.into();
5154        self
5155    }
5156
5157    /// Sets the value of [hashed_size][crate::model::File::hashed_size].
5158    ///
5159    /// # Example
5160    /// ```ignore,no_run
5161    /// # use google_cloud_securitycenter_v2::model::File;
5162    /// let x = File::new().set_hashed_size(42);
5163    /// ```
5164    pub fn set_hashed_size<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5165        self.hashed_size = v.into();
5166        self
5167    }
5168
5169    /// Sets the value of [partially_hashed][crate::model::File::partially_hashed].
5170    ///
5171    /// # Example
5172    /// ```ignore,no_run
5173    /// # use google_cloud_securitycenter_v2::model::File;
5174    /// let x = File::new().set_partially_hashed(true);
5175    /// ```
5176    pub fn set_partially_hashed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5177        self.partially_hashed = v.into();
5178        self
5179    }
5180
5181    /// Sets the value of [contents][crate::model::File::contents].
5182    ///
5183    /// # Example
5184    /// ```ignore,no_run
5185    /// # use google_cloud_securitycenter_v2::model::File;
5186    /// let x = File::new().set_contents("example");
5187    /// ```
5188    pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5189        self.contents = v.into();
5190        self
5191    }
5192
5193    /// Sets the value of [disk_path][crate::model::File::disk_path].
5194    ///
5195    /// # Example
5196    /// ```ignore,no_run
5197    /// # use google_cloud_securitycenter_v2::model::File;
5198    /// use google_cloud_securitycenter_v2::model::file::DiskPath;
5199    /// let x = File::new().set_disk_path(DiskPath::default()/* use setters */);
5200    /// ```
5201    pub fn set_disk_path<T>(mut self, v: T) -> Self
5202    where
5203        T: std::convert::Into<crate::model::file::DiskPath>,
5204    {
5205        self.disk_path = std::option::Option::Some(v.into());
5206        self
5207    }
5208
5209    /// Sets or clears the value of [disk_path][crate::model::File::disk_path].
5210    ///
5211    /// # Example
5212    /// ```ignore,no_run
5213    /// # use google_cloud_securitycenter_v2::model::File;
5214    /// use google_cloud_securitycenter_v2::model::file::DiskPath;
5215    /// let x = File::new().set_or_clear_disk_path(Some(DiskPath::default()/* use setters */));
5216    /// let x = File::new().set_or_clear_disk_path(None::<DiskPath>);
5217    /// ```
5218    pub fn set_or_clear_disk_path<T>(mut self, v: std::option::Option<T>) -> Self
5219    where
5220        T: std::convert::Into<crate::model::file::DiskPath>,
5221    {
5222        self.disk_path = v.map(|x| x.into());
5223        self
5224    }
5225
5226    /// Sets the value of [operations][crate::model::File::operations].
5227    ///
5228    /// # Example
5229    /// ```ignore,no_run
5230    /// # use google_cloud_securitycenter_v2::model::File;
5231    /// use google_cloud_securitycenter_v2::model::file::FileOperation;
5232    /// let x = File::new()
5233    ///     .set_operations([
5234    ///         FileOperation::default()/* use setters */,
5235    ///         FileOperation::default()/* use (different) setters */,
5236    ///     ]);
5237    /// ```
5238    pub fn set_operations<T, V>(mut self, v: T) -> Self
5239    where
5240        T: std::iter::IntoIterator<Item = V>,
5241        V: std::convert::Into<crate::model::file::FileOperation>,
5242    {
5243        use std::iter::Iterator;
5244        self.operations = v.into_iter().map(|i| i.into()).collect();
5245        self
5246    }
5247}
5248
5249impl wkt::message::Message for File {
5250    fn typename() -> &'static str {
5251        "type.googleapis.com/google.cloud.securitycenter.v2.File"
5252    }
5253}
5254
5255/// Defines additional types related to [File].
5256pub mod file {
5257    #[allow(unused_imports)]
5258    use super::*;
5259
5260    /// Path of the file in terms of underlying disk/partition identifiers.
5261    #[derive(Clone, Default, PartialEq)]
5262    #[non_exhaustive]
5263    pub struct DiskPath {
5264        /// UUID of the partition (format
5265        /// <https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid>)
5266        pub partition_uuid: std::string::String,
5267
5268        /// Relative path of the file in the partition as a JSON encoded string.
5269        /// Example: /home/user1/executable_file.sh
5270        pub relative_path: std::string::String,
5271
5272        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5273    }
5274
5275    impl DiskPath {
5276        pub fn new() -> Self {
5277            std::default::Default::default()
5278        }
5279
5280        /// Sets the value of [partition_uuid][crate::model::file::DiskPath::partition_uuid].
5281        ///
5282        /// # Example
5283        /// ```ignore,no_run
5284        /// # use google_cloud_securitycenter_v2::model::file::DiskPath;
5285        /// let x = DiskPath::new().set_partition_uuid("example");
5286        /// ```
5287        pub fn set_partition_uuid<T: std::convert::Into<std::string::String>>(
5288            mut self,
5289            v: T,
5290        ) -> Self {
5291            self.partition_uuid = v.into();
5292            self
5293        }
5294
5295        /// Sets the value of [relative_path][crate::model::file::DiskPath::relative_path].
5296        ///
5297        /// # Example
5298        /// ```ignore,no_run
5299        /// # use google_cloud_securitycenter_v2::model::file::DiskPath;
5300        /// let x = DiskPath::new().set_relative_path("example");
5301        /// ```
5302        pub fn set_relative_path<T: std::convert::Into<std::string::String>>(
5303            mut self,
5304            v: T,
5305        ) -> Self {
5306            self.relative_path = v.into();
5307            self
5308        }
5309    }
5310
5311    impl wkt::message::Message for DiskPath {
5312        fn typename() -> &'static str {
5313            "type.googleapis.com/google.cloud.securitycenter.v2.File.DiskPath"
5314        }
5315    }
5316
5317    /// Operation(s) performed on a file.
5318    #[derive(Clone, Default, PartialEq)]
5319    #[non_exhaustive]
5320    pub struct FileOperation {
5321        /// The type of the operation
5322        pub r#type: crate::model::file::file_operation::OperationType,
5323
5324        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5325    }
5326
5327    impl FileOperation {
5328        pub fn new() -> Self {
5329            std::default::Default::default()
5330        }
5331
5332        /// Sets the value of [r#type][crate::model::file::FileOperation::type].
5333        ///
5334        /// # Example
5335        /// ```ignore,no_run
5336        /// # use google_cloud_securitycenter_v2::model::file::FileOperation;
5337        /// use google_cloud_securitycenter_v2::model::file::file_operation::OperationType;
5338        /// let x0 = FileOperation::new().set_type(OperationType::Open);
5339        /// let x1 = FileOperation::new().set_type(OperationType::Read);
5340        /// let x2 = FileOperation::new().set_type(OperationType::Rename);
5341        /// ```
5342        pub fn set_type<
5343            T: std::convert::Into<crate::model::file::file_operation::OperationType>,
5344        >(
5345            mut self,
5346            v: T,
5347        ) -> Self {
5348            self.r#type = v.into();
5349            self
5350        }
5351    }
5352
5353    impl wkt::message::Message for FileOperation {
5354        fn typename() -> &'static str {
5355            "type.googleapis.com/google.cloud.securitycenter.v2.File.FileOperation"
5356        }
5357    }
5358
5359    /// Defines additional types related to [FileOperation].
5360    pub mod file_operation {
5361        #[allow(unused_imports)]
5362        use super::*;
5363
5364        /// The type of the operation
5365        ///
5366        /// # Working with unknown values
5367        ///
5368        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5369        /// additional enum variants at any time. Adding new variants is not considered
5370        /// a breaking change. Applications should write their code in anticipation of:
5371        ///
5372        /// - New values appearing in future releases of the client library, **and**
5373        /// - New values received dynamically, without application changes.
5374        ///
5375        /// Please consult the [Working with enums] section in the user guide for some
5376        /// guidelines.
5377        ///
5378        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
5379        #[derive(Clone, Debug, PartialEq)]
5380        #[non_exhaustive]
5381        pub enum OperationType {
5382            /// The operation is unspecified.
5383            Unspecified,
5384            /// Represents an open operation.
5385            Open,
5386            /// Represents a read operation.
5387            Read,
5388            /// Represents a rename operation.
5389            Rename,
5390            /// Represents a write operation.
5391            Write,
5392            /// Represents an execute operation.
5393            Execute,
5394            /// If set, the enum was initialized with an unknown value.
5395            ///
5396            /// Applications can examine the value using [OperationType::value] or
5397            /// [OperationType::name].
5398            UnknownValue(operation_type::UnknownValue),
5399        }
5400
5401        #[doc(hidden)]
5402        pub mod operation_type {
5403            #[allow(unused_imports)]
5404            use super::*;
5405            #[derive(Clone, Debug, PartialEq)]
5406            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5407        }
5408
5409        impl OperationType {
5410            /// Gets the enum value.
5411            ///
5412            /// Returns `None` if the enum contains an unknown value deserialized from
5413            /// the string representation of enums.
5414            pub fn value(&self) -> std::option::Option<i32> {
5415                match self {
5416                    Self::Unspecified => std::option::Option::Some(0),
5417                    Self::Open => std::option::Option::Some(1),
5418                    Self::Read => std::option::Option::Some(2),
5419                    Self::Rename => std::option::Option::Some(3),
5420                    Self::Write => std::option::Option::Some(4),
5421                    Self::Execute => std::option::Option::Some(5),
5422                    Self::UnknownValue(u) => u.0.value(),
5423                }
5424            }
5425
5426            /// Gets the enum value as a string.
5427            ///
5428            /// Returns `None` if the enum contains an unknown value deserialized from
5429            /// the integer representation of enums.
5430            pub fn name(&self) -> std::option::Option<&str> {
5431                match self {
5432                    Self::Unspecified => std::option::Option::Some("OPERATION_TYPE_UNSPECIFIED"),
5433                    Self::Open => std::option::Option::Some("OPEN"),
5434                    Self::Read => std::option::Option::Some("READ"),
5435                    Self::Rename => std::option::Option::Some("RENAME"),
5436                    Self::Write => std::option::Option::Some("WRITE"),
5437                    Self::Execute => std::option::Option::Some("EXECUTE"),
5438                    Self::UnknownValue(u) => u.0.name(),
5439                }
5440            }
5441        }
5442
5443        impl std::default::Default for OperationType {
5444            fn default() -> Self {
5445                use std::convert::From;
5446                Self::from(0)
5447            }
5448        }
5449
5450        impl std::fmt::Display for OperationType {
5451            fn fmt(
5452                &self,
5453                f: &mut std::fmt::Formatter<'_>,
5454            ) -> std::result::Result<(), std::fmt::Error> {
5455                wkt::internal::display_enum(f, self.name(), self.value())
5456            }
5457        }
5458
5459        impl std::convert::From<i32> for OperationType {
5460            fn from(value: i32) -> Self {
5461                match value {
5462                    0 => Self::Unspecified,
5463                    1 => Self::Open,
5464                    2 => Self::Read,
5465                    3 => Self::Rename,
5466                    4 => Self::Write,
5467                    5 => Self::Execute,
5468                    _ => Self::UnknownValue(operation_type::UnknownValue(
5469                        wkt::internal::UnknownEnumValue::Integer(value),
5470                    )),
5471                }
5472            }
5473        }
5474
5475        impl std::convert::From<&str> for OperationType {
5476            fn from(value: &str) -> Self {
5477                use std::string::ToString;
5478                match value {
5479                    "OPERATION_TYPE_UNSPECIFIED" => Self::Unspecified,
5480                    "OPEN" => Self::Open,
5481                    "READ" => Self::Read,
5482                    "RENAME" => Self::Rename,
5483                    "WRITE" => Self::Write,
5484                    "EXECUTE" => Self::Execute,
5485                    _ => Self::UnknownValue(operation_type::UnknownValue(
5486                        wkt::internal::UnknownEnumValue::String(value.to_string()),
5487                    )),
5488                }
5489            }
5490        }
5491
5492        impl serde::ser::Serialize for OperationType {
5493            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5494            where
5495                S: serde::Serializer,
5496            {
5497                match self {
5498                    Self::Unspecified => serializer.serialize_i32(0),
5499                    Self::Open => serializer.serialize_i32(1),
5500                    Self::Read => serializer.serialize_i32(2),
5501                    Self::Rename => serializer.serialize_i32(3),
5502                    Self::Write => serializer.serialize_i32(4),
5503                    Self::Execute => serializer.serialize_i32(5),
5504                    Self::UnknownValue(u) => u.0.serialize(serializer),
5505                }
5506            }
5507        }
5508
5509        impl<'de> serde::de::Deserialize<'de> for OperationType {
5510            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5511            where
5512                D: serde::Deserializer<'de>,
5513            {
5514                deserializer.deserialize_any(wkt::internal::EnumVisitor::<OperationType>::new(
5515                    ".google.cloud.securitycenter.v2.File.FileOperation.OperationType",
5516                ))
5517            }
5518        }
5519    }
5520}
5521
5522/// Security Command Center finding.
5523///
5524/// A finding is a record of assessment data like security, risk, health, or
5525/// privacy, that is ingested into Security Command Center for presentation,
5526/// notification, analysis, policy testing, and enforcement. For example, a
5527/// cross-site scripting (XSS) vulnerability in an App Engine application is a
5528/// finding.
5529#[derive(Clone, Default, PartialEq)]
5530#[non_exhaustive]
5531pub struct Finding {
5532    /// Identifier. The [relative resource
5533    /// name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
5534    /// of the finding. The following list shows some examples:
5535    ///
5536    ///
5537    /// `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
5538    /// +
5539    /// `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
5540    ///
5541    /// + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
5542    ///
5543    /// `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
5544    ///
5545    /// + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
5546    ///
5547    /// `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
5548    pub name: std::string::String,
5549
5550    /// Output only. The canonical name of the finding. The following list shows
5551    /// some examples:
5552    ///
5553    ///
5554    /// `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
5555    /// +
5556    /// `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
5557    ///
5558    /// + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
5559    ///
5560    /// `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
5561    ///
5562    /// + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
5563    ///
5564    /// `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
5565    ///
5566    /// The prefix is the closest CRM ancestor of the resource associated with the
5567    /// finding.
5568    pub canonical_name: std::string::String,
5569
5570    /// The relative resource name of the source and location the finding belongs
5571    /// to. See:
5572    /// <https://cloud.google.com/apis/design/resource_names#relative_resource_name>
5573    /// This field is immutable after creation time. The following list shows some
5574    /// examples:
5575    ///
5576    /// + `organizations/{organization_id}/sources/{source_id}`
5577    /// + `folders/{folders_id}/sources/{source_id}`
5578    /// + `projects/{projects_id}/sources/{source_id}`
5579    ///
5580    /// `organizations/{organization_id}/sources/{source_id}/locations/{location_id}`
5581    ///
5582    /// + `folders/{folders_id}/sources/{source_id}/locations/{location_id}`
5583    /// + `projects/{projects_id}/sources/{source_id}/locations/{location_id}`
5584    pub parent: std::string::String,
5585
5586    /// Immutable. For findings on Google Cloud resources, the full resource
5587    /// name of the Google Cloud resource this finding is for. See:
5588    /// <https://cloud.google.com/apis/design/resource_names#full_resource_name>
5589    /// When the finding is for a non-Google Cloud resource, the resourceName can
5590    /// be a customer or partner defined string.
5591    pub resource_name: std::string::String,
5592
5593    /// Output only. The state of the finding.
5594    pub state: crate::model::finding::State,
5595
5596    /// Immutable. The additional taxonomy group within findings from a given
5597    /// source. Example: "XSS_FLASH_INJECTION"
5598    pub category: std::string::String,
5599
5600    /// The URI that, if available, points to a web page outside of Security
5601    /// Command Center where additional information about the finding can be found.
5602    /// This field is guaranteed to be either empty or a well formed URL.
5603    pub external_uri: std::string::String,
5604
5605    /// Source specific properties. These properties are managed by the source
5606    /// that writes the finding. The key names in the source_properties map must be
5607    /// between 1 and 255 characters, and must start with a letter and contain
5608    /// alphanumeric characters or underscores only.
5609    pub source_properties: std::collections::HashMap<std::string::String, wkt::Value>,
5610
5611    /// Output only. User specified security marks. These marks are entirely
5612    /// managed by the user and come from the SecurityMarks resource that belongs
5613    /// to the finding.
5614    pub security_marks: std::option::Option<crate::model::SecurityMarks>,
5615
5616    /// The time the finding was first detected. If an existing finding is updated,
5617    /// then this is the time the update occurred.
5618    /// For example, if the finding represents an open firewall, this property
5619    /// captures the time the detector believes the firewall became open. The
5620    /// accuracy is determined by the detector. If the finding is later resolved,
5621    /// then this time reflects when the finding was resolved. This must not
5622    /// be set to a value greater than the current timestamp.
5623    pub event_time: std::option::Option<wkt::Timestamp>,
5624
5625    /// Output only. The time at which the finding was created in Security Command
5626    /// Center.
5627    pub create_time: std::option::Option<wkt::Timestamp>,
5628
5629    /// The severity of the finding. This field is managed by the source that
5630    /// writes the finding.
5631    pub severity: crate::model::finding::Severity,
5632
5633    /// Indicates the mute state of a finding (either muted, unmuted
5634    /// or undefined). Unlike other attributes of a finding, a finding provider
5635    /// shouldn't set the value of mute.
5636    pub mute: crate::model::finding::Mute,
5637
5638    /// Output only. The mute information regarding this finding.
5639    pub mute_info: std::option::Option<crate::model::finding::MuteInfo>,
5640
5641    /// The class of the finding.
5642    pub finding_class: crate::model::finding::FindingClass,
5643
5644    /// Represents what's commonly known as an *indicator of compromise* (IoC) in
5645    /// computer forensics. This is an artifact observed on a network or in an
5646    /// operating system that, with high confidence, indicates a computer
5647    /// intrusion. For more information, see [Indicator of
5648    /// compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
5649    pub indicator: std::option::Option<crate::model::Indicator>,
5650
5651    /// Represents vulnerability-specific fields like CVE and CVSS scores.
5652    /// CVE stands for Common Vulnerabilities and Exposures
5653    /// (<https://cve.mitre.org/about/>)
5654    pub vulnerability: std::option::Option<crate::model::Vulnerability>,
5655
5656    /// Output only. The most recent time this finding was muted or unmuted.
5657    pub mute_update_time: std::option::Option<wkt::Timestamp>,
5658
5659    /// Output only. Third party SIEM/SOAR fields within SCC, contains external
5660    /// system information and external system finding fields.
5661    pub external_systems:
5662        std::collections::HashMap<std::string::String, crate::model::ExternalSystem>,
5663
5664    /// MITRE ATT&CK tactics and techniques related to this finding.
5665    /// See: <https://attack.mitre.org>
5666    pub mitre_attack: std::option::Option<crate::model::MitreAttack>,
5667
5668    /// Access details associated with the finding, such as more information on the
5669    /// caller, which method was accessed, and from where.
5670    pub access: std::option::Option<crate::model::Access>,
5671
5672    /// Contains information about the IP connection associated with the finding.
5673    pub connections: std::vec::Vec<crate::model::Connection>,
5674
5675    /// Records additional information about the mute operation, for example, the
5676    /// [mute
5677    /// configuration](https://cloud.google.com/security-command-center/docs/how-to-mute-findings)
5678    /// that muted the finding and the user who muted the finding.
5679    pub mute_initiator: std::string::String,
5680
5681    /// Represents operating system processes associated with the Finding.
5682    pub processes: std::vec::Vec<crate::model::Process>,
5683
5684    /// Output only. Map containing the points of contact for the given finding.
5685    /// The key represents the type of contact, while the value contains a list of
5686    /// all the contacts that pertain. Please refer to:
5687    /// <https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories>
5688    ///
5689    /// ```norust
5690    /// {
5691    ///   "security": {
5692    ///     "contacts": [
5693    ///       {
5694    ///         "email": "person1@company.com"
5695    ///       },
5696    ///       {
5697    ///         "email": "person2@company.com"
5698    ///       }
5699    ///     ]
5700    ///   }
5701    /// }
5702    /// ```
5703    pub contacts: std::collections::HashMap<std::string::String, crate::model::ContactDetails>,
5704
5705    /// Contains compliance information for security standards associated to the
5706    /// finding.
5707    pub compliances: std::vec::Vec<crate::model::Compliance>,
5708
5709    /// Output only. The human readable display name of the finding source such as
5710    /// "Event Threat Detection" or "Security Health Analytics".
5711    pub parent_display_name: std::string::String,
5712
5713    /// Contains more details about the finding.
5714    pub description: std::string::String,
5715
5716    /// Represents exfiltrations associated with the finding.
5717    pub exfiltration: std::option::Option<crate::model::Exfiltration>,
5718
5719    /// Represents IAM bindings associated with the finding.
5720    pub iam_bindings: std::vec::Vec<crate::model::IamBinding>,
5721
5722    /// Steps to address the finding.
5723    pub next_steps: std::string::String,
5724
5725    /// Unique identifier of the module which generated the finding.
5726    /// Example:
5727    /// folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885
5728    pub module_name: std::string::String,
5729
5730    /// Containers associated with the finding. This field provides information for
5731    /// both Kubernetes and non-Kubernetes containers.
5732    pub containers: std::vec::Vec<crate::model::Container>,
5733
5734    /// Kubernetes resources associated with the finding.
5735    pub kubernetes: std::option::Option<crate::model::Kubernetes>,
5736
5737    /// Database associated with the finding.
5738    pub database: std::option::Option<crate::model::Database>,
5739
5740    /// The results of an attack path simulation relevant to this finding.
5741    pub attack_exposure: std::option::Option<crate::model::AttackExposure>,
5742
5743    /// File associated with the finding.
5744    pub files: std::vec::Vec<crate::model::File>,
5745
5746    /// Cloud Data Loss Prevention (Cloud DLP) inspection results that are
5747    /// associated with the finding.
5748    pub cloud_dlp_inspection: std::option::Option<crate::model::CloudDlpInspection>,
5749
5750    /// Cloud DLP data profile that is associated with the finding.
5751    pub cloud_dlp_data_profile: std::option::Option<crate::model::CloudDlpDataProfile>,
5752
5753    /// Signature of the kernel rootkit.
5754    pub kernel_rootkit: std::option::Option<crate::model::KernelRootkit>,
5755
5756    /// Contains information about the org policies associated with the finding.
5757    pub org_policies: std::vec::Vec<crate::model::OrgPolicy>,
5758
5759    /// Job associated with the finding.
5760    pub job: std::option::Option<crate::model::Job>,
5761
5762    /// Represents an application associated with the finding.
5763    pub application: std::option::Option<crate::model::Application>,
5764
5765    /// IP rules associated with the finding.
5766    pub ip_rules: std::option::Option<crate::model::IpRules>,
5767
5768    /// Fields related to Backup and DR findings.
5769    pub backup_disaster_recovery: std::option::Option<crate::model::BackupDisasterRecovery>,
5770
5771    /// The security posture associated with the finding.
5772    pub security_posture: std::option::Option<crate::model::SecurityPosture>,
5773
5774    /// Log entries that are relevant to the finding.
5775    pub log_entries: std::vec::Vec<crate::model::LogEntry>,
5776
5777    /// The load balancers associated with the finding.
5778    pub load_balancers: std::vec::Vec<crate::model::LoadBalancer>,
5779
5780    /// Fields related to Cloud Armor findings.
5781    pub cloud_armor: std::option::Option<crate::model::CloudArmor>,
5782
5783    /// Notebook associated with the finding.
5784    pub notebook: std::option::Option<crate::model::Notebook>,
5785
5786    /// Contains details about a group of security issues that, when the issues
5787    /// occur together, represent a greater risk than when the issues occur
5788    /// independently. A group of such issues is referred to as a toxic
5789    /// combination.
5790    /// This field cannot be updated. Its value is ignored in all update requests.
5791    pub toxic_combination: std::option::Option<crate::model::ToxicCombination>,
5792
5793    /// Contains details about groups of which this finding is a member. A group is
5794    /// a collection of findings that are related in some way.
5795    /// This field cannot be updated. Its value is ignored in all update requests.
5796    pub group_memberships: std::vec::Vec<crate::model::GroupMembership>,
5797
5798    /// Disk associated with the finding.
5799    pub disk: std::option::Option<crate::model::Disk>,
5800
5801    /// Data access events associated with the finding.
5802    pub data_access_events: std::vec::Vec<crate::model::DataAccessEvent>,
5803
5804    /// Data flow events associated with the finding.
5805    pub data_flow_events: std::vec::Vec<crate::model::DataFlowEvent>,
5806
5807    /// Represents the VPC networks that the resource is attached to.
5808    pub networks: std::vec::Vec<crate::model::Network>,
5809
5810    /// Data retention deletion events associated with the finding.
5811    pub data_retention_deletion_events: std::vec::Vec<crate::model::DataRetentionDeletionEvent>,
5812
5813    /// AffectedResources associated with the finding.
5814    pub affected_resources: std::option::Option<crate::model::AffectedResources>,
5815
5816    /// The AI model associated with the finding.
5817    pub ai_model: std::option::Option<crate::model::AiModel>,
5818
5819    /// Contains details about a chokepoint, which is a resource or resource group
5820    /// where high-risk attack paths converge, based on [attack path simulations]
5821    /// (<https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations>).
5822    /// This field cannot be updated. Its value is ignored in all update requests.
5823    pub chokepoint: std::option::Option<crate::model::Chokepoint>,
5824
5825    /// VertexAi associated with the finding.
5826    pub vertex_ai: std::option::Option<crate::model::VertexAi>,
5827
5828    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5829}
5830
5831impl Finding {
5832    pub fn new() -> Self {
5833        std::default::Default::default()
5834    }
5835
5836    /// Sets the value of [name][crate::model::Finding::name].
5837    ///
5838    /// # Example
5839    /// ```ignore,no_run
5840    /// # use google_cloud_securitycenter_v2::model::Finding;
5841    /// let x = Finding::new().set_name("example");
5842    /// ```
5843    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5844        self.name = v.into();
5845        self
5846    }
5847
5848    /// Sets the value of [canonical_name][crate::model::Finding::canonical_name].
5849    ///
5850    /// # Example
5851    /// ```ignore,no_run
5852    /// # use google_cloud_securitycenter_v2::model::Finding;
5853    /// let x = Finding::new().set_canonical_name("example");
5854    /// ```
5855    pub fn set_canonical_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5856        self.canonical_name = v.into();
5857        self
5858    }
5859
5860    /// Sets the value of [parent][crate::model::Finding::parent].
5861    ///
5862    /// # Example
5863    /// ```ignore,no_run
5864    /// # use google_cloud_securitycenter_v2::model::Finding;
5865    /// let x = Finding::new().set_parent("example");
5866    /// ```
5867    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5868        self.parent = v.into();
5869        self
5870    }
5871
5872    /// Sets the value of [resource_name][crate::model::Finding::resource_name].
5873    ///
5874    /// # Example
5875    /// ```ignore,no_run
5876    /// # use google_cloud_securitycenter_v2::model::Finding;
5877    /// let x = Finding::new().set_resource_name("example");
5878    /// ```
5879    pub fn set_resource_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5880        self.resource_name = v.into();
5881        self
5882    }
5883
5884    /// Sets the value of [state][crate::model::Finding::state].
5885    ///
5886    /// # Example
5887    /// ```ignore,no_run
5888    /// # use google_cloud_securitycenter_v2::model::Finding;
5889    /// use google_cloud_securitycenter_v2::model::finding::State;
5890    /// let x0 = Finding::new().set_state(State::Active);
5891    /// let x1 = Finding::new().set_state(State::Inactive);
5892    /// ```
5893    pub fn set_state<T: std::convert::Into<crate::model::finding::State>>(mut self, v: T) -> Self {
5894        self.state = v.into();
5895        self
5896    }
5897
5898    /// Sets the value of [category][crate::model::Finding::category].
5899    ///
5900    /// # Example
5901    /// ```ignore,no_run
5902    /// # use google_cloud_securitycenter_v2::model::Finding;
5903    /// let x = Finding::new().set_category("example");
5904    /// ```
5905    pub fn set_category<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5906        self.category = v.into();
5907        self
5908    }
5909
5910    /// Sets the value of [external_uri][crate::model::Finding::external_uri].
5911    ///
5912    /// # Example
5913    /// ```ignore,no_run
5914    /// # use google_cloud_securitycenter_v2::model::Finding;
5915    /// let x = Finding::new().set_external_uri("example");
5916    /// ```
5917    pub fn set_external_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5918        self.external_uri = v.into();
5919        self
5920    }
5921
5922    /// Sets the value of [source_properties][crate::model::Finding::source_properties].
5923    ///
5924    /// # Example
5925    /// ```ignore,no_run
5926    /// # use google_cloud_securitycenter_v2::model::Finding;
5927    /// use wkt::Value;
5928    /// let x = Finding::new().set_source_properties([
5929    ///     ("key0", Value::default()/* use setters */),
5930    ///     ("key1", Value::default()/* use (different) setters */),
5931    /// ]);
5932    /// ```
5933    pub fn set_source_properties<T, K, V>(mut self, v: T) -> Self
5934    where
5935        T: std::iter::IntoIterator<Item = (K, V)>,
5936        K: std::convert::Into<std::string::String>,
5937        V: std::convert::Into<wkt::Value>,
5938    {
5939        use std::iter::Iterator;
5940        self.source_properties = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5941        self
5942    }
5943
5944    /// Sets the value of [security_marks][crate::model::Finding::security_marks].
5945    ///
5946    /// # Example
5947    /// ```ignore,no_run
5948    /// # use google_cloud_securitycenter_v2::model::Finding;
5949    /// use google_cloud_securitycenter_v2::model::SecurityMarks;
5950    /// let x = Finding::new().set_security_marks(SecurityMarks::default()/* use setters */);
5951    /// ```
5952    pub fn set_security_marks<T>(mut self, v: T) -> Self
5953    where
5954        T: std::convert::Into<crate::model::SecurityMarks>,
5955    {
5956        self.security_marks = std::option::Option::Some(v.into());
5957        self
5958    }
5959
5960    /// Sets or clears the value of [security_marks][crate::model::Finding::security_marks].
5961    ///
5962    /// # Example
5963    /// ```ignore,no_run
5964    /// # use google_cloud_securitycenter_v2::model::Finding;
5965    /// use google_cloud_securitycenter_v2::model::SecurityMarks;
5966    /// let x = Finding::new().set_or_clear_security_marks(Some(SecurityMarks::default()/* use setters */));
5967    /// let x = Finding::new().set_or_clear_security_marks(None::<SecurityMarks>);
5968    /// ```
5969    pub fn set_or_clear_security_marks<T>(mut self, v: std::option::Option<T>) -> Self
5970    where
5971        T: std::convert::Into<crate::model::SecurityMarks>,
5972    {
5973        self.security_marks = v.map(|x| x.into());
5974        self
5975    }
5976
5977    /// Sets the value of [event_time][crate::model::Finding::event_time].
5978    ///
5979    /// # Example
5980    /// ```ignore,no_run
5981    /// # use google_cloud_securitycenter_v2::model::Finding;
5982    /// use wkt::Timestamp;
5983    /// let x = Finding::new().set_event_time(Timestamp::default()/* use setters */);
5984    /// ```
5985    pub fn set_event_time<T>(mut self, v: T) -> Self
5986    where
5987        T: std::convert::Into<wkt::Timestamp>,
5988    {
5989        self.event_time = std::option::Option::Some(v.into());
5990        self
5991    }
5992
5993    /// Sets or clears the value of [event_time][crate::model::Finding::event_time].
5994    ///
5995    /// # Example
5996    /// ```ignore,no_run
5997    /// # use google_cloud_securitycenter_v2::model::Finding;
5998    /// use wkt::Timestamp;
5999    /// let x = Finding::new().set_or_clear_event_time(Some(Timestamp::default()/* use setters */));
6000    /// let x = Finding::new().set_or_clear_event_time(None::<Timestamp>);
6001    /// ```
6002    pub fn set_or_clear_event_time<T>(mut self, v: std::option::Option<T>) -> Self
6003    where
6004        T: std::convert::Into<wkt::Timestamp>,
6005    {
6006        self.event_time = v.map(|x| x.into());
6007        self
6008    }
6009
6010    /// Sets the value of [create_time][crate::model::Finding::create_time].
6011    ///
6012    /// # Example
6013    /// ```ignore,no_run
6014    /// # use google_cloud_securitycenter_v2::model::Finding;
6015    /// use wkt::Timestamp;
6016    /// let x = Finding::new().set_create_time(Timestamp::default()/* use setters */);
6017    /// ```
6018    pub fn set_create_time<T>(mut self, v: T) -> Self
6019    where
6020        T: std::convert::Into<wkt::Timestamp>,
6021    {
6022        self.create_time = std::option::Option::Some(v.into());
6023        self
6024    }
6025
6026    /// Sets or clears the value of [create_time][crate::model::Finding::create_time].
6027    ///
6028    /// # Example
6029    /// ```ignore,no_run
6030    /// # use google_cloud_securitycenter_v2::model::Finding;
6031    /// use wkt::Timestamp;
6032    /// let x = Finding::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
6033    /// let x = Finding::new().set_or_clear_create_time(None::<Timestamp>);
6034    /// ```
6035    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6036    where
6037        T: std::convert::Into<wkt::Timestamp>,
6038    {
6039        self.create_time = v.map(|x| x.into());
6040        self
6041    }
6042
6043    /// Sets the value of [severity][crate::model::Finding::severity].
6044    ///
6045    /// # Example
6046    /// ```ignore,no_run
6047    /// # use google_cloud_securitycenter_v2::model::Finding;
6048    /// use google_cloud_securitycenter_v2::model::finding::Severity;
6049    /// let x0 = Finding::new().set_severity(Severity::Critical);
6050    /// let x1 = Finding::new().set_severity(Severity::High);
6051    /// let x2 = Finding::new().set_severity(Severity::Medium);
6052    /// ```
6053    pub fn set_severity<T: std::convert::Into<crate::model::finding::Severity>>(
6054        mut self,
6055        v: T,
6056    ) -> Self {
6057        self.severity = v.into();
6058        self
6059    }
6060
6061    /// Sets the value of [mute][crate::model::Finding::mute].
6062    ///
6063    /// # Example
6064    /// ```ignore,no_run
6065    /// # use google_cloud_securitycenter_v2::model::Finding;
6066    /// use google_cloud_securitycenter_v2::model::finding::Mute;
6067    /// let x0 = Finding::new().set_mute(Mute::Muted);
6068    /// let x1 = Finding::new().set_mute(Mute::Unmuted);
6069    /// let x2 = Finding::new().set_mute(Mute::Undefined);
6070    /// ```
6071    pub fn set_mute<T: std::convert::Into<crate::model::finding::Mute>>(mut self, v: T) -> Self {
6072        self.mute = v.into();
6073        self
6074    }
6075
6076    /// Sets the value of [mute_info][crate::model::Finding::mute_info].
6077    ///
6078    /// # Example
6079    /// ```ignore,no_run
6080    /// # use google_cloud_securitycenter_v2::model::Finding;
6081    /// use google_cloud_securitycenter_v2::model::finding::MuteInfo;
6082    /// let x = Finding::new().set_mute_info(MuteInfo::default()/* use setters */);
6083    /// ```
6084    pub fn set_mute_info<T>(mut self, v: T) -> Self
6085    where
6086        T: std::convert::Into<crate::model::finding::MuteInfo>,
6087    {
6088        self.mute_info = std::option::Option::Some(v.into());
6089        self
6090    }
6091
6092    /// Sets or clears the value of [mute_info][crate::model::Finding::mute_info].
6093    ///
6094    /// # Example
6095    /// ```ignore,no_run
6096    /// # use google_cloud_securitycenter_v2::model::Finding;
6097    /// use google_cloud_securitycenter_v2::model::finding::MuteInfo;
6098    /// let x = Finding::new().set_or_clear_mute_info(Some(MuteInfo::default()/* use setters */));
6099    /// let x = Finding::new().set_or_clear_mute_info(None::<MuteInfo>);
6100    /// ```
6101    pub fn set_or_clear_mute_info<T>(mut self, v: std::option::Option<T>) -> Self
6102    where
6103        T: std::convert::Into<crate::model::finding::MuteInfo>,
6104    {
6105        self.mute_info = v.map(|x| x.into());
6106        self
6107    }
6108
6109    /// Sets the value of [finding_class][crate::model::Finding::finding_class].
6110    ///
6111    /// # Example
6112    /// ```ignore,no_run
6113    /// # use google_cloud_securitycenter_v2::model::Finding;
6114    /// use google_cloud_securitycenter_v2::model::finding::FindingClass;
6115    /// let x0 = Finding::new().set_finding_class(FindingClass::Threat);
6116    /// let x1 = Finding::new().set_finding_class(FindingClass::Vulnerability);
6117    /// let x2 = Finding::new().set_finding_class(FindingClass::Misconfiguration);
6118    /// ```
6119    pub fn set_finding_class<T: std::convert::Into<crate::model::finding::FindingClass>>(
6120        mut self,
6121        v: T,
6122    ) -> Self {
6123        self.finding_class = v.into();
6124        self
6125    }
6126
6127    /// Sets the value of [indicator][crate::model::Finding::indicator].
6128    ///
6129    /// # Example
6130    /// ```ignore,no_run
6131    /// # use google_cloud_securitycenter_v2::model::Finding;
6132    /// use google_cloud_securitycenter_v2::model::Indicator;
6133    /// let x = Finding::new().set_indicator(Indicator::default()/* use setters */);
6134    /// ```
6135    pub fn set_indicator<T>(mut self, v: T) -> Self
6136    where
6137        T: std::convert::Into<crate::model::Indicator>,
6138    {
6139        self.indicator = std::option::Option::Some(v.into());
6140        self
6141    }
6142
6143    /// Sets or clears the value of [indicator][crate::model::Finding::indicator].
6144    ///
6145    /// # Example
6146    /// ```ignore,no_run
6147    /// # use google_cloud_securitycenter_v2::model::Finding;
6148    /// use google_cloud_securitycenter_v2::model::Indicator;
6149    /// let x = Finding::new().set_or_clear_indicator(Some(Indicator::default()/* use setters */));
6150    /// let x = Finding::new().set_or_clear_indicator(None::<Indicator>);
6151    /// ```
6152    pub fn set_or_clear_indicator<T>(mut self, v: std::option::Option<T>) -> Self
6153    where
6154        T: std::convert::Into<crate::model::Indicator>,
6155    {
6156        self.indicator = v.map(|x| x.into());
6157        self
6158    }
6159
6160    /// Sets the value of [vulnerability][crate::model::Finding::vulnerability].
6161    ///
6162    /// # Example
6163    /// ```ignore,no_run
6164    /// # use google_cloud_securitycenter_v2::model::Finding;
6165    /// use google_cloud_securitycenter_v2::model::Vulnerability;
6166    /// let x = Finding::new().set_vulnerability(Vulnerability::default()/* use setters */);
6167    /// ```
6168    pub fn set_vulnerability<T>(mut self, v: T) -> Self
6169    where
6170        T: std::convert::Into<crate::model::Vulnerability>,
6171    {
6172        self.vulnerability = std::option::Option::Some(v.into());
6173        self
6174    }
6175
6176    /// Sets or clears the value of [vulnerability][crate::model::Finding::vulnerability].
6177    ///
6178    /// # Example
6179    /// ```ignore,no_run
6180    /// # use google_cloud_securitycenter_v2::model::Finding;
6181    /// use google_cloud_securitycenter_v2::model::Vulnerability;
6182    /// let x = Finding::new().set_or_clear_vulnerability(Some(Vulnerability::default()/* use setters */));
6183    /// let x = Finding::new().set_or_clear_vulnerability(None::<Vulnerability>);
6184    /// ```
6185    pub fn set_or_clear_vulnerability<T>(mut self, v: std::option::Option<T>) -> Self
6186    where
6187        T: std::convert::Into<crate::model::Vulnerability>,
6188    {
6189        self.vulnerability = v.map(|x| x.into());
6190        self
6191    }
6192
6193    /// Sets the value of [mute_update_time][crate::model::Finding::mute_update_time].
6194    ///
6195    /// # Example
6196    /// ```ignore,no_run
6197    /// # use google_cloud_securitycenter_v2::model::Finding;
6198    /// use wkt::Timestamp;
6199    /// let x = Finding::new().set_mute_update_time(Timestamp::default()/* use setters */);
6200    /// ```
6201    pub fn set_mute_update_time<T>(mut self, v: T) -> Self
6202    where
6203        T: std::convert::Into<wkt::Timestamp>,
6204    {
6205        self.mute_update_time = std::option::Option::Some(v.into());
6206        self
6207    }
6208
6209    /// Sets or clears the value of [mute_update_time][crate::model::Finding::mute_update_time].
6210    ///
6211    /// # Example
6212    /// ```ignore,no_run
6213    /// # use google_cloud_securitycenter_v2::model::Finding;
6214    /// use wkt::Timestamp;
6215    /// let x = Finding::new().set_or_clear_mute_update_time(Some(Timestamp::default()/* use setters */));
6216    /// let x = Finding::new().set_or_clear_mute_update_time(None::<Timestamp>);
6217    /// ```
6218    pub fn set_or_clear_mute_update_time<T>(mut self, v: std::option::Option<T>) -> Self
6219    where
6220        T: std::convert::Into<wkt::Timestamp>,
6221    {
6222        self.mute_update_time = v.map(|x| x.into());
6223        self
6224    }
6225
6226    /// Sets the value of [external_systems][crate::model::Finding::external_systems].
6227    ///
6228    /// # Example
6229    /// ```ignore,no_run
6230    /// # use google_cloud_securitycenter_v2::model::Finding;
6231    /// use google_cloud_securitycenter_v2::model::ExternalSystem;
6232    /// let x = Finding::new().set_external_systems([
6233    ///     ("key0", ExternalSystem::default()/* use setters */),
6234    ///     ("key1", ExternalSystem::default()/* use (different) setters */),
6235    /// ]);
6236    /// ```
6237    pub fn set_external_systems<T, K, V>(mut self, v: T) -> Self
6238    where
6239        T: std::iter::IntoIterator<Item = (K, V)>,
6240        K: std::convert::Into<std::string::String>,
6241        V: std::convert::Into<crate::model::ExternalSystem>,
6242    {
6243        use std::iter::Iterator;
6244        self.external_systems = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6245        self
6246    }
6247
6248    /// Sets the value of [mitre_attack][crate::model::Finding::mitre_attack].
6249    ///
6250    /// # Example
6251    /// ```ignore,no_run
6252    /// # use google_cloud_securitycenter_v2::model::Finding;
6253    /// use google_cloud_securitycenter_v2::model::MitreAttack;
6254    /// let x = Finding::new().set_mitre_attack(MitreAttack::default()/* use setters */);
6255    /// ```
6256    pub fn set_mitre_attack<T>(mut self, v: T) -> Self
6257    where
6258        T: std::convert::Into<crate::model::MitreAttack>,
6259    {
6260        self.mitre_attack = std::option::Option::Some(v.into());
6261        self
6262    }
6263
6264    /// Sets or clears the value of [mitre_attack][crate::model::Finding::mitre_attack].
6265    ///
6266    /// # Example
6267    /// ```ignore,no_run
6268    /// # use google_cloud_securitycenter_v2::model::Finding;
6269    /// use google_cloud_securitycenter_v2::model::MitreAttack;
6270    /// let x = Finding::new().set_or_clear_mitre_attack(Some(MitreAttack::default()/* use setters */));
6271    /// let x = Finding::new().set_or_clear_mitre_attack(None::<MitreAttack>);
6272    /// ```
6273    pub fn set_or_clear_mitre_attack<T>(mut self, v: std::option::Option<T>) -> Self
6274    where
6275        T: std::convert::Into<crate::model::MitreAttack>,
6276    {
6277        self.mitre_attack = v.map(|x| x.into());
6278        self
6279    }
6280
6281    /// Sets the value of [access][crate::model::Finding::access].
6282    ///
6283    /// # Example
6284    /// ```ignore,no_run
6285    /// # use google_cloud_securitycenter_v2::model::Finding;
6286    /// use google_cloud_securitycenter_v2::model::Access;
6287    /// let x = Finding::new().set_access(Access::default()/* use setters */);
6288    /// ```
6289    pub fn set_access<T>(mut self, v: T) -> Self
6290    where
6291        T: std::convert::Into<crate::model::Access>,
6292    {
6293        self.access = std::option::Option::Some(v.into());
6294        self
6295    }
6296
6297    /// Sets or clears the value of [access][crate::model::Finding::access].
6298    ///
6299    /// # Example
6300    /// ```ignore,no_run
6301    /// # use google_cloud_securitycenter_v2::model::Finding;
6302    /// use google_cloud_securitycenter_v2::model::Access;
6303    /// let x = Finding::new().set_or_clear_access(Some(Access::default()/* use setters */));
6304    /// let x = Finding::new().set_or_clear_access(None::<Access>);
6305    /// ```
6306    pub fn set_or_clear_access<T>(mut self, v: std::option::Option<T>) -> Self
6307    where
6308        T: std::convert::Into<crate::model::Access>,
6309    {
6310        self.access = v.map(|x| x.into());
6311        self
6312    }
6313
6314    /// Sets the value of [connections][crate::model::Finding::connections].
6315    ///
6316    /// # Example
6317    /// ```ignore,no_run
6318    /// # use google_cloud_securitycenter_v2::model::Finding;
6319    /// use google_cloud_securitycenter_v2::model::Connection;
6320    /// let x = Finding::new()
6321    ///     .set_connections([
6322    ///         Connection::default()/* use setters */,
6323    ///         Connection::default()/* use (different) setters */,
6324    ///     ]);
6325    /// ```
6326    pub fn set_connections<T, V>(mut self, v: T) -> Self
6327    where
6328        T: std::iter::IntoIterator<Item = V>,
6329        V: std::convert::Into<crate::model::Connection>,
6330    {
6331        use std::iter::Iterator;
6332        self.connections = v.into_iter().map(|i| i.into()).collect();
6333        self
6334    }
6335
6336    /// Sets the value of [mute_initiator][crate::model::Finding::mute_initiator].
6337    ///
6338    /// # Example
6339    /// ```ignore,no_run
6340    /// # use google_cloud_securitycenter_v2::model::Finding;
6341    /// let x = Finding::new().set_mute_initiator("example");
6342    /// ```
6343    pub fn set_mute_initiator<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6344        self.mute_initiator = v.into();
6345        self
6346    }
6347
6348    /// Sets the value of [processes][crate::model::Finding::processes].
6349    ///
6350    /// # Example
6351    /// ```ignore,no_run
6352    /// # use google_cloud_securitycenter_v2::model::Finding;
6353    /// use google_cloud_securitycenter_v2::model::Process;
6354    /// let x = Finding::new()
6355    ///     .set_processes([
6356    ///         Process::default()/* use setters */,
6357    ///         Process::default()/* use (different) setters */,
6358    ///     ]);
6359    /// ```
6360    pub fn set_processes<T, V>(mut self, v: T) -> Self
6361    where
6362        T: std::iter::IntoIterator<Item = V>,
6363        V: std::convert::Into<crate::model::Process>,
6364    {
6365        use std::iter::Iterator;
6366        self.processes = v.into_iter().map(|i| i.into()).collect();
6367        self
6368    }
6369
6370    /// Sets the value of [contacts][crate::model::Finding::contacts].
6371    ///
6372    /// # Example
6373    /// ```ignore,no_run
6374    /// # use google_cloud_securitycenter_v2::model::Finding;
6375    /// use google_cloud_securitycenter_v2::model::ContactDetails;
6376    /// let x = Finding::new().set_contacts([
6377    ///     ("key0", ContactDetails::default()/* use setters */),
6378    ///     ("key1", ContactDetails::default()/* use (different) setters */),
6379    /// ]);
6380    /// ```
6381    pub fn set_contacts<T, K, V>(mut self, v: T) -> Self
6382    where
6383        T: std::iter::IntoIterator<Item = (K, V)>,
6384        K: std::convert::Into<std::string::String>,
6385        V: std::convert::Into<crate::model::ContactDetails>,
6386    {
6387        use std::iter::Iterator;
6388        self.contacts = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6389        self
6390    }
6391
6392    /// Sets the value of [compliances][crate::model::Finding::compliances].
6393    ///
6394    /// # Example
6395    /// ```ignore,no_run
6396    /// # use google_cloud_securitycenter_v2::model::Finding;
6397    /// use google_cloud_securitycenter_v2::model::Compliance;
6398    /// let x = Finding::new()
6399    ///     .set_compliances([
6400    ///         Compliance::default()/* use setters */,
6401    ///         Compliance::default()/* use (different) setters */,
6402    ///     ]);
6403    /// ```
6404    pub fn set_compliances<T, V>(mut self, v: T) -> Self
6405    where
6406        T: std::iter::IntoIterator<Item = V>,
6407        V: std::convert::Into<crate::model::Compliance>,
6408    {
6409        use std::iter::Iterator;
6410        self.compliances = v.into_iter().map(|i| i.into()).collect();
6411        self
6412    }
6413
6414    /// Sets the value of [parent_display_name][crate::model::Finding::parent_display_name].
6415    ///
6416    /// # Example
6417    /// ```ignore,no_run
6418    /// # use google_cloud_securitycenter_v2::model::Finding;
6419    /// let x = Finding::new().set_parent_display_name("example");
6420    /// ```
6421    pub fn set_parent_display_name<T: std::convert::Into<std::string::String>>(
6422        mut self,
6423        v: T,
6424    ) -> Self {
6425        self.parent_display_name = v.into();
6426        self
6427    }
6428
6429    /// Sets the value of [description][crate::model::Finding::description].
6430    ///
6431    /// # Example
6432    /// ```ignore,no_run
6433    /// # use google_cloud_securitycenter_v2::model::Finding;
6434    /// let x = Finding::new().set_description("example");
6435    /// ```
6436    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6437        self.description = v.into();
6438        self
6439    }
6440
6441    /// Sets the value of [exfiltration][crate::model::Finding::exfiltration].
6442    ///
6443    /// # Example
6444    /// ```ignore,no_run
6445    /// # use google_cloud_securitycenter_v2::model::Finding;
6446    /// use google_cloud_securitycenter_v2::model::Exfiltration;
6447    /// let x = Finding::new().set_exfiltration(Exfiltration::default()/* use setters */);
6448    /// ```
6449    pub fn set_exfiltration<T>(mut self, v: T) -> Self
6450    where
6451        T: std::convert::Into<crate::model::Exfiltration>,
6452    {
6453        self.exfiltration = std::option::Option::Some(v.into());
6454        self
6455    }
6456
6457    /// Sets or clears the value of [exfiltration][crate::model::Finding::exfiltration].
6458    ///
6459    /// # Example
6460    /// ```ignore,no_run
6461    /// # use google_cloud_securitycenter_v2::model::Finding;
6462    /// use google_cloud_securitycenter_v2::model::Exfiltration;
6463    /// let x = Finding::new().set_or_clear_exfiltration(Some(Exfiltration::default()/* use setters */));
6464    /// let x = Finding::new().set_or_clear_exfiltration(None::<Exfiltration>);
6465    /// ```
6466    pub fn set_or_clear_exfiltration<T>(mut self, v: std::option::Option<T>) -> Self
6467    where
6468        T: std::convert::Into<crate::model::Exfiltration>,
6469    {
6470        self.exfiltration = v.map(|x| x.into());
6471        self
6472    }
6473
6474    /// Sets the value of [iam_bindings][crate::model::Finding::iam_bindings].
6475    ///
6476    /// # Example
6477    /// ```ignore,no_run
6478    /// # use google_cloud_securitycenter_v2::model::Finding;
6479    /// use google_cloud_securitycenter_v2::model::IamBinding;
6480    /// let x = Finding::new()
6481    ///     .set_iam_bindings([
6482    ///         IamBinding::default()/* use setters */,
6483    ///         IamBinding::default()/* use (different) setters */,
6484    ///     ]);
6485    /// ```
6486    pub fn set_iam_bindings<T, V>(mut self, v: T) -> Self
6487    where
6488        T: std::iter::IntoIterator<Item = V>,
6489        V: std::convert::Into<crate::model::IamBinding>,
6490    {
6491        use std::iter::Iterator;
6492        self.iam_bindings = v.into_iter().map(|i| i.into()).collect();
6493        self
6494    }
6495
6496    /// Sets the value of [next_steps][crate::model::Finding::next_steps].
6497    ///
6498    /// # Example
6499    /// ```ignore,no_run
6500    /// # use google_cloud_securitycenter_v2::model::Finding;
6501    /// let x = Finding::new().set_next_steps("example");
6502    /// ```
6503    pub fn set_next_steps<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6504        self.next_steps = v.into();
6505        self
6506    }
6507
6508    /// Sets the value of [module_name][crate::model::Finding::module_name].
6509    ///
6510    /// # Example
6511    /// ```ignore,no_run
6512    /// # use google_cloud_securitycenter_v2::model::Finding;
6513    /// let x = Finding::new().set_module_name("example");
6514    /// ```
6515    pub fn set_module_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6516        self.module_name = v.into();
6517        self
6518    }
6519
6520    /// Sets the value of [containers][crate::model::Finding::containers].
6521    ///
6522    /// # Example
6523    /// ```ignore,no_run
6524    /// # use google_cloud_securitycenter_v2::model::Finding;
6525    /// use google_cloud_securitycenter_v2::model::Container;
6526    /// let x = Finding::new()
6527    ///     .set_containers([
6528    ///         Container::default()/* use setters */,
6529    ///         Container::default()/* use (different) setters */,
6530    ///     ]);
6531    /// ```
6532    pub fn set_containers<T, V>(mut self, v: T) -> Self
6533    where
6534        T: std::iter::IntoIterator<Item = V>,
6535        V: std::convert::Into<crate::model::Container>,
6536    {
6537        use std::iter::Iterator;
6538        self.containers = v.into_iter().map(|i| i.into()).collect();
6539        self
6540    }
6541
6542    /// Sets the value of [kubernetes][crate::model::Finding::kubernetes].
6543    ///
6544    /// # Example
6545    /// ```ignore,no_run
6546    /// # use google_cloud_securitycenter_v2::model::Finding;
6547    /// use google_cloud_securitycenter_v2::model::Kubernetes;
6548    /// let x = Finding::new().set_kubernetes(Kubernetes::default()/* use setters */);
6549    /// ```
6550    pub fn set_kubernetes<T>(mut self, v: T) -> Self
6551    where
6552        T: std::convert::Into<crate::model::Kubernetes>,
6553    {
6554        self.kubernetes = std::option::Option::Some(v.into());
6555        self
6556    }
6557
6558    /// Sets or clears the value of [kubernetes][crate::model::Finding::kubernetes].
6559    ///
6560    /// # Example
6561    /// ```ignore,no_run
6562    /// # use google_cloud_securitycenter_v2::model::Finding;
6563    /// use google_cloud_securitycenter_v2::model::Kubernetes;
6564    /// let x = Finding::new().set_or_clear_kubernetes(Some(Kubernetes::default()/* use setters */));
6565    /// let x = Finding::new().set_or_clear_kubernetes(None::<Kubernetes>);
6566    /// ```
6567    pub fn set_or_clear_kubernetes<T>(mut self, v: std::option::Option<T>) -> Self
6568    where
6569        T: std::convert::Into<crate::model::Kubernetes>,
6570    {
6571        self.kubernetes = v.map(|x| x.into());
6572        self
6573    }
6574
6575    /// Sets the value of [database][crate::model::Finding::database].
6576    ///
6577    /// # Example
6578    /// ```ignore,no_run
6579    /// # use google_cloud_securitycenter_v2::model::Finding;
6580    /// use google_cloud_securitycenter_v2::model::Database;
6581    /// let x = Finding::new().set_database(Database::default()/* use setters */);
6582    /// ```
6583    pub fn set_database<T>(mut self, v: T) -> Self
6584    where
6585        T: std::convert::Into<crate::model::Database>,
6586    {
6587        self.database = std::option::Option::Some(v.into());
6588        self
6589    }
6590
6591    /// Sets or clears the value of [database][crate::model::Finding::database].
6592    ///
6593    /// # Example
6594    /// ```ignore,no_run
6595    /// # use google_cloud_securitycenter_v2::model::Finding;
6596    /// use google_cloud_securitycenter_v2::model::Database;
6597    /// let x = Finding::new().set_or_clear_database(Some(Database::default()/* use setters */));
6598    /// let x = Finding::new().set_or_clear_database(None::<Database>);
6599    /// ```
6600    pub fn set_or_clear_database<T>(mut self, v: std::option::Option<T>) -> Self
6601    where
6602        T: std::convert::Into<crate::model::Database>,
6603    {
6604        self.database = v.map(|x| x.into());
6605        self
6606    }
6607
6608    /// Sets the value of [attack_exposure][crate::model::Finding::attack_exposure].
6609    ///
6610    /// # Example
6611    /// ```ignore,no_run
6612    /// # use google_cloud_securitycenter_v2::model::Finding;
6613    /// use google_cloud_securitycenter_v2::model::AttackExposure;
6614    /// let x = Finding::new().set_attack_exposure(AttackExposure::default()/* use setters */);
6615    /// ```
6616    pub fn set_attack_exposure<T>(mut self, v: T) -> Self
6617    where
6618        T: std::convert::Into<crate::model::AttackExposure>,
6619    {
6620        self.attack_exposure = std::option::Option::Some(v.into());
6621        self
6622    }
6623
6624    /// Sets or clears the value of [attack_exposure][crate::model::Finding::attack_exposure].
6625    ///
6626    /// # Example
6627    /// ```ignore,no_run
6628    /// # use google_cloud_securitycenter_v2::model::Finding;
6629    /// use google_cloud_securitycenter_v2::model::AttackExposure;
6630    /// let x = Finding::new().set_or_clear_attack_exposure(Some(AttackExposure::default()/* use setters */));
6631    /// let x = Finding::new().set_or_clear_attack_exposure(None::<AttackExposure>);
6632    /// ```
6633    pub fn set_or_clear_attack_exposure<T>(mut self, v: std::option::Option<T>) -> Self
6634    where
6635        T: std::convert::Into<crate::model::AttackExposure>,
6636    {
6637        self.attack_exposure = v.map(|x| x.into());
6638        self
6639    }
6640
6641    /// Sets the value of [files][crate::model::Finding::files].
6642    ///
6643    /// # Example
6644    /// ```ignore,no_run
6645    /// # use google_cloud_securitycenter_v2::model::Finding;
6646    /// use google_cloud_securitycenter_v2::model::File;
6647    /// let x = Finding::new()
6648    ///     .set_files([
6649    ///         File::default()/* use setters */,
6650    ///         File::default()/* use (different) setters */,
6651    ///     ]);
6652    /// ```
6653    pub fn set_files<T, V>(mut self, v: T) -> Self
6654    where
6655        T: std::iter::IntoIterator<Item = V>,
6656        V: std::convert::Into<crate::model::File>,
6657    {
6658        use std::iter::Iterator;
6659        self.files = v.into_iter().map(|i| i.into()).collect();
6660        self
6661    }
6662
6663    /// Sets the value of [cloud_dlp_inspection][crate::model::Finding::cloud_dlp_inspection].
6664    ///
6665    /// # Example
6666    /// ```ignore,no_run
6667    /// # use google_cloud_securitycenter_v2::model::Finding;
6668    /// use google_cloud_securitycenter_v2::model::CloudDlpInspection;
6669    /// let x = Finding::new().set_cloud_dlp_inspection(CloudDlpInspection::default()/* use setters */);
6670    /// ```
6671    pub fn set_cloud_dlp_inspection<T>(mut self, v: T) -> Self
6672    where
6673        T: std::convert::Into<crate::model::CloudDlpInspection>,
6674    {
6675        self.cloud_dlp_inspection = std::option::Option::Some(v.into());
6676        self
6677    }
6678
6679    /// Sets or clears the value of [cloud_dlp_inspection][crate::model::Finding::cloud_dlp_inspection].
6680    ///
6681    /// # Example
6682    /// ```ignore,no_run
6683    /// # use google_cloud_securitycenter_v2::model::Finding;
6684    /// use google_cloud_securitycenter_v2::model::CloudDlpInspection;
6685    /// let x = Finding::new().set_or_clear_cloud_dlp_inspection(Some(CloudDlpInspection::default()/* use setters */));
6686    /// let x = Finding::new().set_or_clear_cloud_dlp_inspection(None::<CloudDlpInspection>);
6687    /// ```
6688    pub fn set_or_clear_cloud_dlp_inspection<T>(mut self, v: std::option::Option<T>) -> Self
6689    where
6690        T: std::convert::Into<crate::model::CloudDlpInspection>,
6691    {
6692        self.cloud_dlp_inspection = v.map(|x| x.into());
6693        self
6694    }
6695
6696    /// Sets the value of [cloud_dlp_data_profile][crate::model::Finding::cloud_dlp_data_profile].
6697    ///
6698    /// # Example
6699    /// ```ignore,no_run
6700    /// # use google_cloud_securitycenter_v2::model::Finding;
6701    /// use google_cloud_securitycenter_v2::model::CloudDlpDataProfile;
6702    /// let x = Finding::new().set_cloud_dlp_data_profile(CloudDlpDataProfile::default()/* use setters */);
6703    /// ```
6704    pub fn set_cloud_dlp_data_profile<T>(mut self, v: T) -> Self
6705    where
6706        T: std::convert::Into<crate::model::CloudDlpDataProfile>,
6707    {
6708        self.cloud_dlp_data_profile = std::option::Option::Some(v.into());
6709        self
6710    }
6711
6712    /// Sets or clears the value of [cloud_dlp_data_profile][crate::model::Finding::cloud_dlp_data_profile].
6713    ///
6714    /// # Example
6715    /// ```ignore,no_run
6716    /// # use google_cloud_securitycenter_v2::model::Finding;
6717    /// use google_cloud_securitycenter_v2::model::CloudDlpDataProfile;
6718    /// let x = Finding::new().set_or_clear_cloud_dlp_data_profile(Some(CloudDlpDataProfile::default()/* use setters */));
6719    /// let x = Finding::new().set_or_clear_cloud_dlp_data_profile(None::<CloudDlpDataProfile>);
6720    /// ```
6721    pub fn set_or_clear_cloud_dlp_data_profile<T>(mut self, v: std::option::Option<T>) -> Self
6722    where
6723        T: std::convert::Into<crate::model::CloudDlpDataProfile>,
6724    {
6725        self.cloud_dlp_data_profile = v.map(|x| x.into());
6726        self
6727    }
6728
6729    /// Sets the value of [kernel_rootkit][crate::model::Finding::kernel_rootkit].
6730    ///
6731    /// # Example
6732    /// ```ignore,no_run
6733    /// # use google_cloud_securitycenter_v2::model::Finding;
6734    /// use google_cloud_securitycenter_v2::model::KernelRootkit;
6735    /// let x = Finding::new().set_kernel_rootkit(KernelRootkit::default()/* use setters */);
6736    /// ```
6737    pub fn set_kernel_rootkit<T>(mut self, v: T) -> Self
6738    where
6739        T: std::convert::Into<crate::model::KernelRootkit>,
6740    {
6741        self.kernel_rootkit = std::option::Option::Some(v.into());
6742        self
6743    }
6744
6745    /// Sets or clears the value of [kernel_rootkit][crate::model::Finding::kernel_rootkit].
6746    ///
6747    /// # Example
6748    /// ```ignore,no_run
6749    /// # use google_cloud_securitycenter_v2::model::Finding;
6750    /// use google_cloud_securitycenter_v2::model::KernelRootkit;
6751    /// let x = Finding::new().set_or_clear_kernel_rootkit(Some(KernelRootkit::default()/* use setters */));
6752    /// let x = Finding::new().set_or_clear_kernel_rootkit(None::<KernelRootkit>);
6753    /// ```
6754    pub fn set_or_clear_kernel_rootkit<T>(mut self, v: std::option::Option<T>) -> Self
6755    where
6756        T: std::convert::Into<crate::model::KernelRootkit>,
6757    {
6758        self.kernel_rootkit = v.map(|x| x.into());
6759        self
6760    }
6761
6762    /// Sets the value of [org_policies][crate::model::Finding::org_policies].
6763    ///
6764    /// # Example
6765    /// ```ignore,no_run
6766    /// # use google_cloud_securitycenter_v2::model::Finding;
6767    /// use google_cloud_securitycenter_v2::model::OrgPolicy;
6768    /// let x = Finding::new()
6769    ///     .set_org_policies([
6770    ///         OrgPolicy::default()/* use setters */,
6771    ///         OrgPolicy::default()/* use (different) setters */,
6772    ///     ]);
6773    /// ```
6774    pub fn set_org_policies<T, V>(mut self, v: T) -> Self
6775    where
6776        T: std::iter::IntoIterator<Item = V>,
6777        V: std::convert::Into<crate::model::OrgPolicy>,
6778    {
6779        use std::iter::Iterator;
6780        self.org_policies = v.into_iter().map(|i| i.into()).collect();
6781        self
6782    }
6783
6784    /// Sets the value of [job][crate::model::Finding::job].
6785    ///
6786    /// # Example
6787    /// ```ignore,no_run
6788    /// # use google_cloud_securitycenter_v2::model::Finding;
6789    /// use google_cloud_securitycenter_v2::model::Job;
6790    /// let x = Finding::new().set_job(Job::default()/* use setters */);
6791    /// ```
6792    pub fn set_job<T>(mut self, v: T) -> Self
6793    where
6794        T: std::convert::Into<crate::model::Job>,
6795    {
6796        self.job = std::option::Option::Some(v.into());
6797        self
6798    }
6799
6800    /// Sets or clears the value of [job][crate::model::Finding::job].
6801    ///
6802    /// # Example
6803    /// ```ignore,no_run
6804    /// # use google_cloud_securitycenter_v2::model::Finding;
6805    /// use google_cloud_securitycenter_v2::model::Job;
6806    /// let x = Finding::new().set_or_clear_job(Some(Job::default()/* use setters */));
6807    /// let x = Finding::new().set_or_clear_job(None::<Job>);
6808    /// ```
6809    pub fn set_or_clear_job<T>(mut self, v: std::option::Option<T>) -> Self
6810    where
6811        T: std::convert::Into<crate::model::Job>,
6812    {
6813        self.job = v.map(|x| x.into());
6814        self
6815    }
6816
6817    /// Sets the value of [application][crate::model::Finding::application].
6818    ///
6819    /// # Example
6820    /// ```ignore,no_run
6821    /// # use google_cloud_securitycenter_v2::model::Finding;
6822    /// use google_cloud_securitycenter_v2::model::Application;
6823    /// let x = Finding::new().set_application(Application::default()/* use setters */);
6824    /// ```
6825    pub fn set_application<T>(mut self, v: T) -> Self
6826    where
6827        T: std::convert::Into<crate::model::Application>,
6828    {
6829        self.application = std::option::Option::Some(v.into());
6830        self
6831    }
6832
6833    /// Sets or clears the value of [application][crate::model::Finding::application].
6834    ///
6835    /// # Example
6836    /// ```ignore,no_run
6837    /// # use google_cloud_securitycenter_v2::model::Finding;
6838    /// use google_cloud_securitycenter_v2::model::Application;
6839    /// let x = Finding::new().set_or_clear_application(Some(Application::default()/* use setters */));
6840    /// let x = Finding::new().set_or_clear_application(None::<Application>);
6841    /// ```
6842    pub fn set_or_clear_application<T>(mut self, v: std::option::Option<T>) -> Self
6843    where
6844        T: std::convert::Into<crate::model::Application>,
6845    {
6846        self.application = v.map(|x| x.into());
6847        self
6848    }
6849
6850    /// Sets the value of [ip_rules][crate::model::Finding::ip_rules].
6851    ///
6852    /// # Example
6853    /// ```ignore,no_run
6854    /// # use google_cloud_securitycenter_v2::model::Finding;
6855    /// use google_cloud_securitycenter_v2::model::IpRules;
6856    /// let x = Finding::new().set_ip_rules(IpRules::default()/* use setters */);
6857    /// ```
6858    pub fn set_ip_rules<T>(mut self, v: T) -> Self
6859    where
6860        T: std::convert::Into<crate::model::IpRules>,
6861    {
6862        self.ip_rules = std::option::Option::Some(v.into());
6863        self
6864    }
6865
6866    /// Sets or clears the value of [ip_rules][crate::model::Finding::ip_rules].
6867    ///
6868    /// # Example
6869    /// ```ignore,no_run
6870    /// # use google_cloud_securitycenter_v2::model::Finding;
6871    /// use google_cloud_securitycenter_v2::model::IpRules;
6872    /// let x = Finding::new().set_or_clear_ip_rules(Some(IpRules::default()/* use setters */));
6873    /// let x = Finding::new().set_or_clear_ip_rules(None::<IpRules>);
6874    /// ```
6875    pub fn set_or_clear_ip_rules<T>(mut self, v: std::option::Option<T>) -> Self
6876    where
6877        T: std::convert::Into<crate::model::IpRules>,
6878    {
6879        self.ip_rules = v.map(|x| x.into());
6880        self
6881    }
6882
6883    /// Sets the value of [backup_disaster_recovery][crate::model::Finding::backup_disaster_recovery].
6884    ///
6885    /// # Example
6886    /// ```ignore,no_run
6887    /// # use google_cloud_securitycenter_v2::model::Finding;
6888    /// use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
6889    /// let x = Finding::new().set_backup_disaster_recovery(BackupDisasterRecovery::default()/* use setters */);
6890    /// ```
6891    pub fn set_backup_disaster_recovery<T>(mut self, v: T) -> Self
6892    where
6893        T: std::convert::Into<crate::model::BackupDisasterRecovery>,
6894    {
6895        self.backup_disaster_recovery = std::option::Option::Some(v.into());
6896        self
6897    }
6898
6899    /// Sets or clears the value of [backup_disaster_recovery][crate::model::Finding::backup_disaster_recovery].
6900    ///
6901    /// # Example
6902    /// ```ignore,no_run
6903    /// # use google_cloud_securitycenter_v2::model::Finding;
6904    /// use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
6905    /// let x = Finding::new().set_or_clear_backup_disaster_recovery(Some(BackupDisasterRecovery::default()/* use setters */));
6906    /// let x = Finding::new().set_or_clear_backup_disaster_recovery(None::<BackupDisasterRecovery>);
6907    /// ```
6908    pub fn set_or_clear_backup_disaster_recovery<T>(mut self, v: std::option::Option<T>) -> Self
6909    where
6910        T: std::convert::Into<crate::model::BackupDisasterRecovery>,
6911    {
6912        self.backup_disaster_recovery = v.map(|x| x.into());
6913        self
6914    }
6915
6916    /// Sets the value of [security_posture][crate::model::Finding::security_posture].
6917    ///
6918    /// # Example
6919    /// ```ignore,no_run
6920    /// # use google_cloud_securitycenter_v2::model::Finding;
6921    /// use google_cloud_securitycenter_v2::model::SecurityPosture;
6922    /// let x = Finding::new().set_security_posture(SecurityPosture::default()/* use setters */);
6923    /// ```
6924    pub fn set_security_posture<T>(mut self, v: T) -> Self
6925    where
6926        T: std::convert::Into<crate::model::SecurityPosture>,
6927    {
6928        self.security_posture = std::option::Option::Some(v.into());
6929        self
6930    }
6931
6932    /// Sets or clears the value of [security_posture][crate::model::Finding::security_posture].
6933    ///
6934    /// # Example
6935    /// ```ignore,no_run
6936    /// # use google_cloud_securitycenter_v2::model::Finding;
6937    /// use google_cloud_securitycenter_v2::model::SecurityPosture;
6938    /// let x = Finding::new().set_or_clear_security_posture(Some(SecurityPosture::default()/* use setters */));
6939    /// let x = Finding::new().set_or_clear_security_posture(None::<SecurityPosture>);
6940    /// ```
6941    pub fn set_or_clear_security_posture<T>(mut self, v: std::option::Option<T>) -> Self
6942    where
6943        T: std::convert::Into<crate::model::SecurityPosture>,
6944    {
6945        self.security_posture = v.map(|x| x.into());
6946        self
6947    }
6948
6949    /// Sets the value of [log_entries][crate::model::Finding::log_entries].
6950    ///
6951    /// # Example
6952    /// ```ignore,no_run
6953    /// # use google_cloud_securitycenter_v2::model::Finding;
6954    /// use google_cloud_securitycenter_v2::model::LogEntry;
6955    /// let x = Finding::new()
6956    ///     .set_log_entries([
6957    ///         LogEntry::default()/* use setters */,
6958    ///         LogEntry::default()/* use (different) setters */,
6959    ///     ]);
6960    /// ```
6961    pub fn set_log_entries<T, V>(mut self, v: T) -> Self
6962    where
6963        T: std::iter::IntoIterator<Item = V>,
6964        V: std::convert::Into<crate::model::LogEntry>,
6965    {
6966        use std::iter::Iterator;
6967        self.log_entries = v.into_iter().map(|i| i.into()).collect();
6968        self
6969    }
6970
6971    /// Sets the value of [load_balancers][crate::model::Finding::load_balancers].
6972    ///
6973    /// # Example
6974    /// ```ignore,no_run
6975    /// # use google_cloud_securitycenter_v2::model::Finding;
6976    /// use google_cloud_securitycenter_v2::model::LoadBalancer;
6977    /// let x = Finding::new()
6978    ///     .set_load_balancers([
6979    ///         LoadBalancer::default()/* use setters */,
6980    ///         LoadBalancer::default()/* use (different) setters */,
6981    ///     ]);
6982    /// ```
6983    pub fn set_load_balancers<T, V>(mut self, v: T) -> Self
6984    where
6985        T: std::iter::IntoIterator<Item = V>,
6986        V: std::convert::Into<crate::model::LoadBalancer>,
6987    {
6988        use std::iter::Iterator;
6989        self.load_balancers = v.into_iter().map(|i| i.into()).collect();
6990        self
6991    }
6992
6993    /// Sets the value of [cloud_armor][crate::model::Finding::cloud_armor].
6994    ///
6995    /// # Example
6996    /// ```ignore,no_run
6997    /// # use google_cloud_securitycenter_v2::model::Finding;
6998    /// use google_cloud_securitycenter_v2::model::CloudArmor;
6999    /// let x = Finding::new().set_cloud_armor(CloudArmor::default()/* use setters */);
7000    /// ```
7001    pub fn set_cloud_armor<T>(mut self, v: T) -> Self
7002    where
7003        T: std::convert::Into<crate::model::CloudArmor>,
7004    {
7005        self.cloud_armor = std::option::Option::Some(v.into());
7006        self
7007    }
7008
7009    /// Sets or clears the value of [cloud_armor][crate::model::Finding::cloud_armor].
7010    ///
7011    /// # Example
7012    /// ```ignore,no_run
7013    /// # use google_cloud_securitycenter_v2::model::Finding;
7014    /// use google_cloud_securitycenter_v2::model::CloudArmor;
7015    /// let x = Finding::new().set_or_clear_cloud_armor(Some(CloudArmor::default()/* use setters */));
7016    /// let x = Finding::new().set_or_clear_cloud_armor(None::<CloudArmor>);
7017    /// ```
7018    pub fn set_or_clear_cloud_armor<T>(mut self, v: std::option::Option<T>) -> Self
7019    where
7020        T: std::convert::Into<crate::model::CloudArmor>,
7021    {
7022        self.cloud_armor = v.map(|x| x.into());
7023        self
7024    }
7025
7026    /// Sets the value of [notebook][crate::model::Finding::notebook].
7027    ///
7028    /// # Example
7029    /// ```ignore,no_run
7030    /// # use google_cloud_securitycenter_v2::model::Finding;
7031    /// use google_cloud_securitycenter_v2::model::Notebook;
7032    /// let x = Finding::new().set_notebook(Notebook::default()/* use setters */);
7033    /// ```
7034    pub fn set_notebook<T>(mut self, v: T) -> Self
7035    where
7036        T: std::convert::Into<crate::model::Notebook>,
7037    {
7038        self.notebook = std::option::Option::Some(v.into());
7039        self
7040    }
7041
7042    /// Sets or clears the value of [notebook][crate::model::Finding::notebook].
7043    ///
7044    /// # Example
7045    /// ```ignore,no_run
7046    /// # use google_cloud_securitycenter_v2::model::Finding;
7047    /// use google_cloud_securitycenter_v2::model::Notebook;
7048    /// let x = Finding::new().set_or_clear_notebook(Some(Notebook::default()/* use setters */));
7049    /// let x = Finding::new().set_or_clear_notebook(None::<Notebook>);
7050    /// ```
7051    pub fn set_or_clear_notebook<T>(mut self, v: std::option::Option<T>) -> Self
7052    where
7053        T: std::convert::Into<crate::model::Notebook>,
7054    {
7055        self.notebook = v.map(|x| x.into());
7056        self
7057    }
7058
7059    /// Sets the value of [toxic_combination][crate::model::Finding::toxic_combination].
7060    ///
7061    /// # Example
7062    /// ```ignore,no_run
7063    /// # use google_cloud_securitycenter_v2::model::Finding;
7064    /// use google_cloud_securitycenter_v2::model::ToxicCombination;
7065    /// let x = Finding::new().set_toxic_combination(ToxicCombination::default()/* use setters */);
7066    /// ```
7067    pub fn set_toxic_combination<T>(mut self, v: T) -> Self
7068    where
7069        T: std::convert::Into<crate::model::ToxicCombination>,
7070    {
7071        self.toxic_combination = std::option::Option::Some(v.into());
7072        self
7073    }
7074
7075    /// Sets or clears the value of [toxic_combination][crate::model::Finding::toxic_combination].
7076    ///
7077    /// # Example
7078    /// ```ignore,no_run
7079    /// # use google_cloud_securitycenter_v2::model::Finding;
7080    /// use google_cloud_securitycenter_v2::model::ToxicCombination;
7081    /// let x = Finding::new().set_or_clear_toxic_combination(Some(ToxicCombination::default()/* use setters */));
7082    /// let x = Finding::new().set_or_clear_toxic_combination(None::<ToxicCombination>);
7083    /// ```
7084    pub fn set_or_clear_toxic_combination<T>(mut self, v: std::option::Option<T>) -> Self
7085    where
7086        T: std::convert::Into<crate::model::ToxicCombination>,
7087    {
7088        self.toxic_combination = v.map(|x| x.into());
7089        self
7090    }
7091
7092    /// Sets the value of [group_memberships][crate::model::Finding::group_memberships].
7093    ///
7094    /// # Example
7095    /// ```ignore,no_run
7096    /// # use google_cloud_securitycenter_v2::model::Finding;
7097    /// use google_cloud_securitycenter_v2::model::GroupMembership;
7098    /// let x = Finding::new()
7099    ///     .set_group_memberships([
7100    ///         GroupMembership::default()/* use setters */,
7101    ///         GroupMembership::default()/* use (different) setters */,
7102    ///     ]);
7103    /// ```
7104    pub fn set_group_memberships<T, V>(mut self, v: T) -> Self
7105    where
7106        T: std::iter::IntoIterator<Item = V>,
7107        V: std::convert::Into<crate::model::GroupMembership>,
7108    {
7109        use std::iter::Iterator;
7110        self.group_memberships = v.into_iter().map(|i| i.into()).collect();
7111        self
7112    }
7113
7114    /// Sets the value of [disk][crate::model::Finding::disk].
7115    ///
7116    /// # Example
7117    /// ```ignore,no_run
7118    /// # use google_cloud_securitycenter_v2::model::Finding;
7119    /// use google_cloud_securitycenter_v2::model::Disk;
7120    /// let x = Finding::new().set_disk(Disk::default()/* use setters */);
7121    /// ```
7122    pub fn set_disk<T>(mut self, v: T) -> Self
7123    where
7124        T: std::convert::Into<crate::model::Disk>,
7125    {
7126        self.disk = std::option::Option::Some(v.into());
7127        self
7128    }
7129
7130    /// Sets or clears the value of [disk][crate::model::Finding::disk].
7131    ///
7132    /// # Example
7133    /// ```ignore,no_run
7134    /// # use google_cloud_securitycenter_v2::model::Finding;
7135    /// use google_cloud_securitycenter_v2::model::Disk;
7136    /// let x = Finding::new().set_or_clear_disk(Some(Disk::default()/* use setters */));
7137    /// let x = Finding::new().set_or_clear_disk(None::<Disk>);
7138    /// ```
7139    pub fn set_or_clear_disk<T>(mut self, v: std::option::Option<T>) -> Self
7140    where
7141        T: std::convert::Into<crate::model::Disk>,
7142    {
7143        self.disk = v.map(|x| x.into());
7144        self
7145    }
7146
7147    /// Sets the value of [data_access_events][crate::model::Finding::data_access_events].
7148    ///
7149    /// # Example
7150    /// ```ignore,no_run
7151    /// # use google_cloud_securitycenter_v2::model::Finding;
7152    /// use google_cloud_securitycenter_v2::model::DataAccessEvent;
7153    /// let x = Finding::new()
7154    ///     .set_data_access_events([
7155    ///         DataAccessEvent::default()/* use setters */,
7156    ///         DataAccessEvent::default()/* use (different) setters */,
7157    ///     ]);
7158    /// ```
7159    pub fn set_data_access_events<T, V>(mut self, v: T) -> Self
7160    where
7161        T: std::iter::IntoIterator<Item = V>,
7162        V: std::convert::Into<crate::model::DataAccessEvent>,
7163    {
7164        use std::iter::Iterator;
7165        self.data_access_events = v.into_iter().map(|i| i.into()).collect();
7166        self
7167    }
7168
7169    /// Sets the value of [data_flow_events][crate::model::Finding::data_flow_events].
7170    ///
7171    /// # Example
7172    /// ```ignore,no_run
7173    /// # use google_cloud_securitycenter_v2::model::Finding;
7174    /// use google_cloud_securitycenter_v2::model::DataFlowEvent;
7175    /// let x = Finding::new()
7176    ///     .set_data_flow_events([
7177    ///         DataFlowEvent::default()/* use setters */,
7178    ///         DataFlowEvent::default()/* use (different) setters */,
7179    ///     ]);
7180    /// ```
7181    pub fn set_data_flow_events<T, V>(mut self, v: T) -> Self
7182    where
7183        T: std::iter::IntoIterator<Item = V>,
7184        V: std::convert::Into<crate::model::DataFlowEvent>,
7185    {
7186        use std::iter::Iterator;
7187        self.data_flow_events = v.into_iter().map(|i| i.into()).collect();
7188        self
7189    }
7190
7191    /// Sets the value of [networks][crate::model::Finding::networks].
7192    ///
7193    /// # Example
7194    /// ```ignore,no_run
7195    /// # use google_cloud_securitycenter_v2::model::Finding;
7196    /// use google_cloud_securitycenter_v2::model::Network;
7197    /// let x = Finding::new()
7198    ///     .set_networks([
7199    ///         Network::default()/* use setters */,
7200    ///         Network::default()/* use (different) setters */,
7201    ///     ]);
7202    /// ```
7203    pub fn set_networks<T, V>(mut self, v: T) -> Self
7204    where
7205        T: std::iter::IntoIterator<Item = V>,
7206        V: std::convert::Into<crate::model::Network>,
7207    {
7208        use std::iter::Iterator;
7209        self.networks = v.into_iter().map(|i| i.into()).collect();
7210        self
7211    }
7212
7213    /// Sets the value of [data_retention_deletion_events][crate::model::Finding::data_retention_deletion_events].
7214    ///
7215    /// # Example
7216    /// ```ignore,no_run
7217    /// # use google_cloud_securitycenter_v2::model::Finding;
7218    /// use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
7219    /// let x = Finding::new()
7220    ///     .set_data_retention_deletion_events([
7221    ///         DataRetentionDeletionEvent::default()/* use setters */,
7222    ///         DataRetentionDeletionEvent::default()/* use (different) setters */,
7223    ///     ]);
7224    /// ```
7225    pub fn set_data_retention_deletion_events<T, V>(mut self, v: T) -> Self
7226    where
7227        T: std::iter::IntoIterator<Item = V>,
7228        V: std::convert::Into<crate::model::DataRetentionDeletionEvent>,
7229    {
7230        use std::iter::Iterator;
7231        self.data_retention_deletion_events = v.into_iter().map(|i| i.into()).collect();
7232        self
7233    }
7234
7235    /// Sets the value of [affected_resources][crate::model::Finding::affected_resources].
7236    ///
7237    /// # Example
7238    /// ```ignore,no_run
7239    /// # use google_cloud_securitycenter_v2::model::Finding;
7240    /// use google_cloud_securitycenter_v2::model::AffectedResources;
7241    /// let x = Finding::new().set_affected_resources(AffectedResources::default()/* use setters */);
7242    /// ```
7243    pub fn set_affected_resources<T>(mut self, v: T) -> Self
7244    where
7245        T: std::convert::Into<crate::model::AffectedResources>,
7246    {
7247        self.affected_resources = std::option::Option::Some(v.into());
7248        self
7249    }
7250
7251    /// Sets or clears the value of [affected_resources][crate::model::Finding::affected_resources].
7252    ///
7253    /// # Example
7254    /// ```ignore,no_run
7255    /// # use google_cloud_securitycenter_v2::model::Finding;
7256    /// use google_cloud_securitycenter_v2::model::AffectedResources;
7257    /// let x = Finding::new().set_or_clear_affected_resources(Some(AffectedResources::default()/* use setters */));
7258    /// let x = Finding::new().set_or_clear_affected_resources(None::<AffectedResources>);
7259    /// ```
7260    pub fn set_or_clear_affected_resources<T>(mut self, v: std::option::Option<T>) -> Self
7261    where
7262        T: std::convert::Into<crate::model::AffectedResources>,
7263    {
7264        self.affected_resources = v.map(|x| x.into());
7265        self
7266    }
7267
7268    /// Sets the value of [ai_model][crate::model::Finding::ai_model].
7269    ///
7270    /// # Example
7271    /// ```ignore,no_run
7272    /// # use google_cloud_securitycenter_v2::model::Finding;
7273    /// use google_cloud_securitycenter_v2::model::AiModel;
7274    /// let x = Finding::new().set_ai_model(AiModel::default()/* use setters */);
7275    /// ```
7276    pub fn set_ai_model<T>(mut self, v: T) -> Self
7277    where
7278        T: std::convert::Into<crate::model::AiModel>,
7279    {
7280        self.ai_model = std::option::Option::Some(v.into());
7281        self
7282    }
7283
7284    /// Sets or clears the value of [ai_model][crate::model::Finding::ai_model].
7285    ///
7286    /// # Example
7287    /// ```ignore,no_run
7288    /// # use google_cloud_securitycenter_v2::model::Finding;
7289    /// use google_cloud_securitycenter_v2::model::AiModel;
7290    /// let x = Finding::new().set_or_clear_ai_model(Some(AiModel::default()/* use setters */));
7291    /// let x = Finding::new().set_or_clear_ai_model(None::<AiModel>);
7292    /// ```
7293    pub fn set_or_clear_ai_model<T>(mut self, v: std::option::Option<T>) -> Self
7294    where
7295        T: std::convert::Into<crate::model::AiModel>,
7296    {
7297        self.ai_model = v.map(|x| x.into());
7298        self
7299    }
7300
7301    /// Sets the value of [chokepoint][crate::model::Finding::chokepoint].
7302    ///
7303    /// # Example
7304    /// ```ignore,no_run
7305    /// # use google_cloud_securitycenter_v2::model::Finding;
7306    /// use google_cloud_securitycenter_v2::model::Chokepoint;
7307    /// let x = Finding::new().set_chokepoint(Chokepoint::default()/* use setters */);
7308    /// ```
7309    pub fn set_chokepoint<T>(mut self, v: T) -> Self
7310    where
7311        T: std::convert::Into<crate::model::Chokepoint>,
7312    {
7313        self.chokepoint = std::option::Option::Some(v.into());
7314        self
7315    }
7316
7317    /// Sets or clears the value of [chokepoint][crate::model::Finding::chokepoint].
7318    ///
7319    /// # Example
7320    /// ```ignore,no_run
7321    /// # use google_cloud_securitycenter_v2::model::Finding;
7322    /// use google_cloud_securitycenter_v2::model::Chokepoint;
7323    /// let x = Finding::new().set_or_clear_chokepoint(Some(Chokepoint::default()/* use setters */));
7324    /// let x = Finding::new().set_or_clear_chokepoint(None::<Chokepoint>);
7325    /// ```
7326    pub fn set_or_clear_chokepoint<T>(mut self, v: std::option::Option<T>) -> Self
7327    where
7328        T: std::convert::Into<crate::model::Chokepoint>,
7329    {
7330        self.chokepoint = v.map(|x| x.into());
7331        self
7332    }
7333
7334    /// Sets the value of [vertex_ai][crate::model::Finding::vertex_ai].
7335    ///
7336    /// # Example
7337    /// ```ignore,no_run
7338    /// # use google_cloud_securitycenter_v2::model::Finding;
7339    /// use google_cloud_securitycenter_v2::model::VertexAi;
7340    /// let x = Finding::new().set_vertex_ai(VertexAi::default()/* use setters */);
7341    /// ```
7342    pub fn set_vertex_ai<T>(mut self, v: T) -> Self
7343    where
7344        T: std::convert::Into<crate::model::VertexAi>,
7345    {
7346        self.vertex_ai = std::option::Option::Some(v.into());
7347        self
7348    }
7349
7350    /// Sets or clears the value of [vertex_ai][crate::model::Finding::vertex_ai].
7351    ///
7352    /// # Example
7353    /// ```ignore,no_run
7354    /// # use google_cloud_securitycenter_v2::model::Finding;
7355    /// use google_cloud_securitycenter_v2::model::VertexAi;
7356    /// let x = Finding::new().set_or_clear_vertex_ai(Some(VertexAi::default()/* use setters */));
7357    /// let x = Finding::new().set_or_clear_vertex_ai(None::<VertexAi>);
7358    /// ```
7359    pub fn set_or_clear_vertex_ai<T>(mut self, v: std::option::Option<T>) -> Self
7360    where
7361        T: std::convert::Into<crate::model::VertexAi>,
7362    {
7363        self.vertex_ai = v.map(|x| x.into());
7364        self
7365    }
7366}
7367
7368impl wkt::message::Message for Finding {
7369    fn typename() -> &'static str {
7370        "type.googleapis.com/google.cloud.securitycenter.v2.Finding"
7371    }
7372}
7373
7374/// Defines additional types related to [Finding].
7375pub mod finding {
7376    #[allow(unused_imports)]
7377    use super::*;
7378
7379    /// Mute information about the finding, including whether the finding has a
7380    /// static mute or any matching dynamic mute rules.
7381    #[derive(Clone, Default, PartialEq)]
7382    #[non_exhaustive]
7383    pub struct MuteInfo {
7384        /// If set, the static mute applied to this finding. Static mutes override
7385        /// dynamic mutes. If unset, there is no static mute.
7386        pub static_mute: std::option::Option<crate::model::finding::mute_info::StaticMute>,
7387
7388        /// The list of dynamic mute rules that currently match the finding.
7389        pub dynamic_mute_records:
7390            std::vec::Vec<crate::model::finding::mute_info::DynamicMuteRecord>,
7391
7392        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7393    }
7394
7395    impl MuteInfo {
7396        pub fn new() -> Self {
7397            std::default::Default::default()
7398        }
7399
7400        /// Sets the value of [static_mute][crate::model::finding::MuteInfo::static_mute].
7401        ///
7402        /// # Example
7403        /// ```ignore,no_run
7404        /// # use google_cloud_securitycenter_v2::model::finding::MuteInfo;
7405        /// use google_cloud_securitycenter_v2::model::finding::mute_info::StaticMute;
7406        /// let x = MuteInfo::new().set_static_mute(StaticMute::default()/* use setters */);
7407        /// ```
7408        pub fn set_static_mute<T>(mut self, v: T) -> Self
7409        where
7410            T: std::convert::Into<crate::model::finding::mute_info::StaticMute>,
7411        {
7412            self.static_mute = std::option::Option::Some(v.into());
7413            self
7414        }
7415
7416        /// Sets or clears the value of [static_mute][crate::model::finding::MuteInfo::static_mute].
7417        ///
7418        /// # Example
7419        /// ```ignore,no_run
7420        /// # use google_cloud_securitycenter_v2::model::finding::MuteInfo;
7421        /// use google_cloud_securitycenter_v2::model::finding::mute_info::StaticMute;
7422        /// let x = MuteInfo::new().set_or_clear_static_mute(Some(StaticMute::default()/* use setters */));
7423        /// let x = MuteInfo::new().set_or_clear_static_mute(None::<StaticMute>);
7424        /// ```
7425        pub fn set_or_clear_static_mute<T>(mut self, v: std::option::Option<T>) -> Self
7426        where
7427            T: std::convert::Into<crate::model::finding::mute_info::StaticMute>,
7428        {
7429            self.static_mute = v.map(|x| x.into());
7430            self
7431        }
7432
7433        /// Sets the value of [dynamic_mute_records][crate::model::finding::MuteInfo::dynamic_mute_records].
7434        ///
7435        /// # Example
7436        /// ```ignore,no_run
7437        /// # use google_cloud_securitycenter_v2::model::finding::MuteInfo;
7438        /// use google_cloud_securitycenter_v2::model::finding::mute_info::DynamicMuteRecord;
7439        /// let x = MuteInfo::new()
7440        ///     .set_dynamic_mute_records([
7441        ///         DynamicMuteRecord::default()/* use setters */,
7442        ///         DynamicMuteRecord::default()/* use (different) setters */,
7443        ///     ]);
7444        /// ```
7445        pub fn set_dynamic_mute_records<T, V>(mut self, v: T) -> Self
7446        where
7447            T: std::iter::IntoIterator<Item = V>,
7448            V: std::convert::Into<crate::model::finding::mute_info::DynamicMuteRecord>,
7449        {
7450            use std::iter::Iterator;
7451            self.dynamic_mute_records = v.into_iter().map(|i| i.into()).collect();
7452            self
7453        }
7454    }
7455
7456    impl wkt::message::Message for MuteInfo {
7457        fn typename() -> &'static str {
7458            "type.googleapis.com/google.cloud.securitycenter.v2.Finding.MuteInfo"
7459        }
7460    }
7461
7462    /// Defines additional types related to [MuteInfo].
7463    pub mod mute_info {
7464        #[allow(unused_imports)]
7465        use super::*;
7466
7467        /// Information about the static mute state. A static mute state overrides
7468        /// any dynamic mute rules that apply to this finding. The static mute state
7469        /// can be set by a static mute rule or by muting the finding directly.
7470        #[derive(Clone, Default, PartialEq)]
7471        #[non_exhaustive]
7472        pub struct StaticMute {
7473            /// The static mute state. If the value is `MUTED` or `UNMUTED`, then the
7474            /// finding's overall mute state will have the same value.
7475            pub state: crate::model::finding::Mute,
7476
7477            /// When the static mute was applied.
7478            pub apply_time: std::option::Option<wkt::Timestamp>,
7479
7480            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7481        }
7482
7483        impl StaticMute {
7484            pub fn new() -> Self {
7485                std::default::Default::default()
7486            }
7487
7488            /// Sets the value of [state][crate::model::finding::mute_info::StaticMute::state].
7489            ///
7490            /// # Example
7491            /// ```ignore,no_run
7492            /// # use google_cloud_securitycenter_v2::model::finding::mute_info::StaticMute;
7493            /// use google_cloud_securitycenter_v2::model::finding::Mute;
7494            /// let x0 = StaticMute::new().set_state(Mute::Muted);
7495            /// let x1 = StaticMute::new().set_state(Mute::Unmuted);
7496            /// let x2 = StaticMute::new().set_state(Mute::Undefined);
7497            /// ```
7498            pub fn set_state<T: std::convert::Into<crate::model::finding::Mute>>(
7499                mut self,
7500                v: T,
7501            ) -> Self {
7502                self.state = v.into();
7503                self
7504            }
7505
7506            /// Sets the value of [apply_time][crate::model::finding::mute_info::StaticMute::apply_time].
7507            ///
7508            /// # Example
7509            /// ```ignore,no_run
7510            /// # use google_cloud_securitycenter_v2::model::finding::mute_info::StaticMute;
7511            /// use wkt::Timestamp;
7512            /// let x = StaticMute::new().set_apply_time(Timestamp::default()/* use setters */);
7513            /// ```
7514            pub fn set_apply_time<T>(mut self, v: T) -> Self
7515            where
7516                T: std::convert::Into<wkt::Timestamp>,
7517            {
7518                self.apply_time = std::option::Option::Some(v.into());
7519                self
7520            }
7521
7522            /// Sets or clears the value of [apply_time][crate::model::finding::mute_info::StaticMute::apply_time].
7523            ///
7524            /// # Example
7525            /// ```ignore,no_run
7526            /// # use google_cloud_securitycenter_v2::model::finding::mute_info::StaticMute;
7527            /// use wkt::Timestamp;
7528            /// let x = StaticMute::new().set_or_clear_apply_time(Some(Timestamp::default()/* use setters */));
7529            /// let x = StaticMute::new().set_or_clear_apply_time(None::<Timestamp>);
7530            /// ```
7531            pub fn set_or_clear_apply_time<T>(mut self, v: std::option::Option<T>) -> Self
7532            where
7533                T: std::convert::Into<wkt::Timestamp>,
7534            {
7535                self.apply_time = v.map(|x| x.into());
7536                self
7537            }
7538        }
7539
7540        impl wkt::message::Message for StaticMute {
7541            fn typename() -> &'static str {
7542                "type.googleapis.com/google.cloud.securitycenter.v2.Finding.MuteInfo.StaticMute"
7543            }
7544        }
7545
7546        /// The record of a dynamic mute rule that matches the finding.
7547        #[derive(Clone, Default, PartialEq)]
7548        #[non_exhaustive]
7549        pub struct DynamicMuteRecord {
7550            /// The relative resource name of the mute rule, represented by a mute
7551            /// config, that created this record, for example
7552            /// `organizations/123/muteConfigs/mymuteconfig` or
7553            /// `organizations/123/locations/global/muteConfigs/mymuteconfig`.
7554            pub mute_config: std::string::String,
7555
7556            /// When the dynamic mute rule first matched the finding.
7557            pub match_time: std::option::Option<wkt::Timestamp>,
7558
7559            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7560        }
7561
7562        impl DynamicMuteRecord {
7563            pub fn new() -> Self {
7564                std::default::Default::default()
7565            }
7566
7567            /// Sets the value of [mute_config][crate::model::finding::mute_info::DynamicMuteRecord::mute_config].
7568            ///
7569            /// # Example
7570            /// ```ignore,no_run
7571            /// # use google_cloud_securitycenter_v2::model::finding::mute_info::DynamicMuteRecord;
7572            /// let x = DynamicMuteRecord::new().set_mute_config("example");
7573            /// ```
7574            pub fn set_mute_config<T: std::convert::Into<std::string::String>>(
7575                mut self,
7576                v: T,
7577            ) -> Self {
7578                self.mute_config = v.into();
7579                self
7580            }
7581
7582            /// Sets the value of [match_time][crate::model::finding::mute_info::DynamicMuteRecord::match_time].
7583            ///
7584            /// # Example
7585            /// ```ignore,no_run
7586            /// # use google_cloud_securitycenter_v2::model::finding::mute_info::DynamicMuteRecord;
7587            /// use wkt::Timestamp;
7588            /// let x = DynamicMuteRecord::new().set_match_time(Timestamp::default()/* use setters */);
7589            /// ```
7590            pub fn set_match_time<T>(mut self, v: T) -> Self
7591            where
7592                T: std::convert::Into<wkt::Timestamp>,
7593            {
7594                self.match_time = std::option::Option::Some(v.into());
7595                self
7596            }
7597
7598            /// Sets or clears the value of [match_time][crate::model::finding::mute_info::DynamicMuteRecord::match_time].
7599            ///
7600            /// # Example
7601            /// ```ignore,no_run
7602            /// # use google_cloud_securitycenter_v2::model::finding::mute_info::DynamicMuteRecord;
7603            /// use wkt::Timestamp;
7604            /// let x = DynamicMuteRecord::new().set_or_clear_match_time(Some(Timestamp::default()/* use setters */));
7605            /// let x = DynamicMuteRecord::new().set_or_clear_match_time(None::<Timestamp>);
7606            /// ```
7607            pub fn set_or_clear_match_time<T>(mut self, v: std::option::Option<T>) -> Self
7608            where
7609                T: std::convert::Into<wkt::Timestamp>,
7610            {
7611                self.match_time = v.map(|x| x.into());
7612                self
7613            }
7614        }
7615
7616        impl wkt::message::Message for DynamicMuteRecord {
7617            fn typename() -> &'static str {
7618                "type.googleapis.com/google.cloud.securitycenter.v2.Finding.MuteInfo.DynamicMuteRecord"
7619            }
7620        }
7621    }
7622
7623    /// The state of the finding.
7624    ///
7625    /// # Working with unknown values
7626    ///
7627    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7628    /// additional enum variants at any time. Adding new variants is not considered
7629    /// a breaking change. Applications should write their code in anticipation of:
7630    ///
7631    /// - New values appearing in future releases of the client library, **and**
7632    /// - New values received dynamically, without application changes.
7633    ///
7634    /// Please consult the [Working with enums] section in the user guide for some
7635    /// guidelines.
7636    ///
7637    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
7638    #[derive(Clone, Debug, PartialEq)]
7639    #[non_exhaustive]
7640    pub enum State {
7641        /// Unspecified state.
7642        Unspecified,
7643        /// The finding requires attention and has not been addressed yet.
7644        Active,
7645        /// The finding has been fixed, triaged as a non-issue or otherwise addressed
7646        /// and is no longer active.
7647        Inactive,
7648        /// If set, the enum was initialized with an unknown value.
7649        ///
7650        /// Applications can examine the value using [State::value] or
7651        /// [State::name].
7652        UnknownValue(state::UnknownValue),
7653    }
7654
7655    #[doc(hidden)]
7656    pub mod state {
7657        #[allow(unused_imports)]
7658        use super::*;
7659        #[derive(Clone, Debug, PartialEq)]
7660        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7661    }
7662
7663    impl State {
7664        /// Gets the enum value.
7665        ///
7666        /// Returns `None` if the enum contains an unknown value deserialized from
7667        /// the string representation of enums.
7668        pub fn value(&self) -> std::option::Option<i32> {
7669            match self {
7670                Self::Unspecified => std::option::Option::Some(0),
7671                Self::Active => std::option::Option::Some(1),
7672                Self::Inactive => std::option::Option::Some(2),
7673                Self::UnknownValue(u) => u.0.value(),
7674            }
7675        }
7676
7677        /// Gets the enum value as a string.
7678        ///
7679        /// Returns `None` if the enum contains an unknown value deserialized from
7680        /// the integer representation of enums.
7681        pub fn name(&self) -> std::option::Option<&str> {
7682            match self {
7683                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
7684                Self::Active => std::option::Option::Some("ACTIVE"),
7685                Self::Inactive => std::option::Option::Some("INACTIVE"),
7686                Self::UnknownValue(u) => u.0.name(),
7687            }
7688        }
7689    }
7690
7691    impl std::default::Default for State {
7692        fn default() -> Self {
7693            use std::convert::From;
7694            Self::from(0)
7695        }
7696    }
7697
7698    impl std::fmt::Display for State {
7699        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7700            wkt::internal::display_enum(f, self.name(), self.value())
7701        }
7702    }
7703
7704    impl std::convert::From<i32> for State {
7705        fn from(value: i32) -> Self {
7706            match value {
7707                0 => Self::Unspecified,
7708                1 => Self::Active,
7709                2 => Self::Inactive,
7710                _ => Self::UnknownValue(state::UnknownValue(
7711                    wkt::internal::UnknownEnumValue::Integer(value),
7712                )),
7713            }
7714        }
7715    }
7716
7717    impl std::convert::From<&str> for State {
7718        fn from(value: &str) -> Self {
7719            use std::string::ToString;
7720            match value {
7721                "STATE_UNSPECIFIED" => Self::Unspecified,
7722                "ACTIVE" => Self::Active,
7723                "INACTIVE" => Self::Inactive,
7724                _ => Self::UnknownValue(state::UnknownValue(
7725                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7726                )),
7727            }
7728        }
7729    }
7730
7731    impl serde::ser::Serialize for State {
7732        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7733        where
7734            S: serde::Serializer,
7735        {
7736            match self {
7737                Self::Unspecified => serializer.serialize_i32(0),
7738                Self::Active => serializer.serialize_i32(1),
7739                Self::Inactive => serializer.serialize_i32(2),
7740                Self::UnknownValue(u) => u.0.serialize(serializer),
7741            }
7742        }
7743    }
7744
7745    impl<'de> serde::de::Deserialize<'de> for State {
7746        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7747        where
7748            D: serde::Deserializer<'de>,
7749        {
7750            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
7751                ".google.cloud.securitycenter.v2.Finding.State",
7752            ))
7753        }
7754    }
7755
7756    /// The severity of the finding.
7757    ///
7758    /// # Working with unknown values
7759    ///
7760    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7761    /// additional enum variants at any time. Adding new variants is not considered
7762    /// a breaking change. Applications should write their code in anticipation of:
7763    ///
7764    /// - New values appearing in future releases of the client library, **and**
7765    /// - New values received dynamically, without application changes.
7766    ///
7767    /// Please consult the [Working with enums] section in the user guide for some
7768    /// guidelines.
7769    ///
7770    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
7771    #[derive(Clone, Debug, PartialEq)]
7772    #[non_exhaustive]
7773    pub enum Severity {
7774        /// This value is used for findings when a source doesn't write a severity
7775        /// value.
7776        Unspecified,
7777        /// Vulnerability:
7778        /// A critical vulnerability is easily discoverable by an external actor,
7779        /// exploitable, and results in the direct ability to execute arbitrary code,
7780        /// exfiltrate data, and otherwise gain additional access and privileges to
7781        /// cloud resources and workloads. Examples include publicly accessible
7782        /// unprotected user data and public SSH access with weak or no
7783        /// passwords.
7784        ///
7785        /// Threat:
7786        /// Indicates a threat that is able to access, modify, or delete data or
7787        /// execute unauthorized code within existing resources.
7788        Critical,
7789        /// Vulnerability:
7790        /// A high risk vulnerability can be easily discovered and exploited in
7791        /// combination with other vulnerabilities in order to gain direct access and
7792        /// the ability to execute arbitrary code, exfiltrate data, and otherwise
7793        /// gain additional access and privileges to cloud resources and workloads.
7794        /// An example is a database with weak or no passwords that is only
7795        /// accessible internally. This database could easily be compromised by an
7796        /// actor that had access to the internal network.
7797        ///
7798        /// Threat:
7799        /// Indicates a threat that is able to create new computational resources in
7800        /// an environment but not able to access data or execute code in existing
7801        /// resources.
7802        High,
7803        /// Vulnerability:
7804        /// A medium risk vulnerability could be used by an actor to gain access to
7805        /// resources or privileges that enable them to eventually (through multiple
7806        /// steps or a complex exploit) gain access and the ability to execute
7807        /// arbitrary code or exfiltrate data. An example is a service account with
7808        /// access to more projects than it should have. If an actor gains access to
7809        /// the service account, they could potentially use that access to manipulate
7810        /// a project the service account was not intended to.
7811        ///
7812        /// Threat:
7813        /// Indicates a threat that is able to cause operational impact but may not
7814        /// access data or execute unauthorized code.
7815        Medium,
7816        /// Vulnerability:
7817        /// A low risk vulnerability hampers a security organization's ability to
7818        /// detect vulnerabilities or active threats in their deployment, or prevents
7819        /// the root cause investigation of security issues. An example is monitoring
7820        /// and logs being disabled for resource configurations and access.
7821        ///
7822        /// Threat:
7823        /// Indicates a threat that has obtained minimal access to an environment but
7824        /// is not able to access data, execute code, or create resources.
7825        Low,
7826        /// If set, the enum was initialized with an unknown value.
7827        ///
7828        /// Applications can examine the value using [Severity::value] or
7829        /// [Severity::name].
7830        UnknownValue(severity::UnknownValue),
7831    }
7832
7833    #[doc(hidden)]
7834    pub mod severity {
7835        #[allow(unused_imports)]
7836        use super::*;
7837        #[derive(Clone, Debug, PartialEq)]
7838        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7839    }
7840
7841    impl Severity {
7842        /// Gets the enum value.
7843        ///
7844        /// Returns `None` if the enum contains an unknown value deserialized from
7845        /// the string representation of enums.
7846        pub fn value(&self) -> std::option::Option<i32> {
7847            match self {
7848                Self::Unspecified => std::option::Option::Some(0),
7849                Self::Critical => std::option::Option::Some(1),
7850                Self::High => std::option::Option::Some(2),
7851                Self::Medium => std::option::Option::Some(3),
7852                Self::Low => std::option::Option::Some(4),
7853                Self::UnknownValue(u) => u.0.value(),
7854            }
7855        }
7856
7857        /// Gets the enum value as a string.
7858        ///
7859        /// Returns `None` if the enum contains an unknown value deserialized from
7860        /// the integer representation of enums.
7861        pub fn name(&self) -> std::option::Option<&str> {
7862            match self {
7863                Self::Unspecified => std::option::Option::Some("SEVERITY_UNSPECIFIED"),
7864                Self::Critical => std::option::Option::Some("CRITICAL"),
7865                Self::High => std::option::Option::Some("HIGH"),
7866                Self::Medium => std::option::Option::Some("MEDIUM"),
7867                Self::Low => std::option::Option::Some("LOW"),
7868                Self::UnknownValue(u) => u.0.name(),
7869            }
7870        }
7871    }
7872
7873    impl std::default::Default for Severity {
7874        fn default() -> Self {
7875            use std::convert::From;
7876            Self::from(0)
7877        }
7878    }
7879
7880    impl std::fmt::Display for Severity {
7881        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7882            wkt::internal::display_enum(f, self.name(), self.value())
7883        }
7884    }
7885
7886    impl std::convert::From<i32> for Severity {
7887        fn from(value: i32) -> Self {
7888            match value {
7889                0 => Self::Unspecified,
7890                1 => Self::Critical,
7891                2 => Self::High,
7892                3 => Self::Medium,
7893                4 => Self::Low,
7894                _ => Self::UnknownValue(severity::UnknownValue(
7895                    wkt::internal::UnknownEnumValue::Integer(value),
7896                )),
7897            }
7898        }
7899    }
7900
7901    impl std::convert::From<&str> for Severity {
7902        fn from(value: &str) -> Self {
7903            use std::string::ToString;
7904            match value {
7905                "SEVERITY_UNSPECIFIED" => Self::Unspecified,
7906                "CRITICAL" => Self::Critical,
7907                "HIGH" => Self::High,
7908                "MEDIUM" => Self::Medium,
7909                "LOW" => Self::Low,
7910                _ => Self::UnknownValue(severity::UnknownValue(
7911                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7912                )),
7913            }
7914        }
7915    }
7916
7917    impl serde::ser::Serialize for Severity {
7918        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7919        where
7920            S: serde::Serializer,
7921        {
7922            match self {
7923                Self::Unspecified => serializer.serialize_i32(0),
7924                Self::Critical => serializer.serialize_i32(1),
7925                Self::High => serializer.serialize_i32(2),
7926                Self::Medium => serializer.serialize_i32(3),
7927                Self::Low => serializer.serialize_i32(4),
7928                Self::UnknownValue(u) => u.0.serialize(serializer),
7929            }
7930        }
7931    }
7932
7933    impl<'de> serde::de::Deserialize<'de> for Severity {
7934        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7935        where
7936            D: serde::Deserializer<'de>,
7937        {
7938            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Severity>::new(
7939                ".google.cloud.securitycenter.v2.Finding.Severity",
7940            ))
7941        }
7942    }
7943
7944    /// Mute state a finding can be in.
7945    ///
7946    /// # Working with unknown values
7947    ///
7948    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7949    /// additional enum variants at any time. Adding new variants is not considered
7950    /// a breaking change. Applications should write their code in anticipation of:
7951    ///
7952    /// - New values appearing in future releases of the client library, **and**
7953    /// - New values received dynamically, without application changes.
7954    ///
7955    /// Please consult the [Working with enums] section in the user guide for some
7956    /// guidelines.
7957    ///
7958    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
7959    #[derive(Clone, Debug, PartialEq)]
7960    #[non_exhaustive]
7961    pub enum Mute {
7962        /// Unspecified.
7963        Unspecified,
7964        /// Finding has been muted.
7965        Muted,
7966        /// Finding has been unmuted.
7967        Unmuted,
7968        /// Finding has never been muted/unmuted.
7969        Undefined,
7970        /// If set, the enum was initialized with an unknown value.
7971        ///
7972        /// Applications can examine the value using [Mute::value] or
7973        /// [Mute::name].
7974        UnknownValue(mute::UnknownValue),
7975    }
7976
7977    #[doc(hidden)]
7978    pub mod mute {
7979        #[allow(unused_imports)]
7980        use super::*;
7981        #[derive(Clone, Debug, PartialEq)]
7982        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7983    }
7984
7985    impl Mute {
7986        /// Gets the enum value.
7987        ///
7988        /// Returns `None` if the enum contains an unknown value deserialized from
7989        /// the string representation of enums.
7990        pub fn value(&self) -> std::option::Option<i32> {
7991            match self {
7992                Self::Unspecified => std::option::Option::Some(0),
7993                Self::Muted => std::option::Option::Some(1),
7994                Self::Unmuted => std::option::Option::Some(2),
7995                Self::Undefined => std::option::Option::Some(3),
7996                Self::UnknownValue(u) => u.0.value(),
7997            }
7998        }
7999
8000        /// Gets the enum value as a string.
8001        ///
8002        /// Returns `None` if the enum contains an unknown value deserialized from
8003        /// the integer representation of enums.
8004        pub fn name(&self) -> std::option::Option<&str> {
8005            match self {
8006                Self::Unspecified => std::option::Option::Some("MUTE_UNSPECIFIED"),
8007                Self::Muted => std::option::Option::Some("MUTED"),
8008                Self::Unmuted => std::option::Option::Some("UNMUTED"),
8009                Self::Undefined => std::option::Option::Some("UNDEFINED"),
8010                Self::UnknownValue(u) => u.0.name(),
8011            }
8012        }
8013    }
8014
8015    impl std::default::Default for Mute {
8016        fn default() -> Self {
8017            use std::convert::From;
8018            Self::from(0)
8019        }
8020    }
8021
8022    impl std::fmt::Display for Mute {
8023        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8024            wkt::internal::display_enum(f, self.name(), self.value())
8025        }
8026    }
8027
8028    impl std::convert::From<i32> for Mute {
8029        fn from(value: i32) -> Self {
8030            match value {
8031                0 => Self::Unspecified,
8032                1 => Self::Muted,
8033                2 => Self::Unmuted,
8034                3 => Self::Undefined,
8035                _ => Self::UnknownValue(mute::UnknownValue(
8036                    wkt::internal::UnknownEnumValue::Integer(value),
8037                )),
8038            }
8039        }
8040    }
8041
8042    impl std::convert::From<&str> for Mute {
8043        fn from(value: &str) -> Self {
8044            use std::string::ToString;
8045            match value {
8046                "MUTE_UNSPECIFIED" => Self::Unspecified,
8047                "MUTED" => Self::Muted,
8048                "UNMUTED" => Self::Unmuted,
8049                "UNDEFINED" => Self::Undefined,
8050                _ => Self::UnknownValue(mute::UnknownValue(
8051                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8052                )),
8053            }
8054        }
8055    }
8056
8057    impl serde::ser::Serialize for Mute {
8058        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8059        where
8060            S: serde::Serializer,
8061        {
8062            match self {
8063                Self::Unspecified => serializer.serialize_i32(0),
8064                Self::Muted => serializer.serialize_i32(1),
8065                Self::Unmuted => serializer.serialize_i32(2),
8066                Self::Undefined => serializer.serialize_i32(3),
8067                Self::UnknownValue(u) => u.0.serialize(serializer),
8068            }
8069        }
8070    }
8071
8072    impl<'de> serde::de::Deserialize<'de> for Mute {
8073        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8074        where
8075            D: serde::Deserializer<'de>,
8076        {
8077            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mute>::new(
8078                ".google.cloud.securitycenter.v2.Finding.Mute",
8079            ))
8080        }
8081    }
8082
8083    /// Represents what kind of Finding it is.
8084    ///
8085    /// # Working with unknown values
8086    ///
8087    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8088    /// additional enum variants at any time. Adding new variants is not considered
8089    /// a breaking change. Applications should write their code in anticipation of:
8090    ///
8091    /// - New values appearing in future releases of the client library, **and**
8092    /// - New values received dynamically, without application changes.
8093    ///
8094    /// Please consult the [Working with enums] section in the user guide for some
8095    /// guidelines.
8096    ///
8097    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
8098    #[derive(Clone, Debug, PartialEq)]
8099    #[non_exhaustive]
8100    pub enum FindingClass {
8101        /// Unspecified finding class.
8102        Unspecified,
8103        /// Describes unwanted or malicious activity.
8104        Threat,
8105        /// Describes a potential weakness in software that increases risk to
8106        /// Confidentiality & Integrity & Availability.
8107        Vulnerability,
8108        /// Describes a potential weakness in cloud resource/asset configuration that
8109        /// increases risk.
8110        Misconfiguration,
8111        /// Describes a security observation that is for informational purposes.
8112        Observation,
8113        /// Describes an error that prevents some SCC functionality.
8114        SccError,
8115        /// Describes a potential security risk due to a change in the security
8116        /// posture.
8117        PostureViolation,
8118        /// Describes a combination of security issues that represent a more severe
8119        /// security problem when taken together.
8120        ToxicCombination,
8121        /// Describes a potential security risk to data assets that contain sensitive
8122        /// data.
8123        SensitiveDataRisk,
8124        /// Describes a resource or resource group where high risk attack paths
8125        /// converge, based on attack path simulations (APS).
8126        Chokepoint,
8127        /// If set, the enum was initialized with an unknown value.
8128        ///
8129        /// Applications can examine the value using [FindingClass::value] or
8130        /// [FindingClass::name].
8131        UnknownValue(finding_class::UnknownValue),
8132    }
8133
8134    #[doc(hidden)]
8135    pub mod finding_class {
8136        #[allow(unused_imports)]
8137        use super::*;
8138        #[derive(Clone, Debug, PartialEq)]
8139        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8140    }
8141
8142    impl FindingClass {
8143        /// Gets the enum value.
8144        ///
8145        /// Returns `None` if the enum contains an unknown value deserialized from
8146        /// the string representation of enums.
8147        pub fn value(&self) -> std::option::Option<i32> {
8148            match self {
8149                Self::Unspecified => std::option::Option::Some(0),
8150                Self::Threat => std::option::Option::Some(1),
8151                Self::Vulnerability => std::option::Option::Some(2),
8152                Self::Misconfiguration => std::option::Option::Some(3),
8153                Self::Observation => std::option::Option::Some(4),
8154                Self::SccError => std::option::Option::Some(5),
8155                Self::PostureViolation => std::option::Option::Some(6),
8156                Self::ToxicCombination => std::option::Option::Some(7),
8157                Self::SensitiveDataRisk => std::option::Option::Some(8),
8158                Self::Chokepoint => std::option::Option::Some(9),
8159                Self::UnknownValue(u) => u.0.value(),
8160            }
8161        }
8162
8163        /// Gets the enum value as a string.
8164        ///
8165        /// Returns `None` if the enum contains an unknown value deserialized from
8166        /// the integer representation of enums.
8167        pub fn name(&self) -> std::option::Option<&str> {
8168            match self {
8169                Self::Unspecified => std::option::Option::Some("FINDING_CLASS_UNSPECIFIED"),
8170                Self::Threat => std::option::Option::Some("THREAT"),
8171                Self::Vulnerability => std::option::Option::Some("VULNERABILITY"),
8172                Self::Misconfiguration => std::option::Option::Some("MISCONFIGURATION"),
8173                Self::Observation => std::option::Option::Some("OBSERVATION"),
8174                Self::SccError => std::option::Option::Some("SCC_ERROR"),
8175                Self::PostureViolation => std::option::Option::Some("POSTURE_VIOLATION"),
8176                Self::ToxicCombination => std::option::Option::Some("TOXIC_COMBINATION"),
8177                Self::SensitiveDataRisk => std::option::Option::Some("SENSITIVE_DATA_RISK"),
8178                Self::Chokepoint => std::option::Option::Some("CHOKEPOINT"),
8179                Self::UnknownValue(u) => u.0.name(),
8180            }
8181        }
8182    }
8183
8184    impl std::default::Default for FindingClass {
8185        fn default() -> Self {
8186            use std::convert::From;
8187            Self::from(0)
8188        }
8189    }
8190
8191    impl std::fmt::Display for FindingClass {
8192        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8193            wkt::internal::display_enum(f, self.name(), self.value())
8194        }
8195    }
8196
8197    impl std::convert::From<i32> for FindingClass {
8198        fn from(value: i32) -> Self {
8199            match value {
8200                0 => Self::Unspecified,
8201                1 => Self::Threat,
8202                2 => Self::Vulnerability,
8203                3 => Self::Misconfiguration,
8204                4 => Self::Observation,
8205                5 => Self::SccError,
8206                6 => Self::PostureViolation,
8207                7 => Self::ToxicCombination,
8208                8 => Self::SensitiveDataRisk,
8209                9 => Self::Chokepoint,
8210                _ => Self::UnknownValue(finding_class::UnknownValue(
8211                    wkt::internal::UnknownEnumValue::Integer(value),
8212                )),
8213            }
8214        }
8215    }
8216
8217    impl std::convert::From<&str> for FindingClass {
8218        fn from(value: &str) -> Self {
8219            use std::string::ToString;
8220            match value {
8221                "FINDING_CLASS_UNSPECIFIED" => Self::Unspecified,
8222                "THREAT" => Self::Threat,
8223                "VULNERABILITY" => Self::Vulnerability,
8224                "MISCONFIGURATION" => Self::Misconfiguration,
8225                "OBSERVATION" => Self::Observation,
8226                "SCC_ERROR" => Self::SccError,
8227                "POSTURE_VIOLATION" => Self::PostureViolation,
8228                "TOXIC_COMBINATION" => Self::ToxicCombination,
8229                "SENSITIVE_DATA_RISK" => Self::SensitiveDataRisk,
8230                "CHOKEPOINT" => Self::Chokepoint,
8231                _ => Self::UnknownValue(finding_class::UnknownValue(
8232                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8233                )),
8234            }
8235        }
8236    }
8237
8238    impl serde::ser::Serialize for FindingClass {
8239        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8240        where
8241            S: serde::Serializer,
8242        {
8243            match self {
8244                Self::Unspecified => serializer.serialize_i32(0),
8245                Self::Threat => serializer.serialize_i32(1),
8246                Self::Vulnerability => serializer.serialize_i32(2),
8247                Self::Misconfiguration => serializer.serialize_i32(3),
8248                Self::Observation => serializer.serialize_i32(4),
8249                Self::SccError => serializer.serialize_i32(5),
8250                Self::PostureViolation => serializer.serialize_i32(6),
8251                Self::ToxicCombination => serializer.serialize_i32(7),
8252                Self::SensitiveDataRisk => serializer.serialize_i32(8),
8253                Self::Chokepoint => serializer.serialize_i32(9),
8254                Self::UnknownValue(u) => u.0.serialize(serializer),
8255            }
8256        }
8257    }
8258
8259    impl<'de> serde::de::Deserialize<'de> for FindingClass {
8260        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8261        where
8262            D: serde::Deserializer<'de>,
8263        {
8264            deserializer.deserialize_any(wkt::internal::EnumVisitor::<FindingClass>::new(
8265                ".google.cloud.securitycenter.v2.Finding.FindingClass",
8266            ))
8267        }
8268    }
8269}
8270
8271/// Message that contains the resource name and display name of a folder
8272/// resource.
8273#[derive(Clone, Default, PartialEq)]
8274#[non_exhaustive]
8275pub struct Folder {
8276    /// Full resource name of this folder. See:
8277    /// <https://cloud.google.com/apis/design/resource_names#full_resource_name>
8278    pub resource_folder: std::string::String,
8279
8280    /// The user defined display name for this folder.
8281    pub resource_folder_display_name: std::string::String,
8282
8283    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8284}
8285
8286impl Folder {
8287    pub fn new() -> Self {
8288        std::default::Default::default()
8289    }
8290
8291    /// Sets the value of [resource_folder][crate::model::Folder::resource_folder].
8292    ///
8293    /// # Example
8294    /// ```ignore,no_run
8295    /// # use google_cloud_securitycenter_v2::model::Folder;
8296    /// let x = Folder::new().set_resource_folder("example");
8297    /// ```
8298    pub fn set_resource_folder<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8299        self.resource_folder = v.into();
8300        self
8301    }
8302
8303    /// Sets the value of [resource_folder_display_name][crate::model::Folder::resource_folder_display_name].
8304    ///
8305    /// # Example
8306    /// ```ignore,no_run
8307    /// # use google_cloud_securitycenter_v2::model::Folder;
8308    /// let x = Folder::new().set_resource_folder_display_name("example");
8309    /// ```
8310    pub fn set_resource_folder_display_name<T: std::convert::Into<std::string::String>>(
8311        mut self,
8312        v: T,
8313    ) -> Self {
8314        self.resource_folder_display_name = v.into();
8315        self
8316    }
8317}
8318
8319impl wkt::message::Message for Folder {
8320    fn typename() -> &'static str {
8321        "type.googleapis.com/google.cloud.securitycenter.v2.Folder"
8322    }
8323}
8324
8325/// Contains details about groups of which this finding is a member. A group is a
8326/// collection of findings that are related in some way.
8327#[derive(Clone, Default, PartialEq)]
8328#[non_exhaustive]
8329pub struct GroupMembership {
8330    /// Type of group.
8331    pub group_type: crate::model::group_membership::GroupType,
8332
8333    /// ID of the group.
8334    pub group_id: std::string::String,
8335
8336    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8337}
8338
8339impl GroupMembership {
8340    pub fn new() -> Self {
8341        std::default::Default::default()
8342    }
8343
8344    /// Sets the value of [group_type][crate::model::GroupMembership::group_type].
8345    ///
8346    /// # Example
8347    /// ```ignore,no_run
8348    /// # use google_cloud_securitycenter_v2::model::GroupMembership;
8349    /// use google_cloud_securitycenter_v2::model::group_membership::GroupType;
8350    /// let x0 = GroupMembership::new().set_group_type(GroupType::ToxicCombination);
8351    /// let x1 = GroupMembership::new().set_group_type(GroupType::Chokepoint);
8352    /// ```
8353    pub fn set_group_type<T: std::convert::Into<crate::model::group_membership::GroupType>>(
8354        mut self,
8355        v: T,
8356    ) -> Self {
8357        self.group_type = v.into();
8358        self
8359    }
8360
8361    /// Sets the value of [group_id][crate::model::GroupMembership::group_id].
8362    ///
8363    /// # Example
8364    /// ```ignore,no_run
8365    /// # use google_cloud_securitycenter_v2::model::GroupMembership;
8366    /// let x = GroupMembership::new().set_group_id("example");
8367    /// ```
8368    pub fn set_group_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8369        self.group_id = v.into();
8370        self
8371    }
8372}
8373
8374impl wkt::message::Message for GroupMembership {
8375    fn typename() -> &'static str {
8376        "type.googleapis.com/google.cloud.securitycenter.v2.GroupMembership"
8377    }
8378}
8379
8380/// Defines additional types related to [GroupMembership].
8381pub mod group_membership {
8382    #[allow(unused_imports)]
8383    use super::*;
8384
8385    /// Possible types of groups.
8386    ///
8387    /// # Working with unknown values
8388    ///
8389    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8390    /// additional enum variants at any time. Adding new variants is not considered
8391    /// a breaking change. Applications should write their code in anticipation of:
8392    ///
8393    /// - New values appearing in future releases of the client library, **and**
8394    /// - New values received dynamically, without application changes.
8395    ///
8396    /// Please consult the [Working with enums] section in the user guide for some
8397    /// guidelines.
8398    ///
8399    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
8400    #[derive(Clone, Debug, PartialEq)]
8401    #[non_exhaustive]
8402    pub enum GroupType {
8403        /// Default value.
8404        Unspecified,
8405        /// Group represents a toxic combination.
8406        ToxicCombination,
8407        /// Group represents a chokepoint.
8408        Chokepoint,
8409        /// If set, the enum was initialized with an unknown value.
8410        ///
8411        /// Applications can examine the value using [GroupType::value] or
8412        /// [GroupType::name].
8413        UnknownValue(group_type::UnknownValue),
8414    }
8415
8416    #[doc(hidden)]
8417    pub mod group_type {
8418        #[allow(unused_imports)]
8419        use super::*;
8420        #[derive(Clone, Debug, PartialEq)]
8421        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8422    }
8423
8424    impl GroupType {
8425        /// Gets the enum value.
8426        ///
8427        /// Returns `None` if the enum contains an unknown value deserialized from
8428        /// the string representation of enums.
8429        pub fn value(&self) -> std::option::Option<i32> {
8430            match self {
8431                Self::Unspecified => std::option::Option::Some(0),
8432                Self::ToxicCombination => std::option::Option::Some(1),
8433                Self::Chokepoint => std::option::Option::Some(3),
8434                Self::UnknownValue(u) => u.0.value(),
8435            }
8436        }
8437
8438        /// Gets the enum value as a string.
8439        ///
8440        /// Returns `None` if the enum contains an unknown value deserialized from
8441        /// the integer representation of enums.
8442        pub fn name(&self) -> std::option::Option<&str> {
8443            match self {
8444                Self::Unspecified => std::option::Option::Some("GROUP_TYPE_UNSPECIFIED"),
8445                Self::ToxicCombination => std::option::Option::Some("GROUP_TYPE_TOXIC_COMBINATION"),
8446                Self::Chokepoint => std::option::Option::Some("GROUP_TYPE_CHOKEPOINT"),
8447                Self::UnknownValue(u) => u.0.name(),
8448            }
8449        }
8450    }
8451
8452    impl std::default::Default for GroupType {
8453        fn default() -> Self {
8454            use std::convert::From;
8455            Self::from(0)
8456        }
8457    }
8458
8459    impl std::fmt::Display for GroupType {
8460        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8461            wkt::internal::display_enum(f, self.name(), self.value())
8462        }
8463    }
8464
8465    impl std::convert::From<i32> for GroupType {
8466        fn from(value: i32) -> Self {
8467            match value {
8468                0 => Self::Unspecified,
8469                1 => Self::ToxicCombination,
8470                3 => Self::Chokepoint,
8471                _ => Self::UnknownValue(group_type::UnknownValue(
8472                    wkt::internal::UnknownEnumValue::Integer(value),
8473                )),
8474            }
8475        }
8476    }
8477
8478    impl std::convert::From<&str> for GroupType {
8479        fn from(value: &str) -> Self {
8480            use std::string::ToString;
8481            match value {
8482                "GROUP_TYPE_UNSPECIFIED" => Self::Unspecified,
8483                "GROUP_TYPE_TOXIC_COMBINATION" => Self::ToxicCombination,
8484                "GROUP_TYPE_CHOKEPOINT" => Self::Chokepoint,
8485                _ => Self::UnknownValue(group_type::UnknownValue(
8486                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8487                )),
8488            }
8489        }
8490    }
8491
8492    impl serde::ser::Serialize for GroupType {
8493        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8494        where
8495            S: serde::Serializer,
8496        {
8497            match self {
8498                Self::Unspecified => serializer.serialize_i32(0),
8499                Self::ToxicCombination => serializer.serialize_i32(1),
8500                Self::Chokepoint => serializer.serialize_i32(3),
8501                Self::UnknownValue(u) => u.0.serialize(serializer),
8502            }
8503        }
8504    }
8505
8506    impl<'de> serde::de::Deserialize<'de> for GroupType {
8507        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8508        where
8509            D: serde::Deserializer<'de>,
8510        {
8511            deserializer.deserialize_any(wkt::internal::EnumVisitor::<GroupType>::new(
8512                ".google.cloud.securitycenter.v2.GroupMembership.GroupType",
8513            ))
8514        }
8515    }
8516}
8517
8518/// Represents a particular IAM binding, which captures a member's role addition,
8519/// removal, or state.
8520#[derive(Clone, Default, PartialEq)]
8521#[non_exhaustive]
8522pub struct IamBinding {
8523    /// The action that was performed on a Binding.
8524    pub action: crate::model::iam_binding::Action,
8525
8526    /// Role that is assigned to "members".
8527    /// For example, "roles/viewer", "roles/editor", or "roles/owner".
8528    pub role: std::string::String,
8529
8530    /// A single identity requesting access for a Cloud Platform resource, for
8531    /// example, "foo@google.com".
8532    pub member: std::string::String,
8533
8534    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8535}
8536
8537impl IamBinding {
8538    pub fn new() -> Self {
8539        std::default::Default::default()
8540    }
8541
8542    /// Sets the value of [action][crate::model::IamBinding::action].
8543    ///
8544    /// # Example
8545    /// ```ignore,no_run
8546    /// # use google_cloud_securitycenter_v2::model::IamBinding;
8547    /// use google_cloud_securitycenter_v2::model::iam_binding::Action;
8548    /// let x0 = IamBinding::new().set_action(Action::Add);
8549    /// let x1 = IamBinding::new().set_action(Action::Remove);
8550    /// ```
8551    pub fn set_action<T: std::convert::Into<crate::model::iam_binding::Action>>(
8552        mut self,
8553        v: T,
8554    ) -> Self {
8555        self.action = v.into();
8556        self
8557    }
8558
8559    /// Sets the value of [role][crate::model::IamBinding::role].
8560    ///
8561    /// # Example
8562    /// ```ignore,no_run
8563    /// # use google_cloud_securitycenter_v2::model::IamBinding;
8564    /// let x = IamBinding::new().set_role("example");
8565    /// ```
8566    pub fn set_role<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8567        self.role = v.into();
8568        self
8569    }
8570
8571    /// Sets the value of [member][crate::model::IamBinding::member].
8572    ///
8573    /// # Example
8574    /// ```ignore,no_run
8575    /// # use google_cloud_securitycenter_v2::model::IamBinding;
8576    /// let x = IamBinding::new().set_member("example");
8577    /// ```
8578    pub fn set_member<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8579        self.member = v.into();
8580        self
8581    }
8582}
8583
8584impl wkt::message::Message for IamBinding {
8585    fn typename() -> &'static str {
8586        "type.googleapis.com/google.cloud.securitycenter.v2.IamBinding"
8587    }
8588}
8589
8590/// Defines additional types related to [IamBinding].
8591pub mod iam_binding {
8592    #[allow(unused_imports)]
8593    use super::*;
8594
8595    /// The type of action performed on a Binding in a policy.
8596    ///
8597    /// # Working with unknown values
8598    ///
8599    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8600    /// additional enum variants at any time. Adding new variants is not considered
8601    /// a breaking change. Applications should write their code in anticipation of:
8602    ///
8603    /// - New values appearing in future releases of the client library, **and**
8604    /// - New values received dynamically, without application changes.
8605    ///
8606    /// Please consult the [Working with enums] section in the user guide for some
8607    /// guidelines.
8608    ///
8609    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
8610    #[derive(Clone, Debug, PartialEq)]
8611    #[non_exhaustive]
8612    pub enum Action {
8613        /// Unspecified.
8614        Unspecified,
8615        /// Addition of a Binding.
8616        Add,
8617        /// Removal of a Binding.
8618        Remove,
8619        /// If set, the enum was initialized with an unknown value.
8620        ///
8621        /// Applications can examine the value using [Action::value] or
8622        /// [Action::name].
8623        UnknownValue(action::UnknownValue),
8624    }
8625
8626    #[doc(hidden)]
8627    pub mod action {
8628        #[allow(unused_imports)]
8629        use super::*;
8630        #[derive(Clone, Debug, PartialEq)]
8631        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8632    }
8633
8634    impl Action {
8635        /// Gets the enum value.
8636        ///
8637        /// Returns `None` if the enum contains an unknown value deserialized from
8638        /// the string representation of enums.
8639        pub fn value(&self) -> std::option::Option<i32> {
8640            match self {
8641                Self::Unspecified => std::option::Option::Some(0),
8642                Self::Add => std::option::Option::Some(1),
8643                Self::Remove => std::option::Option::Some(2),
8644                Self::UnknownValue(u) => u.0.value(),
8645            }
8646        }
8647
8648        /// Gets the enum value as a string.
8649        ///
8650        /// Returns `None` if the enum contains an unknown value deserialized from
8651        /// the integer representation of enums.
8652        pub fn name(&self) -> std::option::Option<&str> {
8653            match self {
8654                Self::Unspecified => std::option::Option::Some("ACTION_UNSPECIFIED"),
8655                Self::Add => std::option::Option::Some("ADD"),
8656                Self::Remove => std::option::Option::Some("REMOVE"),
8657                Self::UnknownValue(u) => u.0.name(),
8658            }
8659        }
8660    }
8661
8662    impl std::default::Default for Action {
8663        fn default() -> Self {
8664            use std::convert::From;
8665            Self::from(0)
8666        }
8667    }
8668
8669    impl std::fmt::Display for Action {
8670        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8671            wkt::internal::display_enum(f, self.name(), self.value())
8672        }
8673    }
8674
8675    impl std::convert::From<i32> for Action {
8676        fn from(value: i32) -> Self {
8677            match value {
8678                0 => Self::Unspecified,
8679                1 => Self::Add,
8680                2 => Self::Remove,
8681                _ => Self::UnknownValue(action::UnknownValue(
8682                    wkt::internal::UnknownEnumValue::Integer(value),
8683                )),
8684            }
8685        }
8686    }
8687
8688    impl std::convert::From<&str> for Action {
8689        fn from(value: &str) -> Self {
8690            use std::string::ToString;
8691            match value {
8692                "ACTION_UNSPECIFIED" => Self::Unspecified,
8693                "ADD" => Self::Add,
8694                "REMOVE" => Self::Remove,
8695                _ => Self::UnknownValue(action::UnknownValue(
8696                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8697                )),
8698            }
8699        }
8700    }
8701
8702    impl serde::ser::Serialize for Action {
8703        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8704        where
8705            S: serde::Serializer,
8706        {
8707            match self {
8708                Self::Unspecified => serializer.serialize_i32(0),
8709                Self::Add => serializer.serialize_i32(1),
8710                Self::Remove => serializer.serialize_i32(2),
8711                Self::UnknownValue(u) => u.0.serialize(serializer),
8712            }
8713        }
8714    }
8715
8716    impl<'de> serde::de::Deserialize<'de> for Action {
8717        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8718        where
8719            D: serde::Deserializer<'de>,
8720        {
8721            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Action>::new(
8722                ".google.cloud.securitycenter.v2.IamBinding.Action",
8723            ))
8724        }
8725    }
8726}
8727
8728/// Represents what's commonly known as an _indicator of compromise_ (IoC) in
8729/// computer forensics. This is an artifact observed on a network or in an
8730/// operating system that, with high confidence, indicates a computer intrusion.
8731/// For more information, see [Indicator of
8732/// compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
8733#[derive(Clone, Default, PartialEq)]
8734#[non_exhaustive]
8735pub struct Indicator {
8736    /// The list of IP addresses that are associated with the finding.
8737    pub ip_addresses: std::vec::Vec<std::string::String>,
8738
8739    /// List of domains associated to the Finding.
8740    pub domains: std::vec::Vec<std::string::String>,
8741
8742    /// The list of matched signatures indicating that the given
8743    /// process is present in the environment.
8744    pub signatures: std::vec::Vec<crate::model::indicator::ProcessSignature>,
8745
8746    /// The list of URIs associated to the Findings.
8747    pub uris: std::vec::Vec<std::string::String>,
8748
8749    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8750}
8751
8752impl Indicator {
8753    pub fn new() -> Self {
8754        std::default::Default::default()
8755    }
8756
8757    /// Sets the value of [ip_addresses][crate::model::Indicator::ip_addresses].
8758    ///
8759    /// # Example
8760    /// ```ignore,no_run
8761    /// # use google_cloud_securitycenter_v2::model::Indicator;
8762    /// let x = Indicator::new().set_ip_addresses(["a", "b", "c"]);
8763    /// ```
8764    pub fn set_ip_addresses<T, V>(mut self, v: T) -> Self
8765    where
8766        T: std::iter::IntoIterator<Item = V>,
8767        V: std::convert::Into<std::string::String>,
8768    {
8769        use std::iter::Iterator;
8770        self.ip_addresses = v.into_iter().map(|i| i.into()).collect();
8771        self
8772    }
8773
8774    /// Sets the value of [domains][crate::model::Indicator::domains].
8775    ///
8776    /// # Example
8777    /// ```ignore,no_run
8778    /// # use google_cloud_securitycenter_v2::model::Indicator;
8779    /// let x = Indicator::new().set_domains(["a", "b", "c"]);
8780    /// ```
8781    pub fn set_domains<T, V>(mut self, v: T) -> Self
8782    where
8783        T: std::iter::IntoIterator<Item = V>,
8784        V: std::convert::Into<std::string::String>,
8785    {
8786        use std::iter::Iterator;
8787        self.domains = v.into_iter().map(|i| i.into()).collect();
8788        self
8789    }
8790
8791    /// Sets the value of [signatures][crate::model::Indicator::signatures].
8792    ///
8793    /// # Example
8794    /// ```ignore,no_run
8795    /// # use google_cloud_securitycenter_v2::model::Indicator;
8796    /// use google_cloud_securitycenter_v2::model::indicator::ProcessSignature;
8797    /// let x = Indicator::new()
8798    ///     .set_signatures([
8799    ///         ProcessSignature::default()/* use setters */,
8800    ///         ProcessSignature::default()/* use (different) setters */,
8801    ///     ]);
8802    /// ```
8803    pub fn set_signatures<T, V>(mut self, v: T) -> Self
8804    where
8805        T: std::iter::IntoIterator<Item = V>,
8806        V: std::convert::Into<crate::model::indicator::ProcessSignature>,
8807    {
8808        use std::iter::Iterator;
8809        self.signatures = v.into_iter().map(|i| i.into()).collect();
8810        self
8811    }
8812
8813    /// Sets the value of [uris][crate::model::Indicator::uris].
8814    ///
8815    /// # Example
8816    /// ```ignore,no_run
8817    /// # use google_cloud_securitycenter_v2::model::Indicator;
8818    /// let x = Indicator::new().set_uris(["a", "b", "c"]);
8819    /// ```
8820    pub fn set_uris<T, V>(mut self, v: T) -> Self
8821    where
8822        T: std::iter::IntoIterator<Item = V>,
8823        V: std::convert::Into<std::string::String>,
8824    {
8825        use std::iter::Iterator;
8826        self.uris = v.into_iter().map(|i| i.into()).collect();
8827        self
8828    }
8829}
8830
8831impl wkt::message::Message for Indicator {
8832    fn typename() -> &'static str {
8833        "type.googleapis.com/google.cloud.securitycenter.v2.Indicator"
8834    }
8835}
8836
8837/// Defines additional types related to [Indicator].
8838pub mod indicator {
8839    #[allow(unused_imports)]
8840    use super::*;
8841
8842    /// Indicates what signature matched this process.
8843    #[derive(Clone, Default, PartialEq)]
8844    #[non_exhaustive]
8845    pub struct ProcessSignature {
8846        /// Describes the type of resource associated with the signature.
8847        pub signature_type: crate::model::indicator::process_signature::SignatureType,
8848
8849        /// The signature.
8850        pub signature: std::option::Option<crate::model::indicator::process_signature::Signature>,
8851
8852        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8853    }
8854
8855    impl ProcessSignature {
8856        pub fn new() -> Self {
8857            std::default::Default::default()
8858        }
8859
8860        /// Sets the value of [signature_type][crate::model::indicator::ProcessSignature::signature_type].
8861        ///
8862        /// # Example
8863        /// ```ignore,no_run
8864        /// # use google_cloud_securitycenter_v2::model::indicator::ProcessSignature;
8865        /// use google_cloud_securitycenter_v2::model::indicator::process_signature::SignatureType;
8866        /// let x0 = ProcessSignature::new().set_signature_type(SignatureType::Process);
8867        /// let x1 = ProcessSignature::new().set_signature_type(SignatureType::File);
8868        /// ```
8869        pub fn set_signature_type<
8870            T: std::convert::Into<crate::model::indicator::process_signature::SignatureType>,
8871        >(
8872            mut self,
8873            v: T,
8874        ) -> Self {
8875            self.signature_type = v.into();
8876            self
8877        }
8878
8879        /// Sets the value of [signature][crate::model::indicator::ProcessSignature::signature].
8880        ///
8881        /// Note that all the setters affecting `signature` are mutually
8882        /// exclusive.
8883        ///
8884        /// # Example
8885        /// ```ignore,no_run
8886        /// # use google_cloud_securitycenter_v2::model::indicator::ProcessSignature;
8887        /// use google_cloud_securitycenter_v2::model::indicator::process_signature::MemoryHashSignature;
8888        /// let x = ProcessSignature::new().set_signature(Some(
8889        ///     google_cloud_securitycenter_v2::model::indicator::process_signature::Signature::MemoryHashSignature(MemoryHashSignature::default().into())));
8890        /// ```
8891        pub fn set_signature<
8892            T: std::convert::Into<
8893                    std::option::Option<crate::model::indicator::process_signature::Signature>,
8894                >,
8895        >(
8896            mut self,
8897            v: T,
8898        ) -> Self {
8899            self.signature = v.into();
8900            self
8901        }
8902
8903        /// The value of [signature][crate::model::indicator::ProcessSignature::signature]
8904        /// if it holds a `MemoryHashSignature`, `None` if the field is not set or
8905        /// holds a different branch.
8906        pub fn memory_hash_signature(
8907            &self,
8908        ) -> std::option::Option<
8909            &std::boxed::Box<crate::model::indicator::process_signature::MemoryHashSignature>,
8910        > {
8911            #[allow(unreachable_patterns)]
8912            self.signature.as_ref().and_then(|v| match v {
8913                crate::model::indicator::process_signature::Signature::MemoryHashSignature(v) => {
8914                    std::option::Option::Some(v)
8915                }
8916                _ => std::option::Option::None,
8917            })
8918        }
8919
8920        /// Sets the value of [signature][crate::model::indicator::ProcessSignature::signature]
8921        /// to hold a `MemoryHashSignature`.
8922        ///
8923        /// Note that all the setters affecting `signature` are
8924        /// mutually exclusive.
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::MemoryHashSignature;
8930        /// let x = ProcessSignature::new().set_memory_hash_signature(MemoryHashSignature::default()/* use setters */);
8931        /// assert!(x.memory_hash_signature().is_some());
8932        /// assert!(x.yara_rule_signature().is_none());
8933        /// ```
8934        pub fn set_memory_hash_signature<
8935            T: std::convert::Into<
8936                    std::boxed::Box<
8937                        crate::model::indicator::process_signature::MemoryHashSignature,
8938                    >,
8939                >,
8940        >(
8941            mut self,
8942            v: T,
8943        ) -> Self {
8944            self.signature = std::option::Option::Some(
8945                crate::model::indicator::process_signature::Signature::MemoryHashSignature(
8946                    v.into(),
8947                ),
8948            );
8949            self
8950        }
8951
8952        /// The value of [signature][crate::model::indicator::ProcessSignature::signature]
8953        /// if it holds a `YaraRuleSignature`, `None` if the field is not set or
8954        /// holds a different branch.
8955        pub fn yara_rule_signature(
8956            &self,
8957        ) -> std::option::Option<
8958            &std::boxed::Box<crate::model::indicator::process_signature::YaraRuleSignature>,
8959        > {
8960            #[allow(unreachable_patterns)]
8961            self.signature.as_ref().and_then(|v| match v {
8962                crate::model::indicator::process_signature::Signature::YaraRuleSignature(v) => {
8963                    std::option::Option::Some(v)
8964                }
8965                _ => std::option::Option::None,
8966            })
8967        }
8968
8969        /// Sets the value of [signature][crate::model::indicator::ProcessSignature::signature]
8970        /// to hold a `YaraRuleSignature`.
8971        ///
8972        /// Note that all the setters affecting `signature` are
8973        /// mutually exclusive.
8974        ///
8975        /// # Example
8976        /// ```ignore,no_run
8977        /// # use google_cloud_securitycenter_v2::model::indicator::ProcessSignature;
8978        /// use google_cloud_securitycenter_v2::model::indicator::process_signature::YaraRuleSignature;
8979        /// let x = ProcessSignature::new().set_yara_rule_signature(YaraRuleSignature::default()/* use setters */);
8980        /// assert!(x.yara_rule_signature().is_some());
8981        /// assert!(x.memory_hash_signature().is_none());
8982        /// ```
8983        pub fn set_yara_rule_signature<
8984            T: std::convert::Into<
8985                    std::boxed::Box<crate::model::indicator::process_signature::YaraRuleSignature>,
8986                >,
8987        >(
8988            mut self,
8989            v: T,
8990        ) -> Self {
8991            self.signature = std::option::Option::Some(
8992                crate::model::indicator::process_signature::Signature::YaraRuleSignature(v.into()),
8993            );
8994            self
8995        }
8996    }
8997
8998    impl wkt::message::Message for ProcessSignature {
8999        fn typename() -> &'static str {
9000            "type.googleapis.com/google.cloud.securitycenter.v2.Indicator.ProcessSignature"
9001        }
9002    }
9003
9004    /// Defines additional types related to [ProcessSignature].
9005    pub mod process_signature {
9006        #[allow(unused_imports)]
9007        use super::*;
9008
9009        /// A signature corresponding to memory page hashes.
9010        #[derive(Clone, Default, PartialEq)]
9011        #[non_exhaustive]
9012        pub struct MemoryHashSignature {
9013            /// The binary family.
9014            pub binary_family: std::string::String,
9015
9016            /// The list of memory hash detections contributing to the binary family
9017            /// match.
9018            pub detections: std::vec::Vec<
9019                crate::model::indicator::process_signature::memory_hash_signature::Detection,
9020            >,
9021
9022            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9023        }
9024
9025        impl MemoryHashSignature {
9026            pub fn new() -> Self {
9027                std::default::Default::default()
9028            }
9029
9030            /// Sets the value of [binary_family][crate::model::indicator::process_signature::MemoryHashSignature::binary_family].
9031            ///
9032            /// # Example
9033            /// ```ignore,no_run
9034            /// # use google_cloud_securitycenter_v2::model::indicator::process_signature::MemoryHashSignature;
9035            /// let x = MemoryHashSignature::new().set_binary_family("example");
9036            /// ```
9037            pub fn set_binary_family<T: std::convert::Into<std::string::String>>(
9038                mut self,
9039                v: T,
9040            ) -> Self {
9041                self.binary_family = v.into();
9042                self
9043            }
9044
9045            /// Sets the value of [detections][crate::model::indicator::process_signature::MemoryHashSignature::detections].
9046            ///
9047            /// # Example
9048            /// ```ignore,no_run
9049            /// # use google_cloud_securitycenter_v2::model::indicator::process_signature::MemoryHashSignature;
9050            /// use google_cloud_securitycenter_v2::model::indicator::process_signature::memory_hash_signature::Detection;
9051            /// let x = MemoryHashSignature::new()
9052            ///     .set_detections([
9053            ///         Detection::default()/* use setters */,
9054            ///         Detection::default()/* use (different) setters */,
9055            ///     ]);
9056            /// ```
9057            pub fn set_detections<T, V>(mut self, v: T) -> Self
9058            where
9059                T: std::iter::IntoIterator<Item = V>,
9060                V: std::convert::Into<crate::model::indicator::process_signature::memory_hash_signature::Detection>
9061            {
9062                use std::iter::Iterator;
9063                self.detections = v.into_iter().map(|i| i.into()).collect();
9064                self
9065            }
9066        }
9067
9068        impl wkt::message::Message for MemoryHashSignature {
9069            fn typename() -> &'static str {
9070                "type.googleapis.com/google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature"
9071            }
9072        }
9073
9074        /// Defines additional types related to [MemoryHashSignature].
9075        pub mod memory_hash_signature {
9076            #[allow(unused_imports)]
9077            use super::*;
9078
9079            /// Memory hash detection contributing to the binary family match.
9080            #[derive(Clone, Default, PartialEq)]
9081            #[non_exhaustive]
9082            pub struct Detection {
9083                /// The name of the binary associated with the memory hash
9084                /// signature detection.
9085                pub binary: std::string::String,
9086
9087                /// The percentage of memory page hashes in the signature
9088                /// that were matched.
9089                pub percent_pages_matched: f64,
9090
9091                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9092            }
9093
9094            impl Detection {
9095                pub fn new() -> Self {
9096                    std::default::Default::default()
9097                }
9098
9099                /// Sets the value of [binary][crate::model::indicator::process_signature::memory_hash_signature::Detection::binary].
9100                ///
9101                /// # Example
9102                /// ```ignore,no_run
9103                /// # use google_cloud_securitycenter_v2::model::indicator::process_signature::memory_hash_signature::Detection;
9104                /// let x = Detection::new().set_binary("example");
9105                /// ```
9106                pub fn set_binary<T: std::convert::Into<std::string::String>>(
9107                    mut self,
9108                    v: T,
9109                ) -> Self {
9110                    self.binary = v.into();
9111                    self
9112                }
9113
9114                /// Sets the value of [percent_pages_matched][crate::model::indicator::process_signature::memory_hash_signature::Detection::percent_pages_matched].
9115                ///
9116                /// # Example
9117                /// ```ignore,no_run
9118                /// # use google_cloud_securitycenter_v2::model::indicator::process_signature::memory_hash_signature::Detection;
9119                /// let x = Detection::new().set_percent_pages_matched(42.0);
9120                /// ```
9121                pub fn set_percent_pages_matched<T: std::convert::Into<f64>>(
9122                    mut self,
9123                    v: T,
9124                ) -> Self {
9125                    self.percent_pages_matched = v.into();
9126                    self
9127                }
9128            }
9129
9130            impl wkt::message::Message for Detection {
9131                fn typename() -> &'static str {
9132                    "type.googleapis.com/google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection"
9133                }
9134            }
9135        }
9136
9137        /// A signature corresponding to a YARA rule.
9138        #[derive(Clone, Default, PartialEq)]
9139        #[non_exhaustive]
9140        pub struct YaraRuleSignature {
9141            /// The name of the YARA rule.
9142            pub yara_rule: std::string::String,
9143
9144            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9145        }
9146
9147        impl YaraRuleSignature {
9148            pub fn new() -> Self {
9149                std::default::Default::default()
9150            }
9151
9152            /// Sets the value of [yara_rule][crate::model::indicator::process_signature::YaraRuleSignature::yara_rule].
9153            ///
9154            /// # Example
9155            /// ```ignore,no_run
9156            /// # use google_cloud_securitycenter_v2::model::indicator::process_signature::YaraRuleSignature;
9157            /// let x = YaraRuleSignature::new().set_yara_rule("example");
9158            /// ```
9159            pub fn set_yara_rule<T: std::convert::Into<std::string::String>>(
9160                mut self,
9161                v: T,
9162            ) -> Self {
9163                self.yara_rule = v.into();
9164                self
9165            }
9166        }
9167
9168        impl wkt::message::Message for YaraRuleSignature {
9169            fn typename() -> &'static str {
9170                "type.googleapis.com/google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature"
9171            }
9172        }
9173
9174        /// Possible resource types to be associated with a signature.
9175        ///
9176        /// # Working with unknown values
9177        ///
9178        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9179        /// additional enum variants at any time. Adding new variants is not considered
9180        /// a breaking change. Applications should write their code in anticipation of:
9181        ///
9182        /// - New values appearing in future releases of the client library, **and**
9183        /// - New values received dynamically, without application changes.
9184        ///
9185        /// Please consult the [Working with enums] section in the user guide for some
9186        /// guidelines.
9187        ///
9188        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9189        #[derive(Clone, Debug, PartialEq)]
9190        #[non_exhaustive]
9191        pub enum SignatureType {
9192            /// The default signature type.
9193            Unspecified,
9194            /// Used for signatures concerning processes.
9195            Process,
9196            /// Used for signatures concerning disks.
9197            File,
9198            /// If set, the enum was initialized with an unknown value.
9199            ///
9200            /// Applications can examine the value using [SignatureType::value] or
9201            /// [SignatureType::name].
9202            UnknownValue(signature_type::UnknownValue),
9203        }
9204
9205        #[doc(hidden)]
9206        pub mod signature_type {
9207            #[allow(unused_imports)]
9208            use super::*;
9209            #[derive(Clone, Debug, PartialEq)]
9210            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9211        }
9212
9213        impl SignatureType {
9214            /// Gets the enum value.
9215            ///
9216            /// Returns `None` if the enum contains an unknown value deserialized from
9217            /// the string representation of enums.
9218            pub fn value(&self) -> std::option::Option<i32> {
9219                match self {
9220                    Self::Unspecified => std::option::Option::Some(0),
9221                    Self::Process => std::option::Option::Some(1),
9222                    Self::File => std::option::Option::Some(2),
9223                    Self::UnknownValue(u) => u.0.value(),
9224                }
9225            }
9226
9227            /// Gets the enum value as a string.
9228            ///
9229            /// Returns `None` if the enum contains an unknown value deserialized from
9230            /// the integer representation of enums.
9231            pub fn name(&self) -> std::option::Option<&str> {
9232                match self {
9233                    Self::Unspecified => std::option::Option::Some("SIGNATURE_TYPE_UNSPECIFIED"),
9234                    Self::Process => std::option::Option::Some("SIGNATURE_TYPE_PROCESS"),
9235                    Self::File => std::option::Option::Some("SIGNATURE_TYPE_FILE"),
9236                    Self::UnknownValue(u) => u.0.name(),
9237                }
9238            }
9239        }
9240
9241        impl std::default::Default for SignatureType {
9242            fn default() -> Self {
9243                use std::convert::From;
9244                Self::from(0)
9245            }
9246        }
9247
9248        impl std::fmt::Display for SignatureType {
9249            fn fmt(
9250                &self,
9251                f: &mut std::fmt::Formatter<'_>,
9252            ) -> std::result::Result<(), std::fmt::Error> {
9253                wkt::internal::display_enum(f, self.name(), self.value())
9254            }
9255        }
9256
9257        impl std::convert::From<i32> for SignatureType {
9258            fn from(value: i32) -> Self {
9259                match value {
9260                    0 => Self::Unspecified,
9261                    1 => Self::Process,
9262                    2 => Self::File,
9263                    _ => Self::UnknownValue(signature_type::UnknownValue(
9264                        wkt::internal::UnknownEnumValue::Integer(value),
9265                    )),
9266                }
9267            }
9268        }
9269
9270        impl std::convert::From<&str> for SignatureType {
9271            fn from(value: &str) -> Self {
9272                use std::string::ToString;
9273                match value {
9274                    "SIGNATURE_TYPE_UNSPECIFIED" => Self::Unspecified,
9275                    "SIGNATURE_TYPE_PROCESS" => Self::Process,
9276                    "SIGNATURE_TYPE_FILE" => Self::File,
9277                    _ => Self::UnknownValue(signature_type::UnknownValue(
9278                        wkt::internal::UnknownEnumValue::String(value.to_string()),
9279                    )),
9280                }
9281            }
9282        }
9283
9284        impl serde::ser::Serialize for SignatureType {
9285            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9286            where
9287                S: serde::Serializer,
9288            {
9289                match self {
9290                    Self::Unspecified => serializer.serialize_i32(0),
9291                    Self::Process => serializer.serialize_i32(1),
9292                    Self::File => serializer.serialize_i32(2),
9293                    Self::UnknownValue(u) => u.0.serialize(serializer),
9294                }
9295            }
9296        }
9297
9298        impl<'de> serde::de::Deserialize<'de> for SignatureType {
9299            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9300            where
9301                D: serde::Deserializer<'de>,
9302            {
9303                deserializer.deserialize_any(wkt::internal::EnumVisitor::<SignatureType>::new(
9304                    ".google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType",
9305                ))
9306            }
9307        }
9308
9309        /// The signature.
9310        #[derive(Clone, Debug, PartialEq)]
9311        #[non_exhaustive]
9312        pub enum Signature {
9313            /// Signature indicating that a binary family was matched.
9314            MemoryHashSignature(
9315                std::boxed::Box<crate::model::indicator::process_signature::MemoryHashSignature>,
9316            ),
9317            /// Signature indicating that a YARA rule was matched.
9318            YaraRuleSignature(
9319                std::boxed::Box<crate::model::indicator::process_signature::YaraRuleSignature>,
9320            ),
9321        }
9322    }
9323}
9324
9325/// IP rules associated with the finding.
9326#[derive(Clone, Default, PartialEq)]
9327#[non_exhaustive]
9328pub struct IpRules {
9329    /// The direction that the rule is applicable to, one of ingress or egress.
9330    pub direction: crate::model::ip_rules::Direction,
9331
9332    /// If source IP ranges are specified, the firewall rule applies only to
9333    /// traffic that has a source IP address in these ranges. These ranges must be
9334    /// expressed in CIDR format. Only supports IPv4.
9335    pub source_ip_ranges: std::vec::Vec<std::string::String>,
9336
9337    /// If destination IP ranges are specified, the firewall rule applies only to
9338    /// traffic that has a destination IP address in these ranges. These ranges
9339    /// must be expressed in CIDR format. Only supports IPv4.
9340    pub destination_ip_ranges: std::vec::Vec<std::string::String>,
9341
9342    /// Name of the network protocol service, such as FTP, that is exposed by the
9343    /// open port. Follows the naming convention available at:
9344    /// <https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml>.
9345    pub exposed_services: std::vec::Vec<std::string::String>,
9346
9347    /// The list of allow rules specified by this firewall. Each rule specifies a
9348    /// protocol and port-range tuple that describes a permitted connection.
9349    pub rules: std::option::Option<crate::model::ip_rules::Rules>,
9350
9351    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9352}
9353
9354impl IpRules {
9355    pub fn new() -> Self {
9356        std::default::Default::default()
9357    }
9358
9359    /// Sets the value of [direction][crate::model::IpRules::direction].
9360    ///
9361    /// # Example
9362    /// ```ignore,no_run
9363    /// # use google_cloud_securitycenter_v2::model::IpRules;
9364    /// use google_cloud_securitycenter_v2::model::ip_rules::Direction;
9365    /// let x0 = IpRules::new().set_direction(Direction::Ingress);
9366    /// let x1 = IpRules::new().set_direction(Direction::Egress);
9367    /// ```
9368    pub fn set_direction<T: std::convert::Into<crate::model::ip_rules::Direction>>(
9369        mut self,
9370        v: T,
9371    ) -> Self {
9372        self.direction = v.into();
9373        self
9374    }
9375
9376    /// Sets the value of [source_ip_ranges][crate::model::IpRules::source_ip_ranges].
9377    ///
9378    /// # Example
9379    /// ```ignore,no_run
9380    /// # use google_cloud_securitycenter_v2::model::IpRules;
9381    /// let x = IpRules::new().set_source_ip_ranges(["a", "b", "c"]);
9382    /// ```
9383    pub fn set_source_ip_ranges<T, V>(mut self, v: T) -> Self
9384    where
9385        T: std::iter::IntoIterator<Item = V>,
9386        V: std::convert::Into<std::string::String>,
9387    {
9388        use std::iter::Iterator;
9389        self.source_ip_ranges = v.into_iter().map(|i| i.into()).collect();
9390        self
9391    }
9392
9393    /// Sets the value of [destination_ip_ranges][crate::model::IpRules::destination_ip_ranges].
9394    ///
9395    /// # Example
9396    /// ```ignore,no_run
9397    /// # use google_cloud_securitycenter_v2::model::IpRules;
9398    /// let x = IpRules::new().set_destination_ip_ranges(["a", "b", "c"]);
9399    /// ```
9400    pub fn set_destination_ip_ranges<T, V>(mut self, v: T) -> Self
9401    where
9402        T: std::iter::IntoIterator<Item = V>,
9403        V: std::convert::Into<std::string::String>,
9404    {
9405        use std::iter::Iterator;
9406        self.destination_ip_ranges = v.into_iter().map(|i| i.into()).collect();
9407        self
9408    }
9409
9410    /// Sets the value of [exposed_services][crate::model::IpRules::exposed_services].
9411    ///
9412    /// # Example
9413    /// ```ignore,no_run
9414    /// # use google_cloud_securitycenter_v2::model::IpRules;
9415    /// let x = IpRules::new().set_exposed_services(["a", "b", "c"]);
9416    /// ```
9417    pub fn set_exposed_services<T, V>(mut self, v: T) -> Self
9418    where
9419        T: std::iter::IntoIterator<Item = V>,
9420        V: std::convert::Into<std::string::String>,
9421    {
9422        use std::iter::Iterator;
9423        self.exposed_services = v.into_iter().map(|i| i.into()).collect();
9424        self
9425    }
9426
9427    /// Sets the value of [rules][crate::model::IpRules::rules].
9428    ///
9429    /// Note that all the setters affecting `rules` are mutually
9430    /// exclusive.
9431    ///
9432    /// # Example
9433    /// ```ignore,no_run
9434    /// # use google_cloud_securitycenter_v2::model::IpRules;
9435    /// use google_cloud_securitycenter_v2::model::Allowed;
9436    /// let x = IpRules::new().set_rules(Some(
9437    ///     google_cloud_securitycenter_v2::model::ip_rules::Rules::Allowed(Allowed::default().into())));
9438    /// ```
9439    pub fn set_rules<T: std::convert::Into<std::option::Option<crate::model::ip_rules::Rules>>>(
9440        mut self,
9441        v: T,
9442    ) -> Self {
9443        self.rules = v.into();
9444        self
9445    }
9446
9447    /// The value of [rules][crate::model::IpRules::rules]
9448    /// if it holds a `Allowed`, `None` if the field is not set or
9449    /// holds a different branch.
9450    pub fn allowed(&self) -> std::option::Option<&std::boxed::Box<crate::model::Allowed>> {
9451        #[allow(unreachable_patterns)]
9452        self.rules.as_ref().and_then(|v| match v {
9453            crate::model::ip_rules::Rules::Allowed(v) => std::option::Option::Some(v),
9454            _ => std::option::Option::None,
9455        })
9456    }
9457
9458    /// Sets the value of [rules][crate::model::IpRules::rules]
9459    /// to hold a `Allowed`.
9460    ///
9461    /// Note that all the setters affecting `rules` are
9462    /// mutually exclusive.
9463    ///
9464    /// # Example
9465    /// ```ignore,no_run
9466    /// # use google_cloud_securitycenter_v2::model::IpRules;
9467    /// use google_cloud_securitycenter_v2::model::Allowed;
9468    /// let x = IpRules::new().set_allowed(Allowed::default()/* use setters */);
9469    /// assert!(x.allowed().is_some());
9470    /// assert!(x.denied().is_none());
9471    /// ```
9472    pub fn set_allowed<T: std::convert::Into<std::boxed::Box<crate::model::Allowed>>>(
9473        mut self,
9474        v: T,
9475    ) -> Self {
9476        self.rules = std::option::Option::Some(crate::model::ip_rules::Rules::Allowed(v.into()));
9477        self
9478    }
9479
9480    /// The value of [rules][crate::model::IpRules::rules]
9481    /// if it holds a `Denied`, `None` if the field is not set or
9482    /// holds a different branch.
9483    pub fn denied(&self) -> std::option::Option<&std::boxed::Box<crate::model::Denied>> {
9484        #[allow(unreachable_patterns)]
9485        self.rules.as_ref().and_then(|v| match v {
9486            crate::model::ip_rules::Rules::Denied(v) => std::option::Option::Some(v),
9487            _ => std::option::Option::None,
9488        })
9489    }
9490
9491    /// Sets the value of [rules][crate::model::IpRules::rules]
9492    /// to hold a `Denied`.
9493    ///
9494    /// Note that all the setters affecting `rules` are
9495    /// mutually exclusive.
9496    ///
9497    /// # Example
9498    /// ```ignore,no_run
9499    /// # use google_cloud_securitycenter_v2::model::IpRules;
9500    /// use google_cloud_securitycenter_v2::model::Denied;
9501    /// let x = IpRules::new().set_denied(Denied::default()/* use setters */);
9502    /// assert!(x.denied().is_some());
9503    /// assert!(x.allowed().is_none());
9504    /// ```
9505    pub fn set_denied<T: std::convert::Into<std::boxed::Box<crate::model::Denied>>>(
9506        mut self,
9507        v: T,
9508    ) -> Self {
9509        self.rules = std::option::Option::Some(crate::model::ip_rules::Rules::Denied(v.into()));
9510        self
9511    }
9512}
9513
9514impl wkt::message::Message for IpRules {
9515    fn typename() -> &'static str {
9516        "type.googleapis.com/google.cloud.securitycenter.v2.IpRules"
9517    }
9518}
9519
9520/// Defines additional types related to [IpRules].
9521pub mod ip_rules {
9522    #[allow(unused_imports)]
9523    use super::*;
9524
9525    /// The type of direction that the rule is applicable to, one of ingress or
9526    /// egress. Not applicable to OPEN_X_PORT findings.
9527    ///
9528    /// # Working with unknown values
9529    ///
9530    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9531    /// additional enum variants at any time. Adding new variants is not considered
9532    /// a breaking change. Applications should write their code in anticipation of:
9533    ///
9534    /// - New values appearing in future releases of the client library, **and**
9535    /// - New values received dynamically, without application changes.
9536    ///
9537    /// Please consult the [Working with enums] section in the user guide for some
9538    /// guidelines.
9539    ///
9540    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9541    #[derive(Clone, Debug, PartialEq)]
9542    #[non_exhaustive]
9543    pub enum Direction {
9544        /// Unspecified direction value.
9545        Unspecified,
9546        /// Ingress direction value.
9547        Ingress,
9548        /// Egress direction value.
9549        Egress,
9550        /// If set, the enum was initialized with an unknown value.
9551        ///
9552        /// Applications can examine the value using [Direction::value] or
9553        /// [Direction::name].
9554        UnknownValue(direction::UnknownValue),
9555    }
9556
9557    #[doc(hidden)]
9558    pub mod direction {
9559        #[allow(unused_imports)]
9560        use super::*;
9561        #[derive(Clone, Debug, PartialEq)]
9562        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9563    }
9564
9565    impl Direction {
9566        /// Gets the enum value.
9567        ///
9568        /// Returns `None` if the enum contains an unknown value deserialized from
9569        /// the string representation of enums.
9570        pub fn value(&self) -> std::option::Option<i32> {
9571            match self {
9572                Self::Unspecified => std::option::Option::Some(0),
9573                Self::Ingress => std::option::Option::Some(1),
9574                Self::Egress => std::option::Option::Some(2),
9575                Self::UnknownValue(u) => u.0.value(),
9576            }
9577        }
9578
9579        /// Gets the enum value as a string.
9580        ///
9581        /// Returns `None` if the enum contains an unknown value deserialized from
9582        /// the integer representation of enums.
9583        pub fn name(&self) -> std::option::Option<&str> {
9584            match self {
9585                Self::Unspecified => std::option::Option::Some("DIRECTION_UNSPECIFIED"),
9586                Self::Ingress => std::option::Option::Some("INGRESS"),
9587                Self::Egress => std::option::Option::Some("EGRESS"),
9588                Self::UnknownValue(u) => u.0.name(),
9589            }
9590        }
9591    }
9592
9593    impl std::default::Default for Direction {
9594        fn default() -> Self {
9595            use std::convert::From;
9596            Self::from(0)
9597        }
9598    }
9599
9600    impl std::fmt::Display for Direction {
9601        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9602            wkt::internal::display_enum(f, self.name(), self.value())
9603        }
9604    }
9605
9606    impl std::convert::From<i32> for Direction {
9607        fn from(value: i32) -> Self {
9608            match value {
9609                0 => Self::Unspecified,
9610                1 => Self::Ingress,
9611                2 => Self::Egress,
9612                _ => Self::UnknownValue(direction::UnknownValue(
9613                    wkt::internal::UnknownEnumValue::Integer(value),
9614                )),
9615            }
9616        }
9617    }
9618
9619    impl std::convert::From<&str> for Direction {
9620        fn from(value: &str) -> Self {
9621            use std::string::ToString;
9622            match value {
9623                "DIRECTION_UNSPECIFIED" => Self::Unspecified,
9624                "INGRESS" => Self::Ingress,
9625                "EGRESS" => Self::Egress,
9626                _ => Self::UnknownValue(direction::UnknownValue(
9627                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9628                )),
9629            }
9630        }
9631    }
9632
9633    impl serde::ser::Serialize for Direction {
9634        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9635        where
9636            S: serde::Serializer,
9637        {
9638            match self {
9639                Self::Unspecified => serializer.serialize_i32(0),
9640                Self::Ingress => serializer.serialize_i32(1),
9641                Self::Egress => serializer.serialize_i32(2),
9642                Self::UnknownValue(u) => u.0.serialize(serializer),
9643            }
9644        }
9645    }
9646
9647    impl<'de> serde::de::Deserialize<'de> for Direction {
9648        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9649        where
9650            D: serde::Deserializer<'de>,
9651        {
9652            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Direction>::new(
9653                ".google.cloud.securitycenter.v2.IpRules.Direction",
9654            ))
9655        }
9656    }
9657
9658    /// The list of allow rules specified by this firewall. Each rule specifies a
9659    /// protocol and port-range tuple that describes a permitted connection.
9660    #[derive(Clone, Debug, PartialEq)]
9661    #[non_exhaustive]
9662    pub enum Rules {
9663        /// Tuple with allowed rules.
9664        Allowed(std::boxed::Box<crate::model::Allowed>),
9665        /// Tuple with denied rules.
9666        Denied(std::boxed::Box<crate::model::Denied>),
9667    }
9668}
9669
9670/// IP rule information.
9671#[derive(Clone, Default, PartialEq)]
9672#[non_exhaustive]
9673pub struct IpRule {
9674    /// The IP protocol this rule applies to. This value can either be one of the
9675    /// following well known protocol strings (TCP, UDP, ICMP, ESP, AH, IPIP,
9676    /// SCTP) or a string representation of the integer value.
9677    pub protocol: std::string::String,
9678
9679    /// Optional. An optional list of ports to which this rule applies. This field
9680    /// is only applicable for the UDP or (S)TCP protocols. Each entry must be
9681    /// either an integer or a range including a min and max port number.
9682    pub port_ranges: std::vec::Vec<crate::model::ip_rule::PortRange>,
9683
9684    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9685}
9686
9687impl IpRule {
9688    pub fn new() -> Self {
9689        std::default::Default::default()
9690    }
9691
9692    /// Sets the value of [protocol][crate::model::IpRule::protocol].
9693    ///
9694    /// # Example
9695    /// ```ignore,no_run
9696    /// # use google_cloud_securitycenter_v2::model::IpRule;
9697    /// let x = IpRule::new().set_protocol("example");
9698    /// ```
9699    pub fn set_protocol<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9700        self.protocol = v.into();
9701        self
9702    }
9703
9704    /// Sets the value of [port_ranges][crate::model::IpRule::port_ranges].
9705    ///
9706    /// # Example
9707    /// ```ignore,no_run
9708    /// # use google_cloud_securitycenter_v2::model::IpRule;
9709    /// use google_cloud_securitycenter_v2::model::ip_rule::PortRange;
9710    /// let x = IpRule::new()
9711    ///     .set_port_ranges([
9712    ///         PortRange::default()/* use setters */,
9713    ///         PortRange::default()/* use (different) setters */,
9714    ///     ]);
9715    /// ```
9716    pub fn set_port_ranges<T, V>(mut self, v: T) -> Self
9717    where
9718        T: std::iter::IntoIterator<Item = V>,
9719        V: std::convert::Into<crate::model::ip_rule::PortRange>,
9720    {
9721        use std::iter::Iterator;
9722        self.port_ranges = v.into_iter().map(|i| i.into()).collect();
9723        self
9724    }
9725}
9726
9727impl wkt::message::Message for IpRule {
9728    fn typename() -> &'static str {
9729        "type.googleapis.com/google.cloud.securitycenter.v2.IpRule"
9730    }
9731}
9732
9733/// Defines additional types related to [IpRule].
9734pub mod ip_rule {
9735    #[allow(unused_imports)]
9736    use super::*;
9737
9738    /// A port range which is inclusive of the min and max values.
9739    /// Values are between 0 and 2^16-1. The max can be equal / must be not smaller
9740    /// than the min value. If min and max are equal this indicates that it is a
9741    /// single port.
9742    #[derive(Clone, Default, PartialEq)]
9743    #[non_exhaustive]
9744    pub struct PortRange {
9745        /// Minimum port value.
9746        pub min: i64,
9747
9748        /// Maximum port value.
9749        pub max: i64,
9750
9751        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9752    }
9753
9754    impl PortRange {
9755        pub fn new() -> Self {
9756            std::default::Default::default()
9757        }
9758
9759        /// Sets the value of [min][crate::model::ip_rule::PortRange::min].
9760        ///
9761        /// # Example
9762        /// ```ignore,no_run
9763        /// # use google_cloud_securitycenter_v2::model::ip_rule::PortRange;
9764        /// let x = PortRange::new().set_min(42);
9765        /// ```
9766        pub fn set_min<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9767            self.min = v.into();
9768            self
9769        }
9770
9771        /// Sets the value of [max][crate::model::ip_rule::PortRange::max].
9772        ///
9773        /// # Example
9774        /// ```ignore,no_run
9775        /// # use google_cloud_securitycenter_v2::model::ip_rule::PortRange;
9776        /// let x = PortRange::new().set_max(42);
9777        /// ```
9778        pub fn set_max<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9779            self.max = v.into();
9780            self
9781        }
9782    }
9783
9784    impl wkt::message::Message for PortRange {
9785        fn typename() -> &'static str {
9786            "type.googleapis.com/google.cloud.securitycenter.v2.IpRule.PortRange"
9787        }
9788    }
9789}
9790
9791/// Allowed IP rule.
9792#[derive(Clone, Default, PartialEq)]
9793#[non_exhaustive]
9794pub struct Allowed {
9795    /// Optional. Optional list of allowed IP rules.
9796    pub ip_rules: std::vec::Vec<crate::model::IpRule>,
9797
9798    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9799}
9800
9801impl Allowed {
9802    pub fn new() -> Self {
9803        std::default::Default::default()
9804    }
9805
9806    /// Sets the value of [ip_rules][crate::model::Allowed::ip_rules].
9807    ///
9808    /// # Example
9809    /// ```ignore,no_run
9810    /// # use google_cloud_securitycenter_v2::model::Allowed;
9811    /// use google_cloud_securitycenter_v2::model::IpRule;
9812    /// let x = Allowed::new()
9813    ///     .set_ip_rules([
9814    ///         IpRule::default()/* use setters */,
9815    ///         IpRule::default()/* use (different) setters */,
9816    ///     ]);
9817    /// ```
9818    pub fn set_ip_rules<T, V>(mut self, v: T) -> Self
9819    where
9820        T: std::iter::IntoIterator<Item = V>,
9821        V: std::convert::Into<crate::model::IpRule>,
9822    {
9823        use std::iter::Iterator;
9824        self.ip_rules = v.into_iter().map(|i| i.into()).collect();
9825        self
9826    }
9827}
9828
9829impl wkt::message::Message for Allowed {
9830    fn typename() -> &'static str {
9831        "type.googleapis.com/google.cloud.securitycenter.v2.Allowed"
9832    }
9833}
9834
9835/// Denied IP rule.
9836#[derive(Clone, Default, PartialEq)]
9837#[non_exhaustive]
9838pub struct Denied {
9839    /// Optional. Optional list of denied IP rules.
9840    pub ip_rules: std::vec::Vec<crate::model::IpRule>,
9841
9842    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9843}
9844
9845impl Denied {
9846    pub fn new() -> Self {
9847        std::default::Default::default()
9848    }
9849
9850    /// Sets the value of [ip_rules][crate::model::Denied::ip_rules].
9851    ///
9852    /// # Example
9853    /// ```ignore,no_run
9854    /// # use google_cloud_securitycenter_v2::model::Denied;
9855    /// use google_cloud_securitycenter_v2::model::IpRule;
9856    /// let x = Denied::new()
9857    ///     .set_ip_rules([
9858    ///         IpRule::default()/* use setters */,
9859    ///         IpRule::default()/* use (different) setters */,
9860    ///     ]);
9861    /// ```
9862    pub fn set_ip_rules<T, V>(mut self, v: T) -> Self
9863    where
9864        T: std::iter::IntoIterator<Item = V>,
9865        V: std::convert::Into<crate::model::IpRule>,
9866    {
9867        use std::iter::Iterator;
9868        self.ip_rules = v.into_iter().map(|i| i.into()).collect();
9869        self
9870    }
9871}
9872
9873impl wkt::message::Message for Denied {
9874    fn typename() -> &'static str {
9875        "type.googleapis.com/google.cloud.securitycenter.v2.Denied"
9876    }
9877}
9878
9879/// Describes a job
9880#[derive(Clone, Default, PartialEq)]
9881#[non_exhaustive]
9882pub struct Job {
9883    /// The fully-qualified name for a job.
9884    /// e.g. `projects/<project_id>/jobs/<job_id>`
9885    pub name: std::string::String,
9886
9887    /// Output only. State of the job, such as `RUNNING` or `PENDING`.
9888    pub state: crate::model::JobState,
9889
9890    /// Optional. If the job did not complete successfully, this field describes
9891    /// why.
9892    pub error_code: i32,
9893
9894    /// Optional. Gives the location where the job ran, such as `US` or
9895    /// `europe-west1`
9896    pub location: std::string::String,
9897
9898    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9899}
9900
9901impl Job {
9902    pub fn new() -> Self {
9903        std::default::Default::default()
9904    }
9905
9906    /// Sets the value of [name][crate::model::Job::name].
9907    ///
9908    /// # Example
9909    /// ```ignore,no_run
9910    /// # use google_cloud_securitycenter_v2::model::Job;
9911    /// let x = Job::new().set_name("example");
9912    /// ```
9913    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9914        self.name = v.into();
9915        self
9916    }
9917
9918    /// Sets the value of [state][crate::model::Job::state].
9919    ///
9920    /// # Example
9921    /// ```ignore,no_run
9922    /// # use google_cloud_securitycenter_v2::model::Job;
9923    /// use google_cloud_securitycenter_v2::model::JobState;
9924    /// let x0 = Job::new().set_state(JobState::Pending);
9925    /// let x1 = Job::new().set_state(JobState::Running);
9926    /// let x2 = Job::new().set_state(JobState::Succeeded);
9927    /// ```
9928    pub fn set_state<T: std::convert::Into<crate::model::JobState>>(mut self, v: T) -> Self {
9929        self.state = v.into();
9930        self
9931    }
9932
9933    /// Sets the value of [error_code][crate::model::Job::error_code].
9934    ///
9935    /// # Example
9936    /// ```ignore,no_run
9937    /// # use google_cloud_securitycenter_v2::model::Job;
9938    /// let x = Job::new().set_error_code(42);
9939    /// ```
9940    pub fn set_error_code<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9941        self.error_code = v.into();
9942        self
9943    }
9944
9945    /// Sets the value of [location][crate::model::Job::location].
9946    ///
9947    /// # Example
9948    /// ```ignore,no_run
9949    /// # use google_cloud_securitycenter_v2::model::Job;
9950    /// let x = Job::new().set_location("example");
9951    /// ```
9952    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9953        self.location = v.into();
9954        self
9955    }
9956}
9957
9958impl wkt::message::Message for Job {
9959    fn typename() -> &'static str {
9960        "type.googleapis.com/google.cloud.securitycenter.v2.Job"
9961    }
9962}
9963
9964/// Kernel mode rootkit signatures.
9965#[derive(Clone, Default, PartialEq)]
9966#[non_exhaustive]
9967pub struct KernelRootkit {
9968    /// Rootkit name, when available.
9969    pub name: std::string::String,
9970
9971    /// True if unexpected modifications of kernel code memory are present.
9972    pub unexpected_code_modification: bool,
9973
9974    /// True if unexpected modifications of kernel read-only data memory are
9975    /// present.
9976    pub unexpected_read_only_data_modification: bool,
9977
9978    /// True if `ftrace` points are present with callbacks pointing to regions
9979    /// that are not in the expected kernel or module code range.
9980    pub unexpected_ftrace_handler: bool,
9981
9982    /// True if `kprobe` points are present with callbacks pointing to regions
9983    /// that are not in the expected kernel or module code range.
9984    pub unexpected_kprobe_handler: bool,
9985
9986    /// True if kernel code pages that are not in the expected kernel or module
9987    /// code regions are present.
9988    pub unexpected_kernel_code_pages: bool,
9989
9990    /// True if system call handlers that are are not in the expected kernel or
9991    /// module code regions are present.
9992    pub unexpected_system_call_handler: bool,
9993
9994    /// True if interrupt handlers that are are not in the expected kernel or
9995    /// module code regions are present.
9996    pub unexpected_interrupt_handler: bool,
9997
9998    /// True if unexpected processes in the scheduler run queue are present. Such
9999    /// processes are in the run queue, but not in the process task list.
10000    pub unexpected_processes_in_runqueue: bool,
10001
10002    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10003}
10004
10005impl KernelRootkit {
10006    pub fn new() -> Self {
10007        std::default::Default::default()
10008    }
10009
10010    /// Sets the value of [name][crate::model::KernelRootkit::name].
10011    ///
10012    /// # Example
10013    /// ```ignore,no_run
10014    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10015    /// let x = KernelRootkit::new().set_name("example");
10016    /// ```
10017    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10018        self.name = v.into();
10019        self
10020    }
10021
10022    /// Sets the value of [unexpected_code_modification][crate::model::KernelRootkit::unexpected_code_modification].
10023    ///
10024    /// # Example
10025    /// ```ignore,no_run
10026    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10027    /// let x = KernelRootkit::new().set_unexpected_code_modification(true);
10028    /// ```
10029    pub fn set_unexpected_code_modification<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10030        self.unexpected_code_modification = v.into();
10031        self
10032    }
10033
10034    /// Sets the value of [unexpected_read_only_data_modification][crate::model::KernelRootkit::unexpected_read_only_data_modification].
10035    ///
10036    /// # Example
10037    /// ```ignore,no_run
10038    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10039    /// let x = KernelRootkit::new().set_unexpected_read_only_data_modification(true);
10040    /// ```
10041    pub fn set_unexpected_read_only_data_modification<T: std::convert::Into<bool>>(
10042        mut self,
10043        v: T,
10044    ) -> Self {
10045        self.unexpected_read_only_data_modification = v.into();
10046        self
10047    }
10048
10049    /// Sets the value of [unexpected_ftrace_handler][crate::model::KernelRootkit::unexpected_ftrace_handler].
10050    ///
10051    /// # Example
10052    /// ```ignore,no_run
10053    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10054    /// let x = KernelRootkit::new().set_unexpected_ftrace_handler(true);
10055    /// ```
10056    pub fn set_unexpected_ftrace_handler<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10057        self.unexpected_ftrace_handler = v.into();
10058        self
10059    }
10060
10061    /// Sets the value of [unexpected_kprobe_handler][crate::model::KernelRootkit::unexpected_kprobe_handler].
10062    ///
10063    /// # Example
10064    /// ```ignore,no_run
10065    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10066    /// let x = KernelRootkit::new().set_unexpected_kprobe_handler(true);
10067    /// ```
10068    pub fn set_unexpected_kprobe_handler<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10069        self.unexpected_kprobe_handler = v.into();
10070        self
10071    }
10072
10073    /// Sets the value of [unexpected_kernel_code_pages][crate::model::KernelRootkit::unexpected_kernel_code_pages].
10074    ///
10075    /// # Example
10076    /// ```ignore,no_run
10077    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10078    /// let x = KernelRootkit::new().set_unexpected_kernel_code_pages(true);
10079    /// ```
10080    pub fn set_unexpected_kernel_code_pages<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10081        self.unexpected_kernel_code_pages = v.into();
10082        self
10083    }
10084
10085    /// Sets the value of [unexpected_system_call_handler][crate::model::KernelRootkit::unexpected_system_call_handler].
10086    ///
10087    /// # Example
10088    /// ```ignore,no_run
10089    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10090    /// let x = KernelRootkit::new().set_unexpected_system_call_handler(true);
10091    /// ```
10092    pub fn set_unexpected_system_call_handler<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10093        self.unexpected_system_call_handler = v.into();
10094        self
10095    }
10096
10097    /// Sets the value of [unexpected_interrupt_handler][crate::model::KernelRootkit::unexpected_interrupt_handler].
10098    ///
10099    /// # Example
10100    /// ```ignore,no_run
10101    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10102    /// let x = KernelRootkit::new().set_unexpected_interrupt_handler(true);
10103    /// ```
10104    pub fn set_unexpected_interrupt_handler<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10105        self.unexpected_interrupt_handler = v.into();
10106        self
10107    }
10108
10109    /// Sets the value of [unexpected_processes_in_runqueue][crate::model::KernelRootkit::unexpected_processes_in_runqueue].
10110    ///
10111    /// # Example
10112    /// ```ignore,no_run
10113    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10114    /// let x = KernelRootkit::new().set_unexpected_processes_in_runqueue(true);
10115    /// ```
10116    pub fn set_unexpected_processes_in_runqueue<T: std::convert::Into<bool>>(
10117        mut self,
10118        v: T,
10119    ) -> Self {
10120        self.unexpected_processes_in_runqueue = v.into();
10121        self
10122    }
10123}
10124
10125impl wkt::message::Message for KernelRootkit {
10126    fn typename() -> &'static str {
10127        "type.googleapis.com/google.cloud.securitycenter.v2.KernelRootkit"
10128    }
10129}
10130
10131/// Kubernetes-related attributes.
10132#[derive(Clone, Default, PartialEq)]
10133#[non_exhaustive]
10134pub struct Kubernetes {
10135    /// Kubernetes
10136    /// [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
10137    /// associated with the finding. This field contains Pod records for each
10138    /// container that is owned by a Pod.
10139    pub pods: std::vec::Vec<crate::model::kubernetes::Pod>,
10140
10141    /// Provides Kubernetes
10142    /// [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
10143    /// information.
10144    pub nodes: std::vec::Vec<crate::model::kubernetes::Node>,
10145
10146    /// GKE [node
10147    /// pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
10148    /// associated with the finding. This field contains node pool information for
10149    /// each node, when it is available.
10150    pub node_pools: std::vec::Vec<crate::model::kubernetes::NodePool>,
10151
10152    /// Provides Kubernetes role information for findings that involve [Roles or
10153    /// ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
10154    pub roles: std::vec::Vec<crate::model::kubernetes::Role>,
10155
10156    /// Provides Kubernetes role binding information for findings that involve
10157    /// [RoleBindings or
10158    /// ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
10159    pub bindings: std::vec::Vec<crate::model::kubernetes::Binding>,
10160
10161    /// Provides information on any Kubernetes access reviews (privilege checks)
10162    /// relevant to the finding.
10163    pub access_reviews: std::vec::Vec<crate::model::kubernetes::AccessReview>,
10164
10165    /// Kubernetes objects related to the finding.
10166    pub objects: std::vec::Vec<crate::model::kubernetes::Object>,
10167
10168    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10169}
10170
10171impl Kubernetes {
10172    pub fn new() -> Self {
10173        std::default::Default::default()
10174    }
10175
10176    /// Sets the value of [pods][crate::model::Kubernetes::pods].
10177    ///
10178    /// # Example
10179    /// ```ignore,no_run
10180    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10181    /// use google_cloud_securitycenter_v2::model::kubernetes::Pod;
10182    /// let x = Kubernetes::new()
10183    ///     .set_pods([
10184    ///         Pod::default()/* use setters */,
10185    ///         Pod::default()/* use (different) setters */,
10186    ///     ]);
10187    /// ```
10188    pub fn set_pods<T, V>(mut self, v: T) -> Self
10189    where
10190        T: std::iter::IntoIterator<Item = V>,
10191        V: std::convert::Into<crate::model::kubernetes::Pod>,
10192    {
10193        use std::iter::Iterator;
10194        self.pods = v.into_iter().map(|i| i.into()).collect();
10195        self
10196    }
10197
10198    /// Sets the value of [nodes][crate::model::Kubernetes::nodes].
10199    ///
10200    /// # Example
10201    /// ```ignore,no_run
10202    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10203    /// use google_cloud_securitycenter_v2::model::kubernetes::Node;
10204    /// let x = Kubernetes::new()
10205    ///     .set_nodes([
10206    ///         Node::default()/* use setters */,
10207    ///         Node::default()/* use (different) setters */,
10208    ///     ]);
10209    /// ```
10210    pub fn set_nodes<T, V>(mut self, v: T) -> Self
10211    where
10212        T: std::iter::IntoIterator<Item = V>,
10213        V: std::convert::Into<crate::model::kubernetes::Node>,
10214    {
10215        use std::iter::Iterator;
10216        self.nodes = v.into_iter().map(|i| i.into()).collect();
10217        self
10218    }
10219
10220    /// Sets the value of [node_pools][crate::model::Kubernetes::node_pools].
10221    ///
10222    /// # Example
10223    /// ```ignore,no_run
10224    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10225    /// use google_cloud_securitycenter_v2::model::kubernetes::NodePool;
10226    /// let x = Kubernetes::new()
10227    ///     .set_node_pools([
10228    ///         NodePool::default()/* use setters */,
10229    ///         NodePool::default()/* use (different) setters */,
10230    ///     ]);
10231    /// ```
10232    pub fn set_node_pools<T, V>(mut self, v: T) -> Self
10233    where
10234        T: std::iter::IntoIterator<Item = V>,
10235        V: std::convert::Into<crate::model::kubernetes::NodePool>,
10236    {
10237        use std::iter::Iterator;
10238        self.node_pools = v.into_iter().map(|i| i.into()).collect();
10239        self
10240    }
10241
10242    /// Sets the value of [roles][crate::model::Kubernetes::roles].
10243    ///
10244    /// # Example
10245    /// ```ignore,no_run
10246    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10247    /// use google_cloud_securitycenter_v2::model::kubernetes::Role;
10248    /// let x = Kubernetes::new()
10249    ///     .set_roles([
10250    ///         Role::default()/* use setters */,
10251    ///         Role::default()/* use (different) setters */,
10252    ///     ]);
10253    /// ```
10254    pub fn set_roles<T, V>(mut self, v: T) -> Self
10255    where
10256        T: std::iter::IntoIterator<Item = V>,
10257        V: std::convert::Into<crate::model::kubernetes::Role>,
10258    {
10259        use std::iter::Iterator;
10260        self.roles = v.into_iter().map(|i| i.into()).collect();
10261        self
10262    }
10263
10264    /// Sets the value of [bindings][crate::model::Kubernetes::bindings].
10265    ///
10266    /// # Example
10267    /// ```ignore,no_run
10268    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10269    /// use google_cloud_securitycenter_v2::model::kubernetes::Binding;
10270    /// let x = Kubernetes::new()
10271    ///     .set_bindings([
10272    ///         Binding::default()/* use setters */,
10273    ///         Binding::default()/* use (different) setters */,
10274    ///     ]);
10275    /// ```
10276    pub fn set_bindings<T, V>(mut self, v: T) -> Self
10277    where
10278        T: std::iter::IntoIterator<Item = V>,
10279        V: std::convert::Into<crate::model::kubernetes::Binding>,
10280    {
10281        use std::iter::Iterator;
10282        self.bindings = v.into_iter().map(|i| i.into()).collect();
10283        self
10284    }
10285
10286    /// Sets the value of [access_reviews][crate::model::Kubernetes::access_reviews].
10287    ///
10288    /// # Example
10289    /// ```ignore,no_run
10290    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10291    /// use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
10292    /// let x = Kubernetes::new()
10293    ///     .set_access_reviews([
10294    ///         AccessReview::default()/* use setters */,
10295    ///         AccessReview::default()/* use (different) setters */,
10296    ///     ]);
10297    /// ```
10298    pub fn set_access_reviews<T, V>(mut self, v: T) -> Self
10299    where
10300        T: std::iter::IntoIterator<Item = V>,
10301        V: std::convert::Into<crate::model::kubernetes::AccessReview>,
10302    {
10303        use std::iter::Iterator;
10304        self.access_reviews = v.into_iter().map(|i| i.into()).collect();
10305        self
10306    }
10307
10308    /// Sets the value of [objects][crate::model::Kubernetes::objects].
10309    ///
10310    /// # Example
10311    /// ```ignore,no_run
10312    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10313    /// use google_cloud_securitycenter_v2::model::kubernetes::Object;
10314    /// let x = Kubernetes::new()
10315    ///     .set_objects([
10316    ///         Object::default()/* use setters */,
10317    ///         Object::default()/* use (different) setters */,
10318    ///     ]);
10319    /// ```
10320    pub fn set_objects<T, V>(mut self, v: T) -> Self
10321    where
10322        T: std::iter::IntoIterator<Item = V>,
10323        V: std::convert::Into<crate::model::kubernetes::Object>,
10324    {
10325        use std::iter::Iterator;
10326        self.objects = v.into_iter().map(|i| i.into()).collect();
10327        self
10328    }
10329}
10330
10331impl wkt::message::Message for Kubernetes {
10332    fn typename() -> &'static str {
10333        "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes"
10334    }
10335}
10336
10337/// Defines additional types related to [Kubernetes].
10338pub mod kubernetes {
10339    #[allow(unused_imports)]
10340    use super::*;
10341
10342    /// A Kubernetes Pod.
10343    #[derive(Clone, Default, PartialEq)]
10344    #[non_exhaustive]
10345    pub struct Pod {
10346        /// Kubernetes Pod namespace.
10347        pub ns: std::string::String,
10348
10349        /// Kubernetes Pod name.
10350        pub name: std::string::String,
10351
10352        /// Pod labels.  For Kubernetes containers, these are applied to the
10353        /// container.
10354        pub labels: std::vec::Vec<crate::model::Label>,
10355
10356        /// Pod containers associated with this finding, if any.
10357        pub containers: std::vec::Vec<crate::model::Container>,
10358
10359        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10360    }
10361
10362    impl Pod {
10363        pub fn new() -> Self {
10364            std::default::Default::default()
10365        }
10366
10367        /// Sets the value of [ns][crate::model::kubernetes::Pod::ns].
10368        ///
10369        /// # Example
10370        /// ```ignore,no_run
10371        /// # use google_cloud_securitycenter_v2::model::kubernetes::Pod;
10372        /// let x = Pod::new().set_ns("example");
10373        /// ```
10374        pub fn set_ns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10375            self.ns = v.into();
10376            self
10377        }
10378
10379        /// Sets the value of [name][crate::model::kubernetes::Pod::name].
10380        ///
10381        /// # Example
10382        /// ```ignore,no_run
10383        /// # use google_cloud_securitycenter_v2::model::kubernetes::Pod;
10384        /// let x = Pod::new().set_name("example");
10385        /// ```
10386        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10387            self.name = v.into();
10388            self
10389        }
10390
10391        /// Sets the value of [labels][crate::model::kubernetes::Pod::labels].
10392        ///
10393        /// # Example
10394        /// ```ignore,no_run
10395        /// # use google_cloud_securitycenter_v2::model::kubernetes::Pod;
10396        /// use google_cloud_securitycenter_v2::model::Label;
10397        /// let x = Pod::new()
10398        ///     .set_labels([
10399        ///         Label::default()/* use setters */,
10400        ///         Label::default()/* use (different) setters */,
10401        ///     ]);
10402        /// ```
10403        pub fn set_labels<T, V>(mut self, v: T) -> Self
10404        where
10405            T: std::iter::IntoIterator<Item = V>,
10406            V: std::convert::Into<crate::model::Label>,
10407        {
10408            use std::iter::Iterator;
10409            self.labels = v.into_iter().map(|i| i.into()).collect();
10410            self
10411        }
10412
10413        /// Sets the value of [containers][crate::model::kubernetes::Pod::containers].
10414        ///
10415        /// # Example
10416        /// ```ignore,no_run
10417        /// # use google_cloud_securitycenter_v2::model::kubernetes::Pod;
10418        /// use google_cloud_securitycenter_v2::model::Container;
10419        /// let x = Pod::new()
10420        ///     .set_containers([
10421        ///         Container::default()/* use setters */,
10422        ///         Container::default()/* use (different) setters */,
10423        ///     ]);
10424        /// ```
10425        pub fn set_containers<T, V>(mut self, v: T) -> Self
10426        where
10427            T: std::iter::IntoIterator<Item = V>,
10428            V: std::convert::Into<crate::model::Container>,
10429        {
10430            use std::iter::Iterator;
10431            self.containers = v.into_iter().map(|i| i.into()).collect();
10432            self
10433        }
10434    }
10435
10436    impl wkt::message::Message for Pod {
10437        fn typename() -> &'static str {
10438            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.Pod"
10439        }
10440    }
10441
10442    /// Kubernetes nodes associated with the finding.
10443    #[derive(Clone, Default, PartialEq)]
10444    #[non_exhaustive]
10445    pub struct Node {
10446        /// [Full resource name](https://google.aip.dev/122#full-resource-names) of
10447        /// the Compute Engine VM running the cluster node.
10448        pub name: std::string::String,
10449
10450        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10451    }
10452
10453    impl Node {
10454        pub fn new() -> Self {
10455            std::default::Default::default()
10456        }
10457
10458        /// Sets the value of [name][crate::model::kubernetes::Node::name].
10459        ///
10460        /// # Example
10461        /// ```ignore,no_run
10462        /// # use google_cloud_securitycenter_v2::model::kubernetes::Node;
10463        /// let x = Node::new().set_name("example");
10464        /// ```
10465        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10466            self.name = v.into();
10467            self
10468        }
10469    }
10470
10471    impl wkt::message::Message for Node {
10472        fn typename() -> &'static str {
10473            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.Node"
10474        }
10475    }
10476
10477    /// Provides GKE node pool information.
10478    #[derive(Clone, Default, PartialEq)]
10479    #[non_exhaustive]
10480    pub struct NodePool {
10481        /// Kubernetes node pool name.
10482        pub name: std::string::String,
10483
10484        /// Nodes associated with the finding.
10485        pub nodes: std::vec::Vec<crate::model::kubernetes::Node>,
10486
10487        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10488    }
10489
10490    impl NodePool {
10491        pub fn new() -> Self {
10492            std::default::Default::default()
10493        }
10494
10495        /// Sets the value of [name][crate::model::kubernetes::NodePool::name].
10496        ///
10497        /// # Example
10498        /// ```ignore,no_run
10499        /// # use google_cloud_securitycenter_v2::model::kubernetes::NodePool;
10500        /// let x = NodePool::new().set_name("example");
10501        /// ```
10502        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10503            self.name = v.into();
10504            self
10505        }
10506
10507        /// Sets the value of [nodes][crate::model::kubernetes::NodePool::nodes].
10508        ///
10509        /// # Example
10510        /// ```ignore,no_run
10511        /// # use google_cloud_securitycenter_v2::model::kubernetes::NodePool;
10512        /// use google_cloud_securitycenter_v2::model::kubernetes::Node;
10513        /// let x = NodePool::new()
10514        ///     .set_nodes([
10515        ///         Node::default()/* use setters */,
10516        ///         Node::default()/* use (different) setters */,
10517        ///     ]);
10518        /// ```
10519        pub fn set_nodes<T, V>(mut self, v: T) -> Self
10520        where
10521            T: std::iter::IntoIterator<Item = V>,
10522            V: std::convert::Into<crate::model::kubernetes::Node>,
10523        {
10524            use std::iter::Iterator;
10525            self.nodes = v.into_iter().map(|i| i.into()).collect();
10526            self
10527        }
10528    }
10529
10530    impl wkt::message::Message for NodePool {
10531        fn typename() -> &'static str {
10532            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.NodePool"
10533        }
10534    }
10535
10536    /// Kubernetes Role or ClusterRole.
10537    #[derive(Clone, Default, PartialEq)]
10538    #[non_exhaustive]
10539    pub struct Role {
10540        /// Role type.
10541        pub kind: crate::model::kubernetes::role::Kind,
10542
10543        /// Role namespace.
10544        pub ns: std::string::String,
10545
10546        /// Role name.
10547        pub name: std::string::String,
10548
10549        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10550    }
10551
10552    impl Role {
10553        pub fn new() -> Self {
10554            std::default::Default::default()
10555        }
10556
10557        /// Sets the value of [kind][crate::model::kubernetes::Role::kind].
10558        ///
10559        /// # Example
10560        /// ```ignore,no_run
10561        /// # use google_cloud_securitycenter_v2::model::kubernetes::Role;
10562        /// use google_cloud_securitycenter_v2::model::kubernetes::role::Kind;
10563        /// let x0 = Role::new().set_kind(Kind::Role);
10564        /// let x1 = Role::new().set_kind(Kind::ClusterRole);
10565        /// ```
10566        pub fn set_kind<T: std::convert::Into<crate::model::kubernetes::role::Kind>>(
10567            mut self,
10568            v: T,
10569        ) -> Self {
10570            self.kind = v.into();
10571            self
10572        }
10573
10574        /// Sets the value of [ns][crate::model::kubernetes::Role::ns].
10575        ///
10576        /// # Example
10577        /// ```ignore,no_run
10578        /// # use google_cloud_securitycenter_v2::model::kubernetes::Role;
10579        /// let x = Role::new().set_ns("example");
10580        /// ```
10581        pub fn set_ns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10582            self.ns = v.into();
10583            self
10584        }
10585
10586        /// Sets the value of [name][crate::model::kubernetes::Role::name].
10587        ///
10588        /// # Example
10589        /// ```ignore,no_run
10590        /// # use google_cloud_securitycenter_v2::model::kubernetes::Role;
10591        /// let x = Role::new().set_name("example");
10592        /// ```
10593        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10594            self.name = v.into();
10595            self
10596        }
10597    }
10598
10599    impl wkt::message::Message for Role {
10600        fn typename() -> &'static str {
10601            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.Role"
10602        }
10603    }
10604
10605    /// Defines additional types related to [Role].
10606    pub mod role {
10607        #[allow(unused_imports)]
10608        use super::*;
10609
10610        /// Types of Kubernetes roles.
10611        ///
10612        /// # Working with unknown values
10613        ///
10614        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10615        /// additional enum variants at any time. Adding new variants is not considered
10616        /// a breaking change. Applications should write their code in anticipation of:
10617        ///
10618        /// - New values appearing in future releases of the client library, **and**
10619        /// - New values received dynamically, without application changes.
10620        ///
10621        /// Please consult the [Working with enums] section in the user guide for some
10622        /// guidelines.
10623        ///
10624        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10625        #[derive(Clone, Debug, PartialEq)]
10626        #[non_exhaustive]
10627        pub enum Kind {
10628            /// Role type is not specified.
10629            Unspecified,
10630            /// Kubernetes Role.
10631            Role,
10632            /// Kubernetes ClusterRole.
10633            ClusterRole,
10634            /// If set, the enum was initialized with an unknown value.
10635            ///
10636            /// Applications can examine the value using [Kind::value] or
10637            /// [Kind::name].
10638            UnknownValue(kind::UnknownValue),
10639        }
10640
10641        #[doc(hidden)]
10642        pub mod kind {
10643            #[allow(unused_imports)]
10644            use super::*;
10645            #[derive(Clone, Debug, PartialEq)]
10646            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10647        }
10648
10649        impl Kind {
10650            /// Gets the enum value.
10651            ///
10652            /// Returns `None` if the enum contains an unknown value deserialized from
10653            /// the string representation of enums.
10654            pub fn value(&self) -> std::option::Option<i32> {
10655                match self {
10656                    Self::Unspecified => std::option::Option::Some(0),
10657                    Self::Role => std::option::Option::Some(1),
10658                    Self::ClusterRole => std::option::Option::Some(2),
10659                    Self::UnknownValue(u) => u.0.value(),
10660                }
10661            }
10662
10663            /// Gets the enum value as a string.
10664            ///
10665            /// Returns `None` if the enum contains an unknown value deserialized from
10666            /// the integer representation of enums.
10667            pub fn name(&self) -> std::option::Option<&str> {
10668                match self {
10669                    Self::Unspecified => std::option::Option::Some("KIND_UNSPECIFIED"),
10670                    Self::Role => std::option::Option::Some("ROLE"),
10671                    Self::ClusterRole => std::option::Option::Some("CLUSTER_ROLE"),
10672                    Self::UnknownValue(u) => u.0.name(),
10673                }
10674            }
10675        }
10676
10677        impl std::default::Default for Kind {
10678            fn default() -> Self {
10679                use std::convert::From;
10680                Self::from(0)
10681            }
10682        }
10683
10684        impl std::fmt::Display for Kind {
10685            fn fmt(
10686                &self,
10687                f: &mut std::fmt::Formatter<'_>,
10688            ) -> std::result::Result<(), std::fmt::Error> {
10689                wkt::internal::display_enum(f, self.name(), self.value())
10690            }
10691        }
10692
10693        impl std::convert::From<i32> for Kind {
10694            fn from(value: i32) -> Self {
10695                match value {
10696                    0 => Self::Unspecified,
10697                    1 => Self::Role,
10698                    2 => Self::ClusterRole,
10699                    _ => Self::UnknownValue(kind::UnknownValue(
10700                        wkt::internal::UnknownEnumValue::Integer(value),
10701                    )),
10702                }
10703            }
10704        }
10705
10706        impl std::convert::From<&str> for Kind {
10707            fn from(value: &str) -> Self {
10708                use std::string::ToString;
10709                match value {
10710                    "KIND_UNSPECIFIED" => Self::Unspecified,
10711                    "ROLE" => Self::Role,
10712                    "CLUSTER_ROLE" => Self::ClusterRole,
10713                    _ => Self::UnknownValue(kind::UnknownValue(
10714                        wkt::internal::UnknownEnumValue::String(value.to_string()),
10715                    )),
10716                }
10717            }
10718        }
10719
10720        impl serde::ser::Serialize for Kind {
10721            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10722            where
10723                S: serde::Serializer,
10724            {
10725                match self {
10726                    Self::Unspecified => serializer.serialize_i32(0),
10727                    Self::Role => serializer.serialize_i32(1),
10728                    Self::ClusterRole => serializer.serialize_i32(2),
10729                    Self::UnknownValue(u) => u.0.serialize(serializer),
10730                }
10731            }
10732        }
10733
10734        impl<'de> serde::de::Deserialize<'de> for Kind {
10735            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10736            where
10737                D: serde::Deserializer<'de>,
10738            {
10739                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Kind>::new(
10740                    ".google.cloud.securitycenter.v2.Kubernetes.Role.Kind",
10741                ))
10742            }
10743        }
10744    }
10745
10746    /// Represents a Kubernetes RoleBinding or ClusterRoleBinding.
10747    #[derive(Clone, Default, PartialEq)]
10748    #[non_exhaustive]
10749    pub struct Binding {
10750        /// Namespace for the binding.
10751        pub ns: std::string::String,
10752
10753        /// Name for the binding.
10754        pub name: std::string::String,
10755
10756        /// The Role or ClusterRole referenced by the binding.
10757        pub role: std::option::Option<crate::model::kubernetes::Role>,
10758
10759        /// Represents one or more subjects that are bound to the role. Not always
10760        /// available for PATCH requests.
10761        pub subjects: std::vec::Vec<crate::model::kubernetes::Subject>,
10762
10763        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10764    }
10765
10766    impl Binding {
10767        pub fn new() -> Self {
10768            std::default::Default::default()
10769        }
10770
10771        /// Sets the value of [ns][crate::model::kubernetes::Binding::ns].
10772        ///
10773        /// # Example
10774        /// ```ignore,no_run
10775        /// # use google_cloud_securitycenter_v2::model::kubernetes::Binding;
10776        /// let x = Binding::new().set_ns("example");
10777        /// ```
10778        pub fn set_ns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10779            self.ns = v.into();
10780            self
10781        }
10782
10783        /// Sets the value of [name][crate::model::kubernetes::Binding::name].
10784        ///
10785        /// # Example
10786        /// ```ignore,no_run
10787        /// # use google_cloud_securitycenter_v2::model::kubernetes::Binding;
10788        /// let x = Binding::new().set_name("example");
10789        /// ```
10790        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10791            self.name = v.into();
10792            self
10793        }
10794
10795        /// Sets the value of [role][crate::model::kubernetes::Binding::role].
10796        ///
10797        /// # Example
10798        /// ```ignore,no_run
10799        /// # use google_cloud_securitycenter_v2::model::kubernetes::Binding;
10800        /// use google_cloud_securitycenter_v2::model::kubernetes::Role;
10801        /// let x = Binding::new().set_role(Role::default()/* use setters */);
10802        /// ```
10803        pub fn set_role<T>(mut self, v: T) -> Self
10804        where
10805            T: std::convert::Into<crate::model::kubernetes::Role>,
10806        {
10807            self.role = std::option::Option::Some(v.into());
10808            self
10809        }
10810
10811        /// Sets or clears the value of [role][crate::model::kubernetes::Binding::role].
10812        ///
10813        /// # Example
10814        /// ```ignore,no_run
10815        /// # use google_cloud_securitycenter_v2::model::kubernetes::Binding;
10816        /// use google_cloud_securitycenter_v2::model::kubernetes::Role;
10817        /// let x = Binding::new().set_or_clear_role(Some(Role::default()/* use setters */));
10818        /// let x = Binding::new().set_or_clear_role(None::<Role>);
10819        /// ```
10820        pub fn set_or_clear_role<T>(mut self, v: std::option::Option<T>) -> Self
10821        where
10822            T: std::convert::Into<crate::model::kubernetes::Role>,
10823        {
10824            self.role = v.map(|x| x.into());
10825            self
10826        }
10827
10828        /// Sets the value of [subjects][crate::model::kubernetes::Binding::subjects].
10829        ///
10830        /// # Example
10831        /// ```ignore,no_run
10832        /// # use google_cloud_securitycenter_v2::model::kubernetes::Binding;
10833        /// use google_cloud_securitycenter_v2::model::kubernetes::Subject;
10834        /// let x = Binding::new()
10835        ///     .set_subjects([
10836        ///         Subject::default()/* use setters */,
10837        ///         Subject::default()/* use (different) setters */,
10838        ///     ]);
10839        /// ```
10840        pub fn set_subjects<T, V>(mut self, v: T) -> Self
10841        where
10842            T: std::iter::IntoIterator<Item = V>,
10843            V: std::convert::Into<crate::model::kubernetes::Subject>,
10844        {
10845            use std::iter::Iterator;
10846            self.subjects = v.into_iter().map(|i| i.into()).collect();
10847            self
10848        }
10849    }
10850
10851    impl wkt::message::Message for Binding {
10852        fn typename() -> &'static str {
10853            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.Binding"
10854        }
10855    }
10856
10857    /// Represents a Kubernetes subject.
10858    #[derive(Clone, Default, PartialEq)]
10859    #[non_exhaustive]
10860    pub struct Subject {
10861        /// Authentication type for the subject.
10862        pub kind: crate::model::kubernetes::subject::AuthType,
10863
10864        /// Namespace for the subject.
10865        pub ns: std::string::String,
10866
10867        /// Name for the subject.
10868        pub name: std::string::String,
10869
10870        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10871    }
10872
10873    impl Subject {
10874        pub fn new() -> Self {
10875            std::default::Default::default()
10876        }
10877
10878        /// Sets the value of [kind][crate::model::kubernetes::Subject::kind].
10879        ///
10880        /// # Example
10881        /// ```ignore,no_run
10882        /// # use google_cloud_securitycenter_v2::model::kubernetes::Subject;
10883        /// use google_cloud_securitycenter_v2::model::kubernetes::subject::AuthType;
10884        /// let x0 = Subject::new().set_kind(AuthType::User);
10885        /// let x1 = Subject::new().set_kind(AuthType::Serviceaccount);
10886        /// let x2 = Subject::new().set_kind(AuthType::Group);
10887        /// ```
10888        pub fn set_kind<T: std::convert::Into<crate::model::kubernetes::subject::AuthType>>(
10889            mut self,
10890            v: T,
10891        ) -> Self {
10892            self.kind = v.into();
10893            self
10894        }
10895
10896        /// Sets the value of [ns][crate::model::kubernetes::Subject::ns].
10897        ///
10898        /// # Example
10899        /// ```ignore,no_run
10900        /// # use google_cloud_securitycenter_v2::model::kubernetes::Subject;
10901        /// let x = Subject::new().set_ns("example");
10902        /// ```
10903        pub fn set_ns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10904            self.ns = v.into();
10905            self
10906        }
10907
10908        /// Sets the value of [name][crate::model::kubernetes::Subject::name].
10909        ///
10910        /// # Example
10911        /// ```ignore,no_run
10912        /// # use google_cloud_securitycenter_v2::model::kubernetes::Subject;
10913        /// let x = Subject::new().set_name("example");
10914        /// ```
10915        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10916            self.name = v.into();
10917            self
10918        }
10919    }
10920
10921    impl wkt::message::Message for Subject {
10922        fn typename() -> &'static str {
10923            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.Subject"
10924        }
10925    }
10926
10927    /// Defines additional types related to [Subject].
10928    pub mod subject {
10929        #[allow(unused_imports)]
10930        use super::*;
10931
10932        /// Auth types that can be used for the subject's kind field.
10933        ///
10934        /// # Working with unknown values
10935        ///
10936        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10937        /// additional enum variants at any time. Adding new variants is not considered
10938        /// a breaking change. Applications should write their code in anticipation of:
10939        ///
10940        /// - New values appearing in future releases of the client library, **and**
10941        /// - New values received dynamically, without application changes.
10942        ///
10943        /// Please consult the [Working with enums] section in the user guide for some
10944        /// guidelines.
10945        ///
10946        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10947        #[derive(Clone, Debug, PartialEq)]
10948        #[non_exhaustive]
10949        pub enum AuthType {
10950            /// Authentication is not specified.
10951            Unspecified,
10952            /// User with valid certificate.
10953            User,
10954            /// Users managed by Kubernetes API with credentials stored as secrets.
10955            Serviceaccount,
10956            /// Collection of users.
10957            Group,
10958            /// If set, the enum was initialized with an unknown value.
10959            ///
10960            /// Applications can examine the value using [AuthType::value] or
10961            /// [AuthType::name].
10962            UnknownValue(auth_type::UnknownValue),
10963        }
10964
10965        #[doc(hidden)]
10966        pub mod auth_type {
10967            #[allow(unused_imports)]
10968            use super::*;
10969            #[derive(Clone, Debug, PartialEq)]
10970            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10971        }
10972
10973        impl AuthType {
10974            /// Gets the enum value.
10975            ///
10976            /// Returns `None` if the enum contains an unknown value deserialized from
10977            /// the string representation of enums.
10978            pub fn value(&self) -> std::option::Option<i32> {
10979                match self {
10980                    Self::Unspecified => std::option::Option::Some(0),
10981                    Self::User => std::option::Option::Some(1),
10982                    Self::Serviceaccount => std::option::Option::Some(2),
10983                    Self::Group => std::option::Option::Some(3),
10984                    Self::UnknownValue(u) => u.0.value(),
10985                }
10986            }
10987
10988            /// Gets the enum value as a string.
10989            ///
10990            /// Returns `None` if the enum contains an unknown value deserialized from
10991            /// the integer representation of enums.
10992            pub fn name(&self) -> std::option::Option<&str> {
10993                match self {
10994                    Self::Unspecified => std::option::Option::Some("AUTH_TYPE_UNSPECIFIED"),
10995                    Self::User => std::option::Option::Some("USER"),
10996                    Self::Serviceaccount => std::option::Option::Some("SERVICEACCOUNT"),
10997                    Self::Group => std::option::Option::Some("GROUP"),
10998                    Self::UnknownValue(u) => u.0.name(),
10999                }
11000            }
11001        }
11002
11003        impl std::default::Default for AuthType {
11004            fn default() -> Self {
11005                use std::convert::From;
11006                Self::from(0)
11007            }
11008        }
11009
11010        impl std::fmt::Display for AuthType {
11011            fn fmt(
11012                &self,
11013                f: &mut std::fmt::Formatter<'_>,
11014            ) -> std::result::Result<(), std::fmt::Error> {
11015                wkt::internal::display_enum(f, self.name(), self.value())
11016            }
11017        }
11018
11019        impl std::convert::From<i32> for AuthType {
11020            fn from(value: i32) -> Self {
11021                match value {
11022                    0 => Self::Unspecified,
11023                    1 => Self::User,
11024                    2 => Self::Serviceaccount,
11025                    3 => Self::Group,
11026                    _ => Self::UnknownValue(auth_type::UnknownValue(
11027                        wkt::internal::UnknownEnumValue::Integer(value),
11028                    )),
11029                }
11030            }
11031        }
11032
11033        impl std::convert::From<&str> for AuthType {
11034            fn from(value: &str) -> Self {
11035                use std::string::ToString;
11036                match value {
11037                    "AUTH_TYPE_UNSPECIFIED" => Self::Unspecified,
11038                    "USER" => Self::User,
11039                    "SERVICEACCOUNT" => Self::Serviceaccount,
11040                    "GROUP" => Self::Group,
11041                    _ => Self::UnknownValue(auth_type::UnknownValue(
11042                        wkt::internal::UnknownEnumValue::String(value.to_string()),
11043                    )),
11044                }
11045            }
11046        }
11047
11048        impl serde::ser::Serialize for AuthType {
11049            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11050            where
11051                S: serde::Serializer,
11052            {
11053                match self {
11054                    Self::Unspecified => serializer.serialize_i32(0),
11055                    Self::User => serializer.serialize_i32(1),
11056                    Self::Serviceaccount => serializer.serialize_i32(2),
11057                    Self::Group => serializer.serialize_i32(3),
11058                    Self::UnknownValue(u) => u.0.serialize(serializer),
11059                }
11060            }
11061        }
11062
11063        impl<'de> serde::de::Deserialize<'de> for AuthType {
11064            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11065            where
11066                D: serde::Deserializer<'de>,
11067            {
11068                deserializer.deserialize_any(wkt::internal::EnumVisitor::<AuthType>::new(
11069                    ".google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType",
11070                ))
11071            }
11072        }
11073    }
11074
11075    /// Conveys information about a Kubernetes access review (such as one returned
11076    /// by a [`kubectl auth
11077    /// can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access)
11078    /// command) that was involved in a finding.
11079    #[derive(Clone, Default, PartialEq)]
11080    #[non_exhaustive]
11081    pub struct AccessReview {
11082        /// The API group of the resource. "*" means all.
11083        pub group: std::string::String,
11084
11085        /// Namespace of the action being requested. Currently, there is no
11086        /// distinction between no namespace and all namespaces.  Both
11087        /// are represented by "" (empty).
11088        pub ns: std::string::String,
11089
11090        /// The name of the resource being requested. Empty means all.
11091        pub name: std::string::String,
11092
11093        /// The optional resource type requested. "*" means all.
11094        pub resource: std::string::String,
11095
11096        /// The optional subresource type.
11097        pub subresource: std::string::String,
11098
11099        /// A Kubernetes resource API verb, like get, list, watch, create, update,
11100        /// delete, proxy. "*" means all.
11101        pub verb: std::string::String,
11102
11103        /// The API version of the resource. "*" means all.
11104        pub version: std::string::String,
11105
11106        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11107    }
11108
11109    impl AccessReview {
11110        pub fn new() -> Self {
11111            std::default::Default::default()
11112        }
11113
11114        /// Sets the value of [group][crate::model::kubernetes::AccessReview::group].
11115        ///
11116        /// # Example
11117        /// ```ignore,no_run
11118        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11119        /// let x = AccessReview::new().set_group("example");
11120        /// ```
11121        pub fn set_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11122            self.group = v.into();
11123            self
11124        }
11125
11126        /// Sets the value of [ns][crate::model::kubernetes::AccessReview::ns].
11127        ///
11128        /// # Example
11129        /// ```ignore,no_run
11130        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11131        /// let x = AccessReview::new().set_ns("example");
11132        /// ```
11133        pub fn set_ns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11134            self.ns = v.into();
11135            self
11136        }
11137
11138        /// Sets the value of [name][crate::model::kubernetes::AccessReview::name].
11139        ///
11140        /// # Example
11141        /// ```ignore,no_run
11142        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11143        /// let x = AccessReview::new().set_name("example");
11144        /// ```
11145        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11146            self.name = v.into();
11147            self
11148        }
11149
11150        /// Sets the value of [resource][crate::model::kubernetes::AccessReview::resource].
11151        ///
11152        /// # Example
11153        /// ```ignore,no_run
11154        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11155        /// let x = AccessReview::new().set_resource("example");
11156        /// ```
11157        pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11158            self.resource = v.into();
11159            self
11160        }
11161
11162        /// Sets the value of [subresource][crate::model::kubernetes::AccessReview::subresource].
11163        ///
11164        /// # Example
11165        /// ```ignore,no_run
11166        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11167        /// let x = AccessReview::new().set_subresource("example");
11168        /// ```
11169        pub fn set_subresource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11170            self.subresource = v.into();
11171            self
11172        }
11173
11174        /// Sets the value of [verb][crate::model::kubernetes::AccessReview::verb].
11175        ///
11176        /// # Example
11177        /// ```ignore,no_run
11178        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11179        /// let x = AccessReview::new().set_verb("example");
11180        /// ```
11181        pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11182            self.verb = v.into();
11183            self
11184        }
11185
11186        /// Sets the value of [version][crate::model::kubernetes::AccessReview::version].
11187        ///
11188        /// # Example
11189        /// ```ignore,no_run
11190        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11191        /// let x = AccessReview::new().set_version("example");
11192        /// ```
11193        pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11194            self.version = v.into();
11195            self
11196        }
11197    }
11198
11199    impl wkt::message::Message for AccessReview {
11200        fn typename() -> &'static str {
11201            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.AccessReview"
11202        }
11203    }
11204
11205    /// Kubernetes object related to the finding, uniquely identified by GKNN.
11206    /// Used if the object Kind is not one of Pod, Node, NodePool, Binding, or
11207    /// AccessReview.
11208    #[derive(Clone, Default, PartialEq)]
11209    #[non_exhaustive]
11210    pub struct Object {
11211        /// Kubernetes object group, such as "policy.k8s.io/v1".
11212        pub group: std::string::String,
11213
11214        /// Kubernetes object kind, such as "Namespace".
11215        pub kind: std::string::String,
11216
11217        /// Kubernetes object namespace. Must be a valid DNS label. Named
11218        /// "ns" to avoid collision with C++ namespace keyword. For details see
11219        /// <https://kubernetes.io/docs/tasks/administer-cluster/namespaces/>.
11220        pub ns: std::string::String,
11221
11222        /// Kubernetes object name. For details see
11223        /// <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/>.
11224        pub name: std::string::String,
11225
11226        /// Pod containers associated with this finding, if any.
11227        pub containers: std::vec::Vec<crate::model::Container>,
11228
11229        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11230    }
11231
11232    impl Object {
11233        pub fn new() -> Self {
11234            std::default::Default::default()
11235        }
11236
11237        /// Sets the value of [group][crate::model::kubernetes::Object::group].
11238        ///
11239        /// # Example
11240        /// ```ignore,no_run
11241        /// # use google_cloud_securitycenter_v2::model::kubernetes::Object;
11242        /// let x = Object::new().set_group("example");
11243        /// ```
11244        pub fn set_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11245            self.group = v.into();
11246            self
11247        }
11248
11249        /// Sets the value of [kind][crate::model::kubernetes::Object::kind].
11250        ///
11251        /// # Example
11252        /// ```ignore,no_run
11253        /// # use google_cloud_securitycenter_v2::model::kubernetes::Object;
11254        /// let x = Object::new().set_kind("example");
11255        /// ```
11256        pub fn set_kind<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11257            self.kind = v.into();
11258            self
11259        }
11260
11261        /// Sets the value of [ns][crate::model::kubernetes::Object::ns].
11262        ///
11263        /// # Example
11264        /// ```ignore,no_run
11265        /// # use google_cloud_securitycenter_v2::model::kubernetes::Object;
11266        /// let x = Object::new().set_ns("example");
11267        /// ```
11268        pub fn set_ns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11269            self.ns = v.into();
11270            self
11271        }
11272
11273        /// Sets the value of [name][crate::model::kubernetes::Object::name].
11274        ///
11275        /// # Example
11276        /// ```ignore,no_run
11277        /// # use google_cloud_securitycenter_v2::model::kubernetes::Object;
11278        /// let x = Object::new().set_name("example");
11279        /// ```
11280        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11281            self.name = v.into();
11282            self
11283        }
11284
11285        /// Sets the value of [containers][crate::model::kubernetes::Object::containers].
11286        ///
11287        /// # Example
11288        /// ```ignore,no_run
11289        /// # use google_cloud_securitycenter_v2::model::kubernetes::Object;
11290        /// use google_cloud_securitycenter_v2::model::Container;
11291        /// let x = Object::new()
11292        ///     .set_containers([
11293        ///         Container::default()/* use setters */,
11294        ///         Container::default()/* use (different) setters */,
11295        ///     ]);
11296        /// ```
11297        pub fn set_containers<T, V>(mut self, v: T) -> Self
11298        where
11299            T: std::iter::IntoIterator<Item = V>,
11300            V: std::convert::Into<crate::model::Container>,
11301        {
11302            use std::iter::Iterator;
11303            self.containers = v.into_iter().map(|i| i.into()).collect();
11304            self
11305        }
11306    }
11307
11308    impl wkt::message::Message for Object {
11309        fn typename() -> &'static str {
11310            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.Object"
11311        }
11312    }
11313}
11314
11315/// Represents a generic name-value label. A label has separate name and value
11316/// fields to support filtering with the `contains()` function. For more
11317/// information, see [Filtering on array-type
11318/// fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering).
11319#[derive(Clone, Default, PartialEq)]
11320#[non_exhaustive]
11321pub struct Label {
11322    /// Name of the label.
11323    pub name: std::string::String,
11324
11325    /// Value that corresponds to the label's name.
11326    pub value: std::string::String,
11327
11328    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11329}
11330
11331impl Label {
11332    pub fn new() -> Self {
11333        std::default::Default::default()
11334    }
11335
11336    /// Sets the value of [name][crate::model::Label::name].
11337    ///
11338    /// # Example
11339    /// ```ignore,no_run
11340    /// # use google_cloud_securitycenter_v2::model::Label;
11341    /// let x = Label::new().set_name("example");
11342    /// ```
11343    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11344        self.name = v.into();
11345        self
11346    }
11347
11348    /// Sets the value of [value][crate::model::Label::value].
11349    ///
11350    /// # Example
11351    /// ```ignore,no_run
11352    /// # use google_cloud_securitycenter_v2::model::Label;
11353    /// let x = Label::new().set_value("example");
11354    /// ```
11355    pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11356        self.value = v.into();
11357        self
11358    }
11359}
11360
11361impl wkt::message::Message for Label {
11362    fn typename() -> &'static str {
11363        "type.googleapis.com/google.cloud.securitycenter.v2.Label"
11364    }
11365}
11366
11367/// Contains information related to the load balancer associated with the
11368/// finding.
11369#[derive(Clone, Default, PartialEq)]
11370#[non_exhaustive]
11371pub struct LoadBalancer {
11372    /// The name of the load balancer associated with the finding.
11373    pub name: std::string::String,
11374
11375    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11376}
11377
11378impl LoadBalancer {
11379    pub fn new() -> Self {
11380        std::default::Default::default()
11381    }
11382
11383    /// Sets the value of [name][crate::model::LoadBalancer::name].
11384    ///
11385    /// # Example
11386    /// ```ignore,no_run
11387    /// # use google_cloud_securitycenter_v2::model::LoadBalancer;
11388    /// let x = LoadBalancer::new().set_name("example");
11389    /// ```
11390    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11391        self.name = v.into();
11392        self
11393    }
11394}
11395
11396impl wkt::message::Message for LoadBalancer {
11397    fn typename() -> &'static str {
11398        "type.googleapis.com/google.cloud.securitycenter.v2.LoadBalancer"
11399    }
11400}
11401
11402/// An individual entry in a log.
11403#[derive(Clone, Default, PartialEq)]
11404#[non_exhaustive]
11405pub struct LogEntry {
11406    /// The log entry.
11407    pub log_entry: std::option::Option<crate::model::log_entry::LogEntry>,
11408
11409    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11410}
11411
11412impl LogEntry {
11413    pub fn new() -> Self {
11414        std::default::Default::default()
11415    }
11416
11417    /// Sets the value of [log_entry][crate::model::LogEntry::log_entry].
11418    ///
11419    /// Note that all the setters affecting `log_entry` are mutually
11420    /// exclusive.
11421    ///
11422    /// # Example
11423    /// ```ignore,no_run
11424    /// # use google_cloud_securitycenter_v2::model::LogEntry;
11425    /// use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
11426    /// let x = LogEntry::new().set_log_entry(Some(
11427    ///     google_cloud_securitycenter_v2::model::log_entry::LogEntry::CloudLoggingEntry(CloudLoggingEntry::default().into())));
11428    /// ```
11429    pub fn set_log_entry<
11430        T: std::convert::Into<std::option::Option<crate::model::log_entry::LogEntry>>,
11431    >(
11432        mut self,
11433        v: T,
11434    ) -> Self {
11435        self.log_entry = v.into();
11436        self
11437    }
11438
11439    /// The value of [log_entry][crate::model::LogEntry::log_entry]
11440    /// if it holds a `CloudLoggingEntry`, `None` if the field is not set or
11441    /// holds a different branch.
11442    pub fn cloud_logging_entry(
11443        &self,
11444    ) -> std::option::Option<&std::boxed::Box<crate::model::CloudLoggingEntry>> {
11445        #[allow(unreachable_patterns)]
11446        self.log_entry.as_ref().and_then(|v| match v {
11447            crate::model::log_entry::LogEntry::CloudLoggingEntry(v) => std::option::Option::Some(v),
11448            _ => std::option::Option::None,
11449        })
11450    }
11451
11452    /// Sets the value of [log_entry][crate::model::LogEntry::log_entry]
11453    /// to hold a `CloudLoggingEntry`.
11454    ///
11455    /// Note that all the setters affecting `log_entry` are
11456    /// mutually exclusive.
11457    ///
11458    /// # Example
11459    /// ```ignore,no_run
11460    /// # use google_cloud_securitycenter_v2::model::LogEntry;
11461    /// use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
11462    /// let x = LogEntry::new().set_cloud_logging_entry(CloudLoggingEntry::default()/* use setters */);
11463    /// assert!(x.cloud_logging_entry().is_some());
11464    /// ```
11465    pub fn set_cloud_logging_entry<
11466        T: std::convert::Into<std::boxed::Box<crate::model::CloudLoggingEntry>>,
11467    >(
11468        mut self,
11469        v: T,
11470    ) -> Self {
11471        self.log_entry = std::option::Option::Some(
11472            crate::model::log_entry::LogEntry::CloudLoggingEntry(v.into()),
11473        );
11474        self
11475    }
11476}
11477
11478impl wkt::message::Message for LogEntry {
11479    fn typename() -> &'static str {
11480        "type.googleapis.com/google.cloud.securitycenter.v2.LogEntry"
11481    }
11482}
11483
11484/// Defines additional types related to [LogEntry].
11485pub mod log_entry {
11486    #[allow(unused_imports)]
11487    use super::*;
11488
11489    /// The log entry.
11490    #[derive(Clone, Debug, PartialEq)]
11491    #[non_exhaustive]
11492    pub enum LogEntry {
11493        /// An individual entry in a log stored in Cloud Logging.
11494        CloudLoggingEntry(std::boxed::Box<crate::model::CloudLoggingEntry>),
11495    }
11496}
11497
11498/// Metadata taken from a [Cloud Logging
11499/// LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry)
11500#[derive(Clone, Default, PartialEq)]
11501#[non_exhaustive]
11502pub struct CloudLoggingEntry {
11503    /// A unique identifier for the log entry.
11504    pub insert_id: std::string::String,
11505
11506    /// The type of the log (part of `log_name`. `log_name` is the resource name of
11507    /// the log to which this log entry belongs). For example:
11508    /// `cloudresourcemanager.googleapis.com/activity` Note that this field is not
11509    /// URL-encoded, unlike in `LogEntry`.
11510    pub log_id: std::string::String,
11511
11512    /// The organization, folder, or project of the monitored resource that
11513    /// produced this log entry.
11514    pub resource_container: std::string::String,
11515
11516    /// The time the event described by the log entry occurred.
11517    pub timestamp: std::option::Option<wkt::Timestamp>,
11518
11519    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11520}
11521
11522impl CloudLoggingEntry {
11523    pub fn new() -> Self {
11524        std::default::Default::default()
11525    }
11526
11527    /// Sets the value of [insert_id][crate::model::CloudLoggingEntry::insert_id].
11528    ///
11529    /// # Example
11530    /// ```ignore,no_run
11531    /// # use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
11532    /// let x = CloudLoggingEntry::new().set_insert_id("example");
11533    /// ```
11534    pub fn set_insert_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11535        self.insert_id = v.into();
11536        self
11537    }
11538
11539    /// Sets the value of [log_id][crate::model::CloudLoggingEntry::log_id].
11540    ///
11541    /// # Example
11542    /// ```ignore,no_run
11543    /// # use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
11544    /// let x = CloudLoggingEntry::new().set_log_id("example");
11545    /// ```
11546    pub fn set_log_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11547        self.log_id = v.into();
11548        self
11549    }
11550
11551    /// Sets the value of [resource_container][crate::model::CloudLoggingEntry::resource_container].
11552    ///
11553    /// # Example
11554    /// ```ignore,no_run
11555    /// # use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
11556    /// let x = CloudLoggingEntry::new().set_resource_container("example");
11557    /// ```
11558    pub fn set_resource_container<T: std::convert::Into<std::string::String>>(
11559        mut self,
11560        v: T,
11561    ) -> Self {
11562        self.resource_container = v.into();
11563        self
11564    }
11565
11566    /// Sets the value of [timestamp][crate::model::CloudLoggingEntry::timestamp].
11567    ///
11568    /// # Example
11569    /// ```ignore,no_run
11570    /// # use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
11571    /// use wkt::Timestamp;
11572    /// let x = CloudLoggingEntry::new().set_timestamp(Timestamp::default()/* use setters */);
11573    /// ```
11574    pub fn set_timestamp<T>(mut self, v: T) -> Self
11575    where
11576        T: std::convert::Into<wkt::Timestamp>,
11577    {
11578        self.timestamp = std::option::Option::Some(v.into());
11579        self
11580    }
11581
11582    /// Sets or clears the value of [timestamp][crate::model::CloudLoggingEntry::timestamp].
11583    ///
11584    /// # Example
11585    /// ```ignore,no_run
11586    /// # use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
11587    /// use wkt::Timestamp;
11588    /// let x = CloudLoggingEntry::new().set_or_clear_timestamp(Some(Timestamp::default()/* use setters */));
11589    /// let x = CloudLoggingEntry::new().set_or_clear_timestamp(None::<Timestamp>);
11590    /// ```
11591    pub fn set_or_clear_timestamp<T>(mut self, v: std::option::Option<T>) -> Self
11592    where
11593        T: std::convert::Into<wkt::Timestamp>,
11594    {
11595        self.timestamp = v.map(|x| x.into());
11596        self
11597    }
11598}
11599
11600impl wkt::message::Message for CloudLoggingEntry {
11601    fn typename() -> &'static str {
11602        "type.googleapis.com/google.cloud.securitycenter.v2.CloudLoggingEntry"
11603    }
11604}
11605
11606/// MITRE ATT&CK tactics and techniques related to this finding.
11607/// See: <https://attack.mitre.org>
11608#[derive(Clone, Default, PartialEq)]
11609#[non_exhaustive]
11610pub struct MitreAttack {
11611    /// The MITRE ATT&CK tactic most closely represented by this finding, if any.
11612    pub primary_tactic: crate::model::mitre_attack::Tactic,
11613
11614    /// The MITRE ATT&CK technique most closely represented by this finding, if
11615    /// any. primary_techniques is a repeated field because there are multiple
11616    /// levels of MITRE ATT&CK techniques.  If the technique most closely
11617    /// represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`),
11618    /// both the sub-technique and its parent technique(s) will be listed (e.g.
11619    /// `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`).
11620    pub primary_techniques: std::vec::Vec<crate::model::mitre_attack::Technique>,
11621
11622    /// Additional MITRE ATT&CK tactics related to this finding, if any.
11623    pub additional_tactics: std::vec::Vec<crate::model::mitre_attack::Tactic>,
11624
11625    /// Additional MITRE ATT&CK techniques related to this finding, if any, along
11626    /// with any of their respective parent techniques.
11627    pub additional_techniques: std::vec::Vec<crate::model::mitre_attack::Technique>,
11628
11629    /// The MITRE ATT&CK version referenced by the above fields. E.g. "8".
11630    pub version: std::string::String,
11631
11632    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11633}
11634
11635impl MitreAttack {
11636    pub fn new() -> Self {
11637        std::default::Default::default()
11638    }
11639
11640    /// Sets the value of [primary_tactic][crate::model::MitreAttack::primary_tactic].
11641    ///
11642    /// # Example
11643    /// ```ignore,no_run
11644    /// # use google_cloud_securitycenter_v2::model::MitreAttack;
11645    /// use google_cloud_securitycenter_v2::model::mitre_attack::Tactic;
11646    /// let x0 = MitreAttack::new().set_primary_tactic(Tactic::Reconnaissance);
11647    /// let x1 = MitreAttack::new().set_primary_tactic(Tactic::ResourceDevelopment);
11648    /// let x2 = MitreAttack::new().set_primary_tactic(Tactic::InitialAccess);
11649    /// ```
11650    pub fn set_primary_tactic<T: std::convert::Into<crate::model::mitre_attack::Tactic>>(
11651        mut self,
11652        v: T,
11653    ) -> Self {
11654        self.primary_tactic = v.into();
11655        self
11656    }
11657
11658    /// Sets the value of [primary_techniques][crate::model::MitreAttack::primary_techniques].
11659    ///
11660    /// # Example
11661    /// ```ignore,no_run
11662    /// # use google_cloud_securitycenter_v2::model::MitreAttack;
11663    /// use google_cloud_securitycenter_v2::model::mitre_attack::Technique;
11664    /// let x = MitreAttack::new().set_primary_techniques([
11665    ///     Technique::DataObfuscation,
11666    ///     Technique::DataObfuscationSteganography,
11667    ///     Technique::OsCredentialDumping,
11668    /// ]);
11669    /// ```
11670    pub fn set_primary_techniques<T, V>(mut self, v: T) -> Self
11671    where
11672        T: std::iter::IntoIterator<Item = V>,
11673        V: std::convert::Into<crate::model::mitre_attack::Technique>,
11674    {
11675        use std::iter::Iterator;
11676        self.primary_techniques = v.into_iter().map(|i| i.into()).collect();
11677        self
11678    }
11679
11680    /// Sets the value of [additional_tactics][crate::model::MitreAttack::additional_tactics].
11681    ///
11682    /// # Example
11683    /// ```ignore,no_run
11684    /// # use google_cloud_securitycenter_v2::model::MitreAttack;
11685    /// use google_cloud_securitycenter_v2::model::mitre_attack::Tactic;
11686    /// let x = MitreAttack::new().set_additional_tactics([
11687    ///     Tactic::Reconnaissance,
11688    ///     Tactic::ResourceDevelopment,
11689    ///     Tactic::InitialAccess,
11690    /// ]);
11691    /// ```
11692    pub fn set_additional_tactics<T, V>(mut self, v: T) -> Self
11693    where
11694        T: std::iter::IntoIterator<Item = V>,
11695        V: std::convert::Into<crate::model::mitre_attack::Tactic>,
11696    {
11697        use std::iter::Iterator;
11698        self.additional_tactics = v.into_iter().map(|i| i.into()).collect();
11699        self
11700    }
11701
11702    /// Sets the value of [additional_techniques][crate::model::MitreAttack::additional_techniques].
11703    ///
11704    /// # Example
11705    /// ```ignore,no_run
11706    /// # use google_cloud_securitycenter_v2::model::MitreAttack;
11707    /// use google_cloud_securitycenter_v2::model::mitre_attack::Technique;
11708    /// let x = MitreAttack::new().set_additional_techniques([
11709    ///     Technique::DataObfuscation,
11710    ///     Technique::DataObfuscationSteganography,
11711    ///     Technique::OsCredentialDumping,
11712    /// ]);
11713    /// ```
11714    pub fn set_additional_techniques<T, V>(mut self, v: T) -> Self
11715    where
11716        T: std::iter::IntoIterator<Item = V>,
11717        V: std::convert::Into<crate::model::mitre_attack::Technique>,
11718    {
11719        use std::iter::Iterator;
11720        self.additional_techniques = v.into_iter().map(|i| i.into()).collect();
11721        self
11722    }
11723
11724    /// Sets the value of [version][crate::model::MitreAttack::version].
11725    ///
11726    /// # Example
11727    /// ```ignore,no_run
11728    /// # use google_cloud_securitycenter_v2::model::MitreAttack;
11729    /// let x = MitreAttack::new().set_version("example");
11730    /// ```
11731    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11732        self.version = v.into();
11733        self
11734    }
11735}
11736
11737impl wkt::message::Message for MitreAttack {
11738    fn typename() -> &'static str {
11739        "type.googleapis.com/google.cloud.securitycenter.v2.MitreAttack"
11740    }
11741}
11742
11743/// Defines additional types related to [MitreAttack].
11744pub mod mitre_attack {
11745    #[allow(unused_imports)]
11746    use super::*;
11747
11748    /// MITRE ATT&CK tactics that can be referenced by SCC findings.
11749    /// See: <https://attack.mitre.org/tactics/enterprise/>
11750    ///
11751    /// # Working with unknown values
11752    ///
11753    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11754    /// additional enum variants at any time. Adding new variants is not considered
11755    /// a breaking change. Applications should write their code in anticipation of:
11756    ///
11757    /// - New values appearing in future releases of the client library, **and**
11758    /// - New values received dynamically, without application changes.
11759    ///
11760    /// Please consult the [Working with enums] section in the user guide for some
11761    /// guidelines.
11762    ///
11763    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11764    #[derive(Clone, Debug, PartialEq)]
11765    #[non_exhaustive]
11766    pub enum Tactic {
11767        /// Unspecified value.
11768        Unspecified,
11769        /// TA0043
11770        Reconnaissance,
11771        /// TA0042
11772        ResourceDevelopment,
11773        /// TA0001
11774        InitialAccess,
11775        /// TA0002
11776        Execution,
11777        /// TA0003
11778        Persistence,
11779        /// TA0004
11780        PrivilegeEscalation,
11781        /// TA0005
11782        DefenseEvasion,
11783        /// TA0006
11784        CredentialAccess,
11785        /// TA0007
11786        Discovery,
11787        /// TA0008
11788        LateralMovement,
11789        /// TA0009
11790        Collection,
11791        /// TA0011
11792        CommandAndControl,
11793        /// TA0010
11794        Exfiltration,
11795        /// TA0040
11796        Impact,
11797        /// If set, the enum was initialized with an unknown value.
11798        ///
11799        /// Applications can examine the value using [Tactic::value] or
11800        /// [Tactic::name].
11801        UnknownValue(tactic::UnknownValue),
11802    }
11803
11804    #[doc(hidden)]
11805    pub mod tactic {
11806        #[allow(unused_imports)]
11807        use super::*;
11808        #[derive(Clone, Debug, PartialEq)]
11809        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11810    }
11811
11812    impl Tactic {
11813        /// Gets the enum value.
11814        ///
11815        /// Returns `None` if the enum contains an unknown value deserialized from
11816        /// the string representation of enums.
11817        pub fn value(&self) -> std::option::Option<i32> {
11818            match self {
11819                Self::Unspecified => std::option::Option::Some(0),
11820                Self::Reconnaissance => std::option::Option::Some(1),
11821                Self::ResourceDevelopment => std::option::Option::Some(2),
11822                Self::InitialAccess => std::option::Option::Some(5),
11823                Self::Execution => std::option::Option::Some(3),
11824                Self::Persistence => std::option::Option::Some(6),
11825                Self::PrivilegeEscalation => std::option::Option::Some(8),
11826                Self::DefenseEvasion => std::option::Option::Some(7),
11827                Self::CredentialAccess => std::option::Option::Some(9),
11828                Self::Discovery => std::option::Option::Some(10),
11829                Self::LateralMovement => std::option::Option::Some(11),
11830                Self::Collection => std::option::Option::Some(12),
11831                Self::CommandAndControl => std::option::Option::Some(4),
11832                Self::Exfiltration => std::option::Option::Some(13),
11833                Self::Impact => std::option::Option::Some(14),
11834                Self::UnknownValue(u) => u.0.value(),
11835            }
11836        }
11837
11838        /// Gets the enum value as a string.
11839        ///
11840        /// Returns `None` if the enum contains an unknown value deserialized from
11841        /// the integer representation of enums.
11842        pub fn name(&self) -> std::option::Option<&str> {
11843            match self {
11844                Self::Unspecified => std::option::Option::Some("TACTIC_UNSPECIFIED"),
11845                Self::Reconnaissance => std::option::Option::Some("RECONNAISSANCE"),
11846                Self::ResourceDevelopment => std::option::Option::Some("RESOURCE_DEVELOPMENT"),
11847                Self::InitialAccess => std::option::Option::Some("INITIAL_ACCESS"),
11848                Self::Execution => std::option::Option::Some("EXECUTION"),
11849                Self::Persistence => std::option::Option::Some("PERSISTENCE"),
11850                Self::PrivilegeEscalation => std::option::Option::Some("PRIVILEGE_ESCALATION"),
11851                Self::DefenseEvasion => std::option::Option::Some("DEFENSE_EVASION"),
11852                Self::CredentialAccess => std::option::Option::Some("CREDENTIAL_ACCESS"),
11853                Self::Discovery => std::option::Option::Some("DISCOVERY"),
11854                Self::LateralMovement => std::option::Option::Some("LATERAL_MOVEMENT"),
11855                Self::Collection => std::option::Option::Some("COLLECTION"),
11856                Self::CommandAndControl => std::option::Option::Some("COMMAND_AND_CONTROL"),
11857                Self::Exfiltration => std::option::Option::Some("EXFILTRATION"),
11858                Self::Impact => std::option::Option::Some("IMPACT"),
11859                Self::UnknownValue(u) => u.0.name(),
11860            }
11861        }
11862    }
11863
11864    impl std::default::Default for Tactic {
11865        fn default() -> Self {
11866            use std::convert::From;
11867            Self::from(0)
11868        }
11869    }
11870
11871    impl std::fmt::Display for Tactic {
11872        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11873            wkt::internal::display_enum(f, self.name(), self.value())
11874        }
11875    }
11876
11877    impl std::convert::From<i32> for Tactic {
11878        fn from(value: i32) -> Self {
11879            match value {
11880                0 => Self::Unspecified,
11881                1 => Self::Reconnaissance,
11882                2 => Self::ResourceDevelopment,
11883                3 => Self::Execution,
11884                4 => Self::CommandAndControl,
11885                5 => Self::InitialAccess,
11886                6 => Self::Persistence,
11887                7 => Self::DefenseEvasion,
11888                8 => Self::PrivilegeEscalation,
11889                9 => Self::CredentialAccess,
11890                10 => Self::Discovery,
11891                11 => Self::LateralMovement,
11892                12 => Self::Collection,
11893                13 => Self::Exfiltration,
11894                14 => Self::Impact,
11895                _ => Self::UnknownValue(tactic::UnknownValue(
11896                    wkt::internal::UnknownEnumValue::Integer(value),
11897                )),
11898            }
11899        }
11900    }
11901
11902    impl std::convert::From<&str> for Tactic {
11903        fn from(value: &str) -> Self {
11904            use std::string::ToString;
11905            match value {
11906                "TACTIC_UNSPECIFIED" => Self::Unspecified,
11907                "RECONNAISSANCE" => Self::Reconnaissance,
11908                "RESOURCE_DEVELOPMENT" => Self::ResourceDevelopment,
11909                "INITIAL_ACCESS" => Self::InitialAccess,
11910                "EXECUTION" => Self::Execution,
11911                "PERSISTENCE" => Self::Persistence,
11912                "PRIVILEGE_ESCALATION" => Self::PrivilegeEscalation,
11913                "DEFENSE_EVASION" => Self::DefenseEvasion,
11914                "CREDENTIAL_ACCESS" => Self::CredentialAccess,
11915                "DISCOVERY" => Self::Discovery,
11916                "LATERAL_MOVEMENT" => Self::LateralMovement,
11917                "COLLECTION" => Self::Collection,
11918                "COMMAND_AND_CONTROL" => Self::CommandAndControl,
11919                "EXFILTRATION" => Self::Exfiltration,
11920                "IMPACT" => Self::Impact,
11921                _ => Self::UnknownValue(tactic::UnknownValue(
11922                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11923                )),
11924            }
11925        }
11926    }
11927
11928    impl serde::ser::Serialize for Tactic {
11929        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11930        where
11931            S: serde::Serializer,
11932        {
11933            match self {
11934                Self::Unspecified => serializer.serialize_i32(0),
11935                Self::Reconnaissance => serializer.serialize_i32(1),
11936                Self::ResourceDevelopment => serializer.serialize_i32(2),
11937                Self::InitialAccess => serializer.serialize_i32(5),
11938                Self::Execution => serializer.serialize_i32(3),
11939                Self::Persistence => serializer.serialize_i32(6),
11940                Self::PrivilegeEscalation => serializer.serialize_i32(8),
11941                Self::DefenseEvasion => serializer.serialize_i32(7),
11942                Self::CredentialAccess => serializer.serialize_i32(9),
11943                Self::Discovery => serializer.serialize_i32(10),
11944                Self::LateralMovement => serializer.serialize_i32(11),
11945                Self::Collection => serializer.serialize_i32(12),
11946                Self::CommandAndControl => serializer.serialize_i32(4),
11947                Self::Exfiltration => serializer.serialize_i32(13),
11948                Self::Impact => serializer.serialize_i32(14),
11949                Self::UnknownValue(u) => u.0.serialize(serializer),
11950            }
11951        }
11952    }
11953
11954    impl<'de> serde::de::Deserialize<'de> for Tactic {
11955        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11956        where
11957            D: serde::Deserializer<'de>,
11958        {
11959            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Tactic>::new(
11960                ".google.cloud.securitycenter.v2.MitreAttack.Tactic",
11961            ))
11962        }
11963    }
11964
11965    /// MITRE ATT&CK techniques that can be referenced by Security Command Center
11966    /// findings. See: <https://attack.mitre.org/techniques/enterprise/>
11967    ///
11968    /// # Working with unknown values
11969    ///
11970    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11971    /// additional enum variants at any time. Adding new variants is not considered
11972    /// a breaking change. Applications should write their code in anticipation of:
11973    ///
11974    /// - New values appearing in future releases of the client library, **and**
11975    /// - New values received dynamically, without application changes.
11976    ///
11977    /// Please consult the [Working with enums] section in the user guide for some
11978    /// guidelines.
11979    ///
11980    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11981    #[derive(Clone, Debug, PartialEq)]
11982    #[non_exhaustive]
11983    pub enum Technique {
11984        /// Unspecified value.
11985        Unspecified,
11986        /// T1001
11987        DataObfuscation,
11988        /// T1001.002
11989        DataObfuscationSteganography,
11990        /// T1003
11991        OsCredentialDumping,
11992        /// T1003.007
11993        OsCredentialDumpingProcFilesystem,
11994        /// T1003.008
11995        OsCredentialDumpingEtcPasswordAndEtcShadow,
11996        /// T1005
11997        DataFromLocalSystem,
11998        /// T1020
11999        AutomatedExfiltration,
12000        /// T1027
12001        ObfuscatedFilesOrInfo,
12002        /// T1027.003
12003        Steganography,
12004        /// T1027.004
12005        CompileAfterDelivery,
12006        /// T1027.010
12007        CommandObfuscation,
12008        /// T1029
12009        ScheduledTransfer,
12010        /// T1033
12011        SystemOwnerUserDiscovery,
12012        /// T1036
12013        Masquerading,
12014        /// T1036.005
12015        MatchLegitimateNameOrLocation,
12016        /// T1037
12017        BootOrLogonInitializationScripts,
12018        /// T1037.005
12019        StartupItems,
12020        /// T1046
12021        NetworkServiceDiscovery,
12022        /// T1053
12023        ScheduledTaskJob,
12024        /// T1053.003
12025        ScheduledTaskJobCron,
12026        /// T1053.007
12027        ContainerOrchestrationJob,
12028        /// T1055
12029        ProcessInjection,
12030        /// T1056
12031        InputCapture,
12032        /// T1056.001
12033        InputCaptureKeylogging,
12034        /// T1057
12035        ProcessDiscovery,
12036        /// T1059
12037        CommandAndScriptingInterpreter,
12038        /// T1059.004
12039        UnixShell,
12040        /// T1059.006
12041        Python,
12042        /// T1068
12043        ExploitationForPrivilegeEscalation,
12044        /// T1069
12045        PermissionGroupsDiscovery,
12046        /// T1069.003
12047        CloudGroups,
12048        /// T1070
12049        IndicatorRemoval,
12050        /// T1070.002
12051        IndicatorRemovalClearLinuxOrMacSystemLogs,
12052        /// T1070.003
12053        IndicatorRemovalClearCommandHistory,
12054        /// T1070.004
12055        IndicatorRemovalFileDeletion,
12056        /// T1070.006
12057        IndicatorRemovalTimestomp,
12058        /// T1070.008
12059        IndicatorRemovalClearMailboxData,
12060        /// T1071
12061        ApplicationLayerProtocol,
12062        /// T1071.004
12063        Dns,
12064        /// T1072
12065        SoftwareDeploymentTools,
12066        /// T1078
12067        ValidAccounts,
12068        /// T1078.001
12069        DefaultAccounts,
12070        /// T1078.003
12071        LocalAccounts,
12072        /// T1078.004
12073        CloudAccounts,
12074        /// T1083
12075        FileAndDirectoryDiscovery,
12076        /// T1087.001
12077        AccountDiscoveryLocalAccount,
12078        /// T1090
12079        Proxy,
12080        /// T1090.002
12081        ExternalProxy,
12082        /// T1090.003
12083        MultiHopProxy,
12084        /// T1098
12085        AccountManipulation,
12086        /// T1098.001
12087        AdditionalCloudCredentials,
12088        /// T1098.003
12089        AdditionalCloudRoles,
12090        /// T1098.004
12091        SshAuthorizedKeys,
12092        /// T1098.006
12093        AdditionalContainerClusterRoles,
12094        /// T1104
12095        MultiStageChannels,
12096        /// T1105
12097        IngressToolTransfer,
12098        /// T1106
12099        NativeApi,
12100        /// T1110
12101        BruteForce,
12102        /// T1119
12103        AutomatedCollection,
12104        /// T1129
12105        SharedModules,
12106        /// T1132
12107        DataEncoding,
12108        /// T1132.001
12109        StandardEncoding,
12110        /// T1134
12111        AccessTokenManipulation,
12112        /// T1134.001
12113        TokenImpersonationOrTheft,
12114        /// T1136
12115        CreateAccount,
12116        /// T1136.001
12117        LocalAccount,
12118        /// T1140
12119        DeobfuscateDecodeFilesOrInfo,
12120        /// T1190
12121        ExploitPublicFacingApplication,
12122        /// T1195
12123        SupplyChainCompromise,
12124        /// T1195.001
12125        CompromiseSoftwareDependenciesAndDevelopmentTools,
12126        /// T1203
12127        ExploitationForClientExecution,
12128        /// T1204
12129        UserExecution,
12130        /// T1222.002
12131        LinuxAndMacFileAndDirectoryPermissionsModification,
12132        /// T1484
12133        DomainPolicyModification,
12134        /// T1485
12135        DataDestruction,
12136        /// T1486
12137        DataEncryptedForImpact,
12138        /// T1489
12139        ServiceStop,
12140        /// T1490
12141        InhibitSystemRecovery,
12142        /// T1495
12143        FirmwareCorruption,
12144        /// T1496
12145        ResourceHijacking,
12146        /// T1498
12147        NetworkDenialOfService,
12148        /// T1526
12149        CloudServiceDiscovery,
12150        /// T1528
12151        StealApplicationAccessToken,
12152        /// T1531
12153        AccountAccessRemoval,
12154        /// T1537
12155        TransferDataToCloudAccount,
12156        /// T1539
12157        StealWebSessionCookie,
12158        /// T1543
12159        CreateOrModifySystemProcess,
12160        /// T1546
12161        EventTriggeredExecution,
12162        /// T1547
12163        BootOrLogonAutostartExecution,
12164        /// T1547.006
12165        KernelModulesAndExtensions,
12166        /// T1547.009
12167        ShortcutModification,
12168        /// T1548
12169        AbuseElevationControlMechanism,
12170        /// T1548.001
12171        AbuseElevationControlMechanismSetuidAndSetgid,
12172        /// T1548.003
12173        AbuseElevationControlMechanismSudoAndSudoCaching,
12174        /// T1552
12175        UnsecuredCredentials,
12176        /// T1552.001
12177        CredentialsInFiles,
12178        /// T1552.003
12179        BashHistory,
12180        /// T1552.004
12181        PrivateKeys,
12182        /// T1553
12183        SubvertTrustControl,
12184        /// T1553.004
12185        InstallRootCertificate,
12186        /// T1554
12187        CompromiseHostSoftwareBinary,
12188        /// T1555
12189        CredentialsFromPasswordStores,
12190        /// T1556
12191        ModifyAuthenticationProcess,
12192        /// T1556.003
12193        PluggableAuthenticationModules,
12194        /// T1556.006
12195        MultiFactorAuthentication,
12196        /// T1562
12197        ImpairDefenses,
12198        /// T1562.001
12199        DisableOrModifyTools,
12200        /// T1562.006
12201        IndicatorBlocking,
12202        /// T1562.012
12203        DisableOrModifyLinuxAuditSystem,
12204        /// T1564
12205        HideArtifacts,
12206        /// T1564.001
12207        HiddenFilesAndDirectories,
12208        /// T1564.002
12209        HiddenUsers,
12210        /// T1567
12211        ExfiltrationOverWebService,
12212        /// T1567.002
12213        ExfiltrationToCloudStorage,
12214        /// T1568
12215        DynamicResolution,
12216        /// T1570
12217        LateralToolTransfer,
12218        /// T1574
12219        HijackExecutionFlow,
12220        /// T1574.006
12221        HijackExecutionFlowDynamicLinkerHijacking,
12222        /// T1578
12223        ModifyCloudComputeInfrastructure,
12224        /// T1578.001
12225        CreateSnapshot,
12226        /// T1580
12227        CloudInfrastructureDiscovery,
12228        /// T1587
12229        DevelopCapabilities,
12230        /// T1587.001
12231        DevelopCapabilitiesMalware,
12232        /// T1588
12233        ObtainCapabilities,
12234        /// T1588.001
12235        ObtainCapabilitiesMalware,
12236        /// T1588.006
12237        ObtainCapabilitiesVulnerabilities,
12238        /// T1595
12239        ActiveScanning,
12240        /// T1595.001
12241        ScanningIpBlocks,
12242        /// T1608
12243        StageCapabilities,
12244        /// T1608.001
12245        UploadMalware,
12246        /// T1609
12247        ContainerAdministrationCommand,
12248        /// T1610
12249        DeployContainer,
12250        /// T1611
12251        EscapeToHost,
12252        /// T1613
12253        ContainerAndResourceDiscovery,
12254        /// T1620
12255        ReflectiveCodeLoading,
12256        /// T1649
12257        StealOrForgeAuthenticationCertificates,
12258        /// T1657
12259        FinancialTheft,
12260        /// If set, the enum was initialized with an unknown value.
12261        ///
12262        /// Applications can examine the value using [Technique::value] or
12263        /// [Technique::name].
12264        UnknownValue(technique::UnknownValue),
12265    }
12266
12267    #[doc(hidden)]
12268    pub mod technique {
12269        #[allow(unused_imports)]
12270        use super::*;
12271        #[derive(Clone, Debug, PartialEq)]
12272        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12273    }
12274
12275    impl Technique {
12276        /// Gets the enum value.
12277        ///
12278        /// Returns `None` if the enum contains an unknown value deserialized from
12279        /// the string representation of enums.
12280        pub fn value(&self) -> std::option::Option<i32> {
12281            match self {
12282                Self::Unspecified => std::option::Option::Some(0),
12283                Self::DataObfuscation => std::option::Option::Some(70),
12284                Self::DataObfuscationSteganography => std::option::Option::Some(71),
12285                Self::OsCredentialDumping => std::option::Option::Some(114),
12286                Self::OsCredentialDumpingProcFilesystem => std::option::Option::Some(115),
12287                Self::OsCredentialDumpingEtcPasswordAndEtcShadow => std::option::Option::Some(122),
12288                Self::DataFromLocalSystem => std::option::Option::Some(117),
12289                Self::AutomatedExfiltration => std::option::Option::Some(68),
12290                Self::ObfuscatedFilesOrInfo => std::option::Option::Some(72),
12291                Self::Steganography => std::option::Option::Some(73),
12292                Self::CompileAfterDelivery => std::option::Option::Some(74),
12293                Self::CommandObfuscation => std::option::Option::Some(75),
12294                Self::ScheduledTransfer => std::option::Option::Some(120),
12295                Self::SystemOwnerUserDiscovery => std::option::Option::Some(118),
12296                Self::Masquerading => std::option::Option::Some(49),
12297                Self::MatchLegitimateNameOrLocation => std::option::Option::Some(50),
12298                Self::BootOrLogonInitializationScripts => std::option::Option::Some(37),
12299                Self::StartupItems => std::option::Option::Some(38),
12300                Self::NetworkServiceDiscovery => std::option::Option::Some(32),
12301                Self::ScheduledTaskJob => std::option::Option::Some(89),
12302                Self::ScheduledTaskJobCron => std::option::Option::Some(119),
12303                Self::ContainerOrchestrationJob => std::option::Option::Some(90),
12304                Self::ProcessInjection => std::option::Option::Some(93),
12305                Self::InputCapture => std::option::Option::Some(103),
12306                Self::InputCaptureKeylogging => std::option::Option::Some(104),
12307                Self::ProcessDiscovery => std::option::Option::Some(56),
12308                Self::CommandAndScriptingInterpreter => std::option::Option::Some(6),
12309                Self::UnixShell => std::option::Option::Some(7),
12310                Self::Python => std::option::Option::Some(59),
12311                Self::ExploitationForPrivilegeEscalation => std::option::Option::Some(63),
12312                Self::PermissionGroupsDiscovery => std::option::Option::Some(18),
12313                Self::CloudGroups => std::option::Option::Some(19),
12314                Self::IndicatorRemoval => std::option::Option::Some(123),
12315                Self::IndicatorRemovalClearLinuxOrMacSystemLogs => std::option::Option::Some(124),
12316                Self::IndicatorRemovalClearCommandHistory => std::option::Option::Some(125),
12317                Self::IndicatorRemovalFileDeletion => std::option::Option::Some(64),
12318                Self::IndicatorRemovalTimestomp => std::option::Option::Some(128),
12319                Self::IndicatorRemovalClearMailboxData => std::option::Option::Some(126),
12320                Self::ApplicationLayerProtocol => std::option::Option::Some(45),
12321                Self::Dns => std::option::Option::Some(46),
12322                Self::SoftwareDeploymentTools => std::option::Option::Some(47),
12323                Self::ValidAccounts => std::option::Option::Some(14),
12324                Self::DefaultAccounts => std::option::Option::Some(35),
12325                Self::LocalAccounts => std::option::Option::Some(15),
12326                Self::CloudAccounts => std::option::Option::Some(16),
12327                Self::FileAndDirectoryDiscovery => std::option::Option::Some(121),
12328                Self::AccountDiscoveryLocalAccount => std::option::Option::Some(116),
12329                Self::Proxy => std::option::Option::Some(9),
12330                Self::ExternalProxy => std::option::Option::Some(10),
12331                Self::MultiHopProxy => std::option::Option::Some(11),
12332                Self::AccountManipulation => std::option::Option::Some(22),
12333                Self::AdditionalCloudCredentials => std::option::Option::Some(40),
12334                Self::AdditionalCloudRoles => std::option::Option::Some(67),
12335                Self::SshAuthorizedKeys => std::option::Option::Some(23),
12336                Self::AdditionalContainerClusterRoles => std::option::Option::Some(58),
12337                Self::MultiStageChannels => std::option::Option::Some(76),
12338                Self::IngressToolTransfer => std::option::Option::Some(3),
12339                Self::NativeApi => std::option::Option::Some(4),
12340                Self::BruteForce => std::option::Option::Some(44),
12341                Self::AutomatedCollection => std::option::Option::Some(94),
12342                Self::SharedModules => std::option::Option::Some(5),
12343                Self::DataEncoding => std::option::Option::Some(77),
12344                Self::StandardEncoding => std::option::Option::Some(78),
12345                Self::AccessTokenManipulation => std::option::Option::Some(33),
12346                Self::TokenImpersonationOrTheft => std::option::Option::Some(39),
12347                Self::CreateAccount => std::option::Option::Some(79),
12348                Self::LocalAccount => std::option::Option::Some(80),
12349                Self::DeobfuscateDecodeFilesOrInfo => std::option::Option::Some(95),
12350                Self::ExploitPublicFacingApplication => std::option::Option::Some(27),
12351                Self::SupplyChainCompromise => std::option::Option::Some(129),
12352                Self::CompromiseSoftwareDependenciesAndDevelopmentTools => {
12353                    std::option::Option::Some(130)
12354                }
12355                Self::ExploitationForClientExecution => std::option::Option::Some(134),
12356                Self::UserExecution => std::option::Option::Some(69),
12357                Self::LinuxAndMacFileAndDirectoryPermissionsModification => {
12358                    std::option::Option::Some(135)
12359                }
12360                Self::DomainPolicyModification => std::option::Option::Some(30),
12361                Self::DataDestruction => std::option::Option::Some(29),
12362                Self::DataEncryptedForImpact => std::option::Option::Some(132),
12363                Self::ServiceStop => std::option::Option::Some(52),
12364                Self::InhibitSystemRecovery => std::option::Option::Some(36),
12365                Self::FirmwareCorruption => std::option::Option::Some(81),
12366                Self::ResourceHijacking => std::option::Option::Some(8),
12367                Self::NetworkDenialOfService => std::option::Option::Some(17),
12368                Self::CloudServiceDiscovery => std::option::Option::Some(48),
12369                Self::StealApplicationAccessToken => std::option::Option::Some(42),
12370                Self::AccountAccessRemoval => std::option::Option::Some(51),
12371                Self::TransferDataToCloudAccount => std::option::Option::Some(91),
12372                Self::StealWebSessionCookie => std::option::Option::Some(25),
12373                Self::CreateOrModifySystemProcess => std::option::Option::Some(24),
12374                Self::EventTriggeredExecution => std::option::Option::Some(65),
12375                Self::BootOrLogonAutostartExecution => std::option::Option::Some(82),
12376                Self::KernelModulesAndExtensions => std::option::Option::Some(83),
12377                Self::ShortcutModification => std::option::Option::Some(127),
12378                Self::AbuseElevationControlMechanism => std::option::Option::Some(34),
12379                Self::AbuseElevationControlMechanismSetuidAndSetgid => {
12380                    std::option::Option::Some(136)
12381                }
12382                Self::AbuseElevationControlMechanismSudoAndSudoCaching => {
12383                    std::option::Option::Some(109)
12384                }
12385                Self::UnsecuredCredentials => std::option::Option::Some(13),
12386                Self::CredentialsInFiles => std::option::Option::Some(105),
12387                Self::BashHistory => std::option::Option::Some(96),
12388                Self::PrivateKeys => std::option::Option::Some(97),
12389                Self::SubvertTrustControl => std::option::Option::Some(106),
12390                Self::InstallRootCertificate => std::option::Option::Some(107),
12391                Self::CompromiseHostSoftwareBinary => std::option::Option::Some(84),
12392                Self::CredentialsFromPasswordStores => std::option::Option::Some(98),
12393                Self::ModifyAuthenticationProcess => std::option::Option::Some(28),
12394                Self::PluggableAuthenticationModules => std::option::Option::Some(108),
12395                Self::MultiFactorAuthentication => std::option::Option::Some(137),
12396                Self::ImpairDefenses => std::option::Option::Some(31),
12397                Self::DisableOrModifyTools => std::option::Option::Some(55),
12398                Self::IndicatorBlocking => std::option::Option::Some(110),
12399                Self::DisableOrModifyLinuxAuditSystem => std::option::Option::Some(111),
12400                Self::HideArtifacts => std::option::Option::Some(85),
12401                Self::HiddenFilesAndDirectories => std::option::Option::Some(86),
12402                Self::HiddenUsers => std::option::Option::Some(87),
12403                Self::ExfiltrationOverWebService => std::option::Option::Some(20),
12404                Self::ExfiltrationToCloudStorage => std::option::Option::Some(21),
12405                Self::DynamicResolution => std::option::Option::Some(12),
12406                Self::LateralToolTransfer => std::option::Option::Some(41),
12407                Self::HijackExecutionFlow => std::option::Option::Some(112),
12408                Self::HijackExecutionFlowDynamicLinkerHijacking => std::option::Option::Some(113),
12409                Self::ModifyCloudComputeInfrastructure => std::option::Option::Some(26),
12410                Self::CreateSnapshot => std::option::Option::Some(54),
12411                Self::CloudInfrastructureDiscovery => std::option::Option::Some(53),
12412                Self::DevelopCapabilities => std::option::Option::Some(99),
12413                Self::DevelopCapabilitiesMalware => std::option::Option::Some(100),
12414                Self::ObtainCapabilities => std::option::Option::Some(43),
12415                Self::ObtainCapabilitiesMalware => std::option::Option::Some(101),
12416                Self::ObtainCapabilitiesVulnerabilities => std::option::Option::Some(133),
12417                Self::ActiveScanning => std::option::Option::Some(1),
12418                Self::ScanningIpBlocks => std::option::Option::Some(2),
12419                Self::StageCapabilities => std::option::Option::Some(88),
12420                Self::UploadMalware => std::option::Option::Some(102),
12421                Self::ContainerAdministrationCommand => std::option::Option::Some(60),
12422                Self::DeployContainer => std::option::Option::Some(66),
12423                Self::EscapeToHost => std::option::Option::Some(61),
12424                Self::ContainerAndResourceDiscovery => std::option::Option::Some(57),
12425                Self::ReflectiveCodeLoading => std::option::Option::Some(92),
12426                Self::StealOrForgeAuthenticationCertificates => std::option::Option::Some(62),
12427                Self::FinancialTheft => std::option::Option::Some(131),
12428                Self::UnknownValue(u) => u.0.value(),
12429            }
12430        }
12431
12432        /// Gets the enum value as a string.
12433        ///
12434        /// Returns `None` if the enum contains an unknown value deserialized from
12435        /// the integer representation of enums.
12436        pub fn name(&self) -> std::option::Option<&str> {
12437            match self {
12438                Self::Unspecified => std::option::Option::Some("TECHNIQUE_UNSPECIFIED"),
12439                Self::DataObfuscation => std::option::Option::Some("DATA_OBFUSCATION"),
12440                Self::DataObfuscationSteganography => {
12441                    std::option::Option::Some("DATA_OBFUSCATION_STEGANOGRAPHY")
12442                }
12443                Self::OsCredentialDumping => std::option::Option::Some("OS_CREDENTIAL_DUMPING"),
12444                Self::OsCredentialDumpingProcFilesystem => {
12445                    std::option::Option::Some("OS_CREDENTIAL_DUMPING_PROC_FILESYSTEM")
12446                }
12447                Self::OsCredentialDumpingEtcPasswordAndEtcShadow => {
12448                    std::option::Option::Some("OS_CREDENTIAL_DUMPING_ETC_PASSWORD_AND_ETC_SHADOW")
12449                }
12450                Self::DataFromLocalSystem => std::option::Option::Some("DATA_FROM_LOCAL_SYSTEM"),
12451                Self::AutomatedExfiltration => std::option::Option::Some("AUTOMATED_EXFILTRATION"),
12452                Self::ObfuscatedFilesOrInfo => {
12453                    std::option::Option::Some("OBFUSCATED_FILES_OR_INFO")
12454                }
12455                Self::Steganography => std::option::Option::Some("STEGANOGRAPHY"),
12456                Self::CompileAfterDelivery => std::option::Option::Some("COMPILE_AFTER_DELIVERY"),
12457                Self::CommandObfuscation => std::option::Option::Some("COMMAND_OBFUSCATION"),
12458                Self::ScheduledTransfer => std::option::Option::Some("SCHEDULED_TRANSFER"),
12459                Self::SystemOwnerUserDiscovery => {
12460                    std::option::Option::Some("SYSTEM_OWNER_USER_DISCOVERY")
12461                }
12462                Self::Masquerading => std::option::Option::Some("MASQUERADING"),
12463                Self::MatchLegitimateNameOrLocation => {
12464                    std::option::Option::Some("MATCH_LEGITIMATE_NAME_OR_LOCATION")
12465                }
12466                Self::BootOrLogonInitializationScripts => {
12467                    std::option::Option::Some("BOOT_OR_LOGON_INITIALIZATION_SCRIPTS")
12468                }
12469                Self::StartupItems => std::option::Option::Some("STARTUP_ITEMS"),
12470                Self::NetworkServiceDiscovery => {
12471                    std::option::Option::Some("NETWORK_SERVICE_DISCOVERY")
12472                }
12473                Self::ScheduledTaskJob => std::option::Option::Some("SCHEDULED_TASK_JOB"),
12474                Self::ScheduledTaskJobCron => std::option::Option::Some("SCHEDULED_TASK_JOB_CRON"),
12475                Self::ContainerOrchestrationJob => {
12476                    std::option::Option::Some("CONTAINER_ORCHESTRATION_JOB")
12477                }
12478                Self::ProcessInjection => std::option::Option::Some("PROCESS_INJECTION"),
12479                Self::InputCapture => std::option::Option::Some("INPUT_CAPTURE"),
12480                Self::InputCaptureKeylogging => {
12481                    std::option::Option::Some("INPUT_CAPTURE_KEYLOGGING")
12482                }
12483                Self::ProcessDiscovery => std::option::Option::Some("PROCESS_DISCOVERY"),
12484                Self::CommandAndScriptingInterpreter => {
12485                    std::option::Option::Some("COMMAND_AND_SCRIPTING_INTERPRETER")
12486                }
12487                Self::UnixShell => std::option::Option::Some("UNIX_SHELL"),
12488                Self::Python => std::option::Option::Some("PYTHON"),
12489                Self::ExploitationForPrivilegeEscalation => {
12490                    std::option::Option::Some("EXPLOITATION_FOR_PRIVILEGE_ESCALATION")
12491                }
12492                Self::PermissionGroupsDiscovery => {
12493                    std::option::Option::Some("PERMISSION_GROUPS_DISCOVERY")
12494                }
12495                Self::CloudGroups => std::option::Option::Some("CLOUD_GROUPS"),
12496                Self::IndicatorRemoval => std::option::Option::Some("INDICATOR_REMOVAL"),
12497                Self::IndicatorRemovalClearLinuxOrMacSystemLogs => {
12498                    std::option::Option::Some("INDICATOR_REMOVAL_CLEAR_LINUX_OR_MAC_SYSTEM_LOGS")
12499                }
12500                Self::IndicatorRemovalClearCommandHistory => {
12501                    std::option::Option::Some("INDICATOR_REMOVAL_CLEAR_COMMAND_HISTORY")
12502                }
12503                Self::IndicatorRemovalFileDeletion => {
12504                    std::option::Option::Some("INDICATOR_REMOVAL_FILE_DELETION")
12505                }
12506                Self::IndicatorRemovalTimestomp => {
12507                    std::option::Option::Some("INDICATOR_REMOVAL_TIMESTOMP")
12508                }
12509                Self::IndicatorRemovalClearMailboxData => {
12510                    std::option::Option::Some("INDICATOR_REMOVAL_CLEAR_MAILBOX_DATA")
12511                }
12512                Self::ApplicationLayerProtocol => {
12513                    std::option::Option::Some("APPLICATION_LAYER_PROTOCOL")
12514                }
12515                Self::Dns => std::option::Option::Some("DNS"),
12516                Self::SoftwareDeploymentTools => {
12517                    std::option::Option::Some("SOFTWARE_DEPLOYMENT_TOOLS")
12518                }
12519                Self::ValidAccounts => std::option::Option::Some("VALID_ACCOUNTS"),
12520                Self::DefaultAccounts => std::option::Option::Some("DEFAULT_ACCOUNTS"),
12521                Self::LocalAccounts => std::option::Option::Some("LOCAL_ACCOUNTS"),
12522                Self::CloudAccounts => std::option::Option::Some("CLOUD_ACCOUNTS"),
12523                Self::FileAndDirectoryDiscovery => {
12524                    std::option::Option::Some("FILE_AND_DIRECTORY_DISCOVERY")
12525                }
12526                Self::AccountDiscoveryLocalAccount => {
12527                    std::option::Option::Some("ACCOUNT_DISCOVERY_LOCAL_ACCOUNT")
12528                }
12529                Self::Proxy => std::option::Option::Some("PROXY"),
12530                Self::ExternalProxy => std::option::Option::Some("EXTERNAL_PROXY"),
12531                Self::MultiHopProxy => std::option::Option::Some("MULTI_HOP_PROXY"),
12532                Self::AccountManipulation => std::option::Option::Some("ACCOUNT_MANIPULATION"),
12533                Self::AdditionalCloudCredentials => {
12534                    std::option::Option::Some("ADDITIONAL_CLOUD_CREDENTIALS")
12535                }
12536                Self::AdditionalCloudRoles => std::option::Option::Some("ADDITIONAL_CLOUD_ROLES"),
12537                Self::SshAuthorizedKeys => std::option::Option::Some("SSH_AUTHORIZED_KEYS"),
12538                Self::AdditionalContainerClusterRoles => {
12539                    std::option::Option::Some("ADDITIONAL_CONTAINER_CLUSTER_ROLES")
12540                }
12541                Self::MultiStageChannels => std::option::Option::Some("MULTI_STAGE_CHANNELS"),
12542                Self::IngressToolTransfer => std::option::Option::Some("INGRESS_TOOL_TRANSFER"),
12543                Self::NativeApi => std::option::Option::Some("NATIVE_API"),
12544                Self::BruteForce => std::option::Option::Some("BRUTE_FORCE"),
12545                Self::AutomatedCollection => std::option::Option::Some("AUTOMATED_COLLECTION"),
12546                Self::SharedModules => std::option::Option::Some("SHARED_MODULES"),
12547                Self::DataEncoding => std::option::Option::Some("DATA_ENCODING"),
12548                Self::StandardEncoding => std::option::Option::Some("STANDARD_ENCODING"),
12549                Self::AccessTokenManipulation => {
12550                    std::option::Option::Some("ACCESS_TOKEN_MANIPULATION")
12551                }
12552                Self::TokenImpersonationOrTheft => {
12553                    std::option::Option::Some("TOKEN_IMPERSONATION_OR_THEFT")
12554                }
12555                Self::CreateAccount => std::option::Option::Some("CREATE_ACCOUNT"),
12556                Self::LocalAccount => std::option::Option::Some("LOCAL_ACCOUNT"),
12557                Self::DeobfuscateDecodeFilesOrInfo => {
12558                    std::option::Option::Some("DEOBFUSCATE_DECODE_FILES_OR_INFO")
12559                }
12560                Self::ExploitPublicFacingApplication => {
12561                    std::option::Option::Some("EXPLOIT_PUBLIC_FACING_APPLICATION")
12562                }
12563                Self::SupplyChainCompromise => std::option::Option::Some("SUPPLY_CHAIN_COMPROMISE"),
12564                Self::CompromiseSoftwareDependenciesAndDevelopmentTools => {
12565                    std::option::Option::Some(
12566                        "COMPROMISE_SOFTWARE_DEPENDENCIES_AND_DEVELOPMENT_TOOLS",
12567                    )
12568                }
12569                Self::ExploitationForClientExecution => {
12570                    std::option::Option::Some("EXPLOITATION_FOR_CLIENT_EXECUTION")
12571                }
12572                Self::UserExecution => std::option::Option::Some("USER_EXECUTION"),
12573                Self::LinuxAndMacFileAndDirectoryPermissionsModification => {
12574                    std::option::Option::Some(
12575                        "LINUX_AND_MAC_FILE_AND_DIRECTORY_PERMISSIONS_MODIFICATION",
12576                    )
12577                }
12578                Self::DomainPolicyModification => {
12579                    std::option::Option::Some("DOMAIN_POLICY_MODIFICATION")
12580                }
12581                Self::DataDestruction => std::option::Option::Some("DATA_DESTRUCTION"),
12582                Self::DataEncryptedForImpact => {
12583                    std::option::Option::Some("DATA_ENCRYPTED_FOR_IMPACT")
12584                }
12585                Self::ServiceStop => std::option::Option::Some("SERVICE_STOP"),
12586                Self::InhibitSystemRecovery => std::option::Option::Some("INHIBIT_SYSTEM_RECOVERY"),
12587                Self::FirmwareCorruption => std::option::Option::Some("FIRMWARE_CORRUPTION"),
12588                Self::ResourceHijacking => std::option::Option::Some("RESOURCE_HIJACKING"),
12589                Self::NetworkDenialOfService => {
12590                    std::option::Option::Some("NETWORK_DENIAL_OF_SERVICE")
12591                }
12592                Self::CloudServiceDiscovery => std::option::Option::Some("CLOUD_SERVICE_DISCOVERY"),
12593                Self::StealApplicationAccessToken => {
12594                    std::option::Option::Some("STEAL_APPLICATION_ACCESS_TOKEN")
12595                }
12596                Self::AccountAccessRemoval => std::option::Option::Some("ACCOUNT_ACCESS_REMOVAL"),
12597                Self::TransferDataToCloudAccount => {
12598                    std::option::Option::Some("TRANSFER_DATA_TO_CLOUD_ACCOUNT")
12599                }
12600                Self::StealWebSessionCookie => {
12601                    std::option::Option::Some("STEAL_WEB_SESSION_COOKIE")
12602                }
12603                Self::CreateOrModifySystemProcess => {
12604                    std::option::Option::Some("CREATE_OR_MODIFY_SYSTEM_PROCESS")
12605                }
12606                Self::EventTriggeredExecution => {
12607                    std::option::Option::Some("EVENT_TRIGGERED_EXECUTION")
12608                }
12609                Self::BootOrLogonAutostartExecution => {
12610                    std::option::Option::Some("BOOT_OR_LOGON_AUTOSTART_EXECUTION")
12611                }
12612                Self::KernelModulesAndExtensions => {
12613                    std::option::Option::Some("KERNEL_MODULES_AND_EXTENSIONS")
12614                }
12615                Self::ShortcutModification => std::option::Option::Some("SHORTCUT_MODIFICATION"),
12616                Self::AbuseElevationControlMechanism => {
12617                    std::option::Option::Some("ABUSE_ELEVATION_CONTROL_MECHANISM")
12618                }
12619                Self::AbuseElevationControlMechanismSetuidAndSetgid => {
12620                    std::option::Option::Some("ABUSE_ELEVATION_CONTROL_MECHANISM_SETUID_AND_SETGID")
12621                }
12622                Self::AbuseElevationControlMechanismSudoAndSudoCaching => {
12623                    std::option::Option::Some(
12624                        "ABUSE_ELEVATION_CONTROL_MECHANISM_SUDO_AND_SUDO_CACHING",
12625                    )
12626                }
12627                Self::UnsecuredCredentials => std::option::Option::Some("UNSECURED_CREDENTIALS"),
12628                Self::CredentialsInFiles => std::option::Option::Some("CREDENTIALS_IN_FILES"),
12629                Self::BashHistory => std::option::Option::Some("BASH_HISTORY"),
12630                Self::PrivateKeys => std::option::Option::Some("PRIVATE_KEYS"),
12631                Self::SubvertTrustControl => std::option::Option::Some("SUBVERT_TRUST_CONTROL"),
12632                Self::InstallRootCertificate => {
12633                    std::option::Option::Some("INSTALL_ROOT_CERTIFICATE")
12634                }
12635                Self::CompromiseHostSoftwareBinary => {
12636                    std::option::Option::Some("COMPROMISE_HOST_SOFTWARE_BINARY")
12637                }
12638                Self::CredentialsFromPasswordStores => {
12639                    std::option::Option::Some("CREDENTIALS_FROM_PASSWORD_STORES")
12640                }
12641                Self::ModifyAuthenticationProcess => {
12642                    std::option::Option::Some("MODIFY_AUTHENTICATION_PROCESS")
12643                }
12644                Self::PluggableAuthenticationModules => {
12645                    std::option::Option::Some("PLUGGABLE_AUTHENTICATION_MODULES")
12646                }
12647                Self::MultiFactorAuthentication => {
12648                    std::option::Option::Some("MULTI_FACTOR_AUTHENTICATION")
12649                }
12650                Self::ImpairDefenses => std::option::Option::Some("IMPAIR_DEFENSES"),
12651                Self::DisableOrModifyTools => std::option::Option::Some("DISABLE_OR_MODIFY_TOOLS"),
12652                Self::IndicatorBlocking => std::option::Option::Some("INDICATOR_BLOCKING"),
12653                Self::DisableOrModifyLinuxAuditSystem => {
12654                    std::option::Option::Some("DISABLE_OR_MODIFY_LINUX_AUDIT_SYSTEM")
12655                }
12656                Self::HideArtifacts => std::option::Option::Some("HIDE_ARTIFACTS"),
12657                Self::HiddenFilesAndDirectories => {
12658                    std::option::Option::Some("HIDDEN_FILES_AND_DIRECTORIES")
12659                }
12660                Self::HiddenUsers => std::option::Option::Some("HIDDEN_USERS"),
12661                Self::ExfiltrationOverWebService => {
12662                    std::option::Option::Some("EXFILTRATION_OVER_WEB_SERVICE")
12663                }
12664                Self::ExfiltrationToCloudStorage => {
12665                    std::option::Option::Some("EXFILTRATION_TO_CLOUD_STORAGE")
12666                }
12667                Self::DynamicResolution => std::option::Option::Some("DYNAMIC_RESOLUTION"),
12668                Self::LateralToolTransfer => std::option::Option::Some("LATERAL_TOOL_TRANSFER"),
12669                Self::HijackExecutionFlow => std::option::Option::Some("HIJACK_EXECUTION_FLOW"),
12670                Self::HijackExecutionFlowDynamicLinkerHijacking => {
12671                    std::option::Option::Some("HIJACK_EXECUTION_FLOW_DYNAMIC_LINKER_HIJACKING")
12672                }
12673                Self::ModifyCloudComputeInfrastructure => {
12674                    std::option::Option::Some("MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE")
12675                }
12676                Self::CreateSnapshot => std::option::Option::Some("CREATE_SNAPSHOT"),
12677                Self::CloudInfrastructureDiscovery => {
12678                    std::option::Option::Some("CLOUD_INFRASTRUCTURE_DISCOVERY")
12679                }
12680                Self::DevelopCapabilities => std::option::Option::Some("DEVELOP_CAPABILITIES"),
12681                Self::DevelopCapabilitiesMalware => {
12682                    std::option::Option::Some("DEVELOP_CAPABILITIES_MALWARE")
12683                }
12684                Self::ObtainCapabilities => std::option::Option::Some("OBTAIN_CAPABILITIES"),
12685                Self::ObtainCapabilitiesMalware => {
12686                    std::option::Option::Some("OBTAIN_CAPABILITIES_MALWARE")
12687                }
12688                Self::ObtainCapabilitiesVulnerabilities => {
12689                    std::option::Option::Some("OBTAIN_CAPABILITIES_VULNERABILITIES")
12690                }
12691                Self::ActiveScanning => std::option::Option::Some("ACTIVE_SCANNING"),
12692                Self::ScanningIpBlocks => std::option::Option::Some("SCANNING_IP_BLOCKS"),
12693                Self::StageCapabilities => std::option::Option::Some("STAGE_CAPABILITIES"),
12694                Self::UploadMalware => std::option::Option::Some("UPLOAD_MALWARE"),
12695                Self::ContainerAdministrationCommand => {
12696                    std::option::Option::Some("CONTAINER_ADMINISTRATION_COMMAND")
12697                }
12698                Self::DeployContainer => std::option::Option::Some("DEPLOY_CONTAINER"),
12699                Self::EscapeToHost => std::option::Option::Some("ESCAPE_TO_HOST"),
12700                Self::ContainerAndResourceDiscovery => {
12701                    std::option::Option::Some("CONTAINER_AND_RESOURCE_DISCOVERY")
12702                }
12703                Self::ReflectiveCodeLoading => std::option::Option::Some("REFLECTIVE_CODE_LOADING"),
12704                Self::StealOrForgeAuthenticationCertificates => {
12705                    std::option::Option::Some("STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES")
12706                }
12707                Self::FinancialTheft => std::option::Option::Some("FINANCIAL_THEFT"),
12708                Self::UnknownValue(u) => u.0.name(),
12709            }
12710        }
12711    }
12712
12713    impl std::default::Default for Technique {
12714        fn default() -> Self {
12715            use std::convert::From;
12716            Self::from(0)
12717        }
12718    }
12719
12720    impl std::fmt::Display for Technique {
12721        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12722            wkt::internal::display_enum(f, self.name(), self.value())
12723        }
12724    }
12725
12726    impl std::convert::From<i32> for Technique {
12727        fn from(value: i32) -> Self {
12728            match value {
12729                0 => Self::Unspecified,
12730                1 => Self::ActiveScanning,
12731                2 => Self::ScanningIpBlocks,
12732                3 => Self::IngressToolTransfer,
12733                4 => Self::NativeApi,
12734                5 => Self::SharedModules,
12735                6 => Self::CommandAndScriptingInterpreter,
12736                7 => Self::UnixShell,
12737                8 => Self::ResourceHijacking,
12738                9 => Self::Proxy,
12739                10 => Self::ExternalProxy,
12740                11 => Self::MultiHopProxy,
12741                12 => Self::DynamicResolution,
12742                13 => Self::UnsecuredCredentials,
12743                14 => Self::ValidAccounts,
12744                15 => Self::LocalAccounts,
12745                16 => Self::CloudAccounts,
12746                17 => Self::NetworkDenialOfService,
12747                18 => Self::PermissionGroupsDiscovery,
12748                19 => Self::CloudGroups,
12749                20 => Self::ExfiltrationOverWebService,
12750                21 => Self::ExfiltrationToCloudStorage,
12751                22 => Self::AccountManipulation,
12752                23 => Self::SshAuthorizedKeys,
12753                24 => Self::CreateOrModifySystemProcess,
12754                25 => Self::StealWebSessionCookie,
12755                26 => Self::ModifyCloudComputeInfrastructure,
12756                27 => Self::ExploitPublicFacingApplication,
12757                28 => Self::ModifyAuthenticationProcess,
12758                29 => Self::DataDestruction,
12759                30 => Self::DomainPolicyModification,
12760                31 => Self::ImpairDefenses,
12761                32 => Self::NetworkServiceDiscovery,
12762                33 => Self::AccessTokenManipulation,
12763                34 => Self::AbuseElevationControlMechanism,
12764                35 => Self::DefaultAccounts,
12765                36 => Self::InhibitSystemRecovery,
12766                37 => Self::BootOrLogonInitializationScripts,
12767                38 => Self::StartupItems,
12768                39 => Self::TokenImpersonationOrTheft,
12769                40 => Self::AdditionalCloudCredentials,
12770                41 => Self::LateralToolTransfer,
12771                42 => Self::StealApplicationAccessToken,
12772                43 => Self::ObtainCapabilities,
12773                44 => Self::BruteForce,
12774                45 => Self::ApplicationLayerProtocol,
12775                46 => Self::Dns,
12776                47 => Self::SoftwareDeploymentTools,
12777                48 => Self::CloudServiceDiscovery,
12778                49 => Self::Masquerading,
12779                50 => Self::MatchLegitimateNameOrLocation,
12780                51 => Self::AccountAccessRemoval,
12781                52 => Self::ServiceStop,
12782                53 => Self::CloudInfrastructureDiscovery,
12783                54 => Self::CreateSnapshot,
12784                55 => Self::DisableOrModifyTools,
12785                56 => Self::ProcessDiscovery,
12786                57 => Self::ContainerAndResourceDiscovery,
12787                58 => Self::AdditionalContainerClusterRoles,
12788                59 => Self::Python,
12789                60 => Self::ContainerAdministrationCommand,
12790                61 => Self::EscapeToHost,
12791                62 => Self::StealOrForgeAuthenticationCertificates,
12792                63 => Self::ExploitationForPrivilegeEscalation,
12793                64 => Self::IndicatorRemovalFileDeletion,
12794                65 => Self::EventTriggeredExecution,
12795                66 => Self::DeployContainer,
12796                67 => Self::AdditionalCloudRoles,
12797                68 => Self::AutomatedExfiltration,
12798                69 => Self::UserExecution,
12799                70 => Self::DataObfuscation,
12800                71 => Self::DataObfuscationSteganography,
12801                72 => Self::ObfuscatedFilesOrInfo,
12802                73 => Self::Steganography,
12803                74 => Self::CompileAfterDelivery,
12804                75 => Self::CommandObfuscation,
12805                76 => Self::MultiStageChannels,
12806                77 => Self::DataEncoding,
12807                78 => Self::StandardEncoding,
12808                79 => Self::CreateAccount,
12809                80 => Self::LocalAccount,
12810                81 => Self::FirmwareCorruption,
12811                82 => Self::BootOrLogonAutostartExecution,
12812                83 => Self::KernelModulesAndExtensions,
12813                84 => Self::CompromiseHostSoftwareBinary,
12814                85 => Self::HideArtifacts,
12815                86 => Self::HiddenFilesAndDirectories,
12816                87 => Self::HiddenUsers,
12817                88 => Self::StageCapabilities,
12818                89 => Self::ScheduledTaskJob,
12819                90 => Self::ContainerOrchestrationJob,
12820                91 => Self::TransferDataToCloudAccount,
12821                92 => Self::ReflectiveCodeLoading,
12822                93 => Self::ProcessInjection,
12823                94 => Self::AutomatedCollection,
12824                95 => Self::DeobfuscateDecodeFilesOrInfo,
12825                96 => Self::BashHistory,
12826                97 => Self::PrivateKeys,
12827                98 => Self::CredentialsFromPasswordStores,
12828                99 => Self::DevelopCapabilities,
12829                100 => Self::DevelopCapabilitiesMalware,
12830                101 => Self::ObtainCapabilitiesMalware,
12831                102 => Self::UploadMalware,
12832                103 => Self::InputCapture,
12833                104 => Self::InputCaptureKeylogging,
12834                105 => Self::CredentialsInFiles,
12835                106 => Self::SubvertTrustControl,
12836                107 => Self::InstallRootCertificate,
12837                108 => Self::PluggableAuthenticationModules,
12838                109 => Self::AbuseElevationControlMechanismSudoAndSudoCaching,
12839                110 => Self::IndicatorBlocking,
12840                111 => Self::DisableOrModifyLinuxAuditSystem,
12841                112 => Self::HijackExecutionFlow,
12842                113 => Self::HijackExecutionFlowDynamicLinkerHijacking,
12843                114 => Self::OsCredentialDumping,
12844                115 => Self::OsCredentialDumpingProcFilesystem,
12845                116 => Self::AccountDiscoveryLocalAccount,
12846                117 => Self::DataFromLocalSystem,
12847                118 => Self::SystemOwnerUserDiscovery,
12848                119 => Self::ScheduledTaskJobCron,
12849                120 => Self::ScheduledTransfer,
12850                121 => Self::FileAndDirectoryDiscovery,
12851                122 => Self::OsCredentialDumpingEtcPasswordAndEtcShadow,
12852                123 => Self::IndicatorRemoval,
12853                124 => Self::IndicatorRemovalClearLinuxOrMacSystemLogs,
12854                125 => Self::IndicatorRemovalClearCommandHistory,
12855                126 => Self::IndicatorRemovalClearMailboxData,
12856                127 => Self::ShortcutModification,
12857                128 => Self::IndicatorRemovalTimestomp,
12858                129 => Self::SupplyChainCompromise,
12859                130 => Self::CompromiseSoftwareDependenciesAndDevelopmentTools,
12860                131 => Self::FinancialTheft,
12861                132 => Self::DataEncryptedForImpact,
12862                133 => Self::ObtainCapabilitiesVulnerabilities,
12863                134 => Self::ExploitationForClientExecution,
12864                135 => Self::LinuxAndMacFileAndDirectoryPermissionsModification,
12865                136 => Self::AbuseElevationControlMechanismSetuidAndSetgid,
12866                137 => Self::MultiFactorAuthentication,
12867                _ => Self::UnknownValue(technique::UnknownValue(
12868                    wkt::internal::UnknownEnumValue::Integer(value),
12869                )),
12870            }
12871        }
12872    }
12873
12874    impl std::convert::From<&str> for Technique {
12875        fn from(value: &str) -> Self {
12876            use std::string::ToString;
12877            match value {
12878                "TECHNIQUE_UNSPECIFIED" => Self::Unspecified,
12879                "DATA_OBFUSCATION" => Self::DataObfuscation,
12880                "DATA_OBFUSCATION_STEGANOGRAPHY" => Self::DataObfuscationSteganography,
12881                "OS_CREDENTIAL_DUMPING" => Self::OsCredentialDumping,
12882                "OS_CREDENTIAL_DUMPING_PROC_FILESYSTEM" => Self::OsCredentialDumpingProcFilesystem,
12883                "OS_CREDENTIAL_DUMPING_ETC_PASSWORD_AND_ETC_SHADOW" => {
12884                    Self::OsCredentialDumpingEtcPasswordAndEtcShadow
12885                }
12886                "DATA_FROM_LOCAL_SYSTEM" => Self::DataFromLocalSystem,
12887                "AUTOMATED_EXFILTRATION" => Self::AutomatedExfiltration,
12888                "OBFUSCATED_FILES_OR_INFO" => Self::ObfuscatedFilesOrInfo,
12889                "STEGANOGRAPHY" => Self::Steganography,
12890                "COMPILE_AFTER_DELIVERY" => Self::CompileAfterDelivery,
12891                "COMMAND_OBFUSCATION" => Self::CommandObfuscation,
12892                "SCHEDULED_TRANSFER" => Self::ScheduledTransfer,
12893                "SYSTEM_OWNER_USER_DISCOVERY" => Self::SystemOwnerUserDiscovery,
12894                "MASQUERADING" => Self::Masquerading,
12895                "MATCH_LEGITIMATE_NAME_OR_LOCATION" => Self::MatchLegitimateNameOrLocation,
12896                "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS" => Self::BootOrLogonInitializationScripts,
12897                "STARTUP_ITEMS" => Self::StartupItems,
12898                "NETWORK_SERVICE_DISCOVERY" => Self::NetworkServiceDiscovery,
12899                "SCHEDULED_TASK_JOB" => Self::ScheduledTaskJob,
12900                "SCHEDULED_TASK_JOB_CRON" => Self::ScheduledTaskJobCron,
12901                "CONTAINER_ORCHESTRATION_JOB" => Self::ContainerOrchestrationJob,
12902                "PROCESS_INJECTION" => Self::ProcessInjection,
12903                "INPUT_CAPTURE" => Self::InputCapture,
12904                "INPUT_CAPTURE_KEYLOGGING" => Self::InputCaptureKeylogging,
12905                "PROCESS_DISCOVERY" => Self::ProcessDiscovery,
12906                "COMMAND_AND_SCRIPTING_INTERPRETER" => Self::CommandAndScriptingInterpreter,
12907                "UNIX_SHELL" => Self::UnixShell,
12908                "PYTHON" => Self::Python,
12909                "EXPLOITATION_FOR_PRIVILEGE_ESCALATION" => Self::ExploitationForPrivilegeEscalation,
12910                "PERMISSION_GROUPS_DISCOVERY" => Self::PermissionGroupsDiscovery,
12911                "CLOUD_GROUPS" => Self::CloudGroups,
12912                "INDICATOR_REMOVAL" => Self::IndicatorRemoval,
12913                "INDICATOR_REMOVAL_CLEAR_LINUX_OR_MAC_SYSTEM_LOGS" => {
12914                    Self::IndicatorRemovalClearLinuxOrMacSystemLogs
12915                }
12916                "INDICATOR_REMOVAL_CLEAR_COMMAND_HISTORY" => {
12917                    Self::IndicatorRemovalClearCommandHistory
12918                }
12919                "INDICATOR_REMOVAL_FILE_DELETION" => Self::IndicatorRemovalFileDeletion,
12920                "INDICATOR_REMOVAL_TIMESTOMP" => Self::IndicatorRemovalTimestomp,
12921                "INDICATOR_REMOVAL_CLEAR_MAILBOX_DATA" => Self::IndicatorRemovalClearMailboxData,
12922                "APPLICATION_LAYER_PROTOCOL" => Self::ApplicationLayerProtocol,
12923                "DNS" => Self::Dns,
12924                "SOFTWARE_DEPLOYMENT_TOOLS" => Self::SoftwareDeploymentTools,
12925                "VALID_ACCOUNTS" => Self::ValidAccounts,
12926                "DEFAULT_ACCOUNTS" => Self::DefaultAccounts,
12927                "LOCAL_ACCOUNTS" => Self::LocalAccounts,
12928                "CLOUD_ACCOUNTS" => Self::CloudAccounts,
12929                "FILE_AND_DIRECTORY_DISCOVERY" => Self::FileAndDirectoryDiscovery,
12930                "ACCOUNT_DISCOVERY_LOCAL_ACCOUNT" => Self::AccountDiscoveryLocalAccount,
12931                "PROXY" => Self::Proxy,
12932                "EXTERNAL_PROXY" => Self::ExternalProxy,
12933                "MULTI_HOP_PROXY" => Self::MultiHopProxy,
12934                "ACCOUNT_MANIPULATION" => Self::AccountManipulation,
12935                "ADDITIONAL_CLOUD_CREDENTIALS" => Self::AdditionalCloudCredentials,
12936                "ADDITIONAL_CLOUD_ROLES" => Self::AdditionalCloudRoles,
12937                "SSH_AUTHORIZED_KEYS" => Self::SshAuthorizedKeys,
12938                "ADDITIONAL_CONTAINER_CLUSTER_ROLES" => Self::AdditionalContainerClusterRoles,
12939                "MULTI_STAGE_CHANNELS" => Self::MultiStageChannels,
12940                "INGRESS_TOOL_TRANSFER" => Self::IngressToolTransfer,
12941                "NATIVE_API" => Self::NativeApi,
12942                "BRUTE_FORCE" => Self::BruteForce,
12943                "AUTOMATED_COLLECTION" => Self::AutomatedCollection,
12944                "SHARED_MODULES" => Self::SharedModules,
12945                "DATA_ENCODING" => Self::DataEncoding,
12946                "STANDARD_ENCODING" => Self::StandardEncoding,
12947                "ACCESS_TOKEN_MANIPULATION" => Self::AccessTokenManipulation,
12948                "TOKEN_IMPERSONATION_OR_THEFT" => Self::TokenImpersonationOrTheft,
12949                "CREATE_ACCOUNT" => Self::CreateAccount,
12950                "LOCAL_ACCOUNT" => Self::LocalAccount,
12951                "DEOBFUSCATE_DECODE_FILES_OR_INFO" => Self::DeobfuscateDecodeFilesOrInfo,
12952                "EXPLOIT_PUBLIC_FACING_APPLICATION" => Self::ExploitPublicFacingApplication,
12953                "SUPPLY_CHAIN_COMPROMISE" => Self::SupplyChainCompromise,
12954                "COMPROMISE_SOFTWARE_DEPENDENCIES_AND_DEVELOPMENT_TOOLS" => {
12955                    Self::CompromiseSoftwareDependenciesAndDevelopmentTools
12956                }
12957                "EXPLOITATION_FOR_CLIENT_EXECUTION" => Self::ExploitationForClientExecution,
12958                "USER_EXECUTION" => Self::UserExecution,
12959                "LINUX_AND_MAC_FILE_AND_DIRECTORY_PERMISSIONS_MODIFICATION" => {
12960                    Self::LinuxAndMacFileAndDirectoryPermissionsModification
12961                }
12962                "DOMAIN_POLICY_MODIFICATION" => Self::DomainPolicyModification,
12963                "DATA_DESTRUCTION" => Self::DataDestruction,
12964                "DATA_ENCRYPTED_FOR_IMPACT" => Self::DataEncryptedForImpact,
12965                "SERVICE_STOP" => Self::ServiceStop,
12966                "INHIBIT_SYSTEM_RECOVERY" => Self::InhibitSystemRecovery,
12967                "FIRMWARE_CORRUPTION" => Self::FirmwareCorruption,
12968                "RESOURCE_HIJACKING" => Self::ResourceHijacking,
12969                "NETWORK_DENIAL_OF_SERVICE" => Self::NetworkDenialOfService,
12970                "CLOUD_SERVICE_DISCOVERY" => Self::CloudServiceDiscovery,
12971                "STEAL_APPLICATION_ACCESS_TOKEN" => Self::StealApplicationAccessToken,
12972                "ACCOUNT_ACCESS_REMOVAL" => Self::AccountAccessRemoval,
12973                "TRANSFER_DATA_TO_CLOUD_ACCOUNT" => Self::TransferDataToCloudAccount,
12974                "STEAL_WEB_SESSION_COOKIE" => Self::StealWebSessionCookie,
12975                "CREATE_OR_MODIFY_SYSTEM_PROCESS" => Self::CreateOrModifySystemProcess,
12976                "EVENT_TRIGGERED_EXECUTION" => Self::EventTriggeredExecution,
12977                "BOOT_OR_LOGON_AUTOSTART_EXECUTION" => Self::BootOrLogonAutostartExecution,
12978                "KERNEL_MODULES_AND_EXTENSIONS" => Self::KernelModulesAndExtensions,
12979                "SHORTCUT_MODIFICATION" => Self::ShortcutModification,
12980                "ABUSE_ELEVATION_CONTROL_MECHANISM" => Self::AbuseElevationControlMechanism,
12981                "ABUSE_ELEVATION_CONTROL_MECHANISM_SETUID_AND_SETGID" => {
12982                    Self::AbuseElevationControlMechanismSetuidAndSetgid
12983                }
12984                "ABUSE_ELEVATION_CONTROL_MECHANISM_SUDO_AND_SUDO_CACHING" => {
12985                    Self::AbuseElevationControlMechanismSudoAndSudoCaching
12986                }
12987                "UNSECURED_CREDENTIALS" => Self::UnsecuredCredentials,
12988                "CREDENTIALS_IN_FILES" => Self::CredentialsInFiles,
12989                "BASH_HISTORY" => Self::BashHistory,
12990                "PRIVATE_KEYS" => Self::PrivateKeys,
12991                "SUBVERT_TRUST_CONTROL" => Self::SubvertTrustControl,
12992                "INSTALL_ROOT_CERTIFICATE" => Self::InstallRootCertificate,
12993                "COMPROMISE_HOST_SOFTWARE_BINARY" => Self::CompromiseHostSoftwareBinary,
12994                "CREDENTIALS_FROM_PASSWORD_STORES" => Self::CredentialsFromPasswordStores,
12995                "MODIFY_AUTHENTICATION_PROCESS" => Self::ModifyAuthenticationProcess,
12996                "PLUGGABLE_AUTHENTICATION_MODULES" => Self::PluggableAuthenticationModules,
12997                "MULTI_FACTOR_AUTHENTICATION" => Self::MultiFactorAuthentication,
12998                "IMPAIR_DEFENSES" => Self::ImpairDefenses,
12999                "DISABLE_OR_MODIFY_TOOLS" => Self::DisableOrModifyTools,
13000                "INDICATOR_BLOCKING" => Self::IndicatorBlocking,
13001                "DISABLE_OR_MODIFY_LINUX_AUDIT_SYSTEM" => Self::DisableOrModifyLinuxAuditSystem,
13002                "HIDE_ARTIFACTS" => Self::HideArtifacts,
13003                "HIDDEN_FILES_AND_DIRECTORIES" => Self::HiddenFilesAndDirectories,
13004                "HIDDEN_USERS" => Self::HiddenUsers,
13005                "EXFILTRATION_OVER_WEB_SERVICE" => Self::ExfiltrationOverWebService,
13006                "EXFILTRATION_TO_CLOUD_STORAGE" => Self::ExfiltrationToCloudStorage,
13007                "DYNAMIC_RESOLUTION" => Self::DynamicResolution,
13008                "LATERAL_TOOL_TRANSFER" => Self::LateralToolTransfer,
13009                "HIJACK_EXECUTION_FLOW" => Self::HijackExecutionFlow,
13010                "HIJACK_EXECUTION_FLOW_DYNAMIC_LINKER_HIJACKING" => {
13011                    Self::HijackExecutionFlowDynamicLinkerHijacking
13012                }
13013                "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" => Self::ModifyCloudComputeInfrastructure,
13014                "CREATE_SNAPSHOT" => Self::CreateSnapshot,
13015                "CLOUD_INFRASTRUCTURE_DISCOVERY" => Self::CloudInfrastructureDiscovery,
13016                "DEVELOP_CAPABILITIES" => Self::DevelopCapabilities,
13017                "DEVELOP_CAPABILITIES_MALWARE" => Self::DevelopCapabilitiesMalware,
13018                "OBTAIN_CAPABILITIES" => Self::ObtainCapabilities,
13019                "OBTAIN_CAPABILITIES_MALWARE" => Self::ObtainCapabilitiesMalware,
13020                "OBTAIN_CAPABILITIES_VULNERABILITIES" => Self::ObtainCapabilitiesVulnerabilities,
13021                "ACTIVE_SCANNING" => Self::ActiveScanning,
13022                "SCANNING_IP_BLOCKS" => Self::ScanningIpBlocks,
13023                "STAGE_CAPABILITIES" => Self::StageCapabilities,
13024                "UPLOAD_MALWARE" => Self::UploadMalware,
13025                "CONTAINER_ADMINISTRATION_COMMAND" => Self::ContainerAdministrationCommand,
13026                "DEPLOY_CONTAINER" => Self::DeployContainer,
13027                "ESCAPE_TO_HOST" => Self::EscapeToHost,
13028                "CONTAINER_AND_RESOURCE_DISCOVERY" => Self::ContainerAndResourceDiscovery,
13029                "REFLECTIVE_CODE_LOADING" => Self::ReflectiveCodeLoading,
13030                "STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES" => {
13031                    Self::StealOrForgeAuthenticationCertificates
13032                }
13033                "FINANCIAL_THEFT" => Self::FinancialTheft,
13034                _ => Self::UnknownValue(technique::UnknownValue(
13035                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13036                )),
13037            }
13038        }
13039    }
13040
13041    impl serde::ser::Serialize for Technique {
13042        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13043        where
13044            S: serde::Serializer,
13045        {
13046            match self {
13047                Self::Unspecified => serializer.serialize_i32(0),
13048                Self::DataObfuscation => serializer.serialize_i32(70),
13049                Self::DataObfuscationSteganography => serializer.serialize_i32(71),
13050                Self::OsCredentialDumping => serializer.serialize_i32(114),
13051                Self::OsCredentialDumpingProcFilesystem => serializer.serialize_i32(115),
13052                Self::OsCredentialDumpingEtcPasswordAndEtcShadow => serializer.serialize_i32(122),
13053                Self::DataFromLocalSystem => serializer.serialize_i32(117),
13054                Self::AutomatedExfiltration => serializer.serialize_i32(68),
13055                Self::ObfuscatedFilesOrInfo => serializer.serialize_i32(72),
13056                Self::Steganography => serializer.serialize_i32(73),
13057                Self::CompileAfterDelivery => serializer.serialize_i32(74),
13058                Self::CommandObfuscation => serializer.serialize_i32(75),
13059                Self::ScheduledTransfer => serializer.serialize_i32(120),
13060                Self::SystemOwnerUserDiscovery => serializer.serialize_i32(118),
13061                Self::Masquerading => serializer.serialize_i32(49),
13062                Self::MatchLegitimateNameOrLocation => serializer.serialize_i32(50),
13063                Self::BootOrLogonInitializationScripts => serializer.serialize_i32(37),
13064                Self::StartupItems => serializer.serialize_i32(38),
13065                Self::NetworkServiceDiscovery => serializer.serialize_i32(32),
13066                Self::ScheduledTaskJob => serializer.serialize_i32(89),
13067                Self::ScheduledTaskJobCron => serializer.serialize_i32(119),
13068                Self::ContainerOrchestrationJob => serializer.serialize_i32(90),
13069                Self::ProcessInjection => serializer.serialize_i32(93),
13070                Self::InputCapture => serializer.serialize_i32(103),
13071                Self::InputCaptureKeylogging => serializer.serialize_i32(104),
13072                Self::ProcessDiscovery => serializer.serialize_i32(56),
13073                Self::CommandAndScriptingInterpreter => serializer.serialize_i32(6),
13074                Self::UnixShell => serializer.serialize_i32(7),
13075                Self::Python => serializer.serialize_i32(59),
13076                Self::ExploitationForPrivilegeEscalation => serializer.serialize_i32(63),
13077                Self::PermissionGroupsDiscovery => serializer.serialize_i32(18),
13078                Self::CloudGroups => serializer.serialize_i32(19),
13079                Self::IndicatorRemoval => serializer.serialize_i32(123),
13080                Self::IndicatorRemovalClearLinuxOrMacSystemLogs => serializer.serialize_i32(124),
13081                Self::IndicatorRemovalClearCommandHistory => serializer.serialize_i32(125),
13082                Self::IndicatorRemovalFileDeletion => serializer.serialize_i32(64),
13083                Self::IndicatorRemovalTimestomp => serializer.serialize_i32(128),
13084                Self::IndicatorRemovalClearMailboxData => serializer.serialize_i32(126),
13085                Self::ApplicationLayerProtocol => serializer.serialize_i32(45),
13086                Self::Dns => serializer.serialize_i32(46),
13087                Self::SoftwareDeploymentTools => serializer.serialize_i32(47),
13088                Self::ValidAccounts => serializer.serialize_i32(14),
13089                Self::DefaultAccounts => serializer.serialize_i32(35),
13090                Self::LocalAccounts => serializer.serialize_i32(15),
13091                Self::CloudAccounts => serializer.serialize_i32(16),
13092                Self::FileAndDirectoryDiscovery => serializer.serialize_i32(121),
13093                Self::AccountDiscoveryLocalAccount => serializer.serialize_i32(116),
13094                Self::Proxy => serializer.serialize_i32(9),
13095                Self::ExternalProxy => serializer.serialize_i32(10),
13096                Self::MultiHopProxy => serializer.serialize_i32(11),
13097                Self::AccountManipulation => serializer.serialize_i32(22),
13098                Self::AdditionalCloudCredentials => serializer.serialize_i32(40),
13099                Self::AdditionalCloudRoles => serializer.serialize_i32(67),
13100                Self::SshAuthorizedKeys => serializer.serialize_i32(23),
13101                Self::AdditionalContainerClusterRoles => serializer.serialize_i32(58),
13102                Self::MultiStageChannels => serializer.serialize_i32(76),
13103                Self::IngressToolTransfer => serializer.serialize_i32(3),
13104                Self::NativeApi => serializer.serialize_i32(4),
13105                Self::BruteForce => serializer.serialize_i32(44),
13106                Self::AutomatedCollection => serializer.serialize_i32(94),
13107                Self::SharedModules => serializer.serialize_i32(5),
13108                Self::DataEncoding => serializer.serialize_i32(77),
13109                Self::StandardEncoding => serializer.serialize_i32(78),
13110                Self::AccessTokenManipulation => serializer.serialize_i32(33),
13111                Self::TokenImpersonationOrTheft => serializer.serialize_i32(39),
13112                Self::CreateAccount => serializer.serialize_i32(79),
13113                Self::LocalAccount => serializer.serialize_i32(80),
13114                Self::DeobfuscateDecodeFilesOrInfo => serializer.serialize_i32(95),
13115                Self::ExploitPublicFacingApplication => serializer.serialize_i32(27),
13116                Self::SupplyChainCompromise => serializer.serialize_i32(129),
13117                Self::CompromiseSoftwareDependenciesAndDevelopmentTools => {
13118                    serializer.serialize_i32(130)
13119                }
13120                Self::ExploitationForClientExecution => serializer.serialize_i32(134),
13121                Self::UserExecution => serializer.serialize_i32(69),
13122                Self::LinuxAndMacFileAndDirectoryPermissionsModification => {
13123                    serializer.serialize_i32(135)
13124                }
13125                Self::DomainPolicyModification => serializer.serialize_i32(30),
13126                Self::DataDestruction => serializer.serialize_i32(29),
13127                Self::DataEncryptedForImpact => serializer.serialize_i32(132),
13128                Self::ServiceStop => serializer.serialize_i32(52),
13129                Self::InhibitSystemRecovery => serializer.serialize_i32(36),
13130                Self::FirmwareCorruption => serializer.serialize_i32(81),
13131                Self::ResourceHijacking => serializer.serialize_i32(8),
13132                Self::NetworkDenialOfService => serializer.serialize_i32(17),
13133                Self::CloudServiceDiscovery => serializer.serialize_i32(48),
13134                Self::StealApplicationAccessToken => serializer.serialize_i32(42),
13135                Self::AccountAccessRemoval => serializer.serialize_i32(51),
13136                Self::TransferDataToCloudAccount => serializer.serialize_i32(91),
13137                Self::StealWebSessionCookie => serializer.serialize_i32(25),
13138                Self::CreateOrModifySystemProcess => serializer.serialize_i32(24),
13139                Self::EventTriggeredExecution => serializer.serialize_i32(65),
13140                Self::BootOrLogonAutostartExecution => serializer.serialize_i32(82),
13141                Self::KernelModulesAndExtensions => serializer.serialize_i32(83),
13142                Self::ShortcutModification => serializer.serialize_i32(127),
13143                Self::AbuseElevationControlMechanism => serializer.serialize_i32(34),
13144                Self::AbuseElevationControlMechanismSetuidAndSetgid => {
13145                    serializer.serialize_i32(136)
13146                }
13147                Self::AbuseElevationControlMechanismSudoAndSudoCaching => {
13148                    serializer.serialize_i32(109)
13149                }
13150                Self::UnsecuredCredentials => serializer.serialize_i32(13),
13151                Self::CredentialsInFiles => serializer.serialize_i32(105),
13152                Self::BashHistory => serializer.serialize_i32(96),
13153                Self::PrivateKeys => serializer.serialize_i32(97),
13154                Self::SubvertTrustControl => serializer.serialize_i32(106),
13155                Self::InstallRootCertificate => serializer.serialize_i32(107),
13156                Self::CompromiseHostSoftwareBinary => serializer.serialize_i32(84),
13157                Self::CredentialsFromPasswordStores => serializer.serialize_i32(98),
13158                Self::ModifyAuthenticationProcess => serializer.serialize_i32(28),
13159                Self::PluggableAuthenticationModules => serializer.serialize_i32(108),
13160                Self::MultiFactorAuthentication => serializer.serialize_i32(137),
13161                Self::ImpairDefenses => serializer.serialize_i32(31),
13162                Self::DisableOrModifyTools => serializer.serialize_i32(55),
13163                Self::IndicatorBlocking => serializer.serialize_i32(110),
13164                Self::DisableOrModifyLinuxAuditSystem => serializer.serialize_i32(111),
13165                Self::HideArtifacts => serializer.serialize_i32(85),
13166                Self::HiddenFilesAndDirectories => serializer.serialize_i32(86),
13167                Self::HiddenUsers => serializer.serialize_i32(87),
13168                Self::ExfiltrationOverWebService => serializer.serialize_i32(20),
13169                Self::ExfiltrationToCloudStorage => serializer.serialize_i32(21),
13170                Self::DynamicResolution => serializer.serialize_i32(12),
13171                Self::LateralToolTransfer => serializer.serialize_i32(41),
13172                Self::HijackExecutionFlow => serializer.serialize_i32(112),
13173                Self::HijackExecutionFlowDynamicLinkerHijacking => serializer.serialize_i32(113),
13174                Self::ModifyCloudComputeInfrastructure => serializer.serialize_i32(26),
13175                Self::CreateSnapshot => serializer.serialize_i32(54),
13176                Self::CloudInfrastructureDiscovery => serializer.serialize_i32(53),
13177                Self::DevelopCapabilities => serializer.serialize_i32(99),
13178                Self::DevelopCapabilitiesMalware => serializer.serialize_i32(100),
13179                Self::ObtainCapabilities => serializer.serialize_i32(43),
13180                Self::ObtainCapabilitiesMalware => serializer.serialize_i32(101),
13181                Self::ObtainCapabilitiesVulnerabilities => serializer.serialize_i32(133),
13182                Self::ActiveScanning => serializer.serialize_i32(1),
13183                Self::ScanningIpBlocks => serializer.serialize_i32(2),
13184                Self::StageCapabilities => serializer.serialize_i32(88),
13185                Self::UploadMalware => serializer.serialize_i32(102),
13186                Self::ContainerAdministrationCommand => serializer.serialize_i32(60),
13187                Self::DeployContainer => serializer.serialize_i32(66),
13188                Self::EscapeToHost => serializer.serialize_i32(61),
13189                Self::ContainerAndResourceDiscovery => serializer.serialize_i32(57),
13190                Self::ReflectiveCodeLoading => serializer.serialize_i32(92),
13191                Self::StealOrForgeAuthenticationCertificates => serializer.serialize_i32(62),
13192                Self::FinancialTheft => serializer.serialize_i32(131),
13193                Self::UnknownValue(u) => u.0.serialize(serializer),
13194            }
13195        }
13196    }
13197
13198    impl<'de> serde::de::Deserialize<'de> for Technique {
13199        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13200        where
13201            D: serde::Deserializer<'de>,
13202        {
13203            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Technique>::new(
13204                ".google.cloud.securitycenter.v2.MitreAttack.Technique",
13205            ))
13206        }
13207    }
13208}
13209
13210/// A mute config is a Cloud SCC resource that contains the configuration
13211/// to mute create/update events of findings.
13212#[derive(Clone, Default, PartialEq)]
13213#[non_exhaustive]
13214pub struct MuteConfig {
13215    /// Identifier. This field will be ignored if provided on config creation. The
13216    /// following list shows some examples of the format:
13217    ///
13218    /// + `organizations/{organization}/muteConfigs/{mute_config}`
13219    ///
13220    /// `organizations/{organization}locations/{location}//muteConfigs/{mute_config}`
13221    ///
13222    /// + `folders/{folder}/muteConfigs/{mute_config}`
13223    /// + `folders/{folder}/locations/{location}/muteConfigs/{mute_config}`
13224    /// + `projects/{project}/muteConfigs/{mute_config}`
13225    /// + `projects/{project}/locations/{location}/muteConfigs/{mute_config}`
13226    pub name: std::string::String,
13227
13228    /// A description of the mute config.
13229    pub description: std::string::String,
13230
13231    /// Required. An expression that defines the filter to apply across
13232    /// create/update events of findings. While creating a filter string, be
13233    /// mindful of the scope in which the mute configuration is being created.
13234    /// E.g., If a filter contains project = X but is created under the project = Y
13235    /// scope, it might not match any findings.
13236    ///
13237    /// The following field and operator combinations are supported:
13238    ///
13239    /// * severity: `=`, `:`
13240    /// * category: `=`, `:`
13241    /// * resource.name: `=`, `:`
13242    /// * resource.project_name: `=`, `:`
13243    /// * resource.project_display_name: `=`, `:`
13244    /// * resource.folders.resource_folder: `=`, `:`
13245    /// * resource.parent_name: `=`, `:`
13246    /// * resource.parent_display_name: `=`, `:`
13247    /// * resource.type: `=`, `:`
13248    /// * finding_class: `=`, `:`
13249    /// * indicator.ip_addresses: `=`, `:`
13250    /// * indicator.domains: `=`, `:`
13251    pub filter: std::string::String,
13252
13253    /// Output only. The time at which the mute config was created.
13254    /// This field is set by the server and will be ignored if provided on config
13255    /// creation.
13256    pub create_time: std::option::Option<wkt::Timestamp>,
13257
13258    /// Output only. The most recent time at which the mute config was updated.
13259    /// This field is set by the server and will be ignored if provided on config
13260    /// creation or update.
13261    pub update_time: std::option::Option<wkt::Timestamp>,
13262
13263    /// Output only. Email address of the user who last edited the mute config.
13264    /// This field is set by the server and will be ignored if provided on config
13265    /// creation or update.
13266    pub most_recent_editor: std::string::String,
13267
13268    /// Required. The type of the mute config, which determines what type of mute
13269    /// state the config affects. Immutable after creation.
13270    pub r#type: crate::model::mute_config::MuteConfigType,
13271
13272    /// Optional. The expiry of the mute config. Only applicable for dynamic
13273    /// configs. If the expiry is set, when the config expires, it is removed from
13274    /// all findings.
13275    pub expiry_time: std::option::Option<wkt::Timestamp>,
13276
13277    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13278}
13279
13280impl MuteConfig {
13281    pub fn new() -> Self {
13282        std::default::Default::default()
13283    }
13284
13285    /// Sets the value of [name][crate::model::MuteConfig::name].
13286    ///
13287    /// # Example
13288    /// ```ignore,no_run
13289    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13290    /// let x = MuteConfig::new().set_name("example");
13291    /// ```
13292    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13293        self.name = v.into();
13294        self
13295    }
13296
13297    /// Sets the value of [description][crate::model::MuteConfig::description].
13298    ///
13299    /// # Example
13300    /// ```ignore,no_run
13301    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13302    /// let x = MuteConfig::new().set_description("example");
13303    /// ```
13304    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13305        self.description = v.into();
13306        self
13307    }
13308
13309    /// Sets the value of [filter][crate::model::MuteConfig::filter].
13310    ///
13311    /// # Example
13312    /// ```ignore,no_run
13313    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13314    /// let x = MuteConfig::new().set_filter("example");
13315    /// ```
13316    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13317        self.filter = v.into();
13318        self
13319    }
13320
13321    /// Sets the value of [create_time][crate::model::MuteConfig::create_time].
13322    ///
13323    /// # Example
13324    /// ```ignore,no_run
13325    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13326    /// use wkt::Timestamp;
13327    /// let x = MuteConfig::new().set_create_time(Timestamp::default()/* use setters */);
13328    /// ```
13329    pub fn set_create_time<T>(mut self, v: T) -> Self
13330    where
13331        T: std::convert::Into<wkt::Timestamp>,
13332    {
13333        self.create_time = std::option::Option::Some(v.into());
13334        self
13335    }
13336
13337    /// Sets or clears the value of [create_time][crate::model::MuteConfig::create_time].
13338    ///
13339    /// # Example
13340    /// ```ignore,no_run
13341    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13342    /// use wkt::Timestamp;
13343    /// let x = MuteConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
13344    /// let x = MuteConfig::new().set_or_clear_create_time(None::<Timestamp>);
13345    /// ```
13346    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
13347    where
13348        T: std::convert::Into<wkt::Timestamp>,
13349    {
13350        self.create_time = v.map(|x| x.into());
13351        self
13352    }
13353
13354    /// Sets the value of [update_time][crate::model::MuteConfig::update_time].
13355    ///
13356    /// # Example
13357    /// ```ignore,no_run
13358    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13359    /// use wkt::Timestamp;
13360    /// let x = MuteConfig::new().set_update_time(Timestamp::default()/* use setters */);
13361    /// ```
13362    pub fn set_update_time<T>(mut self, v: T) -> Self
13363    where
13364        T: std::convert::Into<wkt::Timestamp>,
13365    {
13366        self.update_time = std::option::Option::Some(v.into());
13367        self
13368    }
13369
13370    /// Sets or clears the value of [update_time][crate::model::MuteConfig::update_time].
13371    ///
13372    /// # Example
13373    /// ```ignore,no_run
13374    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13375    /// use wkt::Timestamp;
13376    /// let x = MuteConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
13377    /// let x = MuteConfig::new().set_or_clear_update_time(None::<Timestamp>);
13378    /// ```
13379    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
13380    where
13381        T: std::convert::Into<wkt::Timestamp>,
13382    {
13383        self.update_time = v.map(|x| x.into());
13384        self
13385    }
13386
13387    /// Sets the value of [most_recent_editor][crate::model::MuteConfig::most_recent_editor].
13388    ///
13389    /// # Example
13390    /// ```ignore,no_run
13391    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13392    /// let x = MuteConfig::new().set_most_recent_editor("example");
13393    /// ```
13394    pub fn set_most_recent_editor<T: std::convert::Into<std::string::String>>(
13395        mut self,
13396        v: T,
13397    ) -> Self {
13398        self.most_recent_editor = v.into();
13399        self
13400    }
13401
13402    /// Sets the value of [r#type][crate::model::MuteConfig::type].
13403    ///
13404    /// # Example
13405    /// ```ignore,no_run
13406    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13407    /// use google_cloud_securitycenter_v2::model::mute_config::MuteConfigType;
13408    /// let x0 = MuteConfig::new().set_type(MuteConfigType::Static);
13409    /// let x1 = MuteConfig::new().set_type(MuteConfigType::Dynamic);
13410    /// ```
13411    pub fn set_type<T: std::convert::Into<crate::model::mute_config::MuteConfigType>>(
13412        mut self,
13413        v: T,
13414    ) -> Self {
13415        self.r#type = v.into();
13416        self
13417    }
13418
13419    /// Sets the value of [expiry_time][crate::model::MuteConfig::expiry_time].
13420    ///
13421    /// # Example
13422    /// ```ignore,no_run
13423    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13424    /// use wkt::Timestamp;
13425    /// let x = MuteConfig::new().set_expiry_time(Timestamp::default()/* use setters */);
13426    /// ```
13427    pub fn set_expiry_time<T>(mut self, v: T) -> Self
13428    where
13429        T: std::convert::Into<wkt::Timestamp>,
13430    {
13431        self.expiry_time = std::option::Option::Some(v.into());
13432        self
13433    }
13434
13435    /// Sets or clears the value of [expiry_time][crate::model::MuteConfig::expiry_time].
13436    ///
13437    /// # Example
13438    /// ```ignore,no_run
13439    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13440    /// use wkt::Timestamp;
13441    /// let x = MuteConfig::new().set_or_clear_expiry_time(Some(Timestamp::default()/* use setters */));
13442    /// let x = MuteConfig::new().set_or_clear_expiry_time(None::<Timestamp>);
13443    /// ```
13444    pub fn set_or_clear_expiry_time<T>(mut self, v: std::option::Option<T>) -> Self
13445    where
13446        T: std::convert::Into<wkt::Timestamp>,
13447    {
13448        self.expiry_time = v.map(|x| x.into());
13449        self
13450    }
13451}
13452
13453impl wkt::message::Message for MuteConfig {
13454    fn typename() -> &'static str {
13455        "type.googleapis.com/google.cloud.securitycenter.v2.MuteConfig"
13456    }
13457}
13458
13459/// Defines additional types related to [MuteConfig].
13460pub mod mute_config {
13461    #[allow(unused_imports)]
13462    use super::*;
13463
13464    /// The type of MuteConfig.
13465    ///
13466    /// # Working with unknown values
13467    ///
13468    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13469    /// additional enum variants at any time. Adding new variants is not considered
13470    /// a breaking change. Applications should write their code in anticipation of:
13471    ///
13472    /// - New values appearing in future releases of the client library, **and**
13473    /// - New values received dynamically, without application changes.
13474    ///
13475    /// Please consult the [Working with enums] section in the user guide for some
13476    /// guidelines.
13477    ///
13478    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13479    #[derive(Clone, Debug, PartialEq)]
13480    #[non_exhaustive]
13481    pub enum MuteConfigType {
13482        /// Unused.
13483        Unspecified,
13484        /// A static mute config, which sets the static mute state of future matching
13485        /// findings to muted. Once the static mute state has been set, finding or
13486        /// config modifications will not affect the state.
13487        Static,
13488        /// A dynamic mute config, which is applied to existing and future matching
13489        /// findings, setting their dynamic mute state to "muted". If the config is
13490        /// updated or deleted, or a matching finding is updated, such that the
13491        /// finding doesn't match the config, the config will be removed from the
13492        /// finding, and the finding's dynamic mute state may become "unmuted"
13493        /// (unless other configs still match).
13494        Dynamic,
13495        /// If set, the enum was initialized with an unknown value.
13496        ///
13497        /// Applications can examine the value using [MuteConfigType::value] or
13498        /// [MuteConfigType::name].
13499        UnknownValue(mute_config_type::UnknownValue),
13500    }
13501
13502    #[doc(hidden)]
13503    pub mod mute_config_type {
13504        #[allow(unused_imports)]
13505        use super::*;
13506        #[derive(Clone, Debug, PartialEq)]
13507        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13508    }
13509
13510    impl MuteConfigType {
13511        /// Gets the enum value.
13512        ///
13513        /// Returns `None` if the enum contains an unknown value deserialized from
13514        /// the string representation of enums.
13515        pub fn value(&self) -> std::option::Option<i32> {
13516            match self {
13517                Self::Unspecified => std::option::Option::Some(0),
13518                Self::Static => std::option::Option::Some(1),
13519                Self::Dynamic => std::option::Option::Some(2),
13520                Self::UnknownValue(u) => u.0.value(),
13521            }
13522        }
13523
13524        /// Gets the enum value as a string.
13525        ///
13526        /// Returns `None` if the enum contains an unknown value deserialized from
13527        /// the integer representation of enums.
13528        pub fn name(&self) -> std::option::Option<&str> {
13529            match self {
13530                Self::Unspecified => std::option::Option::Some("MUTE_CONFIG_TYPE_UNSPECIFIED"),
13531                Self::Static => std::option::Option::Some("STATIC"),
13532                Self::Dynamic => std::option::Option::Some("DYNAMIC"),
13533                Self::UnknownValue(u) => u.0.name(),
13534            }
13535        }
13536    }
13537
13538    impl std::default::Default for MuteConfigType {
13539        fn default() -> Self {
13540            use std::convert::From;
13541            Self::from(0)
13542        }
13543    }
13544
13545    impl std::fmt::Display for MuteConfigType {
13546        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13547            wkt::internal::display_enum(f, self.name(), self.value())
13548        }
13549    }
13550
13551    impl std::convert::From<i32> for MuteConfigType {
13552        fn from(value: i32) -> Self {
13553            match value {
13554                0 => Self::Unspecified,
13555                1 => Self::Static,
13556                2 => Self::Dynamic,
13557                _ => Self::UnknownValue(mute_config_type::UnknownValue(
13558                    wkt::internal::UnknownEnumValue::Integer(value),
13559                )),
13560            }
13561        }
13562    }
13563
13564    impl std::convert::From<&str> for MuteConfigType {
13565        fn from(value: &str) -> Self {
13566            use std::string::ToString;
13567            match value {
13568                "MUTE_CONFIG_TYPE_UNSPECIFIED" => Self::Unspecified,
13569                "STATIC" => Self::Static,
13570                "DYNAMIC" => Self::Dynamic,
13571                _ => Self::UnknownValue(mute_config_type::UnknownValue(
13572                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13573                )),
13574            }
13575        }
13576    }
13577
13578    impl serde::ser::Serialize for MuteConfigType {
13579        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13580        where
13581            S: serde::Serializer,
13582        {
13583            match self {
13584                Self::Unspecified => serializer.serialize_i32(0),
13585                Self::Static => serializer.serialize_i32(1),
13586                Self::Dynamic => serializer.serialize_i32(2),
13587                Self::UnknownValue(u) => u.0.serialize(serializer),
13588            }
13589        }
13590    }
13591
13592    impl<'de> serde::de::Deserialize<'de> for MuteConfigType {
13593        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13594        where
13595            D: serde::Deserializer<'de>,
13596        {
13597            deserializer.deserialize_any(wkt::internal::EnumVisitor::<MuteConfigType>::new(
13598                ".google.cloud.securitycenter.v2.MuteConfig.MuteConfigType",
13599            ))
13600        }
13601    }
13602}
13603
13604/// Contains information about a VPC network associated with the finding.
13605#[derive(Clone, Default, PartialEq)]
13606#[non_exhaustive]
13607pub struct Network {
13608    /// The name of the VPC network resource, for example,
13609    /// `//compute.googleapis.com/projects/my-project/global/networks/my-network`.
13610    pub name: std::string::String,
13611
13612    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13613}
13614
13615impl Network {
13616    pub fn new() -> Self {
13617        std::default::Default::default()
13618    }
13619
13620    /// Sets the value of [name][crate::model::Network::name].
13621    ///
13622    /// # Example
13623    /// ```ignore,no_run
13624    /// # use google_cloud_securitycenter_v2::model::Network;
13625    /// let x = Network::new().set_name("example");
13626    /// ```
13627    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13628        self.name = v.into();
13629        self
13630    }
13631}
13632
13633impl wkt::message::Message for Network {
13634    fn typename() -> &'static str {
13635        "type.googleapis.com/google.cloud.securitycenter.v2.Network"
13636    }
13637}
13638
13639/// Represents a Jupyter notebook IPYNB file, such as a [Colab Enterprise
13640/// notebook](https://cloud.google.com/colab/docs/introduction) file, that is
13641/// associated with a finding.
13642#[derive(Clone, Default, PartialEq)]
13643#[non_exhaustive]
13644pub struct Notebook {
13645    /// The name of the notebook.
13646    pub name: std::string::String,
13647
13648    /// The source notebook service, for example, "Colab Enterprise".
13649    pub service: std::string::String,
13650
13651    /// The user ID of the latest author to modify the notebook.
13652    pub last_author: std::string::String,
13653
13654    /// The most recent time the notebook was updated.
13655    pub notebook_update_time: std::option::Option<wkt::Timestamp>,
13656
13657    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13658}
13659
13660impl Notebook {
13661    pub fn new() -> Self {
13662        std::default::Default::default()
13663    }
13664
13665    /// Sets the value of [name][crate::model::Notebook::name].
13666    ///
13667    /// # Example
13668    /// ```ignore,no_run
13669    /// # use google_cloud_securitycenter_v2::model::Notebook;
13670    /// let x = Notebook::new().set_name("example");
13671    /// ```
13672    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13673        self.name = v.into();
13674        self
13675    }
13676
13677    /// Sets the value of [service][crate::model::Notebook::service].
13678    ///
13679    /// # Example
13680    /// ```ignore,no_run
13681    /// # use google_cloud_securitycenter_v2::model::Notebook;
13682    /// let x = Notebook::new().set_service("example");
13683    /// ```
13684    pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13685        self.service = v.into();
13686        self
13687    }
13688
13689    /// Sets the value of [last_author][crate::model::Notebook::last_author].
13690    ///
13691    /// # Example
13692    /// ```ignore,no_run
13693    /// # use google_cloud_securitycenter_v2::model::Notebook;
13694    /// let x = Notebook::new().set_last_author("example");
13695    /// ```
13696    pub fn set_last_author<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13697        self.last_author = v.into();
13698        self
13699    }
13700
13701    /// Sets the value of [notebook_update_time][crate::model::Notebook::notebook_update_time].
13702    ///
13703    /// # Example
13704    /// ```ignore,no_run
13705    /// # use google_cloud_securitycenter_v2::model::Notebook;
13706    /// use wkt::Timestamp;
13707    /// let x = Notebook::new().set_notebook_update_time(Timestamp::default()/* use setters */);
13708    /// ```
13709    pub fn set_notebook_update_time<T>(mut self, v: T) -> Self
13710    where
13711        T: std::convert::Into<wkt::Timestamp>,
13712    {
13713        self.notebook_update_time = std::option::Option::Some(v.into());
13714        self
13715    }
13716
13717    /// Sets or clears the value of [notebook_update_time][crate::model::Notebook::notebook_update_time].
13718    ///
13719    /// # Example
13720    /// ```ignore,no_run
13721    /// # use google_cloud_securitycenter_v2::model::Notebook;
13722    /// use wkt::Timestamp;
13723    /// let x = Notebook::new().set_or_clear_notebook_update_time(Some(Timestamp::default()/* use setters */));
13724    /// let x = Notebook::new().set_or_clear_notebook_update_time(None::<Timestamp>);
13725    /// ```
13726    pub fn set_or_clear_notebook_update_time<T>(mut self, v: std::option::Option<T>) -> Self
13727    where
13728        T: std::convert::Into<wkt::Timestamp>,
13729    {
13730        self.notebook_update_time = v.map(|x| x.into());
13731        self
13732    }
13733}
13734
13735impl wkt::message::Message for Notebook {
13736    fn typename() -> &'static str {
13737        "type.googleapis.com/google.cloud.securitycenter.v2.Notebook"
13738    }
13739}
13740
13741/// Cloud Security Command Center (Cloud SCC) notification configs.
13742///
13743/// A notification config is a Cloud SCC resource that contains the configuration
13744/// to send notifications for create/update events of findings, assets and etc.
13745#[derive(Clone, Default, PartialEq)]
13746#[non_exhaustive]
13747pub struct NotificationConfig {
13748    /// Identifier. The relative resource name of this notification config. See:
13749    /// <https://cloud.google.com/apis/design/resource_names#relative_resource_name>
13750    /// The following list shows some examples:
13751    /// +
13752    /// `organizations/{organization_id}/locations/{location_id}/notificationConfigs/notify_public_bucket`
13753    /// +
13754    /// `folders/{folder_id}/locations/{location_id}/notificationConfigs/notify_public_bucket`
13755    /// +
13756    /// `projects/{project_id}/locations/{location_id}/notificationConfigs/notify_public_bucket`
13757    pub name: std::string::String,
13758
13759    /// The description of the notification config (max of 1024 characters).
13760    pub description: std::string::String,
13761
13762    /// The Pub/Sub topic to send notifications to. Its format is
13763    /// "projects/[project_id]/topics/[topic]".
13764    pub pubsub_topic: std::string::String,
13765
13766    /// Output only. The service account that needs "pubsub.topics.publish"
13767    /// permission to publish to the Pub/Sub topic.
13768    pub service_account: std::string::String,
13769
13770    /// Output only. The timestamp of when the notification config was last
13771    /// updated.
13772    pub update_time: std::option::Option<wkt::Timestamp>,
13773
13774    /// The config for triggering notifications.
13775    pub notify_config: std::option::Option<crate::model::notification_config::NotifyConfig>,
13776
13777    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13778}
13779
13780impl NotificationConfig {
13781    pub fn new() -> Self {
13782        std::default::Default::default()
13783    }
13784
13785    /// Sets the value of [name][crate::model::NotificationConfig::name].
13786    ///
13787    /// # Example
13788    /// ```ignore,no_run
13789    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
13790    /// let x = NotificationConfig::new().set_name("example");
13791    /// ```
13792    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13793        self.name = v.into();
13794        self
13795    }
13796
13797    /// Sets the value of [description][crate::model::NotificationConfig::description].
13798    ///
13799    /// # Example
13800    /// ```ignore,no_run
13801    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
13802    /// let x = NotificationConfig::new().set_description("example");
13803    /// ```
13804    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13805        self.description = v.into();
13806        self
13807    }
13808
13809    /// Sets the value of [pubsub_topic][crate::model::NotificationConfig::pubsub_topic].
13810    ///
13811    /// # Example
13812    /// ```ignore,no_run
13813    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
13814    /// let x = NotificationConfig::new().set_pubsub_topic("example");
13815    /// ```
13816    pub fn set_pubsub_topic<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13817        self.pubsub_topic = v.into();
13818        self
13819    }
13820
13821    /// Sets the value of [service_account][crate::model::NotificationConfig::service_account].
13822    ///
13823    /// # Example
13824    /// ```ignore,no_run
13825    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
13826    /// let x = NotificationConfig::new().set_service_account("example");
13827    /// ```
13828    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13829        self.service_account = v.into();
13830        self
13831    }
13832
13833    /// Sets the value of [update_time][crate::model::NotificationConfig::update_time].
13834    ///
13835    /// # Example
13836    /// ```ignore,no_run
13837    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
13838    /// use wkt::Timestamp;
13839    /// let x = NotificationConfig::new().set_update_time(Timestamp::default()/* use setters */);
13840    /// ```
13841    pub fn set_update_time<T>(mut self, v: T) -> Self
13842    where
13843        T: std::convert::Into<wkt::Timestamp>,
13844    {
13845        self.update_time = std::option::Option::Some(v.into());
13846        self
13847    }
13848
13849    /// Sets or clears the value of [update_time][crate::model::NotificationConfig::update_time].
13850    ///
13851    /// # Example
13852    /// ```ignore,no_run
13853    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
13854    /// use wkt::Timestamp;
13855    /// let x = NotificationConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
13856    /// let x = NotificationConfig::new().set_or_clear_update_time(None::<Timestamp>);
13857    /// ```
13858    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
13859    where
13860        T: std::convert::Into<wkt::Timestamp>,
13861    {
13862        self.update_time = v.map(|x| x.into());
13863        self
13864    }
13865
13866    /// Sets the value of [notify_config][crate::model::NotificationConfig::notify_config].
13867    ///
13868    /// Note that all the setters affecting `notify_config` are mutually
13869    /// exclusive.
13870    ///
13871    /// # Example
13872    /// ```ignore,no_run
13873    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
13874    /// use google_cloud_securitycenter_v2::model::notification_config::StreamingConfig;
13875    /// let x = NotificationConfig::new().set_notify_config(Some(
13876    ///     google_cloud_securitycenter_v2::model::notification_config::NotifyConfig::StreamingConfig(StreamingConfig::default().into())));
13877    /// ```
13878    pub fn set_notify_config<
13879        T: std::convert::Into<std::option::Option<crate::model::notification_config::NotifyConfig>>,
13880    >(
13881        mut self,
13882        v: T,
13883    ) -> Self {
13884        self.notify_config = v.into();
13885        self
13886    }
13887
13888    /// The value of [notify_config][crate::model::NotificationConfig::notify_config]
13889    /// if it holds a `StreamingConfig`, `None` if the field is not set or
13890    /// holds a different branch.
13891    pub fn streaming_config(
13892        &self,
13893    ) -> std::option::Option<&std::boxed::Box<crate::model::notification_config::StreamingConfig>>
13894    {
13895        #[allow(unreachable_patterns)]
13896        self.notify_config.as_ref().and_then(|v| match v {
13897            crate::model::notification_config::NotifyConfig::StreamingConfig(v) => {
13898                std::option::Option::Some(v)
13899            }
13900            _ => std::option::Option::None,
13901        })
13902    }
13903
13904    /// Sets the value of [notify_config][crate::model::NotificationConfig::notify_config]
13905    /// to hold a `StreamingConfig`.
13906    ///
13907    /// Note that all the setters affecting `notify_config` are
13908    /// mutually exclusive.
13909    ///
13910    /// # Example
13911    /// ```ignore,no_run
13912    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
13913    /// use google_cloud_securitycenter_v2::model::notification_config::StreamingConfig;
13914    /// let x = NotificationConfig::new().set_streaming_config(StreamingConfig::default()/* use setters */);
13915    /// assert!(x.streaming_config().is_some());
13916    /// ```
13917    pub fn set_streaming_config<
13918        T: std::convert::Into<std::boxed::Box<crate::model::notification_config::StreamingConfig>>,
13919    >(
13920        mut self,
13921        v: T,
13922    ) -> Self {
13923        self.notify_config = std::option::Option::Some(
13924            crate::model::notification_config::NotifyConfig::StreamingConfig(v.into()),
13925        );
13926        self
13927    }
13928}
13929
13930impl wkt::message::Message for NotificationConfig {
13931    fn typename() -> &'static str {
13932        "type.googleapis.com/google.cloud.securitycenter.v2.NotificationConfig"
13933    }
13934}
13935
13936/// Defines additional types related to [NotificationConfig].
13937pub mod notification_config {
13938    #[allow(unused_imports)]
13939    use super::*;
13940
13941    /// The config for streaming-based notifications, which send each event as soon
13942    /// as it is detected.
13943    #[derive(Clone, Default, PartialEq)]
13944    #[non_exhaustive]
13945    pub struct StreamingConfig {
13946        /// Expression that defines the filter to apply across create/update events
13947        /// of assets or findings as specified by the event type. The expression is a
13948        /// list of zero or more restrictions combined via logical operators `AND`
13949        /// and `OR`. Parentheses are supported, and `OR` has higher precedence than
13950        /// `AND`.
13951        ///
13952        /// Restrictions have the form `<field> <operator> <value>` and may have a
13953        /// `-` character in front of them to indicate negation. The fields map to
13954        /// those defined in the corresponding resource.
13955        ///
13956        /// The supported operators are:
13957        ///
13958        /// * `=` for all value types.
13959        /// * `>`, `<`, `>=`, `<=` for integer values.
13960        /// * `:`, meaning substring matching, for strings.
13961        ///
13962        /// The supported value types are:
13963        ///
13964        /// * string literals in quotes.
13965        /// * integer literals without quotes.
13966        /// * boolean literals `true` and `false` without quotes.
13967        pub filter: std::string::String,
13968
13969        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13970    }
13971
13972    impl StreamingConfig {
13973        pub fn new() -> Self {
13974            std::default::Default::default()
13975        }
13976
13977        /// Sets the value of [filter][crate::model::notification_config::StreamingConfig::filter].
13978        ///
13979        /// # Example
13980        /// ```ignore,no_run
13981        /// # use google_cloud_securitycenter_v2::model::notification_config::StreamingConfig;
13982        /// let x = StreamingConfig::new().set_filter("example");
13983        /// ```
13984        pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13985            self.filter = v.into();
13986            self
13987        }
13988    }
13989
13990    impl wkt::message::Message for StreamingConfig {
13991        fn typename() -> &'static str {
13992            "type.googleapis.com/google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig"
13993        }
13994    }
13995
13996    /// The config for triggering notifications.
13997    #[derive(Clone, Debug, PartialEq)]
13998    #[non_exhaustive]
13999    pub enum NotifyConfig {
14000        /// The config for triggering streaming-based notifications.
14001        StreamingConfig(std::boxed::Box<crate::model::notification_config::StreamingConfig>),
14002    }
14003}
14004
14005/// Cloud SCC's Notification
14006#[derive(Clone, Default, PartialEq)]
14007#[non_exhaustive]
14008pub struct NotificationMessage {
14009    /// Name of the notification config that generated current notification.
14010    pub notification_config_name: std::string::String,
14011
14012    /// The Cloud resource tied to this notification's Finding.
14013    pub resource: std::option::Option<crate::model::Resource>,
14014
14015    /// Notification Event.
14016    pub event: std::option::Option<crate::model::notification_message::Event>,
14017
14018    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14019}
14020
14021impl NotificationMessage {
14022    pub fn new() -> Self {
14023        std::default::Default::default()
14024    }
14025
14026    /// Sets the value of [notification_config_name][crate::model::NotificationMessage::notification_config_name].
14027    ///
14028    /// # Example
14029    /// ```ignore,no_run
14030    /// # use google_cloud_securitycenter_v2::model::NotificationMessage;
14031    /// let x = NotificationMessage::new().set_notification_config_name("example");
14032    /// ```
14033    pub fn set_notification_config_name<T: std::convert::Into<std::string::String>>(
14034        mut self,
14035        v: T,
14036    ) -> Self {
14037        self.notification_config_name = v.into();
14038        self
14039    }
14040
14041    /// Sets the value of [resource][crate::model::NotificationMessage::resource].
14042    ///
14043    /// # Example
14044    /// ```ignore,no_run
14045    /// # use google_cloud_securitycenter_v2::model::NotificationMessage;
14046    /// use google_cloud_securitycenter_v2::model::Resource;
14047    /// let x = NotificationMessage::new().set_resource(Resource::default()/* use setters */);
14048    /// ```
14049    pub fn set_resource<T>(mut self, v: T) -> Self
14050    where
14051        T: std::convert::Into<crate::model::Resource>,
14052    {
14053        self.resource = std::option::Option::Some(v.into());
14054        self
14055    }
14056
14057    /// Sets or clears the value of [resource][crate::model::NotificationMessage::resource].
14058    ///
14059    /// # Example
14060    /// ```ignore,no_run
14061    /// # use google_cloud_securitycenter_v2::model::NotificationMessage;
14062    /// use google_cloud_securitycenter_v2::model::Resource;
14063    /// let x = NotificationMessage::new().set_or_clear_resource(Some(Resource::default()/* use setters */));
14064    /// let x = NotificationMessage::new().set_or_clear_resource(None::<Resource>);
14065    /// ```
14066    pub fn set_or_clear_resource<T>(mut self, v: std::option::Option<T>) -> Self
14067    where
14068        T: std::convert::Into<crate::model::Resource>,
14069    {
14070        self.resource = v.map(|x| x.into());
14071        self
14072    }
14073
14074    /// Sets the value of [event][crate::model::NotificationMessage::event].
14075    ///
14076    /// Note that all the setters affecting `event` are mutually
14077    /// exclusive.
14078    ///
14079    /// # Example
14080    /// ```ignore,no_run
14081    /// # use google_cloud_securitycenter_v2::model::NotificationMessage;
14082    /// use google_cloud_securitycenter_v2::model::Finding;
14083    /// let x = NotificationMessage::new().set_event(Some(
14084    ///     google_cloud_securitycenter_v2::model::notification_message::Event::Finding(Finding::default().into())));
14085    /// ```
14086    pub fn set_event<
14087        T: std::convert::Into<std::option::Option<crate::model::notification_message::Event>>,
14088    >(
14089        mut self,
14090        v: T,
14091    ) -> Self {
14092        self.event = v.into();
14093        self
14094    }
14095
14096    /// The value of [event][crate::model::NotificationMessage::event]
14097    /// if it holds a `Finding`, `None` if the field is not set or
14098    /// holds a different branch.
14099    pub fn finding(&self) -> std::option::Option<&std::boxed::Box<crate::model::Finding>> {
14100        #[allow(unreachable_patterns)]
14101        self.event.as_ref().and_then(|v| match v {
14102            crate::model::notification_message::Event::Finding(v) => std::option::Option::Some(v),
14103            _ => std::option::Option::None,
14104        })
14105    }
14106
14107    /// Sets the value of [event][crate::model::NotificationMessage::event]
14108    /// to hold a `Finding`.
14109    ///
14110    /// Note that all the setters affecting `event` are
14111    /// mutually exclusive.
14112    ///
14113    /// # Example
14114    /// ```ignore,no_run
14115    /// # use google_cloud_securitycenter_v2::model::NotificationMessage;
14116    /// use google_cloud_securitycenter_v2::model::Finding;
14117    /// let x = NotificationMessage::new().set_finding(Finding::default()/* use setters */);
14118    /// assert!(x.finding().is_some());
14119    /// ```
14120    pub fn set_finding<T: std::convert::Into<std::boxed::Box<crate::model::Finding>>>(
14121        mut self,
14122        v: T,
14123    ) -> Self {
14124        self.event =
14125            std::option::Option::Some(crate::model::notification_message::Event::Finding(v.into()));
14126        self
14127    }
14128}
14129
14130impl wkt::message::Message for NotificationMessage {
14131    fn typename() -> &'static str {
14132        "type.googleapis.com/google.cloud.securitycenter.v2.NotificationMessage"
14133    }
14134}
14135
14136/// Defines additional types related to [NotificationMessage].
14137pub mod notification_message {
14138    #[allow(unused_imports)]
14139    use super::*;
14140
14141    /// Notification Event.
14142    #[derive(Clone, Debug, PartialEq)]
14143    #[non_exhaustive]
14144    pub enum Event {
14145        /// If it's a Finding based notification config, this field will be
14146        /// populated.
14147        Finding(std::boxed::Box<crate::model::Finding>),
14148    }
14149}
14150
14151/// Contains information about the org policies associated with the finding.
14152#[derive(Clone, Default, PartialEq)]
14153#[non_exhaustive]
14154pub struct OrgPolicy {
14155    /// Identifier. The resource name of the org policy.
14156    /// Example:
14157    /// "organizations/{organization_id}/policies/{constraint_name}"
14158    pub name: std::string::String,
14159
14160    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14161}
14162
14163impl OrgPolicy {
14164    pub fn new() -> Self {
14165        std::default::Default::default()
14166    }
14167
14168    /// Sets the value of [name][crate::model::OrgPolicy::name].
14169    ///
14170    /// # Example
14171    /// ```ignore,no_run
14172    /// # use google_cloud_securitycenter_v2::model::OrgPolicy;
14173    /// let x = OrgPolicy::new().set_name("example");
14174    /// ```
14175    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14176        self.name = v.into();
14177        self
14178    }
14179}
14180
14181impl wkt::message::Message for OrgPolicy {
14182    fn typename() -> &'static str {
14183        "type.googleapis.com/google.cloud.securitycenter.v2.OrgPolicy"
14184    }
14185}
14186
14187/// Represents an operating system process.
14188#[derive(Clone, Default, PartialEq)]
14189#[non_exhaustive]
14190pub struct Process {
14191    /// The process name, as displayed in utilities like `top` and `ps`. This name
14192    /// can be accessed through `/proc/[pid]/comm` and changed with
14193    /// `prctl(PR_SET_NAME)`.
14194    pub name: std::string::String,
14195
14196    /// File information for the process executable.
14197    pub binary: std::option::Option<crate::model::File>,
14198
14199    /// File information for libraries loaded by the process.
14200    pub libraries: std::vec::Vec<crate::model::File>,
14201
14202    /// When the process represents the invocation of a script, `binary` provides
14203    /// information about the interpreter, while `script` provides information
14204    /// about the script file provided to the interpreter.
14205    pub script: std::option::Option<crate::model::File>,
14206
14207    /// Process arguments as JSON encoded strings.
14208    pub args: std::vec::Vec<std::string::String>,
14209
14210    /// True if `args` is incomplete.
14211    pub arguments_truncated: bool,
14212
14213    /// Process environment variables.
14214    pub env_variables: std::vec::Vec<crate::model::EnvironmentVariable>,
14215
14216    /// True if `env_variables` is incomplete.
14217    pub env_variables_truncated: bool,
14218
14219    /// The process ID.
14220    pub pid: i64,
14221
14222    /// The parent process ID.
14223    pub parent_pid: i64,
14224
14225    /// The ID of the user that executed the process. E.g. If this is the root user
14226    /// this will always be 0.
14227    pub user_id: i64,
14228
14229    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14230}
14231
14232impl Process {
14233    pub fn new() -> Self {
14234        std::default::Default::default()
14235    }
14236
14237    /// Sets the value of [name][crate::model::Process::name].
14238    ///
14239    /// # Example
14240    /// ```ignore,no_run
14241    /// # use google_cloud_securitycenter_v2::model::Process;
14242    /// let x = Process::new().set_name("example");
14243    /// ```
14244    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14245        self.name = v.into();
14246        self
14247    }
14248
14249    /// Sets the value of [binary][crate::model::Process::binary].
14250    ///
14251    /// # Example
14252    /// ```ignore,no_run
14253    /// # use google_cloud_securitycenter_v2::model::Process;
14254    /// use google_cloud_securitycenter_v2::model::File;
14255    /// let x = Process::new().set_binary(File::default()/* use setters */);
14256    /// ```
14257    pub fn set_binary<T>(mut self, v: T) -> Self
14258    where
14259        T: std::convert::Into<crate::model::File>,
14260    {
14261        self.binary = std::option::Option::Some(v.into());
14262        self
14263    }
14264
14265    /// Sets or clears the value of [binary][crate::model::Process::binary].
14266    ///
14267    /// # Example
14268    /// ```ignore,no_run
14269    /// # use google_cloud_securitycenter_v2::model::Process;
14270    /// use google_cloud_securitycenter_v2::model::File;
14271    /// let x = Process::new().set_or_clear_binary(Some(File::default()/* use setters */));
14272    /// let x = Process::new().set_or_clear_binary(None::<File>);
14273    /// ```
14274    pub fn set_or_clear_binary<T>(mut self, v: std::option::Option<T>) -> Self
14275    where
14276        T: std::convert::Into<crate::model::File>,
14277    {
14278        self.binary = v.map(|x| x.into());
14279        self
14280    }
14281
14282    /// Sets the value of [libraries][crate::model::Process::libraries].
14283    ///
14284    /// # Example
14285    /// ```ignore,no_run
14286    /// # use google_cloud_securitycenter_v2::model::Process;
14287    /// use google_cloud_securitycenter_v2::model::File;
14288    /// let x = Process::new()
14289    ///     .set_libraries([
14290    ///         File::default()/* use setters */,
14291    ///         File::default()/* use (different) setters */,
14292    ///     ]);
14293    /// ```
14294    pub fn set_libraries<T, V>(mut self, v: T) -> Self
14295    where
14296        T: std::iter::IntoIterator<Item = V>,
14297        V: std::convert::Into<crate::model::File>,
14298    {
14299        use std::iter::Iterator;
14300        self.libraries = v.into_iter().map(|i| i.into()).collect();
14301        self
14302    }
14303
14304    /// Sets the value of [script][crate::model::Process::script].
14305    ///
14306    /// # Example
14307    /// ```ignore,no_run
14308    /// # use google_cloud_securitycenter_v2::model::Process;
14309    /// use google_cloud_securitycenter_v2::model::File;
14310    /// let x = Process::new().set_script(File::default()/* use setters */);
14311    /// ```
14312    pub fn set_script<T>(mut self, v: T) -> Self
14313    where
14314        T: std::convert::Into<crate::model::File>,
14315    {
14316        self.script = std::option::Option::Some(v.into());
14317        self
14318    }
14319
14320    /// Sets or clears the value of [script][crate::model::Process::script].
14321    ///
14322    /// # Example
14323    /// ```ignore,no_run
14324    /// # use google_cloud_securitycenter_v2::model::Process;
14325    /// use google_cloud_securitycenter_v2::model::File;
14326    /// let x = Process::new().set_or_clear_script(Some(File::default()/* use setters */));
14327    /// let x = Process::new().set_or_clear_script(None::<File>);
14328    /// ```
14329    pub fn set_or_clear_script<T>(mut self, v: std::option::Option<T>) -> Self
14330    where
14331        T: std::convert::Into<crate::model::File>,
14332    {
14333        self.script = v.map(|x| x.into());
14334        self
14335    }
14336
14337    /// Sets the value of [args][crate::model::Process::args].
14338    ///
14339    /// # Example
14340    /// ```ignore,no_run
14341    /// # use google_cloud_securitycenter_v2::model::Process;
14342    /// let x = Process::new().set_args(["a", "b", "c"]);
14343    /// ```
14344    pub fn set_args<T, V>(mut self, v: T) -> Self
14345    where
14346        T: std::iter::IntoIterator<Item = V>,
14347        V: std::convert::Into<std::string::String>,
14348    {
14349        use std::iter::Iterator;
14350        self.args = v.into_iter().map(|i| i.into()).collect();
14351        self
14352    }
14353
14354    /// Sets the value of [arguments_truncated][crate::model::Process::arguments_truncated].
14355    ///
14356    /// # Example
14357    /// ```ignore,no_run
14358    /// # use google_cloud_securitycenter_v2::model::Process;
14359    /// let x = Process::new().set_arguments_truncated(true);
14360    /// ```
14361    pub fn set_arguments_truncated<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14362        self.arguments_truncated = v.into();
14363        self
14364    }
14365
14366    /// Sets the value of [env_variables][crate::model::Process::env_variables].
14367    ///
14368    /// # Example
14369    /// ```ignore,no_run
14370    /// # use google_cloud_securitycenter_v2::model::Process;
14371    /// use google_cloud_securitycenter_v2::model::EnvironmentVariable;
14372    /// let x = Process::new()
14373    ///     .set_env_variables([
14374    ///         EnvironmentVariable::default()/* use setters */,
14375    ///         EnvironmentVariable::default()/* use (different) setters */,
14376    ///     ]);
14377    /// ```
14378    pub fn set_env_variables<T, V>(mut self, v: T) -> Self
14379    where
14380        T: std::iter::IntoIterator<Item = V>,
14381        V: std::convert::Into<crate::model::EnvironmentVariable>,
14382    {
14383        use std::iter::Iterator;
14384        self.env_variables = v.into_iter().map(|i| i.into()).collect();
14385        self
14386    }
14387
14388    /// Sets the value of [env_variables_truncated][crate::model::Process::env_variables_truncated].
14389    ///
14390    /// # Example
14391    /// ```ignore,no_run
14392    /// # use google_cloud_securitycenter_v2::model::Process;
14393    /// let x = Process::new().set_env_variables_truncated(true);
14394    /// ```
14395    pub fn set_env_variables_truncated<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14396        self.env_variables_truncated = v.into();
14397        self
14398    }
14399
14400    /// Sets the value of [pid][crate::model::Process::pid].
14401    ///
14402    /// # Example
14403    /// ```ignore,no_run
14404    /// # use google_cloud_securitycenter_v2::model::Process;
14405    /// let x = Process::new().set_pid(42);
14406    /// ```
14407    pub fn set_pid<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14408        self.pid = v.into();
14409        self
14410    }
14411
14412    /// Sets the value of [parent_pid][crate::model::Process::parent_pid].
14413    ///
14414    /// # Example
14415    /// ```ignore,no_run
14416    /// # use google_cloud_securitycenter_v2::model::Process;
14417    /// let x = Process::new().set_parent_pid(42);
14418    /// ```
14419    pub fn set_parent_pid<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14420        self.parent_pid = v.into();
14421        self
14422    }
14423
14424    /// Sets the value of [user_id][crate::model::Process::user_id].
14425    ///
14426    /// # Example
14427    /// ```ignore,no_run
14428    /// # use google_cloud_securitycenter_v2::model::Process;
14429    /// let x = Process::new().set_user_id(42);
14430    /// ```
14431    pub fn set_user_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14432        self.user_id = v.into();
14433        self
14434    }
14435}
14436
14437impl wkt::message::Message for Process {
14438    fn typename() -> &'static str {
14439        "type.googleapis.com/google.cloud.securitycenter.v2.Process"
14440    }
14441}
14442
14443/// A name-value pair representing an environment variable used in an operating
14444/// system process.
14445#[derive(Clone, Default, PartialEq)]
14446#[non_exhaustive]
14447pub struct EnvironmentVariable {
14448    /// Environment variable name as a JSON encoded string.
14449    pub name: std::string::String,
14450
14451    /// Environment variable value as a JSON encoded string.
14452    pub val: std::string::String,
14453
14454    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14455}
14456
14457impl EnvironmentVariable {
14458    pub fn new() -> Self {
14459        std::default::Default::default()
14460    }
14461
14462    /// Sets the value of [name][crate::model::EnvironmentVariable::name].
14463    ///
14464    /// # Example
14465    /// ```ignore,no_run
14466    /// # use google_cloud_securitycenter_v2::model::EnvironmentVariable;
14467    /// let x = EnvironmentVariable::new().set_name("example");
14468    /// ```
14469    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14470        self.name = v.into();
14471        self
14472    }
14473
14474    /// Sets the value of [val][crate::model::EnvironmentVariable::val].
14475    ///
14476    /// # Example
14477    /// ```ignore,no_run
14478    /// # use google_cloud_securitycenter_v2::model::EnvironmentVariable;
14479    /// let x = EnvironmentVariable::new().set_val("example");
14480    /// ```
14481    pub fn set_val<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14482        self.val = v.into();
14483        self
14484    }
14485}
14486
14487impl wkt::message::Message for EnvironmentVariable {
14488    fn typename() -> &'static str {
14489        "type.googleapis.com/google.cloud.securitycenter.v2.EnvironmentVariable"
14490    }
14491}
14492
14493/// Information related to the Google Cloud resource.
14494#[derive(Clone, Default, PartialEq)]
14495#[non_exhaustive]
14496pub struct Resource {
14497    /// The full resource name of the resource. See:
14498    /// <https://cloud.google.com/apis/design/resource_names#full_resource_name>
14499    pub name: std::string::String,
14500
14501    /// The human readable name of the resource.
14502    pub display_name: std::string::String,
14503
14504    /// The full resource type of the resource.
14505    pub r#type: std::string::String,
14506
14507    /// Indicates which cloud provider the finding is from.
14508    pub cloud_provider: crate::model::CloudProvider,
14509
14510    /// The service or resource provider associated with the resource.
14511    pub service: std::string::String,
14512
14513    /// The region or location of the service (if applicable).
14514    pub location: std::string::String,
14515
14516    /// Provides the path to the resource within the resource hierarchy.
14517    pub resource_path: std::option::Option<crate::model::ResourcePath>,
14518
14519    /// A string representation of the resource path.
14520    /// For Google Cloud, it has the format of
14521    /// `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}`
14522    /// where there can be any number of folders.
14523    /// For AWS, it has the format of
14524    /// `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}`
14525    /// where there can be any number of organizational units.
14526    /// For Azure, it has the format of
14527    /// `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}`
14528    /// where there can be any number of management groups.
14529    pub resource_path_string: std::string::String,
14530
14531    /// The metadata associated with the cloud provider.
14532    pub cloud_provider_metadata: std::option::Option<crate::model::resource::CloudProviderMetadata>,
14533
14534    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14535}
14536
14537impl Resource {
14538    pub fn new() -> Self {
14539        std::default::Default::default()
14540    }
14541
14542    /// Sets the value of [name][crate::model::Resource::name].
14543    ///
14544    /// # Example
14545    /// ```ignore,no_run
14546    /// # use google_cloud_securitycenter_v2::model::Resource;
14547    /// let x = Resource::new().set_name("example");
14548    /// ```
14549    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14550        self.name = v.into();
14551        self
14552    }
14553
14554    /// Sets the value of [display_name][crate::model::Resource::display_name].
14555    ///
14556    /// # Example
14557    /// ```ignore,no_run
14558    /// # use google_cloud_securitycenter_v2::model::Resource;
14559    /// let x = Resource::new().set_display_name("example");
14560    /// ```
14561    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14562        self.display_name = v.into();
14563        self
14564    }
14565
14566    /// Sets the value of [r#type][crate::model::Resource::type].
14567    ///
14568    /// # Example
14569    /// ```ignore,no_run
14570    /// # use google_cloud_securitycenter_v2::model::Resource;
14571    /// let x = Resource::new().set_type("example");
14572    /// ```
14573    pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14574        self.r#type = v.into();
14575        self
14576    }
14577
14578    /// Sets the value of [cloud_provider][crate::model::Resource::cloud_provider].
14579    ///
14580    /// # Example
14581    /// ```ignore,no_run
14582    /// # use google_cloud_securitycenter_v2::model::Resource;
14583    /// use google_cloud_securitycenter_v2::model::CloudProvider;
14584    /// let x0 = Resource::new().set_cloud_provider(CloudProvider::GoogleCloudPlatform);
14585    /// let x1 = Resource::new().set_cloud_provider(CloudProvider::AmazonWebServices);
14586    /// let x2 = Resource::new().set_cloud_provider(CloudProvider::MicrosoftAzure);
14587    /// ```
14588    pub fn set_cloud_provider<T: std::convert::Into<crate::model::CloudProvider>>(
14589        mut self,
14590        v: T,
14591    ) -> Self {
14592        self.cloud_provider = v.into();
14593        self
14594    }
14595
14596    /// Sets the value of [service][crate::model::Resource::service].
14597    ///
14598    /// # Example
14599    /// ```ignore,no_run
14600    /// # use google_cloud_securitycenter_v2::model::Resource;
14601    /// let x = Resource::new().set_service("example");
14602    /// ```
14603    pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14604        self.service = v.into();
14605        self
14606    }
14607
14608    /// Sets the value of [location][crate::model::Resource::location].
14609    ///
14610    /// # Example
14611    /// ```ignore,no_run
14612    /// # use google_cloud_securitycenter_v2::model::Resource;
14613    /// let x = Resource::new().set_location("example");
14614    /// ```
14615    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14616        self.location = v.into();
14617        self
14618    }
14619
14620    /// Sets the value of [resource_path][crate::model::Resource::resource_path].
14621    ///
14622    /// # Example
14623    /// ```ignore,no_run
14624    /// # use google_cloud_securitycenter_v2::model::Resource;
14625    /// use google_cloud_securitycenter_v2::model::ResourcePath;
14626    /// let x = Resource::new().set_resource_path(ResourcePath::default()/* use setters */);
14627    /// ```
14628    pub fn set_resource_path<T>(mut self, v: T) -> Self
14629    where
14630        T: std::convert::Into<crate::model::ResourcePath>,
14631    {
14632        self.resource_path = std::option::Option::Some(v.into());
14633        self
14634    }
14635
14636    /// Sets or clears the value of [resource_path][crate::model::Resource::resource_path].
14637    ///
14638    /// # Example
14639    /// ```ignore,no_run
14640    /// # use google_cloud_securitycenter_v2::model::Resource;
14641    /// use google_cloud_securitycenter_v2::model::ResourcePath;
14642    /// let x = Resource::new().set_or_clear_resource_path(Some(ResourcePath::default()/* use setters */));
14643    /// let x = Resource::new().set_or_clear_resource_path(None::<ResourcePath>);
14644    /// ```
14645    pub fn set_or_clear_resource_path<T>(mut self, v: std::option::Option<T>) -> Self
14646    where
14647        T: std::convert::Into<crate::model::ResourcePath>,
14648    {
14649        self.resource_path = v.map(|x| x.into());
14650        self
14651    }
14652
14653    /// Sets the value of [resource_path_string][crate::model::Resource::resource_path_string].
14654    ///
14655    /// # Example
14656    /// ```ignore,no_run
14657    /// # use google_cloud_securitycenter_v2::model::Resource;
14658    /// let x = Resource::new().set_resource_path_string("example");
14659    /// ```
14660    pub fn set_resource_path_string<T: std::convert::Into<std::string::String>>(
14661        mut self,
14662        v: T,
14663    ) -> Self {
14664        self.resource_path_string = v.into();
14665        self
14666    }
14667
14668    /// Sets the value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata].
14669    ///
14670    /// Note that all the setters affecting `cloud_provider_metadata` are mutually
14671    /// exclusive.
14672    ///
14673    /// # Example
14674    /// ```ignore,no_run
14675    /// # use google_cloud_securitycenter_v2::model::Resource;
14676    /// use google_cloud_securitycenter_v2::model::GcpMetadata;
14677    /// let x = Resource::new().set_cloud_provider_metadata(Some(
14678    ///     google_cloud_securitycenter_v2::model::resource::CloudProviderMetadata::GcpMetadata(GcpMetadata::default().into())));
14679    /// ```
14680    pub fn set_cloud_provider_metadata<
14681        T: std::convert::Into<std::option::Option<crate::model::resource::CloudProviderMetadata>>,
14682    >(
14683        mut self,
14684        v: T,
14685    ) -> Self {
14686        self.cloud_provider_metadata = v.into();
14687        self
14688    }
14689
14690    /// The value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata]
14691    /// if it holds a `GcpMetadata`, `None` if the field is not set or
14692    /// holds a different branch.
14693    pub fn gcp_metadata(&self) -> std::option::Option<&std::boxed::Box<crate::model::GcpMetadata>> {
14694        #[allow(unreachable_patterns)]
14695        self.cloud_provider_metadata.as_ref().and_then(|v| match v {
14696            crate::model::resource::CloudProviderMetadata::GcpMetadata(v) => {
14697                std::option::Option::Some(v)
14698            }
14699            _ => std::option::Option::None,
14700        })
14701    }
14702
14703    /// Sets the value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata]
14704    /// to hold a `GcpMetadata`.
14705    ///
14706    /// Note that all the setters affecting `cloud_provider_metadata` are
14707    /// mutually exclusive.
14708    ///
14709    /// # Example
14710    /// ```ignore,no_run
14711    /// # use google_cloud_securitycenter_v2::model::Resource;
14712    /// use google_cloud_securitycenter_v2::model::GcpMetadata;
14713    /// let x = Resource::new().set_gcp_metadata(GcpMetadata::default()/* use setters */);
14714    /// assert!(x.gcp_metadata().is_some());
14715    /// assert!(x.aws_metadata().is_none());
14716    /// assert!(x.azure_metadata().is_none());
14717    /// ```
14718    pub fn set_gcp_metadata<T: std::convert::Into<std::boxed::Box<crate::model::GcpMetadata>>>(
14719        mut self,
14720        v: T,
14721    ) -> Self {
14722        self.cloud_provider_metadata = std::option::Option::Some(
14723            crate::model::resource::CloudProviderMetadata::GcpMetadata(v.into()),
14724        );
14725        self
14726    }
14727
14728    /// The value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata]
14729    /// if it holds a `AwsMetadata`, `None` if the field is not set or
14730    /// holds a different branch.
14731    pub fn aws_metadata(&self) -> std::option::Option<&std::boxed::Box<crate::model::AwsMetadata>> {
14732        #[allow(unreachable_patterns)]
14733        self.cloud_provider_metadata.as_ref().and_then(|v| match v {
14734            crate::model::resource::CloudProviderMetadata::AwsMetadata(v) => {
14735                std::option::Option::Some(v)
14736            }
14737            _ => std::option::Option::None,
14738        })
14739    }
14740
14741    /// Sets the value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata]
14742    /// to hold a `AwsMetadata`.
14743    ///
14744    /// Note that all the setters affecting `cloud_provider_metadata` are
14745    /// mutually exclusive.
14746    ///
14747    /// # Example
14748    /// ```ignore,no_run
14749    /// # use google_cloud_securitycenter_v2::model::Resource;
14750    /// use google_cloud_securitycenter_v2::model::AwsMetadata;
14751    /// let x = Resource::new().set_aws_metadata(AwsMetadata::default()/* use setters */);
14752    /// assert!(x.aws_metadata().is_some());
14753    /// assert!(x.gcp_metadata().is_none());
14754    /// assert!(x.azure_metadata().is_none());
14755    /// ```
14756    pub fn set_aws_metadata<T: std::convert::Into<std::boxed::Box<crate::model::AwsMetadata>>>(
14757        mut self,
14758        v: T,
14759    ) -> Self {
14760        self.cloud_provider_metadata = std::option::Option::Some(
14761            crate::model::resource::CloudProviderMetadata::AwsMetadata(v.into()),
14762        );
14763        self
14764    }
14765
14766    /// The value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata]
14767    /// if it holds a `AzureMetadata`, `None` if the field is not set or
14768    /// holds a different branch.
14769    pub fn azure_metadata(
14770        &self,
14771    ) -> std::option::Option<&std::boxed::Box<crate::model::AzureMetadata>> {
14772        #[allow(unreachable_patterns)]
14773        self.cloud_provider_metadata.as_ref().and_then(|v| match v {
14774            crate::model::resource::CloudProviderMetadata::AzureMetadata(v) => {
14775                std::option::Option::Some(v)
14776            }
14777            _ => std::option::Option::None,
14778        })
14779    }
14780
14781    /// Sets the value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata]
14782    /// to hold a `AzureMetadata`.
14783    ///
14784    /// Note that all the setters affecting `cloud_provider_metadata` are
14785    /// mutually exclusive.
14786    ///
14787    /// # Example
14788    /// ```ignore,no_run
14789    /// # use google_cloud_securitycenter_v2::model::Resource;
14790    /// use google_cloud_securitycenter_v2::model::AzureMetadata;
14791    /// let x = Resource::new().set_azure_metadata(AzureMetadata::default()/* use setters */);
14792    /// assert!(x.azure_metadata().is_some());
14793    /// assert!(x.gcp_metadata().is_none());
14794    /// assert!(x.aws_metadata().is_none());
14795    /// ```
14796    pub fn set_azure_metadata<
14797        T: std::convert::Into<std::boxed::Box<crate::model::AzureMetadata>>,
14798    >(
14799        mut self,
14800        v: T,
14801    ) -> Self {
14802        self.cloud_provider_metadata = std::option::Option::Some(
14803            crate::model::resource::CloudProviderMetadata::AzureMetadata(v.into()),
14804        );
14805        self
14806    }
14807}
14808
14809impl wkt::message::Message for Resource {
14810    fn typename() -> &'static str {
14811        "type.googleapis.com/google.cloud.securitycenter.v2.Resource"
14812    }
14813}
14814
14815/// Defines additional types related to [Resource].
14816pub mod resource {
14817    #[allow(unused_imports)]
14818    use super::*;
14819
14820    /// The metadata associated with the cloud provider.
14821    #[derive(Clone, Debug, PartialEq)]
14822    #[non_exhaustive]
14823    pub enum CloudProviderMetadata {
14824        /// The GCP metadata associated with the finding.
14825        GcpMetadata(std::boxed::Box<crate::model::GcpMetadata>),
14826        /// The AWS metadata associated with the finding.
14827        AwsMetadata(std::boxed::Box<crate::model::AwsMetadata>),
14828        /// The Azure metadata associated with the finding.
14829        AzureMetadata(std::boxed::Box<crate::model::AzureMetadata>),
14830    }
14831}
14832
14833/// Google Cloud metadata associated with the resource. Only applicable if the
14834/// finding's cloud provider is Google Cloud.
14835#[derive(Clone, Default, PartialEq)]
14836#[non_exhaustive]
14837pub struct GcpMetadata {
14838    /// The full resource name of project that the resource belongs to.
14839    pub project: std::string::String,
14840
14841    /// The project ID that the resource belongs to.
14842    pub project_display_name: std::string::String,
14843
14844    /// The full resource name of resource's parent.
14845    pub parent: std::string::String,
14846
14847    /// The human readable name of resource's parent.
14848    pub parent_display_name: std::string::String,
14849
14850    /// Output only. Contains a Folder message for each folder in the assets
14851    /// ancestry. The first folder is the deepest nested folder, and the last
14852    /// folder is the folder directly under the Organization.
14853    pub folders: std::vec::Vec<crate::model::Folder>,
14854
14855    /// The name of the organization that the resource belongs to.
14856    pub organization: std::string::String,
14857
14858    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14859}
14860
14861impl GcpMetadata {
14862    pub fn new() -> Self {
14863        std::default::Default::default()
14864    }
14865
14866    /// Sets the value of [project][crate::model::GcpMetadata::project].
14867    ///
14868    /// # Example
14869    /// ```ignore,no_run
14870    /// # use google_cloud_securitycenter_v2::model::GcpMetadata;
14871    /// let x = GcpMetadata::new().set_project("example");
14872    /// ```
14873    pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14874        self.project = v.into();
14875        self
14876    }
14877
14878    /// Sets the value of [project_display_name][crate::model::GcpMetadata::project_display_name].
14879    ///
14880    /// # Example
14881    /// ```ignore,no_run
14882    /// # use google_cloud_securitycenter_v2::model::GcpMetadata;
14883    /// let x = GcpMetadata::new().set_project_display_name("example");
14884    /// ```
14885    pub fn set_project_display_name<T: std::convert::Into<std::string::String>>(
14886        mut self,
14887        v: T,
14888    ) -> Self {
14889        self.project_display_name = v.into();
14890        self
14891    }
14892
14893    /// Sets the value of [parent][crate::model::GcpMetadata::parent].
14894    ///
14895    /// # Example
14896    /// ```ignore,no_run
14897    /// # use google_cloud_securitycenter_v2::model::GcpMetadata;
14898    /// let x = GcpMetadata::new().set_parent("example");
14899    /// ```
14900    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14901        self.parent = v.into();
14902        self
14903    }
14904
14905    /// Sets the value of [parent_display_name][crate::model::GcpMetadata::parent_display_name].
14906    ///
14907    /// # Example
14908    /// ```ignore,no_run
14909    /// # use google_cloud_securitycenter_v2::model::GcpMetadata;
14910    /// let x = GcpMetadata::new().set_parent_display_name("example");
14911    /// ```
14912    pub fn set_parent_display_name<T: std::convert::Into<std::string::String>>(
14913        mut self,
14914        v: T,
14915    ) -> Self {
14916        self.parent_display_name = v.into();
14917        self
14918    }
14919
14920    /// Sets the value of [folders][crate::model::GcpMetadata::folders].
14921    ///
14922    /// # Example
14923    /// ```ignore,no_run
14924    /// # use google_cloud_securitycenter_v2::model::GcpMetadata;
14925    /// use google_cloud_securitycenter_v2::model::Folder;
14926    /// let x = GcpMetadata::new()
14927    ///     .set_folders([
14928    ///         Folder::default()/* use setters */,
14929    ///         Folder::default()/* use (different) setters */,
14930    ///     ]);
14931    /// ```
14932    pub fn set_folders<T, V>(mut self, v: T) -> Self
14933    where
14934        T: std::iter::IntoIterator<Item = V>,
14935        V: std::convert::Into<crate::model::Folder>,
14936    {
14937        use std::iter::Iterator;
14938        self.folders = v.into_iter().map(|i| i.into()).collect();
14939        self
14940    }
14941
14942    /// Sets the value of [organization][crate::model::GcpMetadata::organization].
14943    ///
14944    /// # Example
14945    /// ```ignore,no_run
14946    /// # use google_cloud_securitycenter_v2::model::GcpMetadata;
14947    /// let x = GcpMetadata::new().set_organization("example");
14948    /// ```
14949    pub fn set_organization<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14950        self.organization = v.into();
14951        self
14952    }
14953}
14954
14955impl wkt::message::Message for GcpMetadata {
14956    fn typename() -> &'static str {
14957        "type.googleapis.com/google.cloud.securitycenter.v2.GcpMetadata"
14958    }
14959}
14960
14961/// AWS metadata associated with the resource, only applicable if the finding's
14962/// cloud provider is Amazon Web Services.
14963#[derive(Clone, Default, PartialEq)]
14964#[non_exhaustive]
14965pub struct AwsMetadata {
14966    /// The AWS organization associated with the resource.
14967    pub organization: std::option::Option<crate::model::aws_metadata::AwsOrganization>,
14968
14969    /// A list of AWS organizational units associated with the resource, ordered
14970    /// from lowest level (closest to the account) to highest level.
14971    pub organizational_units: std::vec::Vec<crate::model::aws_metadata::AwsOrganizationalUnit>,
14972
14973    /// The AWS account associated with the resource.
14974    pub account: std::option::Option<crate::model::aws_metadata::AwsAccount>,
14975
14976    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14977}
14978
14979impl AwsMetadata {
14980    pub fn new() -> Self {
14981        std::default::Default::default()
14982    }
14983
14984    /// Sets the value of [organization][crate::model::AwsMetadata::organization].
14985    ///
14986    /// # Example
14987    /// ```ignore,no_run
14988    /// # use google_cloud_securitycenter_v2::model::AwsMetadata;
14989    /// use google_cloud_securitycenter_v2::model::aws_metadata::AwsOrganization;
14990    /// let x = AwsMetadata::new().set_organization(AwsOrganization::default()/* use setters */);
14991    /// ```
14992    pub fn set_organization<T>(mut self, v: T) -> Self
14993    where
14994        T: std::convert::Into<crate::model::aws_metadata::AwsOrganization>,
14995    {
14996        self.organization = std::option::Option::Some(v.into());
14997        self
14998    }
14999
15000    /// Sets or clears the value of [organization][crate::model::AwsMetadata::organization].
15001    ///
15002    /// # Example
15003    /// ```ignore,no_run
15004    /// # use google_cloud_securitycenter_v2::model::AwsMetadata;
15005    /// use google_cloud_securitycenter_v2::model::aws_metadata::AwsOrganization;
15006    /// let x = AwsMetadata::new().set_or_clear_organization(Some(AwsOrganization::default()/* use setters */));
15007    /// let x = AwsMetadata::new().set_or_clear_organization(None::<AwsOrganization>);
15008    /// ```
15009    pub fn set_or_clear_organization<T>(mut self, v: std::option::Option<T>) -> Self
15010    where
15011        T: std::convert::Into<crate::model::aws_metadata::AwsOrganization>,
15012    {
15013        self.organization = v.map(|x| x.into());
15014        self
15015    }
15016
15017    /// Sets the value of [organizational_units][crate::model::AwsMetadata::organizational_units].
15018    ///
15019    /// # Example
15020    /// ```ignore,no_run
15021    /// # use google_cloud_securitycenter_v2::model::AwsMetadata;
15022    /// use google_cloud_securitycenter_v2::model::aws_metadata::AwsOrganizationalUnit;
15023    /// let x = AwsMetadata::new()
15024    ///     .set_organizational_units([
15025    ///         AwsOrganizationalUnit::default()/* use setters */,
15026    ///         AwsOrganizationalUnit::default()/* use (different) setters */,
15027    ///     ]);
15028    /// ```
15029    pub fn set_organizational_units<T, V>(mut self, v: T) -> Self
15030    where
15031        T: std::iter::IntoIterator<Item = V>,
15032        V: std::convert::Into<crate::model::aws_metadata::AwsOrganizationalUnit>,
15033    {
15034        use std::iter::Iterator;
15035        self.organizational_units = v.into_iter().map(|i| i.into()).collect();
15036        self
15037    }
15038
15039    /// Sets the value of [account][crate::model::AwsMetadata::account].
15040    ///
15041    /// # Example
15042    /// ```ignore,no_run
15043    /// # use google_cloud_securitycenter_v2::model::AwsMetadata;
15044    /// use google_cloud_securitycenter_v2::model::aws_metadata::AwsAccount;
15045    /// let x = AwsMetadata::new().set_account(AwsAccount::default()/* use setters */);
15046    /// ```
15047    pub fn set_account<T>(mut self, v: T) -> Self
15048    where
15049        T: std::convert::Into<crate::model::aws_metadata::AwsAccount>,
15050    {
15051        self.account = std::option::Option::Some(v.into());
15052        self
15053    }
15054
15055    /// Sets or clears the value of [account][crate::model::AwsMetadata::account].
15056    ///
15057    /// # Example
15058    /// ```ignore,no_run
15059    /// # use google_cloud_securitycenter_v2::model::AwsMetadata;
15060    /// use google_cloud_securitycenter_v2::model::aws_metadata::AwsAccount;
15061    /// let x = AwsMetadata::new().set_or_clear_account(Some(AwsAccount::default()/* use setters */));
15062    /// let x = AwsMetadata::new().set_or_clear_account(None::<AwsAccount>);
15063    /// ```
15064    pub fn set_or_clear_account<T>(mut self, v: std::option::Option<T>) -> Self
15065    where
15066        T: std::convert::Into<crate::model::aws_metadata::AwsAccount>,
15067    {
15068        self.account = v.map(|x| x.into());
15069        self
15070    }
15071}
15072
15073impl wkt::message::Message for AwsMetadata {
15074    fn typename() -> &'static str {
15075        "type.googleapis.com/google.cloud.securitycenter.v2.AwsMetadata"
15076    }
15077}
15078
15079/// Defines additional types related to [AwsMetadata].
15080pub mod aws_metadata {
15081    #[allow(unused_imports)]
15082    use super::*;
15083
15084    /// An organization is a collection of accounts that are centrally managed
15085    /// together using consolidated billing, organized hierarchically with
15086    /// organizational units (OUs), and controlled with policies.
15087    #[derive(Clone, Default, PartialEq)]
15088    #[non_exhaustive]
15089    pub struct AwsOrganization {
15090        /// The unique identifier (ID) for the organization. The regex pattern for an
15091        /// organization ID string requires "o-" followed by from 10 to 32 lowercase
15092        /// letters or digits.
15093        pub id: std::string::String,
15094
15095        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15096    }
15097
15098    impl AwsOrganization {
15099        pub fn new() -> Self {
15100            std::default::Default::default()
15101        }
15102
15103        /// Sets the value of [id][crate::model::aws_metadata::AwsOrganization::id].
15104        ///
15105        /// # Example
15106        /// ```ignore,no_run
15107        /// # use google_cloud_securitycenter_v2::model::aws_metadata::AwsOrganization;
15108        /// let x = AwsOrganization::new().set_id("example");
15109        /// ```
15110        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15111            self.id = v.into();
15112            self
15113        }
15114    }
15115
15116    impl wkt::message::Message for AwsOrganization {
15117        fn typename() -> &'static str {
15118            "type.googleapis.com/google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization"
15119        }
15120    }
15121
15122    /// An Organizational Unit (OU) is a container of AWS accounts within a root of
15123    /// an organization. Policies that are attached to an OU apply to all accounts
15124    /// contained in that OU and in any child OUs.
15125    #[derive(Clone, Default, PartialEq)]
15126    #[non_exhaustive]
15127    pub struct AwsOrganizationalUnit {
15128        /// The unique identifier (ID) associated with this OU. The regex pattern for
15129        /// an organizational unit ID string requires "ou-" followed by from 4 to 32
15130        /// lowercase letters or digits (the ID of the root that contains the OU).
15131        /// This string is followed by a second "-" dash and from 8 to 32 additional
15132        /// lowercase letters or digits. For example, "ou-ab12-cd34ef56".
15133        pub id: std::string::String,
15134
15135        /// The friendly name of the OU.
15136        pub name: std::string::String,
15137
15138        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15139    }
15140
15141    impl AwsOrganizationalUnit {
15142        pub fn new() -> Self {
15143            std::default::Default::default()
15144        }
15145
15146        /// Sets the value of [id][crate::model::aws_metadata::AwsOrganizationalUnit::id].
15147        ///
15148        /// # Example
15149        /// ```ignore,no_run
15150        /// # use google_cloud_securitycenter_v2::model::aws_metadata::AwsOrganizationalUnit;
15151        /// let x = AwsOrganizationalUnit::new().set_id("example");
15152        /// ```
15153        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15154            self.id = v.into();
15155            self
15156        }
15157
15158        /// Sets the value of [name][crate::model::aws_metadata::AwsOrganizationalUnit::name].
15159        ///
15160        /// # Example
15161        /// ```ignore,no_run
15162        /// # use google_cloud_securitycenter_v2::model::aws_metadata::AwsOrganizationalUnit;
15163        /// let x = AwsOrganizationalUnit::new().set_name("example");
15164        /// ```
15165        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15166            self.name = v.into();
15167            self
15168        }
15169    }
15170
15171    impl wkt::message::Message for AwsOrganizationalUnit {
15172        fn typename() -> &'static str {
15173            "type.googleapis.com/google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit"
15174        }
15175    }
15176
15177    /// An AWS account that is a member of an organization.
15178    #[derive(Clone, Default, PartialEq)]
15179    #[non_exhaustive]
15180    pub struct AwsAccount {
15181        /// The unique identifier (ID) of the account, containing exactly 12 digits.
15182        pub id: std::string::String,
15183
15184        /// The friendly name of this account.
15185        pub name: std::string::String,
15186
15187        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15188    }
15189
15190    impl AwsAccount {
15191        pub fn new() -> Self {
15192            std::default::Default::default()
15193        }
15194
15195        /// Sets the value of [id][crate::model::aws_metadata::AwsAccount::id].
15196        ///
15197        /// # Example
15198        /// ```ignore,no_run
15199        /// # use google_cloud_securitycenter_v2::model::aws_metadata::AwsAccount;
15200        /// let x = AwsAccount::new().set_id("example");
15201        /// ```
15202        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15203            self.id = v.into();
15204            self
15205        }
15206
15207        /// Sets the value of [name][crate::model::aws_metadata::AwsAccount::name].
15208        ///
15209        /// # Example
15210        /// ```ignore,no_run
15211        /// # use google_cloud_securitycenter_v2::model::aws_metadata::AwsAccount;
15212        /// let x = AwsAccount::new().set_name("example");
15213        /// ```
15214        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15215            self.name = v.into();
15216            self
15217        }
15218    }
15219
15220    impl wkt::message::Message for AwsAccount {
15221        fn typename() -> &'static str {
15222            "type.googleapis.com/google.cloud.securitycenter.v2.AwsMetadata.AwsAccount"
15223        }
15224    }
15225}
15226
15227/// Azure metadata associated with the resource, only applicable if the finding's
15228/// cloud provider is Microsoft Azure.
15229#[derive(Clone, Default, PartialEq)]
15230#[non_exhaustive]
15231pub struct AzureMetadata {
15232    /// A list of Azure management groups associated with the resource, ordered
15233    /// from lowest level (closest to the subscription) to highest level.
15234    pub management_groups: std::vec::Vec<crate::model::azure_metadata::AzureManagementGroup>,
15235
15236    /// The Azure subscription associated with the resource.
15237    pub subscription: std::option::Option<crate::model::azure_metadata::AzureSubscription>,
15238
15239    /// The Azure resource group associated with the resource.
15240    pub resource_group: std::option::Option<crate::model::azure_metadata::AzureResourceGroup>,
15241
15242    /// The Azure Entra tenant associated with the resource.
15243    pub tenant: std::option::Option<crate::model::azure_metadata::AzureTenant>,
15244
15245    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15246}
15247
15248impl AzureMetadata {
15249    pub fn new() -> Self {
15250        std::default::Default::default()
15251    }
15252
15253    /// Sets the value of [management_groups][crate::model::AzureMetadata::management_groups].
15254    ///
15255    /// # Example
15256    /// ```ignore,no_run
15257    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
15258    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureManagementGroup;
15259    /// let x = AzureMetadata::new()
15260    ///     .set_management_groups([
15261    ///         AzureManagementGroup::default()/* use setters */,
15262    ///         AzureManagementGroup::default()/* use (different) setters */,
15263    ///     ]);
15264    /// ```
15265    pub fn set_management_groups<T, V>(mut self, v: T) -> Self
15266    where
15267        T: std::iter::IntoIterator<Item = V>,
15268        V: std::convert::Into<crate::model::azure_metadata::AzureManagementGroup>,
15269    {
15270        use std::iter::Iterator;
15271        self.management_groups = v.into_iter().map(|i| i.into()).collect();
15272        self
15273    }
15274
15275    /// Sets the value of [subscription][crate::model::AzureMetadata::subscription].
15276    ///
15277    /// # Example
15278    /// ```ignore,no_run
15279    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
15280    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureSubscription;
15281    /// let x = AzureMetadata::new().set_subscription(AzureSubscription::default()/* use setters */);
15282    /// ```
15283    pub fn set_subscription<T>(mut self, v: T) -> Self
15284    where
15285        T: std::convert::Into<crate::model::azure_metadata::AzureSubscription>,
15286    {
15287        self.subscription = std::option::Option::Some(v.into());
15288        self
15289    }
15290
15291    /// Sets or clears the value of [subscription][crate::model::AzureMetadata::subscription].
15292    ///
15293    /// # Example
15294    /// ```ignore,no_run
15295    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
15296    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureSubscription;
15297    /// let x = AzureMetadata::new().set_or_clear_subscription(Some(AzureSubscription::default()/* use setters */));
15298    /// let x = AzureMetadata::new().set_or_clear_subscription(None::<AzureSubscription>);
15299    /// ```
15300    pub fn set_or_clear_subscription<T>(mut self, v: std::option::Option<T>) -> Self
15301    where
15302        T: std::convert::Into<crate::model::azure_metadata::AzureSubscription>,
15303    {
15304        self.subscription = v.map(|x| x.into());
15305        self
15306    }
15307
15308    /// Sets the value of [resource_group][crate::model::AzureMetadata::resource_group].
15309    ///
15310    /// # Example
15311    /// ```ignore,no_run
15312    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
15313    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureResourceGroup;
15314    /// let x = AzureMetadata::new().set_resource_group(AzureResourceGroup::default()/* use setters */);
15315    /// ```
15316    pub fn set_resource_group<T>(mut self, v: T) -> Self
15317    where
15318        T: std::convert::Into<crate::model::azure_metadata::AzureResourceGroup>,
15319    {
15320        self.resource_group = std::option::Option::Some(v.into());
15321        self
15322    }
15323
15324    /// Sets or clears the value of [resource_group][crate::model::AzureMetadata::resource_group].
15325    ///
15326    /// # Example
15327    /// ```ignore,no_run
15328    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
15329    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureResourceGroup;
15330    /// let x = AzureMetadata::new().set_or_clear_resource_group(Some(AzureResourceGroup::default()/* use setters */));
15331    /// let x = AzureMetadata::new().set_or_clear_resource_group(None::<AzureResourceGroup>);
15332    /// ```
15333    pub fn set_or_clear_resource_group<T>(mut self, v: std::option::Option<T>) -> Self
15334    where
15335        T: std::convert::Into<crate::model::azure_metadata::AzureResourceGroup>,
15336    {
15337        self.resource_group = v.map(|x| x.into());
15338        self
15339    }
15340
15341    /// Sets the value of [tenant][crate::model::AzureMetadata::tenant].
15342    ///
15343    /// # Example
15344    /// ```ignore,no_run
15345    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
15346    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureTenant;
15347    /// let x = AzureMetadata::new().set_tenant(AzureTenant::default()/* use setters */);
15348    /// ```
15349    pub fn set_tenant<T>(mut self, v: T) -> Self
15350    where
15351        T: std::convert::Into<crate::model::azure_metadata::AzureTenant>,
15352    {
15353        self.tenant = std::option::Option::Some(v.into());
15354        self
15355    }
15356
15357    /// Sets or clears the value of [tenant][crate::model::AzureMetadata::tenant].
15358    ///
15359    /// # Example
15360    /// ```ignore,no_run
15361    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
15362    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureTenant;
15363    /// let x = AzureMetadata::new().set_or_clear_tenant(Some(AzureTenant::default()/* use setters */));
15364    /// let x = AzureMetadata::new().set_or_clear_tenant(None::<AzureTenant>);
15365    /// ```
15366    pub fn set_or_clear_tenant<T>(mut self, v: std::option::Option<T>) -> Self
15367    where
15368        T: std::convert::Into<crate::model::azure_metadata::AzureTenant>,
15369    {
15370        self.tenant = v.map(|x| x.into());
15371        self
15372    }
15373}
15374
15375impl wkt::message::Message for AzureMetadata {
15376    fn typename() -> &'static str {
15377        "type.googleapis.com/google.cloud.securitycenter.v2.AzureMetadata"
15378    }
15379}
15380
15381/// Defines additional types related to [AzureMetadata].
15382pub mod azure_metadata {
15383    #[allow(unused_imports)]
15384    use super::*;
15385
15386    /// Represents an Azure management group.
15387    #[derive(Clone, Default, PartialEq)]
15388    #[non_exhaustive]
15389    pub struct AzureManagementGroup {
15390        /// The UUID of the Azure management group, for example,
15391        /// `20000000-0001-0000-0000-000000000000`.
15392        pub id: std::string::String,
15393
15394        /// The display name of the Azure management group.
15395        pub display_name: std::string::String,
15396
15397        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15398    }
15399
15400    impl AzureManagementGroup {
15401        pub fn new() -> Self {
15402            std::default::Default::default()
15403        }
15404
15405        /// Sets the value of [id][crate::model::azure_metadata::AzureManagementGroup::id].
15406        ///
15407        /// # Example
15408        /// ```ignore,no_run
15409        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureManagementGroup;
15410        /// let x = AzureManagementGroup::new().set_id("example");
15411        /// ```
15412        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15413            self.id = v.into();
15414            self
15415        }
15416
15417        /// Sets the value of [display_name][crate::model::azure_metadata::AzureManagementGroup::display_name].
15418        ///
15419        /// # Example
15420        /// ```ignore,no_run
15421        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureManagementGroup;
15422        /// let x = AzureManagementGroup::new().set_display_name("example");
15423        /// ```
15424        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
15425            mut self,
15426            v: T,
15427        ) -> Self {
15428            self.display_name = v.into();
15429            self
15430        }
15431    }
15432
15433    impl wkt::message::Message for AzureManagementGroup {
15434        fn typename() -> &'static str {
15435            "type.googleapis.com/google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup"
15436        }
15437    }
15438
15439    /// Represents an Azure subscription.
15440    #[derive(Clone, Default, PartialEq)]
15441    #[non_exhaustive]
15442    pub struct AzureSubscription {
15443        /// The UUID of the Azure subscription, for example,
15444        /// `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`.
15445        pub id: std::string::String,
15446
15447        /// The display name of the Azure subscription.
15448        pub display_name: std::string::String,
15449
15450        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15451    }
15452
15453    impl AzureSubscription {
15454        pub fn new() -> Self {
15455            std::default::Default::default()
15456        }
15457
15458        /// Sets the value of [id][crate::model::azure_metadata::AzureSubscription::id].
15459        ///
15460        /// # Example
15461        /// ```ignore,no_run
15462        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureSubscription;
15463        /// let x = AzureSubscription::new().set_id("example");
15464        /// ```
15465        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15466            self.id = v.into();
15467            self
15468        }
15469
15470        /// Sets the value of [display_name][crate::model::azure_metadata::AzureSubscription::display_name].
15471        ///
15472        /// # Example
15473        /// ```ignore,no_run
15474        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureSubscription;
15475        /// let x = AzureSubscription::new().set_display_name("example");
15476        /// ```
15477        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
15478            mut self,
15479            v: T,
15480        ) -> Self {
15481            self.display_name = v.into();
15482            self
15483        }
15484    }
15485
15486    impl wkt::message::Message for AzureSubscription {
15487        fn typename() -> &'static str {
15488            "type.googleapis.com/google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription"
15489        }
15490    }
15491
15492    /// Represents an Azure resource group.
15493    #[derive(Clone, Default, PartialEq)]
15494    #[non_exhaustive]
15495    pub struct AzureResourceGroup {
15496        /// The ID of the Azure resource group.
15497        pub id: std::string::String,
15498
15499        /// The name of the Azure resource group. This is not a UUID.
15500        pub name: std::string::String,
15501
15502        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15503    }
15504
15505    impl AzureResourceGroup {
15506        pub fn new() -> Self {
15507            std::default::Default::default()
15508        }
15509
15510        /// Sets the value of [id][crate::model::azure_metadata::AzureResourceGroup::id].
15511        ///
15512        /// # Example
15513        /// ```ignore,no_run
15514        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureResourceGroup;
15515        /// let x = AzureResourceGroup::new().set_id("example");
15516        /// ```
15517        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15518            self.id = v.into();
15519            self
15520        }
15521
15522        /// Sets the value of [name][crate::model::azure_metadata::AzureResourceGroup::name].
15523        ///
15524        /// # Example
15525        /// ```ignore,no_run
15526        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureResourceGroup;
15527        /// let x = AzureResourceGroup::new().set_name("example");
15528        /// ```
15529        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15530            self.name = v.into();
15531            self
15532        }
15533    }
15534
15535    impl wkt::message::Message for AzureResourceGroup {
15536        fn typename() -> &'static str {
15537            "type.googleapis.com/google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup"
15538        }
15539    }
15540
15541    /// Represents a Microsoft Entra tenant.
15542    #[derive(Clone, Default, PartialEq)]
15543    #[non_exhaustive]
15544    pub struct AzureTenant {
15545        /// The ID of the Microsoft Entra tenant, for example,
15546        /// "a11aaa11-aa11-1aa1-11aa-1aaa11a".
15547        pub id: std::string::String,
15548
15549        /// The display name of the Azure tenant.
15550        pub display_name: std::string::String,
15551
15552        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15553    }
15554
15555    impl AzureTenant {
15556        pub fn new() -> Self {
15557            std::default::Default::default()
15558        }
15559
15560        /// Sets the value of [id][crate::model::azure_metadata::AzureTenant::id].
15561        ///
15562        /// # Example
15563        /// ```ignore,no_run
15564        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureTenant;
15565        /// let x = AzureTenant::new().set_id("example");
15566        /// ```
15567        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15568            self.id = v.into();
15569            self
15570        }
15571
15572        /// Sets the value of [display_name][crate::model::azure_metadata::AzureTenant::display_name].
15573        ///
15574        /// # Example
15575        /// ```ignore,no_run
15576        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureTenant;
15577        /// let x = AzureTenant::new().set_display_name("example");
15578        /// ```
15579        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
15580            mut self,
15581            v: T,
15582        ) -> Self {
15583            self.display_name = v.into();
15584            self
15585        }
15586    }
15587
15588    impl wkt::message::Message for AzureTenant {
15589        fn typename() -> &'static str {
15590            "type.googleapis.com/google.cloud.securitycenter.v2.AzureMetadata.AzureTenant"
15591        }
15592    }
15593}
15594
15595/// Represents the path of resources leading up to the resource this finding is
15596/// about.
15597#[derive(Clone, Default, PartialEq)]
15598#[non_exhaustive]
15599pub struct ResourcePath {
15600    /// The list of nodes that make the up resource path, ordered from lowest
15601    /// level to highest level.
15602    pub nodes: std::vec::Vec<crate::model::resource_path::ResourcePathNode>,
15603
15604    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15605}
15606
15607impl ResourcePath {
15608    pub fn new() -> Self {
15609        std::default::Default::default()
15610    }
15611
15612    /// Sets the value of [nodes][crate::model::ResourcePath::nodes].
15613    ///
15614    /// # Example
15615    /// ```ignore,no_run
15616    /// # use google_cloud_securitycenter_v2::model::ResourcePath;
15617    /// use google_cloud_securitycenter_v2::model::resource_path::ResourcePathNode;
15618    /// let x = ResourcePath::new()
15619    ///     .set_nodes([
15620    ///         ResourcePathNode::default()/* use setters */,
15621    ///         ResourcePathNode::default()/* use (different) setters */,
15622    ///     ]);
15623    /// ```
15624    pub fn set_nodes<T, V>(mut self, v: T) -> Self
15625    where
15626        T: std::iter::IntoIterator<Item = V>,
15627        V: std::convert::Into<crate::model::resource_path::ResourcePathNode>,
15628    {
15629        use std::iter::Iterator;
15630        self.nodes = v.into_iter().map(|i| i.into()).collect();
15631        self
15632    }
15633}
15634
15635impl wkt::message::Message for ResourcePath {
15636    fn typename() -> &'static str {
15637        "type.googleapis.com/google.cloud.securitycenter.v2.ResourcePath"
15638    }
15639}
15640
15641/// Defines additional types related to [ResourcePath].
15642pub mod resource_path {
15643    #[allow(unused_imports)]
15644    use super::*;
15645
15646    /// A node within the resource path. Each node represents a resource within the
15647    /// resource hierarchy.
15648    #[derive(Clone, Default, PartialEq)]
15649    #[non_exhaustive]
15650    pub struct ResourcePathNode {
15651        /// The type of resource this node represents.
15652        pub node_type: crate::model::resource_path::ResourcePathNodeType,
15653
15654        /// The ID of the resource this node represents.
15655        pub id: std::string::String,
15656
15657        /// The display name of the resource this node represents.
15658        pub display_name: std::string::String,
15659
15660        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15661    }
15662
15663    impl ResourcePathNode {
15664        pub fn new() -> Self {
15665            std::default::Default::default()
15666        }
15667
15668        /// Sets the value of [node_type][crate::model::resource_path::ResourcePathNode::node_type].
15669        ///
15670        /// # Example
15671        /// ```ignore,no_run
15672        /// # use google_cloud_securitycenter_v2::model::resource_path::ResourcePathNode;
15673        /// use google_cloud_securitycenter_v2::model::resource_path::ResourcePathNodeType;
15674        /// let x0 = ResourcePathNode::new().set_node_type(ResourcePathNodeType::GcpOrganization);
15675        /// let x1 = ResourcePathNode::new().set_node_type(ResourcePathNodeType::GcpFolder);
15676        /// let x2 = ResourcePathNode::new().set_node_type(ResourcePathNodeType::GcpProject);
15677        /// ```
15678        pub fn set_node_type<
15679            T: std::convert::Into<crate::model::resource_path::ResourcePathNodeType>,
15680        >(
15681            mut self,
15682            v: T,
15683        ) -> Self {
15684            self.node_type = v.into();
15685            self
15686        }
15687
15688        /// Sets the value of [id][crate::model::resource_path::ResourcePathNode::id].
15689        ///
15690        /// # Example
15691        /// ```ignore,no_run
15692        /// # use google_cloud_securitycenter_v2::model::resource_path::ResourcePathNode;
15693        /// let x = ResourcePathNode::new().set_id("example");
15694        /// ```
15695        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15696            self.id = v.into();
15697            self
15698        }
15699
15700        /// Sets the value of [display_name][crate::model::resource_path::ResourcePathNode::display_name].
15701        ///
15702        /// # Example
15703        /// ```ignore,no_run
15704        /// # use google_cloud_securitycenter_v2::model::resource_path::ResourcePathNode;
15705        /// let x = ResourcePathNode::new().set_display_name("example");
15706        /// ```
15707        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
15708            mut self,
15709            v: T,
15710        ) -> Self {
15711            self.display_name = v.into();
15712            self
15713        }
15714    }
15715
15716    impl wkt::message::Message for ResourcePathNode {
15717        fn typename() -> &'static str {
15718            "type.googleapis.com/google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode"
15719        }
15720    }
15721
15722    /// The type of resource the node represents.
15723    ///
15724    /// # Working with unknown values
15725    ///
15726    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15727    /// additional enum variants at any time. Adding new variants is not considered
15728    /// a breaking change. Applications should write their code in anticipation of:
15729    ///
15730    /// - New values appearing in future releases of the client library, **and**
15731    /// - New values received dynamically, without application changes.
15732    ///
15733    /// Please consult the [Working with enums] section in the user guide for some
15734    /// guidelines.
15735    ///
15736    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15737    #[derive(Clone, Debug, PartialEq)]
15738    #[non_exhaustive]
15739    pub enum ResourcePathNodeType {
15740        /// Node type is unspecified.
15741        Unspecified,
15742        /// The node represents a Google Cloud organization.
15743        GcpOrganization,
15744        /// The node represents a Google Cloud folder.
15745        GcpFolder,
15746        /// The node represents a Google Cloud project.
15747        GcpProject,
15748        /// The node represents an AWS organization.
15749        AwsOrganization,
15750        /// The node represents an AWS organizational unit.
15751        AwsOrganizationalUnit,
15752        /// The node represents an AWS account.
15753        AwsAccount,
15754        /// The node represents an Azure management group.
15755        AzureManagementGroup,
15756        /// The node represents an Azure subscription.
15757        AzureSubscription,
15758        /// The node represents an Azure resource group.
15759        AzureResourceGroup,
15760        /// If set, the enum was initialized with an unknown value.
15761        ///
15762        /// Applications can examine the value using [ResourcePathNodeType::value] or
15763        /// [ResourcePathNodeType::name].
15764        UnknownValue(resource_path_node_type::UnknownValue),
15765    }
15766
15767    #[doc(hidden)]
15768    pub mod resource_path_node_type {
15769        #[allow(unused_imports)]
15770        use super::*;
15771        #[derive(Clone, Debug, PartialEq)]
15772        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15773    }
15774
15775    impl ResourcePathNodeType {
15776        /// Gets the enum value.
15777        ///
15778        /// Returns `None` if the enum contains an unknown value deserialized from
15779        /// the string representation of enums.
15780        pub fn value(&self) -> std::option::Option<i32> {
15781            match self {
15782                Self::Unspecified => std::option::Option::Some(0),
15783                Self::GcpOrganization => std::option::Option::Some(1),
15784                Self::GcpFolder => std::option::Option::Some(2),
15785                Self::GcpProject => std::option::Option::Some(3),
15786                Self::AwsOrganization => std::option::Option::Some(4),
15787                Self::AwsOrganizationalUnit => std::option::Option::Some(5),
15788                Self::AwsAccount => std::option::Option::Some(6),
15789                Self::AzureManagementGroup => std::option::Option::Some(7),
15790                Self::AzureSubscription => std::option::Option::Some(8),
15791                Self::AzureResourceGroup => std::option::Option::Some(9),
15792                Self::UnknownValue(u) => u.0.value(),
15793            }
15794        }
15795
15796        /// Gets the enum value as a string.
15797        ///
15798        /// Returns `None` if the enum contains an unknown value deserialized from
15799        /// the integer representation of enums.
15800        pub fn name(&self) -> std::option::Option<&str> {
15801            match self {
15802                Self::Unspecified => {
15803                    std::option::Option::Some("RESOURCE_PATH_NODE_TYPE_UNSPECIFIED")
15804                }
15805                Self::GcpOrganization => std::option::Option::Some("GCP_ORGANIZATION"),
15806                Self::GcpFolder => std::option::Option::Some("GCP_FOLDER"),
15807                Self::GcpProject => std::option::Option::Some("GCP_PROJECT"),
15808                Self::AwsOrganization => std::option::Option::Some("AWS_ORGANIZATION"),
15809                Self::AwsOrganizationalUnit => std::option::Option::Some("AWS_ORGANIZATIONAL_UNIT"),
15810                Self::AwsAccount => std::option::Option::Some("AWS_ACCOUNT"),
15811                Self::AzureManagementGroup => std::option::Option::Some("AZURE_MANAGEMENT_GROUP"),
15812                Self::AzureSubscription => std::option::Option::Some("AZURE_SUBSCRIPTION"),
15813                Self::AzureResourceGroup => std::option::Option::Some("AZURE_RESOURCE_GROUP"),
15814                Self::UnknownValue(u) => u.0.name(),
15815            }
15816        }
15817    }
15818
15819    impl std::default::Default for ResourcePathNodeType {
15820        fn default() -> Self {
15821            use std::convert::From;
15822            Self::from(0)
15823        }
15824    }
15825
15826    impl std::fmt::Display for ResourcePathNodeType {
15827        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15828            wkt::internal::display_enum(f, self.name(), self.value())
15829        }
15830    }
15831
15832    impl std::convert::From<i32> for ResourcePathNodeType {
15833        fn from(value: i32) -> Self {
15834            match value {
15835                0 => Self::Unspecified,
15836                1 => Self::GcpOrganization,
15837                2 => Self::GcpFolder,
15838                3 => Self::GcpProject,
15839                4 => Self::AwsOrganization,
15840                5 => Self::AwsOrganizationalUnit,
15841                6 => Self::AwsAccount,
15842                7 => Self::AzureManagementGroup,
15843                8 => Self::AzureSubscription,
15844                9 => Self::AzureResourceGroup,
15845                _ => Self::UnknownValue(resource_path_node_type::UnknownValue(
15846                    wkt::internal::UnknownEnumValue::Integer(value),
15847                )),
15848            }
15849        }
15850    }
15851
15852    impl std::convert::From<&str> for ResourcePathNodeType {
15853        fn from(value: &str) -> Self {
15854            use std::string::ToString;
15855            match value {
15856                "RESOURCE_PATH_NODE_TYPE_UNSPECIFIED" => Self::Unspecified,
15857                "GCP_ORGANIZATION" => Self::GcpOrganization,
15858                "GCP_FOLDER" => Self::GcpFolder,
15859                "GCP_PROJECT" => Self::GcpProject,
15860                "AWS_ORGANIZATION" => Self::AwsOrganization,
15861                "AWS_ORGANIZATIONAL_UNIT" => Self::AwsOrganizationalUnit,
15862                "AWS_ACCOUNT" => Self::AwsAccount,
15863                "AZURE_MANAGEMENT_GROUP" => Self::AzureManagementGroup,
15864                "AZURE_SUBSCRIPTION" => Self::AzureSubscription,
15865                "AZURE_RESOURCE_GROUP" => Self::AzureResourceGroup,
15866                _ => Self::UnknownValue(resource_path_node_type::UnknownValue(
15867                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15868                )),
15869            }
15870        }
15871    }
15872
15873    impl serde::ser::Serialize for ResourcePathNodeType {
15874        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15875        where
15876            S: serde::Serializer,
15877        {
15878            match self {
15879                Self::Unspecified => serializer.serialize_i32(0),
15880                Self::GcpOrganization => serializer.serialize_i32(1),
15881                Self::GcpFolder => serializer.serialize_i32(2),
15882                Self::GcpProject => serializer.serialize_i32(3),
15883                Self::AwsOrganization => serializer.serialize_i32(4),
15884                Self::AwsOrganizationalUnit => serializer.serialize_i32(5),
15885                Self::AwsAccount => serializer.serialize_i32(6),
15886                Self::AzureManagementGroup => serializer.serialize_i32(7),
15887                Self::AzureSubscription => serializer.serialize_i32(8),
15888                Self::AzureResourceGroup => serializer.serialize_i32(9),
15889                Self::UnknownValue(u) => u.0.serialize(serializer),
15890            }
15891        }
15892    }
15893
15894    impl<'de> serde::de::Deserialize<'de> for ResourcePathNodeType {
15895        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15896        where
15897            D: serde::Deserializer<'de>,
15898        {
15899            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResourcePathNodeType>::new(
15900                ".google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType",
15901            ))
15902        }
15903    }
15904}
15905
15906/// A resource value configuration (RVC) is a mapping configuration of user's
15907/// resources to resource values. Used in Attack path simulations.
15908#[derive(Clone, Default, PartialEq)]
15909#[non_exhaustive]
15910pub struct ResourceValueConfig {
15911    /// Identifier. Name for the resource value configuration
15912    pub name: std::string::String,
15913
15914    /// Resource value level this expression represents
15915    /// Only required when there is no Sensitive Data Protection mapping in the
15916    /// request
15917    pub resource_value: crate::model::ResourceValue,
15918
15919    /// Tag values combined with `AND` to check against.
15920    /// For Google Cloud resources, they are tag value IDs in the form of
15921    /// "tagValues/123". Example: `[ "tagValues/123", "tagValues/456",
15922    /// "tagValues/789" ]`
15923    /// <https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing>
15924    pub tag_values: std::vec::Vec<std::string::String>,
15925
15926    /// Apply resource_value only to resources that match resource_type.
15927    /// resource_type will be checked with `AND` of other resources.
15928    /// For example, "storage.googleapis.com/Bucket" with resource_value "HIGH"
15929    /// will apply "HIGH" value only to "storage.googleapis.com/Bucket" resources.
15930    pub resource_type: std::string::String,
15931
15932    /// Project or folder to scope this configuration to.
15933    /// For example, "project/456" would apply this configuration only to resources
15934    /// in "project/456" scope and will be checked with `AND` of other resources.
15935    pub scope: std::string::String,
15936
15937    /// List of resource labels to search for, evaluated with `AND`.
15938    /// For example, "resource_labels_selector": {"key": "value", "env": "prod"}
15939    /// will match resources with labels "key": "value" `AND` "env":
15940    /// "prod"
15941    /// <https://cloud.google.com/resource-manager/docs/creating-managing-labels>
15942    pub resource_labels_selector:
15943        std::collections::HashMap<std::string::String, std::string::String>,
15944
15945    /// Description of the resource value configuration.
15946    pub description: std::string::String,
15947
15948    /// Output only. Timestamp this resource value configuration was created.
15949    pub create_time: std::option::Option<wkt::Timestamp>,
15950
15951    /// Output only. Timestamp this resource value configuration was last updated.
15952    pub update_time: std::option::Option<wkt::Timestamp>,
15953
15954    /// Cloud provider this configuration applies to
15955    pub cloud_provider: crate::model::CloudProvider,
15956
15957    /// A mapping of the sensitivity on Sensitive Data Protection finding to
15958    /// resource values. This mapping can only be used in combination with a
15959    /// resource_type that is related to BigQuery, e.g.
15960    /// "bigquery.googleapis.com/Dataset".
15961    pub sensitive_data_protection_mapping:
15962        std::option::Option<crate::model::resource_value_config::SensitiveDataProtectionMapping>,
15963
15964    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15965}
15966
15967impl ResourceValueConfig {
15968    pub fn new() -> Self {
15969        std::default::Default::default()
15970    }
15971
15972    /// Sets the value of [name][crate::model::ResourceValueConfig::name].
15973    ///
15974    /// # Example
15975    /// ```ignore,no_run
15976    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
15977    /// let x = ResourceValueConfig::new().set_name("example");
15978    /// ```
15979    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15980        self.name = v.into();
15981        self
15982    }
15983
15984    /// Sets the value of [resource_value][crate::model::ResourceValueConfig::resource_value].
15985    ///
15986    /// # Example
15987    /// ```ignore,no_run
15988    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
15989    /// use google_cloud_securitycenter_v2::model::ResourceValue;
15990    /// let x0 = ResourceValueConfig::new().set_resource_value(ResourceValue::High);
15991    /// let x1 = ResourceValueConfig::new().set_resource_value(ResourceValue::Medium);
15992    /// let x2 = ResourceValueConfig::new().set_resource_value(ResourceValue::Low);
15993    /// ```
15994    pub fn set_resource_value<T: std::convert::Into<crate::model::ResourceValue>>(
15995        mut self,
15996        v: T,
15997    ) -> Self {
15998        self.resource_value = v.into();
15999        self
16000    }
16001
16002    /// Sets the value of [tag_values][crate::model::ResourceValueConfig::tag_values].
16003    ///
16004    /// # Example
16005    /// ```ignore,no_run
16006    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16007    /// let x = ResourceValueConfig::new().set_tag_values(["a", "b", "c"]);
16008    /// ```
16009    pub fn set_tag_values<T, V>(mut self, v: T) -> Self
16010    where
16011        T: std::iter::IntoIterator<Item = V>,
16012        V: std::convert::Into<std::string::String>,
16013    {
16014        use std::iter::Iterator;
16015        self.tag_values = v.into_iter().map(|i| i.into()).collect();
16016        self
16017    }
16018
16019    /// Sets the value of [resource_type][crate::model::ResourceValueConfig::resource_type].
16020    ///
16021    /// # Example
16022    /// ```ignore,no_run
16023    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16024    /// let x = ResourceValueConfig::new().set_resource_type("example");
16025    /// ```
16026    pub fn set_resource_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16027        self.resource_type = v.into();
16028        self
16029    }
16030
16031    /// Sets the value of [scope][crate::model::ResourceValueConfig::scope].
16032    ///
16033    /// # Example
16034    /// ```ignore,no_run
16035    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16036    /// let x = ResourceValueConfig::new().set_scope("example");
16037    /// ```
16038    pub fn set_scope<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16039        self.scope = v.into();
16040        self
16041    }
16042
16043    /// Sets the value of [resource_labels_selector][crate::model::ResourceValueConfig::resource_labels_selector].
16044    ///
16045    /// # Example
16046    /// ```ignore,no_run
16047    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16048    /// let x = ResourceValueConfig::new().set_resource_labels_selector([
16049    ///     ("key0", "abc"),
16050    ///     ("key1", "xyz"),
16051    /// ]);
16052    /// ```
16053    pub fn set_resource_labels_selector<T, K, V>(mut self, v: T) -> Self
16054    where
16055        T: std::iter::IntoIterator<Item = (K, V)>,
16056        K: std::convert::Into<std::string::String>,
16057        V: std::convert::Into<std::string::String>,
16058    {
16059        use std::iter::Iterator;
16060        self.resource_labels_selector = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
16061        self
16062    }
16063
16064    /// Sets the value of [description][crate::model::ResourceValueConfig::description].
16065    ///
16066    /// # Example
16067    /// ```ignore,no_run
16068    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16069    /// let x = ResourceValueConfig::new().set_description("example");
16070    /// ```
16071    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16072        self.description = v.into();
16073        self
16074    }
16075
16076    /// Sets the value of [create_time][crate::model::ResourceValueConfig::create_time].
16077    ///
16078    /// # Example
16079    /// ```ignore,no_run
16080    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16081    /// use wkt::Timestamp;
16082    /// let x = ResourceValueConfig::new().set_create_time(Timestamp::default()/* use setters */);
16083    /// ```
16084    pub fn set_create_time<T>(mut self, v: T) -> Self
16085    where
16086        T: std::convert::Into<wkt::Timestamp>,
16087    {
16088        self.create_time = std::option::Option::Some(v.into());
16089        self
16090    }
16091
16092    /// Sets or clears the value of [create_time][crate::model::ResourceValueConfig::create_time].
16093    ///
16094    /// # Example
16095    /// ```ignore,no_run
16096    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16097    /// use wkt::Timestamp;
16098    /// let x = ResourceValueConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
16099    /// let x = ResourceValueConfig::new().set_or_clear_create_time(None::<Timestamp>);
16100    /// ```
16101    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
16102    where
16103        T: std::convert::Into<wkt::Timestamp>,
16104    {
16105        self.create_time = v.map(|x| x.into());
16106        self
16107    }
16108
16109    /// Sets the value of [update_time][crate::model::ResourceValueConfig::update_time].
16110    ///
16111    /// # Example
16112    /// ```ignore,no_run
16113    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16114    /// use wkt::Timestamp;
16115    /// let x = ResourceValueConfig::new().set_update_time(Timestamp::default()/* use setters */);
16116    /// ```
16117    pub fn set_update_time<T>(mut self, v: T) -> Self
16118    where
16119        T: std::convert::Into<wkt::Timestamp>,
16120    {
16121        self.update_time = std::option::Option::Some(v.into());
16122        self
16123    }
16124
16125    /// Sets or clears the value of [update_time][crate::model::ResourceValueConfig::update_time].
16126    ///
16127    /// # Example
16128    /// ```ignore,no_run
16129    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16130    /// use wkt::Timestamp;
16131    /// let x = ResourceValueConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
16132    /// let x = ResourceValueConfig::new().set_or_clear_update_time(None::<Timestamp>);
16133    /// ```
16134    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
16135    where
16136        T: std::convert::Into<wkt::Timestamp>,
16137    {
16138        self.update_time = v.map(|x| x.into());
16139        self
16140    }
16141
16142    /// Sets the value of [cloud_provider][crate::model::ResourceValueConfig::cloud_provider].
16143    ///
16144    /// # Example
16145    /// ```ignore,no_run
16146    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16147    /// use google_cloud_securitycenter_v2::model::CloudProvider;
16148    /// let x0 = ResourceValueConfig::new().set_cloud_provider(CloudProvider::GoogleCloudPlatform);
16149    /// let x1 = ResourceValueConfig::new().set_cloud_provider(CloudProvider::AmazonWebServices);
16150    /// let x2 = ResourceValueConfig::new().set_cloud_provider(CloudProvider::MicrosoftAzure);
16151    /// ```
16152    pub fn set_cloud_provider<T: std::convert::Into<crate::model::CloudProvider>>(
16153        mut self,
16154        v: T,
16155    ) -> Self {
16156        self.cloud_provider = v.into();
16157        self
16158    }
16159
16160    /// Sets the value of [sensitive_data_protection_mapping][crate::model::ResourceValueConfig::sensitive_data_protection_mapping].
16161    ///
16162    /// # Example
16163    /// ```ignore,no_run
16164    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16165    /// use google_cloud_securitycenter_v2::model::resource_value_config::SensitiveDataProtectionMapping;
16166    /// let x = ResourceValueConfig::new().set_sensitive_data_protection_mapping(SensitiveDataProtectionMapping::default()/* use setters */);
16167    /// ```
16168    pub fn set_sensitive_data_protection_mapping<T>(mut self, v: T) -> Self
16169    where
16170        T: std::convert::Into<crate::model::resource_value_config::SensitiveDataProtectionMapping>,
16171    {
16172        self.sensitive_data_protection_mapping = std::option::Option::Some(v.into());
16173        self
16174    }
16175
16176    /// Sets or clears the value of [sensitive_data_protection_mapping][crate::model::ResourceValueConfig::sensitive_data_protection_mapping].
16177    ///
16178    /// # Example
16179    /// ```ignore,no_run
16180    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16181    /// use google_cloud_securitycenter_v2::model::resource_value_config::SensitiveDataProtectionMapping;
16182    /// let x = ResourceValueConfig::new().set_or_clear_sensitive_data_protection_mapping(Some(SensitiveDataProtectionMapping::default()/* use setters */));
16183    /// let x = ResourceValueConfig::new().set_or_clear_sensitive_data_protection_mapping(None::<SensitiveDataProtectionMapping>);
16184    /// ```
16185    pub fn set_or_clear_sensitive_data_protection_mapping<T>(
16186        mut self,
16187        v: std::option::Option<T>,
16188    ) -> Self
16189    where
16190        T: std::convert::Into<crate::model::resource_value_config::SensitiveDataProtectionMapping>,
16191    {
16192        self.sensitive_data_protection_mapping = v.map(|x| x.into());
16193        self
16194    }
16195}
16196
16197impl wkt::message::Message for ResourceValueConfig {
16198    fn typename() -> &'static str {
16199        "type.googleapis.com/google.cloud.securitycenter.v2.ResourceValueConfig"
16200    }
16201}
16202
16203/// Defines additional types related to [ResourceValueConfig].
16204pub mod resource_value_config {
16205    #[allow(unused_imports)]
16206    use super::*;
16207
16208    /// Resource value mapping for Sensitive Data Protection findings
16209    /// If any of these mappings have a resource value that is not unspecified,
16210    /// the resource_value field will be ignored when reading this configuration.
16211    #[derive(Clone, Default, PartialEq)]
16212    #[non_exhaustive]
16213    pub struct SensitiveDataProtectionMapping {
16214        /// Resource value mapping for high-sensitivity Sensitive Data Protection
16215        /// findings
16216        pub high_sensitivity_mapping: crate::model::ResourceValue,
16217
16218        /// Resource value mapping for medium-sensitivity Sensitive Data Protection
16219        /// findings
16220        pub medium_sensitivity_mapping: crate::model::ResourceValue,
16221
16222        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16223    }
16224
16225    impl SensitiveDataProtectionMapping {
16226        pub fn new() -> Self {
16227            std::default::Default::default()
16228        }
16229
16230        /// Sets the value of [high_sensitivity_mapping][crate::model::resource_value_config::SensitiveDataProtectionMapping::high_sensitivity_mapping].
16231        ///
16232        /// # Example
16233        /// ```ignore,no_run
16234        /// # use google_cloud_securitycenter_v2::model::resource_value_config::SensitiveDataProtectionMapping;
16235        /// use google_cloud_securitycenter_v2::model::ResourceValue;
16236        /// let x0 = SensitiveDataProtectionMapping::new().set_high_sensitivity_mapping(ResourceValue::High);
16237        /// let x1 = SensitiveDataProtectionMapping::new().set_high_sensitivity_mapping(ResourceValue::Medium);
16238        /// let x2 = SensitiveDataProtectionMapping::new().set_high_sensitivity_mapping(ResourceValue::Low);
16239        /// ```
16240        pub fn set_high_sensitivity_mapping<T: std::convert::Into<crate::model::ResourceValue>>(
16241            mut self,
16242            v: T,
16243        ) -> Self {
16244            self.high_sensitivity_mapping = v.into();
16245            self
16246        }
16247
16248        /// Sets the value of [medium_sensitivity_mapping][crate::model::resource_value_config::SensitiveDataProtectionMapping::medium_sensitivity_mapping].
16249        ///
16250        /// # Example
16251        /// ```ignore,no_run
16252        /// # use google_cloud_securitycenter_v2::model::resource_value_config::SensitiveDataProtectionMapping;
16253        /// use google_cloud_securitycenter_v2::model::ResourceValue;
16254        /// let x0 = SensitiveDataProtectionMapping::new().set_medium_sensitivity_mapping(ResourceValue::High);
16255        /// let x1 = SensitiveDataProtectionMapping::new().set_medium_sensitivity_mapping(ResourceValue::Medium);
16256        /// let x2 = SensitiveDataProtectionMapping::new().set_medium_sensitivity_mapping(ResourceValue::Low);
16257        /// ```
16258        pub fn set_medium_sensitivity_mapping<
16259            T: std::convert::Into<crate::model::ResourceValue>,
16260        >(
16261            mut self,
16262            v: T,
16263        ) -> Self {
16264            self.medium_sensitivity_mapping = v.into();
16265            self
16266        }
16267    }
16268
16269    impl wkt::message::Message for SensitiveDataProtectionMapping {
16270        fn typename() -> &'static str {
16271            "type.googleapis.com/google.cloud.securitycenter.v2.ResourceValueConfig.SensitiveDataProtectionMapping"
16272        }
16273    }
16274}
16275
16276/// User specified security marks that are attached to the parent Security
16277/// Command Center resource. Security marks are scoped within a Security Command
16278/// Center organization -- they can be modified and viewed by all users who have
16279/// proper permissions on the organization.
16280#[derive(Clone, Default, PartialEq)]
16281#[non_exhaustive]
16282pub struct SecurityMarks {
16283    /// The relative resource name of the SecurityMarks. See:
16284    /// <https://cloud.google.com/apis/design/resource_names#relative_resource_name>
16285    /// The following list shows some examples:
16286    ///
16287    /// + `organizations/{organization_id}/assets/{asset_id}/securityMarks`
16288    ///
16289    /// `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
16290    /// +
16291    /// `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
16292    pub name: std::string::String,
16293
16294    /// Mutable user specified security marks belonging to the parent resource.
16295    /// Constraints are as follows:
16296    ///
16297    /// * Keys and values are treated as case insensitive
16298    /// * Keys must be between 1 - 256 characters (inclusive)
16299    /// * Keys must be letters, numbers, underscores, or dashes
16300    /// * Values have leading and trailing whitespace trimmed, remaining
16301    ///   characters must be between 1 - 4096 characters (inclusive)
16302    pub marks: std::collections::HashMap<std::string::String, std::string::String>,
16303
16304    /// The canonical name of the marks. The following list shows some examples:
16305    ///
16306    /// + `organizations/{organization_id}/assets/{asset_id}/securityMarks`
16307    ///
16308    /// `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
16309    /// +
16310    /// `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
16311    ///
16312    /// + `folders/{folder_id}/assets/{asset_id}/securityMarks`
16313    ///
16314    /// `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
16315    /// +
16316    /// `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
16317    ///
16318    /// + `projects/{project_number}/assets/{asset_id}/securityMarks`
16319    ///
16320    /// `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks`
16321    /// +
16322    /// `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
16323    pub canonical_name: std::string::String,
16324
16325    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16326}
16327
16328impl SecurityMarks {
16329    pub fn new() -> Self {
16330        std::default::Default::default()
16331    }
16332
16333    /// Sets the value of [name][crate::model::SecurityMarks::name].
16334    ///
16335    /// # Example
16336    /// ```ignore,no_run
16337    /// # use google_cloud_securitycenter_v2::model::SecurityMarks;
16338    /// let x = SecurityMarks::new().set_name("example");
16339    /// ```
16340    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16341        self.name = v.into();
16342        self
16343    }
16344
16345    /// Sets the value of [marks][crate::model::SecurityMarks::marks].
16346    ///
16347    /// # Example
16348    /// ```ignore,no_run
16349    /// # use google_cloud_securitycenter_v2::model::SecurityMarks;
16350    /// let x = SecurityMarks::new().set_marks([
16351    ///     ("key0", "abc"),
16352    ///     ("key1", "xyz"),
16353    /// ]);
16354    /// ```
16355    pub fn set_marks<T, K, V>(mut self, v: T) -> Self
16356    where
16357        T: std::iter::IntoIterator<Item = (K, V)>,
16358        K: std::convert::Into<std::string::String>,
16359        V: std::convert::Into<std::string::String>,
16360    {
16361        use std::iter::Iterator;
16362        self.marks = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
16363        self
16364    }
16365
16366    /// Sets the value of [canonical_name][crate::model::SecurityMarks::canonical_name].
16367    ///
16368    /// # Example
16369    /// ```ignore,no_run
16370    /// # use google_cloud_securitycenter_v2::model::SecurityMarks;
16371    /// let x = SecurityMarks::new().set_canonical_name("example");
16372    /// ```
16373    pub fn set_canonical_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16374        self.canonical_name = v.into();
16375        self
16376    }
16377}
16378
16379impl wkt::message::Message for SecurityMarks {
16380    fn typename() -> &'static str {
16381        "type.googleapis.com/google.cloud.securitycenter.v2.SecurityMarks"
16382    }
16383}
16384
16385/// Represents a posture that is deployed on Google Cloud by the
16386/// Security Command Center Posture Management service.
16387/// A posture contains one or more policy sets. A policy set is a
16388/// group of policies that enforce a set of security rules on Google
16389/// Cloud.
16390#[derive(Clone, Default, PartialEq)]
16391#[non_exhaustive]
16392pub struct SecurityPosture {
16393    /// Name of the posture, for example, `CIS-Posture`.
16394    pub name: std::string::String,
16395
16396    /// The version of the posture, for example, `c7cfa2a8`.
16397    pub revision_id: std::string::String,
16398
16399    /// The project, folder, or organization on which the posture is deployed,
16400    /// for example, `projects/{project_number}`.
16401    pub posture_deployment_resource: std::string::String,
16402
16403    /// The name of the posture deployment, for example,
16404    /// `organizations/{org_id}/posturedeployments/{posture_deployment_id}`.
16405    pub posture_deployment: std::string::String,
16406
16407    /// The name of the updated policy, for example,
16408    /// `projects/{project_id}/policies/{constraint_name}`.
16409    pub changed_policy: std::string::String,
16410
16411    /// The name of the updated policy set, for example, `cis-policyset`.
16412    pub policy_set: std::string::String,
16413
16414    /// The ID of the updated policy, for example, `compute-policy-1`.
16415    pub policy: std::string::String,
16416
16417    /// The details about a change in an updated policy that violates the deployed
16418    /// posture.
16419    pub policy_drift_details: std::vec::Vec<crate::model::security_posture::PolicyDriftDetails>,
16420
16421    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16422}
16423
16424impl SecurityPosture {
16425    pub fn new() -> Self {
16426        std::default::Default::default()
16427    }
16428
16429    /// Sets the value of [name][crate::model::SecurityPosture::name].
16430    ///
16431    /// # Example
16432    /// ```ignore,no_run
16433    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
16434    /// let x = SecurityPosture::new().set_name("example");
16435    /// ```
16436    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16437        self.name = v.into();
16438        self
16439    }
16440
16441    /// Sets the value of [revision_id][crate::model::SecurityPosture::revision_id].
16442    ///
16443    /// # Example
16444    /// ```ignore,no_run
16445    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
16446    /// let x = SecurityPosture::new().set_revision_id("example");
16447    /// ```
16448    pub fn set_revision_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16449        self.revision_id = v.into();
16450        self
16451    }
16452
16453    /// Sets the value of [posture_deployment_resource][crate::model::SecurityPosture::posture_deployment_resource].
16454    ///
16455    /// # Example
16456    /// ```ignore,no_run
16457    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
16458    /// let x = SecurityPosture::new().set_posture_deployment_resource("example");
16459    /// ```
16460    pub fn set_posture_deployment_resource<T: std::convert::Into<std::string::String>>(
16461        mut self,
16462        v: T,
16463    ) -> Self {
16464        self.posture_deployment_resource = v.into();
16465        self
16466    }
16467
16468    /// Sets the value of [posture_deployment][crate::model::SecurityPosture::posture_deployment].
16469    ///
16470    /// # Example
16471    /// ```ignore,no_run
16472    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
16473    /// let x = SecurityPosture::new().set_posture_deployment("example");
16474    /// ```
16475    pub fn set_posture_deployment<T: std::convert::Into<std::string::String>>(
16476        mut self,
16477        v: T,
16478    ) -> Self {
16479        self.posture_deployment = v.into();
16480        self
16481    }
16482
16483    /// Sets the value of [changed_policy][crate::model::SecurityPosture::changed_policy].
16484    ///
16485    /// # Example
16486    /// ```ignore,no_run
16487    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
16488    /// let x = SecurityPosture::new().set_changed_policy("example");
16489    /// ```
16490    pub fn set_changed_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16491        self.changed_policy = v.into();
16492        self
16493    }
16494
16495    /// Sets the value of [policy_set][crate::model::SecurityPosture::policy_set].
16496    ///
16497    /// # Example
16498    /// ```ignore,no_run
16499    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
16500    /// let x = SecurityPosture::new().set_policy_set("example");
16501    /// ```
16502    pub fn set_policy_set<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16503        self.policy_set = v.into();
16504        self
16505    }
16506
16507    /// Sets the value of [policy][crate::model::SecurityPosture::policy].
16508    ///
16509    /// # Example
16510    /// ```ignore,no_run
16511    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
16512    /// let x = SecurityPosture::new().set_policy("example");
16513    /// ```
16514    pub fn set_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16515        self.policy = v.into();
16516        self
16517    }
16518
16519    /// Sets the value of [policy_drift_details][crate::model::SecurityPosture::policy_drift_details].
16520    ///
16521    /// # Example
16522    /// ```ignore,no_run
16523    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
16524    /// use google_cloud_securitycenter_v2::model::security_posture::PolicyDriftDetails;
16525    /// let x = SecurityPosture::new()
16526    ///     .set_policy_drift_details([
16527    ///         PolicyDriftDetails::default()/* use setters */,
16528    ///         PolicyDriftDetails::default()/* use (different) setters */,
16529    ///     ]);
16530    /// ```
16531    pub fn set_policy_drift_details<T, V>(mut self, v: T) -> Self
16532    where
16533        T: std::iter::IntoIterator<Item = V>,
16534        V: std::convert::Into<crate::model::security_posture::PolicyDriftDetails>,
16535    {
16536        use std::iter::Iterator;
16537        self.policy_drift_details = v.into_iter().map(|i| i.into()).collect();
16538        self
16539    }
16540}
16541
16542impl wkt::message::Message for SecurityPosture {
16543    fn typename() -> &'static str {
16544        "type.googleapis.com/google.cloud.securitycenter.v2.SecurityPosture"
16545    }
16546}
16547
16548/// Defines additional types related to [SecurityPosture].
16549pub mod security_posture {
16550    #[allow(unused_imports)]
16551    use super::*;
16552
16553    /// The policy field that violates the deployed posture and its expected and
16554    /// detected values.
16555    #[derive(Clone, Default, PartialEq)]
16556    #[non_exhaustive]
16557    pub struct PolicyDriftDetails {
16558        /// The name of the updated field, for example
16559        /// constraint.implementation.policy_rules[0].enforce
16560        pub field: std::string::String,
16561
16562        /// The value of this field that was configured in a posture, for example,
16563        /// `true` or `allowed_values={"projects/29831892"}`.
16564        pub expected_value: std::string::String,
16565
16566        /// The detected value that violates the deployed posture, for example,
16567        /// `false` or `allowed_values={"projects/22831892"}`.
16568        pub detected_value: std::string::String,
16569
16570        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16571    }
16572
16573    impl PolicyDriftDetails {
16574        pub fn new() -> Self {
16575            std::default::Default::default()
16576        }
16577
16578        /// Sets the value of [field][crate::model::security_posture::PolicyDriftDetails::field].
16579        ///
16580        /// # Example
16581        /// ```ignore,no_run
16582        /// # use google_cloud_securitycenter_v2::model::security_posture::PolicyDriftDetails;
16583        /// let x = PolicyDriftDetails::new().set_field("example");
16584        /// ```
16585        pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16586            self.field = v.into();
16587            self
16588        }
16589
16590        /// Sets the value of [expected_value][crate::model::security_posture::PolicyDriftDetails::expected_value].
16591        ///
16592        /// # Example
16593        /// ```ignore,no_run
16594        /// # use google_cloud_securitycenter_v2::model::security_posture::PolicyDriftDetails;
16595        /// let x = PolicyDriftDetails::new().set_expected_value("example");
16596        /// ```
16597        pub fn set_expected_value<T: std::convert::Into<std::string::String>>(
16598            mut self,
16599            v: T,
16600        ) -> Self {
16601            self.expected_value = v.into();
16602            self
16603        }
16604
16605        /// Sets the value of [detected_value][crate::model::security_posture::PolicyDriftDetails::detected_value].
16606        ///
16607        /// # Example
16608        /// ```ignore,no_run
16609        /// # use google_cloud_securitycenter_v2::model::security_posture::PolicyDriftDetails;
16610        /// let x = PolicyDriftDetails::new().set_detected_value("example");
16611        /// ```
16612        pub fn set_detected_value<T: std::convert::Into<std::string::String>>(
16613            mut self,
16614            v: T,
16615        ) -> Self {
16616            self.detected_value = v.into();
16617            self
16618        }
16619    }
16620
16621    impl wkt::message::Message for PolicyDriftDetails {
16622        fn typename() -> &'static str {
16623            "type.googleapis.com/google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails"
16624        }
16625    }
16626}
16627
16628/// Request message to create multiple resource value configs
16629#[derive(Clone, Default, PartialEq)]
16630#[non_exhaustive]
16631pub struct BatchCreateResourceValueConfigsRequest {
16632    /// Required. Resource name of the new ResourceValueConfig's parent.
16633    /// The parent field in the CreateResourceValueConfigRequest
16634    /// messages must either be empty or match this field.
16635    pub parent: std::string::String,
16636
16637    /// Required. The resource value configs to be created.
16638    pub requests: std::vec::Vec<crate::model::CreateResourceValueConfigRequest>,
16639
16640    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16641}
16642
16643impl BatchCreateResourceValueConfigsRequest {
16644    pub fn new() -> Self {
16645        std::default::Default::default()
16646    }
16647
16648    /// Sets the value of [parent][crate::model::BatchCreateResourceValueConfigsRequest::parent].
16649    ///
16650    /// # Example
16651    /// ```ignore,no_run
16652    /// # use google_cloud_securitycenter_v2::model::BatchCreateResourceValueConfigsRequest;
16653    /// let x = BatchCreateResourceValueConfigsRequest::new().set_parent("example");
16654    /// ```
16655    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16656        self.parent = v.into();
16657        self
16658    }
16659
16660    /// Sets the value of [requests][crate::model::BatchCreateResourceValueConfigsRequest::requests].
16661    ///
16662    /// # Example
16663    /// ```ignore,no_run
16664    /// # use google_cloud_securitycenter_v2::model::BatchCreateResourceValueConfigsRequest;
16665    /// use google_cloud_securitycenter_v2::model::CreateResourceValueConfigRequest;
16666    /// let x = BatchCreateResourceValueConfigsRequest::new()
16667    ///     .set_requests([
16668    ///         CreateResourceValueConfigRequest::default()/* use setters */,
16669    ///         CreateResourceValueConfigRequest::default()/* use (different) setters */,
16670    ///     ]);
16671    /// ```
16672    pub fn set_requests<T, V>(mut self, v: T) -> Self
16673    where
16674        T: std::iter::IntoIterator<Item = V>,
16675        V: std::convert::Into<crate::model::CreateResourceValueConfigRequest>,
16676    {
16677        use std::iter::Iterator;
16678        self.requests = v.into_iter().map(|i| i.into()).collect();
16679        self
16680    }
16681}
16682
16683impl wkt::message::Message for BatchCreateResourceValueConfigsRequest {
16684    fn typename() -> &'static str {
16685        "type.googleapis.com/google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest"
16686    }
16687}
16688
16689/// Response message for BatchCreateResourceValueConfigs
16690#[derive(Clone, Default, PartialEq)]
16691#[non_exhaustive]
16692pub struct BatchCreateResourceValueConfigsResponse {
16693    /// The resource value configs created
16694    pub resource_value_configs: std::vec::Vec<crate::model::ResourceValueConfig>,
16695
16696    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16697}
16698
16699impl BatchCreateResourceValueConfigsResponse {
16700    pub fn new() -> Self {
16701        std::default::Default::default()
16702    }
16703
16704    /// Sets the value of [resource_value_configs][crate::model::BatchCreateResourceValueConfigsResponse::resource_value_configs].
16705    ///
16706    /// # Example
16707    /// ```ignore,no_run
16708    /// # use google_cloud_securitycenter_v2::model::BatchCreateResourceValueConfigsResponse;
16709    /// use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16710    /// let x = BatchCreateResourceValueConfigsResponse::new()
16711    ///     .set_resource_value_configs([
16712    ///         ResourceValueConfig::default()/* use setters */,
16713    ///         ResourceValueConfig::default()/* use (different) setters */,
16714    ///     ]);
16715    /// ```
16716    pub fn set_resource_value_configs<T, V>(mut self, v: T) -> Self
16717    where
16718        T: std::iter::IntoIterator<Item = V>,
16719        V: std::convert::Into<crate::model::ResourceValueConfig>,
16720    {
16721        use std::iter::Iterator;
16722        self.resource_value_configs = v.into_iter().map(|i| i.into()).collect();
16723        self
16724    }
16725}
16726
16727impl wkt::message::Message for BatchCreateResourceValueConfigsResponse {
16728    fn typename() -> &'static str {
16729        "type.googleapis.com/google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse"
16730    }
16731}
16732
16733/// Request message for bulk findings update.
16734///
16735/// Note:
16736///
16737/// 1. If multiple bulk update requests match the same resource, the order in
16738///    which they get executed is not defined.
16739/// 1. Once a bulk operation is started, there is no way to stop it.
16740#[derive(Clone, Default, PartialEq)]
16741#[non_exhaustive]
16742pub struct BulkMuteFindingsRequest {
16743    /// Required. The parent, at which bulk action needs to be applied. If no
16744    /// location is specified, findings are updated in global. The following list
16745    /// shows some examples:
16746    ///
16747    /// + `organizations/[organization_id]`
16748    /// + `organizations/[organization_id]/locations/[location_id]`
16749    /// + `folders/[folder_id]`
16750    /// + `folders/[folder_id]/locations/[location_id]`
16751    /// + `projects/[project_id]`
16752    /// + `projects/[project_id]/locations/[location_id]`
16753    pub parent: std::string::String,
16754
16755    /// Expression that identifies findings that should be updated.
16756    /// The expression is a list of zero or more restrictions combined
16757    /// via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
16758    /// has higher precedence than `AND`.
16759    ///
16760    /// Restrictions have the form `<field> <operator> <value>` and may have a
16761    /// `-` character in front of them to indicate negation. The fields map to
16762    /// those defined in the corresponding resource.
16763    ///
16764    /// The supported operators are:
16765    ///
16766    /// * `=` for all value types.
16767    /// * `>`, `<`, `>=`, `<=` for integer values.
16768    /// * `:`, meaning substring matching, for strings.
16769    ///
16770    /// The supported value types are:
16771    ///
16772    /// * string literals in quotes.
16773    /// * integer literals without quotes.
16774    /// * boolean literals `true` and `false` without quotes.
16775    pub filter: std::string::String,
16776
16777    /// Optional. All findings matching the given filter will have their mute state
16778    /// set to this value. The default value is `MUTED`. Setting this to
16779    /// `UNDEFINED` will clear the mute state on all matching findings.
16780    pub mute_state: crate::model::bulk_mute_findings_request::MuteState,
16781
16782    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16783}
16784
16785impl BulkMuteFindingsRequest {
16786    pub fn new() -> Self {
16787        std::default::Default::default()
16788    }
16789
16790    /// Sets the value of [parent][crate::model::BulkMuteFindingsRequest::parent].
16791    ///
16792    /// # Example
16793    /// ```ignore,no_run
16794    /// # use google_cloud_securitycenter_v2::model::BulkMuteFindingsRequest;
16795    /// let x = BulkMuteFindingsRequest::new().set_parent("example");
16796    /// ```
16797    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16798        self.parent = v.into();
16799        self
16800    }
16801
16802    /// Sets the value of [filter][crate::model::BulkMuteFindingsRequest::filter].
16803    ///
16804    /// # Example
16805    /// ```ignore,no_run
16806    /// # use google_cloud_securitycenter_v2::model::BulkMuteFindingsRequest;
16807    /// let x = BulkMuteFindingsRequest::new().set_filter("example");
16808    /// ```
16809    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16810        self.filter = v.into();
16811        self
16812    }
16813
16814    /// Sets the value of [mute_state][crate::model::BulkMuteFindingsRequest::mute_state].
16815    ///
16816    /// # Example
16817    /// ```ignore,no_run
16818    /// # use google_cloud_securitycenter_v2::model::BulkMuteFindingsRequest;
16819    /// use google_cloud_securitycenter_v2::model::bulk_mute_findings_request::MuteState;
16820    /// let x0 = BulkMuteFindingsRequest::new().set_mute_state(MuteState::Muted);
16821    /// let x1 = BulkMuteFindingsRequest::new().set_mute_state(MuteState::Undefined);
16822    /// ```
16823    pub fn set_mute_state<
16824        T: std::convert::Into<crate::model::bulk_mute_findings_request::MuteState>,
16825    >(
16826        mut self,
16827        v: T,
16828    ) -> Self {
16829        self.mute_state = v.into();
16830        self
16831    }
16832}
16833
16834impl wkt::message::Message for BulkMuteFindingsRequest {
16835    fn typename() -> &'static str {
16836        "type.googleapis.com/google.cloud.securitycenter.v2.BulkMuteFindingsRequest"
16837    }
16838}
16839
16840/// Defines additional types related to [BulkMuteFindingsRequest].
16841pub mod bulk_mute_findings_request {
16842    #[allow(unused_imports)]
16843    use super::*;
16844
16845    /// The mute state.
16846    ///
16847    /// # Working with unknown values
16848    ///
16849    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16850    /// additional enum variants at any time. Adding new variants is not considered
16851    /// a breaking change. Applications should write their code in anticipation of:
16852    ///
16853    /// - New values appearing in future releases of the client library, **and**
16854    /// - New values received dynamically, without application changes.
16855    ///
16856    /// Please consult the [Working with enums] section in the user guide for some
16857    /// guidelines.
16858    ///
16859    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
16860    #[derive(Clone, Debug, PartialEq)]
16861    #[non_exhaustive]
16862    pub enum MuteState {
16863        /// Unused.
16864        Unspecified,
16865        /// Matching findings will be muted (default).
16866        Muted,
16867        /// Matching findings will have their mute state cleared.
16868        Undefined,
16869        /// If set, the enum was initialized with an unknown value.
16870        ///
16871        /// Applications can examine the value using [MuteState::value] or
16872        /// [MuteState::name].
16873        UnknownValue(mute_state::UnknownValue),
16874    }
16875
16876    #[doc(hidden)]
16877    pub mod mute_state {
16878        #[allow(unused_imports)]
16879        use super::*;
16880        #[derive(Clone, Debug, PartialEq)]
16881        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16882    }
16883
16884    impl MuteState {
16885        /// Gets the enum value.
16886        ///
16887        /// Returns `None` if the enum contains an unknown value deserialized from
16888        /// the string representation of enums.
16889        pub fn value(&self) -> std::option::Option<i32> {
16890            match self {
16891                Self::Unspecified => std::option::Option::Some(0),
16892                Self::Muted => std::option::Option::Some(1),
16893                Self::Undefined => std::option::Option::Some(2),
16894                Self::UnknownValue(u) => u.0.value(),
16895            }
16896        }
16897
16898        /// Gets the enum value as a string.
16899        ///
16900        /// Returns `None` if the enum contains an unknown value deserialized from
16901        /// the integer representation of enums.
16902        pub fn name(&self) -> std::option::Option<&str> {
16903            match self {
16904                Self::Unspecified => std::option::Option::Some("MUTE_STATE_UNSPECIFIED"),
16905                Self::Muted => std::option::Option::Some("MUTED"),
16906                Self::Undefined => std::option::Option::Some("UNDEFINED"),
16907                Self::UnknownValue(u) => u.0.name(),
16908            }
16909        }
16910    }
16911
16912    impl std::default::Default for MuteState {
16913        fn default() -> Self {
16914            use std::convert::From;
16915            Self::from(0)
16916        }
16917    }
16918
16919    impl std::fmt::Display for MuteState {
16920        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16921            wkt::internal::display_enum(f, self.name(), self.value())
16922        }
16923    }
16924
16925    impl std::convert::From<i32> for MuteState {
16926        fn from(value: i32) -> Self {
16927            match value {
16928                0 => Self::Unspecified,
16929                1 => Self::Muted,
16930                2 => Self::Undefined,
16931                _ => Self::UnknownValue(mute_state::UnknownValue(
16932                    wkt::internal::UnknownEnumValue::Integer(value),
16933                )),
16934            }
16935        }
16936    }
16937
16938    impl std::convert::From<&str> for MuteState {
16939        fn from(value: &str) -> Self {
16940            use std::string::ToString;
16941            match value {
16942                "MUTE_STATE_UNSPECIFIED" => Self::Unspecified,
16943                "MUTED" => Self::Muted,
16944                "UNDEFINED" => Self::Undefined,
16945                _ => Self::UnknownValue(mute_state::UnknownValue(
16946                    wkt::internal::UnknownEnumValue::String(value.to_string()),
16947                )),
16948            }
16949        }
16950    }
16951
16952    impl serde::ser::Serialize for MuteState {
16953        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16954        where
16955            S: serde::Serializer,
16956        {
16957            match self {
16958                Self::Unspecified => serializer.serialize_i32(0),
16959                Self::Muted => serializer.serialize_i32(1),
16960                Self::Undefined => serializer.serialize_i32(2),
16961                Self::UnknownValue(u) => u.0.serialize(serializer),
16962            }
16963        }
16964    }
16965
16966    impl<'de> serde::de::Deserialize<'de> for MuteState {
16967        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16968        where
16969            D: serde::Deserializer<'de>,
16970        {
16971            deserializer.deserialize_any(wkt::internal::EnumVisitor::<MuteState>::new(
16972                ".google.cloud.securitycenter.v2.BulkMuteFindingsRequest.MuteState",
16973            ))
16974        }
16975    }
16976}
16977
16978/// The response to a BulkMute request. Contains the LRO information.
16979#[derive(Clone, Default, PartialEq)]
16980#[non_exhaustive]
16981pub struct BulkMuteFindingsResponse {
16982    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16983}
16984
16985impl BulkMuteFindingsResponse {
16986    pub fn new() -> Self {
16987        std::default::Default::default()
16988    }
16989}
16990
16991impl wkt::message::Message for BulkMuteFindingsResponse {
16992    fn typename() -> &'static str {
16993        "type.googleapis.com/google.cloud.securitycenter.v2.BulkMuteFindingsResponse"
16994    }
16995}
16996
16997/// Request message for creating a BigQuery export.
16998#[derive(Clone, Default, PartialEq)]
16999#[non_exhaustive]
17000pub struct CreateBigQueryExportRequest {
17001    /// Required. The name of the parent resource of the new BigQuery export. Its
17002    /// format is `organizations/[organization_id]/locations/[location_id]`,
17003    /// `folders/[folder_id]/locations/[location_id]`, or
17004    /// `projects/[project_id]/locations/[location_id]`.
17005    pub parent: std::string::String,
17006
17007    /// Required. The BigQuery export being created.
17008    pub big_query_export: std::option::Option<crate::model::BigQueryExport>,
17009
17010    /// Required. Unique identifier provided by the client within the parent scope.
17011    /// It must consist of only lowercase letters, numbers, and hyphens, must start
17012    /// with a letter, must end with either a letter or a number, and must be 63
17013    /// characters or less.
17014    pub big_query_export_id: std::string::String,
17015
17016    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17017}
17018
17019impl CreateBigQueryExportRequest {
17020    pub fn new() -> Self {
17021        std::default::Default::default()
17022    }
17023
17024    /// Sets the value of [parent][crate::model::CreateBigQueryExportRequest::parent].
17025    ///
17026    /// # Example
17027    /// ```ignore,no_run
17028    /// # use google_cloud_securitycenter_v2::model::CreateBigQueryExportRequest;
17029    /// let x = CreateBigQueryExportRequest::new().set_parent("example");
17030    /// ```
17031    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17032        self.parent = v.into();
17033        self
17034    }
17035
17036    /// Sets the value of [big_query_export][crate::model::CreateBigQueryExportRequest::big_query_export].
17037    ///
17038    /// # Example
17039    /// ```ignore,no_run
17040    /// # use google_cloud_securitycenter_v2::model::CreateBigQueryExportRequest;
17041    /// use google_cloud_securitycenter_v2::model::BigQueryExport;
17042    /// let x = CreateBigQueryExportRequest::new().set_big_query_export(BigQueryExport::default()/* use setters */);
17043    /// ```
17044    pub fn set_big_query_export<T>(mut self, v: T) -> Self
17045    where
17046        T: std::convert::Into<crate::model::BigQueryExport>,
17047    {
17048        self.big_query_export = std::option::Option::Some(v.into());
17049        self
17050    }
17051
17052    /// Sets or clears the value of [big_query_export][crate::model::CreateBigQueryExportRequest::big_query_export].
17053    ///
17054    /// # Example
17055    /// ```ignore,no_run
17056    /// # use google_cloud_securitycenter_v2::model::CreateBigQueryExportRequest;
17057    /// use google_cloud_securitycenter_v2::model::BigQueryExport;
17058    /// let x = CreateBigQueryExportRequest::new().set_or_clear_big_query_export(Some(BigQueryExport::default()/* use setters */));
17059    /// let x = CreateBigQueryExportRequest::new().set_or_clear_big_query_export(None::<BigQueryExport>);
17060    /// ```
17061    pub fn set_or_clear_big_query_export<T>(mut self, v: std::option::Option<T>) -> Self
17062    where
17063        T: std::convert::Into<crate::model::BigQueryExport>,
17064    {
17065        self.big_query_export = v.map(|x| x.into());
17066        self
17067    }
17068
17069    /// Sets the value of [big_query_export_id][crate::model::CreateBigQueryExportRequest::big_query_export_id].
17070    ///
17071    /// # Example
17072    /// ```ignore,no_run
17073    /// # use google_cloud_securitycenter_v2::model::CreateBigQueryExportRequest;
17074    /// let x = CreateBigQueryExportRequest::new().set_big_query_export_id("example");
17075    /// ```
17076    pub fn set_big_query_export_id<T: std::convert::Into<std::string::String>>(
17077        mut self,
17078        v: T,
17079    ) -> Self {
17080        self.big_query_export_id = v.into();
17081        self
17082    }
17083}
17084
17085impl wkt::message::Message for CreateBigQueryExportRequest {
17086    fn typename() -> &'static str {
17087        "type.googleapis.com/google.cloud.securitycenter.v2.CreateBigQueryExportRequest"
17088    }
17089}
17090
17091/// Request message for creating a finding.
17092#[derive(Clone, Default, PartialEq)]
17093#[non_exhaustive]
17094pub struct CreateFindingRequest {
17095    /// Required. Resource name of the new finding's parent. The following list
17096    /// shows some examples of the format:
17097    /// +
17098    /// `organizations/[organization_id]/sources/[source_id]`
17099    /// +
17100    /// `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
17101    pub parent: std::string::String,
17102
17103    /// Required. Unique identifier provided by the client within the parent scope.
17104    /// It must be alphanumeric and less than or equal to 32 characters and
17105    /// greater than 0 characters in length.
17106    pub finding_id: std::string::String,
17107
17108    /// Required. The Finding being created. The name and security_marks will be
17109    /// ignored as they are both output only fields on this resource.
17110    pub finding: std::option::Option<crate::model::Finding>,
17111
17112    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17113}
17114
17115impl CreateFindingRequest {
17116    pub fn new() -> Self {
17117        std::default::Default::default()
17118    }
17119
17120    /// Sets the value of [parent][crate::model::CreateFindingRequest::parent].
17121    ///
17122    /// # Example
17123    /// ```ignore,no_run
17124    /// # use google_cloud_securitycenter_v2::model::CreateFindingRequest;
17125    /// let x = CreateFindingRequest::new().set_parent("example");
17126    /// ```
17127    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17128        self.parent = v.into();
17129        self
17130    }
17131
17132    /// Sets the value of [finding_id][crate::model::CreateFindingRequest::finding_id].
17133    ///
17134    /// # Example
17135    /// ```ignore,no_run
17136    /// # use google_cloud_securitycenter_v2::model::CreateFindingRequest;
17137    /// let x = CreateFindingRequest::new().set_finding_id("example");
17138    /// ```
17139    pub fn set_finding_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17140        self.finding_id = v.into();
17141        self
17142    }
17143
17144    /// Sets the value of [finding][crate::model::CreateFindingRequest::finding].
17145    ///
17146    /// # Example
17147    /// ```ignore,no_run
17148    /// # use google_cloud_securitycenter_v2::model::CreateFindingRequest;
17149    /// use google_cloud_securitycenter_v2::model::Finding;
17150    /// let x = CreateFindingRequest::new().set_finding(Finding::default()/* use setters */);
17151    /// ```
17152    pub fn set_finding<T>(mut self, v: T) -> Self
17153    where
17154        T: std::convert::Into<crate::model::Finding>,
17155    {
17156        self.finding = std::option::Option::Some(v.into());
17157        self
17158    }
17159
17160    /// Sets or clears the value of [finding][crate::model::CreateFindingRequest::finding].
17161    ///
17162    /// # Example
17163    /// ```ignore,no_run
17164    /// # use google_cloud_securitycenter_v2::model::CreateFindingRequest;
17165    /// use google_cloud_securitycenter_v2::model::Finding;
17166    /// let x = CreateFindingRequest::new().set_or_clear_finding(Some(Finding::default()/* use setters */));
17167    /// let x = CreateFindingRequest::new().set_or_clear_finding(None::<Finding>);
17168    /// ```
17169    pub fn set_or_clear_finding<T>(mut self, v: std::option::Option<T>) -> Self
17170    where
17171        T: std::convert::Into<crate::model::Finding>,
17172    {
17173        self.finding = v.map(|x| x.into());
17174        self
17175    }
17176}
17177
17178impl wkt::message::Message for CreateFindingRequest {
17179    fn typename() -> &'static str {
17180        "type.googleapis.com/google.cloud.securitycenter.v2.CreateFindingRequest"
17181    }
17182}
17183
17184/// Request message for creating a mute config.
17185#[derive(Clone, Default, PartialEq)]
17186#[non_exhaustive]
17187pub struct CreateMuteConfigRequest {
17188    /// Required. Resource name of the new mute configs's parent. Its format is
17189    /// `organizations/[organization_id]/locations/[location_id]`,
17190    /// `folders/[folder_id]/locations/[location_id]`, or
17191    /// `projects/[project_id]/locations/[location_id]`.
17192    pub parent: std::string::String,
17193
17194    /// Required. The mute config being created.
17195    pub mute_config: std::option::Option<crate::model::MuteConfig>,
17196
17197    /// Required. Unique identifier provided by the client within the parent scope.
17198    /// It must consist of only lowercase letters, numbers, and hyphens, must start
17199    /// with a letter, must end with either a letter or a number, and must be 63
17200    /// characters or less.
17201    pub mute_config_id: std::string::String,
17202
17203    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17204}
17205
17206impl CreateMuteConfigRequest {
17207    pub fn new() -> Self {
17208        std::default::Default::default()
17209    }
17210
17211    /// Sets the value of [parent][crate::model::CreateMuteConfigRequest::parent].
17212    ///
17213    /// # Example
17214    /// ```ignore,no_run
17215    /// # use google_cloud_securitycenter_v2::model::CreateMuteConfigRequest;
17216    /// let x = CreateMuteConfigRequest::new().set_parent("example");
17217    /// ```
17218    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17219        self.parent = v.into();
17220        self
17221    }
17222
17223    /// Sets the value of [mute_config][crate::model::CreateMuteConfigRequest::mute_config].
17224    ///
17225    /// # Example
17226    /// ```ignore,no_run
17227    /// # use google_cloud_securitycenter_v2::model::CreateMuteConfigRequest;
17228    /// use google_cloud_securitycenter_v2::model::MuteConfig;
17229    /// let x = CreateMuteConfigRequest::new().set_mute_config(MuteConfig::default()/* use setters */);
17230    /// ```
17231    pub fn set_mute_config<T>(mut self, v: T) -> Self
17232    where
17233        T: std::convert::Into<crate::model::MuteConfig>,
17234    {
17235        self.mute_config = std::option::Option::Some(v.into());
17236        self
17237    }
17238
17239    /// Sets or clears the value of [mute_config][crate::model::CreateMuteConfigRequest::mute_config].
17240    ///
17241    /// # Example
17242    /// ```ignore,no_run
17243    /// # use google_cloud_securitycenter_v2::model::CreateMuteConfigRequest;
17244    /// use google_cloud_securitycenter_v2::model::MuteConfig;
17245    /// let x = CreateMuteConfigRequest::new().set_or_clear_mute_config(Some(MuteConfig::default()/* use setters */));
17246    /// let x = CreateMuteConfigRequest::new().set_or_clear_mute_config(None::<MuteConfig>);
17247    /// ```
17248    pub fn set_or_clear_mute_config<T>(mut self, v: std::option::Option<T>) -> Self
17249    where
17250        T: std::convert::Into<crate::model::MuteConfig>,
17251    {
17252        self.mute_config = v.map(|x| x.into());
17253        self
17254    }
17255
17256    /// Sets the value of [mute_config_id][crate::model::CreateMuteConfigRequest::mute_config_id].
17257    ///
17258    /// # Example
17259    /// ```ignore,no_run
17260    /// # use google_cloud_securitycenter_v2::model::CreateMuteConfigRequest;
17261    /// let x = CreateMuteConfigRequest::new().set_mute_config_id("example");
17262    /// ```
17263    pub fn set_mute_config_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17264        self.mute_config_id = v.into();
17265        self
17266    }
17267}
17268
17269impl wkt::message::Message for CreateMuteConfigRequest {
17270    fn typename() -> &'static str {
17271        "type.googleapis.com/google.cloud.securitycenter.v2.CreateMuteConfigRequest"
17272    }
17273}
17274
17275/// Request message for creating a notification config.
17276#[derive(Clone, Default, PartialEq)]
17277#[non_exhaustive]
17278pub struct CreateNotificationConfigRequest {
17279    /// Required. Resource name of the new notification config's parent. Its format
17280    /// is `organizations/[organization_id]/locations/[location_id]`,
17281    /// `folders/[folder_id]/locations/[location_id]`, or
17282    /// `projects/[project_id]/locations/[location_id]`.
17283    pub parent: std::string::String,
17284
17285    /// Required.
17286    /// Unique identifier provided by the client within the parent scope.
17287    /// It must be between 1 and 128 characters and contain alphanumeric
17288    /// characters, underscores, or hyphens only.
17289    pub config_id: std::string::String,
17290
17291    /// Required. The notification config being created. The name and the service
17292    /// account will be ignored as they are both output only fields on this
17293    /// resource.
17294    pub notification_config: std::option::Option<crate::model::NotificationConfig>,
17295
17296    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17297}
17298
17299impl CreateNotificationConfigRequest {
17300    pub fn new() -> Self {
17301        std::default::Default::default()
17302    }
17303
17304    /// Sets the value of [parent][crate::model::CreateNotificationConfigRequest::parent].
17305    ///
17306    /// # Example
17307    /// ```ignore,no_run
17308    /// # use google_cloud_securitycenter_v2::model::CreateNotificationConfigRequest;
17309    /// let x = CreateNotificationConfigRequest::new().set_parent("example");
17310    /// ```
17311    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17312        self.parent = v.into();
17313        self
17314    }
17315
17316    /// Sets the value of [config_id][crate::model::CreateNotificationConfigRequest::config_id].
17317    ///
17318    /// # Example
17319    /// ```ignore,no_run
17320    /// # use google_cloud_securitycenter_v2::model::CreateNotificationConfigRequest;
17321    /// let x = CreateNotificationConfigRequest::new().set_config_id("example");
17322    /// ```
17323    pub fn set_config_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17324        self.config_id = v.into();
17325        self
17326    }
17327
17328    /// Sets the value of [notification_config][crate::model::CreateNotificationConfigRequest::notification_config].
17329    ///
17330    /// # Example
17331    /// ```ignore,no_run
17332    /// # use google_cloud_securitycenter_v2::model::CreateNotificationConfigRequest;
17333    /// use google_cloud_securitycenter_v2::model::NotificationConfig;
17334    /// let x = CreateNotificationConfigRequest::new().set_notification_config(NotificationConfig::default()/* use setters */);
17335    /// ```
17336    pub fn set_notification_config<T>(mut self, v: T) -> Self
17337    where
17338        T: std::convert::Into<crate::model::NotificationConfig>,
17339    {
17340        self.notification_config = std::option::Option::Some(v.into());
17341        self
17342    }
17343
17344    /// Sets or clears the value of [notification_config][crate::model::CreateNotificationConfigRequest::notification_config].
17345    ///
17346    /// # Example
17347    /// ```ignore,no_run
17348    /// # use google_cloud_securitycenter_v2::model::CreateNotificationConfigRequest;
17349    /// use google_cloud_securitycenter_v2::model::NotificationConfig;
17350    /// let x = CreateNotificationConfigRequest::new().set_or_clear_notification_config(Some(NotificationConfig::default()/* use setters */));
17351    /// let x = CreateNotificationConfigRequest::new().set_or_clear_notification_config(None::<NotificationConfig>);
17352    /// ```
17353    pub fn set_or_clear_notification_config<T>(mut self, v: std::option::Option<T>) -> Self
17354    where
17355        T: std::convert::Into<crate::model::NotificationConfig>,
17356    {
17357        self.notification_config = v.map(|x| x.into());
17358        self
17359    }
17360}
17361
17362impl wkt::message::Message for CreateNotificationConfigRequest {
17363    fn typename() -> &'static str {
17364        "type.googleapis.com/google.cloud.securitycenter.v2.CreateNotificationConfigRequest"
17365    }
17366}
17367
17368/// Request message to create single resource value config
17369#[derive(Clone, Default, PartialEq)]
17370#[non_exhaustive]
17371pub struct CreateResourceValueConfigRequest {
17372    /// Required. Resource name of the new ResourceValueConfig's parent.
17373    pub parent: std::string::String,
17374
17375    /// Required. The resource value config being created.
17376    pub resource_value_config: std::option::Option<crate::model::ResourceValueConfig>,
17377
17378    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17379}
17380
17381impl CreateResourceValueConfigRequest {
17382    pub fn new() -> Self {
17383        std::default::Default::default()
17384    }
17385
17386    /// Sets the value of [parent][crate::model::CreateResourceValueConfigRequest::parent].
17387    ///
17388    /// # Example
17389    /// ```ignore,no_run
17390    /// # use google_cloud_securitycenter_v2::model::CreateResourceValueConfigRequest;
17391    /// let x = CreateResourceValueConfigRequest::new().set_parent("example");
17392    /// ```
17393    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17394        self.parent = v.into();
17395        self
17396    }
17397
17398    /// Sets the value of [resource_value_config][crate::model::CreateResourceValueConfigRequest::resource_value_config].
17399    ///
17400    /// # Example
17401    /// ```ignore,no_run
17402    /// # use google_cloud_securitycenter_v2::model::CreateResourceValueConfigRequest;
17403    /// use google_cloud_securitycenter_v2::model::ResourceValueConfig;
17404    /// let x = CreateResourceValueConfigRequest::new().set_resource_value_config(ResourceValueConfig::default()/* use setters */);
17405    /// ```
17406    pub fn set_resource_value_config<T>(mut self, v: T) -> Self
17407    where
17408        T: std::convert::Into<crate::model::ResourceValueConfig>,
17409    {
17410        self.resource_value_config = std::option::Option::Some(v.into());
17411        self
17412    }
17413
17414    /// Sets or clears the value of [resource_value_config][crate::model::CreateResourceValueConfigRequest::resource_value_config].
17415    ///
17416    /// # Example
17417    /// ```ignore,no_run
17418    /// # use google_cloud_securitycenter_v2::model::CreateResourceValueConfigRequest;
17419    /// use google_cloud_securitycenter_v2::model::ResourceValueConfig;
17420    /// let x = CreateResourceValueConfigRequest::new().set_or_clear_resource_value_config(Some(ResourceValueConfig::default()/* use setters */));
17421    /// let x = CreateResourceValueConfigRequest::new().set_or_clear_resource_value_config(None::<ResourceValueConfig>);
17422    /// ```
17423    pub fn set_or_clear_resource_value_config<T>(mut self, v: std::option::Option<T>) -> Self
17424    where
17425        T: std::convert::Into<crate::model::ResourceValueConfig>,
17426    {
17427        self.resource_value_config = v.map(|x| x.into());
17428        self
17429    }
17430}
17431
17432impl wkt::message::Message for CreateResourceValueConfigRequest {
17433    fn typename() -> &'static str {
17434        "type.googleapis.com/google.cloud.securitycenter.v2.CreateResourceValueConfigRequest"
17435    }
17436}
17437
17438/// Request message for creating a source.
17439#[derive(Clone, Default, PartialEq)]
17440#[non_exhaustive]
17441pub struct CreateSourceRequest {
17442    /// Required. Resource name of the new source's parent. Its format should be
17443    /// `organizations/[organization_id]`.
17444    pub parent: std::string::String,
17445
17446    /// Required. The Source being created, only the display_name and description
17447    /// will be used. All other fields will be ignored.
17448    pub source: std::option::Option<crate::model::Source>,
17449
17450    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17451}
17452
17453impl CreateSourceRequest {
17454    pub fn new() -> Self {
17455        std::default::Default::default()
17456    }
17457
17458    /// Sets the value of [parent][crate::model::CreateSourceRequest::parent].
17459    ///
17460    /// # Example
17461    /// ```ignore,no_run
17462    /// # use google_cloud_securitycenter_v2::model::CreateSourceRequest;
17463    /// let x = CreateSourceRequest::new().set_parent("example");
17464    /// ```
17465    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17466        self.parent = v.into();
17467        self
17468    }
17469
17470    /// Sets the value of [source][crate::model::CreateSourceRequest::source].
17471    ///
17472    /// # Example
17473    /// ```ignore,no_run
17474    /// # use google_cloud_securitycenter_v2::model::CreateSourceRequest;
17475    /// use google_cloud_securitycenter_v2::model::Source;
17476    /// let x = CreateSourceRequest::new().set_source(Source::default()/* use setters */);
17477    /// ```
17478    pub fn set_source<T>(mut self, v: T) -> Self
17479    where
17480        T: std::convert::Into<crate::model::Source>,
17481    {
17482        self.source = std::option::Option::Some(v.into());
17483        self
17484    }
17485
17486    /// Sets or clears the value of [source][crate::model::CreateSourceRequest::source].
17487    ///
17488    /// # Example
17489    /// ```ignore,no_run
17490    /// # use google_cloud_securitycenter_v2::model::CreateSourceRequest;
17491    /// use google_cloud_securitycenter_v2::model::Source;
17492    /// let x = CreateSourceRequest::new().set_or_clear_source(Some(Source::default()/* use setters */));
17493    /// let x = CreateSourceRequest::new().set_or_clear_source(None::<Source>);
17494    /// ```
17495    pub fn set_or_clear_source<T>(mut self, v: std::option::Option<T>) -> Self
17496    where
17497        T: std::convert::Into<crate::model::Source>,
17498    {
17499        self.source = v.map(|x| x.into());
17500        self
17501    }
17502}
17503
17504impl wkt::message::Message for CreateSourceRequest {
17505    fn typename() -> &'static str {
17506        "type.googleapis.com/google.cloud.securitycenter.v2.CreateSourceRequest"
17507    }
17508}
17509
17510/// Request message for deleting a BigQuery export.
17511#[derive(Clone, Default, PartialEq)]
17512#[non_exhaustive]
17513pub struct DeleteBigQueryExportRequest {
17514    /// Required. The name of the BigQuery export to delete. The following list
17515    /// shows some examples of the format:
17516    ///
17517    ///
17518    /// `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
17519    ///
17520    /// + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
17521    /// + `projects/{project}/locations/{location}/bigQueryExports/{export_id}`
17522    pub name: std::string::String,
17523
17524    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17525}
17526
17527impl DeleteBigQueryExportRequest {
17528    pub fn new() -> Self {
17529        std::default::Default::default()
17530    }
17531
17532    /// Sets the value of [name][crate::model::DeleteBigQueryExportRequest::name].
17533    ///
17534    /// # Example
17535    /// ```ignore,no_run
17536    /// # use google_cloud_securitycenter_v2::model::DeleteBigQueryExportRequest;
17537    /// let x = DeleteBigQueryExportRequest::new().set_name("example");
17538    /// ```
17539    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17540        self.name = v.into();
17541        self
17542    }
17543}
17544
17545impl wkt::message::Message for DeleteBigQueryExportRequest {
17546    fn typename() -> &'static str {
17547        "type.googleapis.com/google.cloud.securitycenter.v2.DeleteBigQueryExportRequest"
17548    }
17549}
17550
17551/// Request message for deleting a mute config. If no location is specified,
17552/// default is global.
17553#[derive(Clone, Default, PartialEq)]
17554#[non_exhaustive]
17555pub struct DeleteMuteConfigRequest {
17556    /// Required. Name of the mute config to delete. The following list shows some
17557    /// examples of the format:
17558    ///
17559    /// + `organizations/{organization}/muteConfigs/{config_id}`
17560    ///
17561    /// `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
17562    ///
17563    /// + `folders/{folder}/muteConfigs/{config_id}`
17564    /// + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
17565    /// + `projects/{project}/muteConfigs/{config_id}`
17566    /// + `projects/{project}/locations/{location}/muteConfigs/{config_id}`
17567    pub name: std::string::String,
17568
17569    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17570}
17571
17572impl DeleteMuteConfigRequest {
17573    pub fn new() -> Self {
17574        std::default::Default::default()
17575    }
17576
17577    /// Sets the value of [name][crate::model::DeleteMuteConfigRequest::name].
17578    ///
17579    /// # Example
17580    /// ```ignore,no_run
17581    /// # use google_cloud_securitycenter_v2::model::DeleteMuteConfigRequest;
17582    /// let x = DeleteMuteConfigRequest::new().set_name("example");
17583    /// ```
17584    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17585        self.name = v.into();
17586        self
17587    }
17588}
17589
17590impl wkt::message::Message for DeleteMuteConfigRequest {
17591    fn typename() -> &'static str {
17592        "type.googleapis.com/google.cloud.securitycenter.v2.DeleteMuteConfigRequest"
17593    }
17594}
17595
17596/// Request message for deleting a notification config.
17597#[derive(Clone, Default, PartialEq)]
17598#[non_exhaustive]
17599pub struct DeleteNotificationConfigRequest {
17600    /// Required. Name of the notification config to delete. The following list
17601    /// shows some examples of the format:
17602    ///
17603    ///
17604    /// `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
17605    /// +
17606    /// `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]`
17607    /// +
17608    /// `projects/[project_id]/locations/[location_id]notificationConfigs/[config_id]`
17609    pub name: std::string::String,
17610
17611    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17612}
17613
17614impl DeleteNotificationConfigRequest {
17615    pub fn new() -> Self {
17616        std::default::Default::default()
17617    }
17618
17619    /// Sets the value of [name][crate::model::DeleteNotificationConfigRequest::name].
17620    ///
17621    /// # Example
17622    /// ```ignore,no_run
17623    /// # use google_cloud_securitycenter_v2::model::DeleteNotificationConfigRequest;
17624    /// let x = DeleteNotificationConfigRequest::new().set_name("example");
17625    /// ```
17626    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17627        self.name = v.into();
17628        self
17629    }
17630}
17631
17632impl wkt::message::Message for DeleteNotificationConfigRequest {
17633    fn typename() -> &'static str {
17634        "type.googleapis.com/google.cloud.securitycenter.v2.DeleteNotificationConfigRequest"
17635    }
17636}
17637
17638/// Request message to delete resource value config
17639#[derive(Clone, Default, PartialEq)]
17640#[non_exhaustive]
17641pub struct DeleteResourceValueConfigRequest {
17642    /// Required. Name of the ResourceValueConfig to delete
17643    pub name: std::string::String,
17644
17645    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17646}
17647
17648impl DeleteResourceValueConfigRequest {
17649    pub fn new() -> Self {
17650        std::default::Default::default()
17651    }
17652
17653    /// Sets the value of [name][crate::model::DeleteResourceValueConfigRequest::name].
17654    ///
17655    /// # Example
17656    /// ```ignore,no_run
17657    /// # use google_cloud_securitycenter_v2::model::DeleteResourceValueConfigRequest;
17658    /// let x = DeleteResourceValueConfigRequest::new().set_name("example");
17659    /// ```
17660    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17661        self.name = v.into();
17662        self
17663    }
17664}
17665
17666impl wkt::message::Message for DeleteResourceValueConfigRequest {
17667    fn typename() -> &'static str {
17668        "type.googleapis.com/google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest"
17669    }
17670}
17671
17672/// The destination big query dataset to export findings to.
17673#[derive(Clone, Default, PartialEq)]
17674#[non_exhaustive]
17675pub struct BigQueryDestination {
17676    /// Required. The relative resource name of the destination dataset, in the
17677    /// form projects/{projectId}/datasets/{datasetId}.
17678    pub dataset: std::string::String,
17679
17680    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17681}
17682
17683impl BigQueryDestination {
17684    pub fn new() -> Self {
17685        std::default::Default::default()
17686    }
17687
17688    /// Sets the value of [dataset][crate::model::BigQueryDestination::dataset].
17689    ///
17690    /// # Example
17691    /// ```ignore,no_run
17692    /// # use google_cloud_securitycenter_v2::model::BigQueryDestination;
17693    /// let x = BigQueryDestination::new().set_dataset("example");
17694    /// ```
17695    pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17696        self.dataset = v.into();
17697        self
17698    }
17699}
17700
17701impl wkt::message::Message for BigQueryDestination {
17702    fn typename() -> &'static str {
17703        "type.googleapis.com/google.cloud.securitycenter.v2.BigQueryDestination"
17704    }
17705}
17706
17707/// The LRO metadata for a ExportFindings request.
17708#[derive(Clone, Default, PartialEq)]
17709#[non_exhaustive]
17710pub struct ExportFindingsMetadata {
17711    /// Optional. Timestamp at which export was started
17712    pub export_start_time: std::option::Option<wkt::Timestamp>,
17713
17714    /// The destination to export findings to.
17715    pub destination: std::option::Option<crate::model::export_findings_metadata::Destination>,
17716
17717    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17718}
17719
17720impl ExportFindingsMetadata {
17721    pub fn new() -> Self {
17722        std::default::Default::default()
17723    }
17724
17725    /// Sets the value of [export_start_time][crate::model::ExportFindingsMetadata::export_start_time].
17726    ///
17727    /// # Example
17728    /// ```ignore,no_run
17729    /// # use google_cloud_securitycenter_v2::model::ExportFindingsMetadata;
17730    /// use wkt::Timestamp;
17731    /// let x = ExportFindingsMetadata::new().set_export_start_time(Timestamp::default()/* use setters */);
17732    /// ```
17733    pub fn set_export_start_time<T>(mut self, v: T) -> Self
17734    where
17735        T: std::convert::Into<wkt::Timestamp>,
17736    {
17737        self.export_start_time = std::option::Option::Some(v.into());
17738        self
17739    }
17740
17741    /// Sets or clears the value of [export_start_time][crate::model::ExportFindingsMetadata::export_start_time].
17742    ///
17743    /// # Example
17744    /// ```ignore,no_run
17745    /// # use google_cloud_securitycenter_v2::model::ExportFindingsMetadata;
17746    /// use wkt::Timestamp;
17747    /// let x = ExportFindingsMetadata::new().set_or_clear_export_start_time(Some(Timestamp::default()/* use setters */));
17748    /// let x = ExportFindingsMetadata::new().set_or_clear_export_start_time(None::<Timestamp>);
17749    /// ```
17750    pub fn set_or_clear_export_start_time<T>(mut self, v: std::option::Option<T>) -> Self
17751    where
17752        T: std::convert::Into<wkt::Timestamp>,
17753    {
17754        self.export_start_time = v.map(|x| x.into());
17755        self
17756    }
17757
17758    /// Sets the value of [destination][crate::model::ExportFindingsMetadata::destination].
17759    ///
17760    /// Note that all the setters affecting `destination` are mutually
17761    /// exclusive.
17762    ///
17763    /// # Example
17764    /// ```ignore,no_run
17765    /// # use google_cloud_securitycenter_v2::model::ExportFindingsMetadata;
17766    /// use google_cloud_securitycenter_v2::model::BigQueryDestination;
17767    /// let x = ExportFindingsMetadata::new().set_destination(Some(
17768    ///     google_cloud_securitycenter_v2::model::export_findings_metadata::Destination::BigQueryDestination(BigQueryDestination::default().into())));
17769    /// ```
17770    pub fn set_destination<
17771        T: std::convert::Into<
17772                std::option::Option<crate::model::export_findings_metadata::Destination>,
17773            >,
17774    >(
17775        mut self,
17776        v: T,
17777    ) -> Self {
17778        self.destination = v.into();
17779        self
17780    }
17781
17782    /// The value of [destination][crate::model::ExportFindingsMetadata::destination]
17783    /// if it holds a `BigQueryDestination`, `None` if the field is not set or
17784    /// holds a different branch.
17785    pub fn big_query_destination(
17786        &self,
17787    ) -> std::option::Option<&std::boxed::Box<crate::model::BigQueryDestination>> {
17788        #[allow(unreachable_patterns)]
17789        self.destination.as_ref().and_then(|v| match v {
17790            crate::model::export_findings_metadata::Destination::BigQueryDestination(v) => {
17791                std::option::Option::Some(v)
17792            }
17793            _ => std::option::Option::None,
17794        })
17795    }
17796
17797    /// Sets the value of [destination][crate::model::ExportFindingsMetadata::destination]
17798    /// to hold a `BigQueryDestination`.
17799    ///
17800    /// Note that all the setters affecting `destination` are
17801    /// mutually exclusive.
17802    ///
17803    /// # Example
17804    /// ```ignore,no_run
17805    /// # use google_cloud_securitycenter_v2::model::ExportFindingsMetadata;
17806    /// use google_cloud_securitycenter_v2::model::BigQueryDestination;
17807    /// let x = ExportFindingsMetadata::new().set_big_query_destination(BigQueryDestination::default()/* use setters */);
17808    /// assert!(x.big_query_destination().is_some());
17809    /// ```
17810    pub fn set_big_query_destination<
17811        T: std::convert::Into<std::boxed::Box<crate::model::BigQueryDestination>>,
17812    >(
17813        mut self,
17814        v: T,
17815    ) -> Self {
17816        self.destination = std::option::Option::Some(
17817            crate::model::export_findings_metadata::Destination::BigQueryDestination(v.into()),
17818        );
17819        self
17820    }
17821}
17822
17823impl wkt::message::Message for ExportFindingsMetadata {
17824    fn typename() -> &'static str {
17825        "type.googleapis.com/google.cloud.securitycenter.v2.ExportFindingsMetadata"
17826    }
17827}
17828
17829/// Defines additional types related to [ExportFindingsMetadata].
17830pub mod export_findings_metadata {
17831    #[allow(unused_imports)]
17832    use super::*;
17833
17834    /// The destination to export findings to.
17835    #[derive(Clone, Debug, PartialEq)]
17836    #[non_exhaustive]
17837    pub enum Destination {
17838        /// Required. The destination big query dataset to export findings to.
17839        BigQueryDestination(std::boxed::Box<crate::model::BigQueryDestination>),
17840    }
17841}
17842
17843/// The response to a ExportFindings request. Contains the LRO information.
17844#[derive(Clone, Default, PartialEq)]
17845#[non_exhaustive]
17846pub struct ExportFindingsResponse {
17847    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17848}
17849
17850impl ExportFindingsResponse {
17851    pub fn new() -> Self {
17852        std::default::Default::default()
17853    }
17854}
17855
17856impl wkt::message::Message for ExportFindingsResponse {
17857    fn typename() -> &'static str {
17858        "type.googleapis.com/google.cloud.securitycenter.v2.ExportFindingsResponse"
17859    }
17860}
17861
17862/// Request message for retrieving a BigQuery export.
17863#[derive(Clone, Default, PartialEq)]
17864#[non_exhaustive]
17865pub struct GetBigQueryExportRequest {
17866    /// Required. Name of the BigQuery export to retrieve. The following list shows
17867    /// some examples of the format:
17868    ///
17869    ///
17870    /// `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
17871    ///
17872    /// + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
17873    /// + `projects/{project}locations/{location}//bigQueryExports/{export_id}`
17874    pub name: std::string::String,
17875
17876    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17877}
17878
17879impl GetBigQueryExportRequest {
17880    pub fn new() -> Self {
17881        std::default::Default::default()
17882    }
17883
17884    /// Sets the value of [name][crate::model::GetBigQueryExportRequest::name].
17885    ///
17886    /// # Example
17887    /// ```ignore,no_run
17888    /// # use google_cloud_securitycenter_v2::model::GetBigQueryExportRequest;
17889    /// let x = GetBigQueryExportRequest::new().set_name("example");
17890    /// ```
17891    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17892        self.name = v.into();
17893        self
17894    }
17895}
17896
17897impl wkt::message::Message for GetBigQueryExportRequest {
17898    fn typename() -> &'static str {
17899        "type.googleapis.com/google.cloud.securitycenter.v2.GetBigQueryExportRequest"
17900    }
17901}
17902
17903/// Request message for retrieving a mute config. If no location is specified,
17904/// default is global.
17905#[derive(Clone, Default, PartialEq)]
17906#[non_exhaustive]
17907pub struct GetMuteConfigRequest {
17908    /// Required. Name of the mute config to retrieve. The following list shows
17909    /// some examples of the format:
17910    ///
17911    /// + `organizations/{organization}/muteConfigs/{config_id}`
17912    ///
17913    /// `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
17914    ///
17915    /// + `folders/{folder}/muteConfigs/{config_id}`
17916    /// + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
17917    /// + `projects/{project}/muteConfigs/{config_id}`
17918    /// + `projects/{project}/locations/{location}/muteConfigs/{config_id}`
17919    pub name: std::string::String,
17920
17921    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17922}
17923
17924impl GetMuteConfigRequest {
17925    pub fn new() -> Self {
17926        std::default::Default::default()
17927    }
17928
17929    /// Sets the value of [name][crate::model::GetMuteConfigRequest::name].
17930    ///
17931    /// # Example
17932    /// ```ignore,no_run
17933    /// # use google_cloud_securitycenter_v2::model::GetMuteConfigRequest;
17934    /// let x = GetMuteConfigRequest::new().set_name("example");
17935    /// ```
17936    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17937        self.name = v.into();
17938        self
17939    }
17940}
17941
17942impl wkt::message::Message for GetMuteConfigRequest {
17943    fn typename() -> &'static str {
17944        "type.googleapis.com/google.cloud.securitycenter.v2.GetMuteConfigRequest"
17945    }
17946}
17947
17948/// Request message for getting a notification config.
17949#[derive(Clone, Default, PartialEq)]
17950#[non_exhaustive]
17951pub struct GetNotificationConfigRequest {
17952    /// Required. Name of the notification config to get. The following list shows
17953    /// some examples of the format:
17954    ///
17955    ///
17956    /// `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
17957    /// +
17958    /// `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]`
17959    /// +
17960    /// `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]`
17961    pub name: std::string::String,
17962
17963    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17964}
17965
17966impl GetNotificationConfigRequest {
17967    pub fn new() -> Self {
17968        std::default::Default::default()
17969    }
17970
17971    /// Sets the value of [name][crate::model::GetNotificationConfigRequest::name].
17972    ///
17973    /// # Example
17974    /// ```ignore,no_run
17975    /// # use google_cloud_securitycenter_v2::model::GetNotificationConfigRequest;
17976    /// let x = GetNotificationConfigRequest::new().set_name("example");
17977    /// ```
17978    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17979        self.name = v.into();
17980        self
17981    }
17982}
17983
17984impl wkt::message::Message for GetNotificationConfigRequest {
17985    fn typename() -> &'static str {
17986        "type.googleapis.com/google.cloud.securitycenter.v2.GetNotificationConfigRequest"
17987    }
17988}
17989
17990/// Request message to get resource value config
17991#[derive(Clone, Default, PartialEq)]
17992#[non_exhaustive]
17993pub struct GetResourceValueConfigRequest {
17994    /// Required. Name of the resource value config to retrieve. Its format is
17995    /// organizations/{organization}/resourceValueConfigs/{config_id}.
17996    pub name: std::string::String,
17997
17998    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17999}
18000
18001impl GetResourceValueConfigRequest {
18002    pub fn new() -> Self {
18003        std::default::Default::default()
18004    }
18005
18006    /// Sets the value of [name][crate::model::GetResourceValueConfigRequest::name].
18007    ///
18008    /// # Example
18009    /// ```ignore,no_run
18010    /// # use google_cloud_securitycenter_v2::model::GetResourceValueConfigRequest;
18011    /// let x = GetResourceValueConfigRequest::new().set_name("example");
18012    /// ```
18013    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18014        self.name = v.into();
18015        self
18016    }
18017}
18018
18019impl wkt::message::Message for GetResourceValueConfigRequest {
18020    fn typename() -> &'static str {
18021        "type.googleapis.com/google.cloud.securitycenter.v2.GetResourceValueConfigRequest"
18022    }
18023}
18024
18025/// Request message for getting a source.
18026#[derive(Clone, Default, PartialEq)]
18027#[non_exhaustive]
18028pub struct GetSourceRequest {
18029    /// Required. Relative resource name of the source. Its format is
18030    /// `organizations/[organization_id]/source/[source_id]`.
18031    pub name: std::string::String,
18032
18033    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18034}
18035
18036impl GetSourceRequest {
18037    pub fn new() -> Self {
18038        std::default::Default::default()
18039    }
18040
18041    /// Sets the value of [name][crate::model::GetSourceRequest::name].
18042    ///
18043    /// # Example
18044    /// ```ignore,no_run
18045    /// # use google_cloud_securitycenter_v2::model::GetSourceRequest;
18046    /// let x = GetSourceRequest::new().set_name("example");
18047    /// ```
18048    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18049        self.name = v.into();
18050        self
18051    }
18052}
18053
18054impl wkt::message::Message for GetSourceRequest {
18055    fn typename() -> &'static str {
18056        "type.googleapis.com/google.cloud.securitycenter.v2.GetSourceRequest"
18057    }
18058}
18059
18060/// Request message for grouping by findings.
18061#[derive(Clone, Default, PartialEq)]
18062#[non_exhaustive]
18063pub struct GroupFindingsRequest {
18064    /// Required. Name of the source to groupBy. If no location is specified,
18065    /// finding is assumed to be in global.
18066    /// The following list shows some examples:
18067    ///
18068    /// + `organizations/[organization_id]/sources/[source_id]`
18069    ///
18070    /// `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
18071    ///
18072    /// + `folders/[folder_id]/sources/[source_id]`
18073    /// + `folders/[folder_id]/sources/[source_id]/locations/[location_id]`
18074    /// + `projects/[project_id]/sources/[source_id]`
18075    /// + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
18076    ///
18077    /// To groupBy across all sources provide a source_id of `-`. The following
18078    /// list shows some examples:
18079    ///
18080    /// + `organizations/{organization_id}/sources/-`
18081    /// + `organizations/{organization_id}/sources/-/locations/[location_id]`
18082    /// + `folders/{folder_id}/sources/-`
18083    /// + `folders/{folder_id}/sources/-/locations/[location_id]`
18084    /// + `projects/{project_id}/sources/-`
18085    /// + `projects/{project_id}/sources/-/locations/[location_id]`
18086    pub parent: std::string::String,
18087
18088    /// Expression that defines the filter to apply across findings.
18089    /// The expression is a list of one or more restrictions combined via logical
18090    /// operators `AND` and `OR`.
18091    /// Parentheses are supported, and `OR` has higher precedence than `AND`.
18092    ///
18093    /// Restrictions have the form `<field> <operator> <value>` and may have a `-`
18094    /// character in front of them to indicate negation. Examples include:
18095    ///
18096    /// * name
18097    /// * security_marks.marks.marka
18098    ///
18099    /// The supported operators are:
18100    ///
18101    /// * `=` for all value types.
18102    /// * `>`, `<`, `>=`, `<=` for integer values.
18103    /// * `:`, meaning substring matching, for strings.
18104    ///
18105    /// The supported value types are:
18106    ///
18107    /// * string literals in quotes.
18108    /// * integer literals without quotes.
18109    /// * boolean literals `true` and `false` without quotes.
18110    ///
18111    /// The following field and operator combinations are supported:
18112    ///
18113    /// * name: `=`
18114    ///
18115    /// * parent: `=`, `:`
18116    ///
18117    /// * resource_name: `=`, `:`
18118    ///
18119    /// * state: `=`, `:`
18120    ///
18121    /// * category: `=`, `:`
18122    ///
18123    /// * external_uri: `=`, `:`
18124    ///
18125    /// * event_time: `=`, `>`, `<`, `>=`, `<=`
18126    ///
18127    ///   Usage: This should be milliseconds since epoch or an RFC3339 string.
18128    ///   Examples:
18129    ///   `event_time = "2019-06-10T16:07:18-07:00"`
18130    ///   `event_time = 1560208038000`
18131    ///
18132    /// * severity: `=`, `:`
18133    ///
18134    /// * security_marks.marks: `=`, `:`
18135    ///
18136    /// * resource:
18137    ///
18138    ///   * resource.name: `=`, `:`
18139    ///   * resource.parent_name: `=`, `:`
18140    ///   * resource.parent_display_name: `=`, `:`
18141    ///   * resource.project_name: `=`, `:`
18142    ///   * resource.project_display_name: `=`, `:`
18143    ///   * resource.type: `=`, `:`
18144    pub filter: std::string::String,
18145
18146    /// Required. Expression that defines what assets fields to use for grouping.
18147    /// The string value should follow SQL syntax: comma separated list of fields.
18148    /// For example: "parent,resource_name".
18149    pub group_by: std::string::String,
18150
18151    /// The value returned by the last `GroupFindingsResponse`; indicates
18152    /// that this is a continuation of a prior `GroupFindings` call, and
18153    /// that the system should return the next page of data.
18154    pub page_token: std::string::String,
18155
18156    /// The maximum number of results to return in a single response. Default is
18157    /// 10, minimum is 1, maximum is 1000.
18158    pub page_size: i32,
18159
18160    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18161}
18162
18163impl GroupFindingsRequest {
18164    pub fn new() -> Self {
18165        std::default::Default::default()
18166    }
18167
18168    /// Sets the value of [parent][crate::model::GroupFindingsRequest::parent].
18169    ///
18170    /// # Example
18171    /// ```ignore,no_run
18172    /// # use google_cloud_securitycenter_v2::model::GroupFindingsRequest;
18173    /// let x = GroupFindingsRequest::new().set_parent("example");
18174    /// ```
18175    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18176        self.parent = v.into();
18177        self
18178    }
18179
18180    /// Sets the value of [filter][crate::model::GroupFindingsRequest::filter].
18181    ///
18182    /// # Example
18183    /// ```ignore,no_run
18184    /// # use google_cloud_securitycenter_v2::model::GroupFindingsRequest;
18185    /// let x = GroupFindingsRequest::new().set_filter("example");
18186    /// ```
18187    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18188        self.filter = v.into();
18189        self
18190    }
18191
18192    /// Sets the value of [group_by][crate::model::GroupFindingsRequest::group_by].
18193    ///
18194    /// # Example
18195    /// ```ignore,no_run
18196    /// # use google_cloud_securitycenter_v2::model::GroupFindingsRequest;
18197    /// let x = GroupFindingsRequest::new().set_group_by("example");
18198    /// ```
18199    pub fn set_group_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18200        self.group_by = v.into();
18201        self
18202    }
18203
18204    /// Sets the value of [page_token][crate::model::GroupFindingsRequest::page_token].
18205    ///
18206    /// # Example
18207    /// ```ignore,no_run
18208    /// # use google_cloud_securitycenter_v2::model::GroupFindingsRequest;
18209    /// let x = GroupFindingsRequest::new().set_page_token("example");
18210    /// ```
18211    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18212        self.page_token = v.into();
18213        self
18214    }
18215
18216    /// Sets the value of [page_size][crate::model::GroupFindingsRequest::page_size].
18217    ///
18218    /// # Example
18219    /// ```ignore,no_run
18220    /// # use google_cloud_securitycenter_v2::model::GroupFindingsRequest;
18221    /// let x = GroupFindingsRequest::new().set_page_size(42);
18222    /// ```
18223    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18224        self.page_size = v.into();
18225        self
18226    }
18227}
18228
18229impl wkt::message::Message for GroupFindingsRequest {
18230    fn typename() -> &'static str {
18231        "type.googleapis.com/google.cloud.securitycenter.v2.GroupFindingsRequest"
18232    }
18233}
18234
18235/// Response message for group by findings.
18236#[derive(Clone, Default, PartialEq)]
18237#[non_exhaustive]
18238pub struct GroupFindingsResponse {
18239    /// Group results. There exists an element for each existing unique
18240    /// combination of property/values. The element contains a count for the number
18241    /// of times those specific property/values appear.
18242    pub group_by_results: std::vec::Vec<crate::model::GroupResult>,
18243
18244    /// Token to retrieve the next page of results, or empty if there are no more
18245    /// results.
18246    pub next_page_token: std::string::String,
18247
18248    /// The total number of results matching the query.
18249    pub total_size: i32,
18250
18251    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18252}
18253
18254impl GroupFindingsResponse {
18255    pub fn new() -> Self {
18256        std::default::Default::default()
18257    }
18258
18259    /// Sets the value of [group_by_results][crate::model::GroupFindingsResponse::group_by_results].
18260    ///
18261    /// # Example
18262    /// ```ignore,no_run
18263    /// # use google_cloud_securitycenter_v2::model::GroupFindingsResponse;
18264    /// use google_cloud_securitycenter_v2::model::GroupResult;
18265    /// let x = GroupFindingsResponse::new()
18266    ///     .set_group_by_results([
18267    ///         GroupResult::default()/* use setters */,
18268    ///         GroupResult::default()/* use (different) setters */,
18269    ///     ]);
18270    /// ```
18271    pub fn set_group_by_results<T, V>(mut self, v: T) -> Self
18272    where
18273        T: std::iter::IntoIterator<Item = V>,
18274        V: std::convert::Into<crate::model::GroupResult>,
18275    {
18276        use std::iter::Iterator;
18277        self.group_by_results = v.into_iter().map(|i| i.into()).collect();
18278        self
18279    }
18280
18281    /// Sets the value of [next_page_token][crate::model::GroupFindingsResponse::next_page_token].
18282    ///
18283    /// # Example
18284    /// ```ignore,no_run
18285    /// # use google_cloud_securitycenter_v2::model::GroupFindingsResponse;
18286    /// let x = GroupFindingsResponse::new().set_next_page_token("example");
18287    /// ```
18288    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18289        self.next_page_token = v.into();
18290        self
18291    }
18292
18293    /// Sets the value of [total_size][crate::model::GroupFindingsResponse::total_size].
18294    ///
18295    /// # Example
18296    /// ```ignore,no_run
18297    /// # use google_cloud_securitycenter_v2::model::GroupFindingsResponse;
18298    /// let x = GroupFindingsResponse::new().set_total_size(42);
18299    /// ```
18300    pub fn set_total_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18301        self.total_size = v.into();
18302        self
18303    }
18304}
18305
18306impl wkt::message::Message for GroupFindingsResponse {
18307    fn typename() -> &'static str {
18308        "type.googleapis.com/google.cloud.securitycenter.v2.GroupFindingsResponse"
18309    }
18310}
18311
18312#[doc(hidden)]
18313impl google_cloud_gax::paginator::internal::PageableResponse for GroupFindingsResponse {
18314    type PageItem = crate::model::GroupResult;
18315
18316    fn items(self) -> std::vec::Vec<Self::PageItem> {
18317        self.group_by_results
18318    }
18319
18320    fn next_page_token(&self) -> std::string::String {
18321        use std::clone::Clone;
18322        self.next_page_token.clone()
18323    }
18324}
18325
18326/// Result containing the properties and count of a groupBy request.
18327#[derive(Clone, Default, PartialEq)]
18328#[non_exhaustive]
18329pub struct GroupResult {
18330    /// Properties matching the groupBy fields in the request.
18331    pub properties: std::collections::HashMap<std::string::String, wkt::Value>,
18332
18333    /// Total count of resources for the given properties.
18334    pub count: i64,
18335
18336    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18337}
18338
18339impl GroupResult {
18340    pub fn new() -> Self {
18341        std::default::Default::default()
18342    }
18343
18344    /// Sets the value of [properties][crate::model::GroupResult::properties].
18345    ///
18346    /// # Example
18347    /// ```ignore,no_run
18348    /// # use google_cloud_securitycenter_v2::model::GroupResult;
18349    /// use wkt::Value;
18350    /// let x = GroupResult::new().set_properties([
18351    ///     ("key0", Value::default()/* use setters */),
18352    ///     ("key1", Value::default()/* use (different) setters */),
18353    /// ]);
18354    /// ```
18355    pub fn set_properties<T, K, V>(mut self, v: T) -> Self
18356    where
18357        T: std::iter::IntoIterator<Item = (K, V)>,
18358        K: std::convert::Into<std::string::String>,
18359        V: std::convert::Into<wkt::Value>,
18360    {
18361        use std::iter::Iterator;
18362        self.properties = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
18363        self
18364    }
18365
18366    /// Sets the value of [count][crate::model::GroupResult::count].
18367    ///
18368    /// # Example
18369    /// ```ignore,no_run
18370    /// # use google_cloud_securitycenter_v2::model::GroupResult;
18371    /// let x = GroupResult::new().set_count(42);
18372    /// ```
18373    pub fn set_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
18374        self.count = v.into();
18375        self
18376    }
18377}
18378
18379impl wkt::message::Message for GroupResult {
18380    fn typename() -> &'static str {
18381        "type.googleapis.com/google.cloud.securitycenter.v2.GroupResult"
18382    }
18383}
18384
18385/// Request message for listing the attack paths for a given simulation or valued
18386/// resource.
18387#[derive(Clone, Default, PartialEq)]
18388#[non_exhaustive]
18389pub struct ListAttackPathsRequest {
18390    /// Required. Name of parent to list attack paths.
18391    ///
18392    /// Valid formats:
18393    /// `organizations/{organization}`,
18394    /// `organizations/{organization}/simulations/{simulation}`
18395    /// `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
18396    /// `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
18397    pub parent: std::string::String,
18398
18399    /// The filter expression that filters the attack path in the response.
18400    /// Supported fields:
18401    ///
18402    /// * `valued_resources` supports =
18403    pub filter: std::string::String,
18404
18405    /// The value returned by the last `ListAttackPathsResponse`; indicates
18406    /// that this is a continuation of a prior `ListAttackPaths` call, and
18407    /// that the system should return the next page of data.
18408    pub page_token: std::string::String,
18409
18410    /// The maximum number of results to return in a single response. Default is
18411    /// 10, minimum is 1, maximum is 1000.
18412    pub page_size: i32,
18413
18414    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18415}
18416
18417impl ListAttackPathsRequest {
18418    pub fn new() -> Self {
18419        std::default::Default::default()
18420    }
18421
18422    /// Sets the value of [parent][crate::model::ListAttackPathsRequest::parent].
18423    ///
18424    /// # Example
18425    /// ```ignore,no_run
18426    /// # use google_cloud_securitycenter_v2::model::ListAttackPathsRequest;
18427    /// let x = ListAttackPathsRequest::new().set_parent("example");
18428    /// ```
18429    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18430        self.parent = v.into();
18431        self
18432    }
18433
18434    /// Sets the value of [filter][crate::model::ListAttackPathsRequest::filter].
18435    ///
18436    /// # Example
18437    /// ```ignore,no_run
18438    /// # use google_cloud_securitycenter_v2::model::ListAttackPathsRequest;
18439    /// let x = ListAttackPathsRequest::new().set_filter("example");
18440    /// ```
18441    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18442        self.filter = v.into();
18443        self
18444    }
18445
18446    /// Sets the value of [page_token][crate::model::ListAttackPathsRequest::page_token].
18447    ///
18448    /// # Example
18449    /// ```ignore,no_run
18450    /// # use google_cloud_securitycenter_v2::model::ListAttackPathsRequest;
18451    /// let x = ListAttackPathsRequest::new().set_page_token("example");
18452    /// ```
18453    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18454        self.page_token = v.into();
18455        self
18456    }
18457
18458    /// Sets the value of [page_size][crate::model::ListAttackPathsRequest::page_size].
18459    ///
18460    /// # Example
18461    /// ```ignore,no_run
18462    /// # use google_cloud_securitycenter_v2::model::ListAttackPathsRequest;
18463    /// let x = ListAttackPathsRequest::new().set_page_size(42);
18464    /// ```
18465    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18466        self.page_size = v.into();
18467        self
18468    }
18469}
18470
18471impl wkt::message::Message for ListAttackPathsRequest {
18472    fn typename() -> &'static str {
18473        "type.googleapis.com/google.cloud.securitycenter.v2.ListAttackPathsRequest"
18474    }
18475}
18476
18477/// Response message for listing the attack paths for a given simulation or
18478/// valued resource.
18479#[derive(Clone, Default, PartialEq)]
18480#[non_exhaustive]
18481pub struct ListAttackPathsResponse {
18482    /// The attack paths that the attack path simulation identified.
18483    pub attack_paths: std::vec::Vec<crate::model::AttackPath>,
18484
18485    /// Token to retrieve the next page of results, or empty if there are no more
18486    /// results.
18487    pub next_page_token: std::string::String,
18488
18489    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18490}
18491
18492impl ListAttackPathsResponse {
18493    pub fn new() -> Self {
18494        std::default::Default::default()
18495    }
18496
18497    /// Sets the value of [attack_paths][crate::model::ListAttackPathsResponse::attack_paths].
18498    ///
18499    /// # Example
18500    /// ```ignore,no_run
18501    /// # use google_cloud_securitycenter_v2::model::ListAttackPathsResponse;
18502    /// use google_cloud_securitycenter_v2::model::AttackPath;
18503    /// let x = ListAttackPathsResponse::new()
18504    ///     .set_attack_paths([
18505    ///         AttackPath::default()/* use setters */,
18506    ///         AttackPath::default()/* use (different) setters */,
18507    ///     ]);
18508    /// ```
18509    pub fn set_attack_paths<T, V>(mut self, v: T) -> Self
18510    where
18511        T: std::iter::IntoIterator<Item = V>,
18512        V: std::convert::Into<crate::model::AttackPath>,
18513    {
18514        use std::iter::Iterator;
18515        self.attack_paths = v.into_iter().map(|i| i.into()).collect();
18516        self
18517    }
18518
18519    /// Sets the value of [next_page_token][crate::model::ListAttackPathsResponse::next_page_token].
18520    ///
18521    /// # Example
18522    /// ```ignore,no_run
18523    /// # use google_cloud_securitycenter_v2::model::ListAttackPathsResponse;
18524    /// let x = ListAttackPathsResponse::new().set_next_page_token("example");
18525    /// ```
18526    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18527        self.next_page_token = v.into();
18528        self
18529    }
18530}
18531
18532impl wkt::message::Message for ListAttackPathsResponse {
18533    fn typename() -> &'static str {
18534        "type.googleapis.com/google.cloud.securitycenter.v2.ListAttackPathsResponse"
18535    }
18536}
18537
18538#[doc(hidden)]
18539impl google_cloud_gax::paginator::internal::PageableResponse for ListAttackPathsResponse {
18540    type PageItem = crate::model::AttackPath;
18541
18542    fn items(self) -> std::vec::Vec<Self::PageItem> {
18543        self.attack_paths
18544    }
18545
18546    fn next_page_token(&self) -> std::string::String {
18547        use std::clone::Clone;
18548        self.next_page_token.clone()
18549    }
18550}
18551
18552/// Request message for getting simulation.
18553/// Simulation name can include "latest" to retrieve the latest simulation
18554/// For example, "organizations/123/simulations/latest"
18555#[derive(Clone, Default, PartialEq)]
18556#[non_exhaustive]
18557pub struct GetSimulationRequest {
18558    /// Required. The organization name or simulation name of this simulation
18559    ///
18560    /// Valid format:
18561    /// `organizations/{organization}/simulations/latest`
18562    /// `organizations/{organization}/simulations/{simulation}`
18563    pub name: std::string::String,
18564
18565    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18566}
18567
18568impl GetSimulationRequest {
18569    pub fn new() -> Self {
18570        std::default::Default::default()
18571    }
18572
18573    /// Sets the value of [name][crate::model::GetSimulationRequest::name].
18574    ///
18575    /// # Example
18576    /// ```ignore,no_run
18577    /// # use google_cloud_securitycenter_v2::model::GetSimulationRequest;
18578    /// let x = GetSimulationRequest::new().set_name("example");
18579    /// ```
18580    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18581        self.name = v.into();
18582        self
18583    }
18584}
18585
18586impl wkt::message::Message for GetSimulationRequest {
18587    fn typename() -> &'static str {
18588        "type.googleapis.com/google.cloud.securitycenter.v2.GetSimulationRequest"
18589    }
18590}
18591
18592/// Request message for getting a valued resource.
18593#[derive(Clone, Default, PartialEq)]
18594#[non_exhaustive]
18595pub struct GetValuedResourceRequest {
18596    /// Required. The name of this valued resource
18597    ///
18598    /// Valid format:
18599    /// `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
18600    pub name: std::string::String,
18601
18602    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18603}
18604
18605impl GetValuedResourceRequest {
18606    pub fn new() -> Self {
18607        std::default::Default::default()
18608    }
18609
18610    /// Sets the value of [name][crate::model::GetValuedResourceRequest::name].
18611    ///
18612    /// # Example
18613    /// ```ignore,no_run
18614    /// # use google_cloud_securitycenter_v2::model::GetValuedResourceRequest;
18615    /// let x = GetValuedResourceRequest::new().set_name("example");
18616    /// ```
18617    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18618        self.name = v.into();
18619        self
18620    }
18621}
18622
18623impl wkt::message::Message for GetValuedResourceRequest {
18624    fn typename() -> &'static str {
18625        "type.googleapis.com/google.cloud.securitycenter.v2.GetValuedResourceRequest"
18626    }
18627}
18628
18629/// Request message for listing BigQuery exports at a given scope e.g.
18630/// organization, folder or project.
18631#[derive(Clone, Default, PartialEq)]
18632#[non_exhaustive]
18633pub struct ListBigQueryExportsRequest {
18634    /// Required. The parent, which owns the collection of BigQuery exports. Its
18635    /// format is `organizations/[organization_id]/locations/[location_id]`,
18636    /// `folders/[folder_id]/locations/[location_id]`, or
18637    /// `projects/[project_id]/locations/[location_id]`.
18638    pub parent: std::string::String,
18639
18640    /// The maximum number of configs to return. The service may return fewer than
18641    /// this value.
18642    /// If unspecified, at most 10 configs will be returned.
18643    /// The maximum value is 1000; values above 1000 will be coerced to 1000.
18644    pub page_size: i32,
18645
18646    /// A page token, received from a previous `ListBigQueryExports` call.
18647    /// Provide this to retrieve the subsequent page.
18648    /// When paginating, all other parameters provided to `ListBigQueryExports`
18649    /// must match the call that provided the page token.
18650    pub page_token: std::string::String,
18651
18652    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18653}
18654
18655impl ListBigQueryExportsRequest {
18656    pub fn new() -> Self {
18657        std::default::Default::default()
18658    }
18659
18660    /// Sets the value of [parent][crate::model::ListBigQueryExportsRequest::parent].
18661    ///
18662    /// # Example
18663    /// ```ignore,no_run
18664    /// # use google_cloud_securitycenter_v2::model::ListBigQueryExportsRequest;
18665    /// let x = ListBigQueryExportsRequest::new().set_parent("example");
18666    /// ```
18667    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18668        self.parent = v.into();
18669        self
18670    }
18671
18672    /// Sets the value of [page_size][crate::model::ListBigQueryExportsRequest::page_size].
18673    ///
18674    /// # Example
18675    /// ```ignore,no_run
18676    /// # use google_cloud_securitycenter_v2::model::ListBigQueryExportsRequest;
18677    /// let x = ListBigQueryExportsRequest::new().set_page_size(42);
18678    /// ```
18679    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18680        self.page_size = v.into();
18681        self
18682    }
18683
18684    /// Sets the value of [page_token][crate::model::ListBigQueryExportsRequest::page_token].
18685    ///
18686    /// # Example
18687    /// ```ignore,no_run
18688    /// # use google_cloud_securitycenter_v2::model::ListBigQueryExportsRequest;
18689    /// let x = ListBigQueryExportsRequest::new().set_page_token("example");
18690    /// ```
18691    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18692        self.page_token = v.into();
18693        self
18694    }
18695}
18696
18697impl wkt::message::Message for ListBigQueryExportsRequest {
18698    fn typename() -> &'static str {
18699        "type.googleapis.com/google.cloud.securitycenter.v2.ListBigQueryExportsRequest"
18700    }
18701}
18702
18703/// Response message for listing BigQuery exports.
18704#[derive(Clone, Default, PartialEq)]
18705#[non_exhaustive]
18706pub struct ListBigQueryExportsResponse {
18707    /// The BigQuery exports from the specified parent.
18708    pub big_query_exports: std::vec::Vec<crate::model::BigQueryExport>,
18709
18710    /// A token, which can be sent as `page_token` to retrieve the next page.
18711    /// If this field is omitted, there are no subsequent pages.
18712    pub next_page_token: std::string::String,
18713
18714    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18715}
18716
18717impl ListBigQueryExportsResponse {
18718    pub fn new() -> Self {
18719        std::default::Default::default()
18720    }
18721
18722    /// Sets the value of [big_query_exports][crate::model::ListBigQueryExportsResponse::big_query_exports].
18723    ///
18724    /// # Example
18725    /// ```ignore,no_run
18726    /// # use google_cloud_securitycenter_v2::model::ListBigQueryExportsResponse;
18727    /// use google_cloud_securitycenter_v2::model::BigQueryExport;
18728    /// let x = ListBigQueryExportsResponse::new()
18729    ///     .set_big_query_exports([
18730    ///         BigQueryExport::default()/* use setters */,
18731    ///         BigQueryExport::default()/* use (different) setters */,
18732    ///     ]);
18733    /// ```
18734    pub fn set_big_query_exports<T, V>(mut self, v: T) -> Self
18735    where
18736        T: std::iter::IntoIterator<Item = V>,
18737        V: std::convert::Into<crate::model::BigQueryExport>,
18738    {
18739        use std::iter::Iterator;
18740        self.big_query_exports = v.into_iter().map(|i| i.into()).collect();
18741        self
18742    }
18743
18744    /// Sets the value of [next_page_token][crate::model::ListBigQueryExportsResponse::next_page_token].
18745    ///
18746    /// # Example
18747    /// ```ignore,no_run
18748    /// # use google_cloud_securitycenter_v2::model::ListBigQueryExportsResponse;
18749    /// let x = ListBigQueryExportsResponse::new().set_next_page_token("example");
18750    /// ```
18751    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18752        self.next_page_token = v.into();
18753        self
18754    }
18755}
18756
18757impl wkt::message::Message for ListBigQueryExportsResponse {
18758    fn typename() -> &'static str {
18759        "type.googleapis.com/google.cloud.securitycenter.v2.ListBigQueryExportsResponse"
18760    }
18761}
18762
18763#[doc(hidden)]
18764impl google_cloud_gax::paginator::internal::PageableResponse for ListBigQueryExportsResponse {
18765    type PageItem = crate::model::BigQueryExport;
18766
18767    fn items(self) -> std::vec::Vec<Self::PageItem> {
18768        self.big_query_exports
18769    }
18770
18771    fn next_page_token(&self) -> std::string::String {
18772        use std::clone::Clone;
18773        self.next_page_token.clone()
18774    }
18775}
18776
18777/// Request message for listing findings.
18778#[derive(Clone, Default, PartialEq)]
18779#[non_exhaustive]
18780pub struct ListFindingsRequest {
18781    /// Required. Name of the source the findings belong to. If no location is
18782    /// specified, the default is global. The following list shows some examples:
18783    ///
18784    /// + `organizations/[organization_id]/sources/[source_id]`
18785    ///
18786    /// `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
18787    ///
18788    /// + `folders/[folder_id]/sources/[source_id]`
18789    /// + `folders/[folder_id]/sources/[source_id]/locations/[location_id]`
18790    /// + `projects/[project_id]/sources/[source_id]`
18791    /// + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
18792    ///
18793    /// To list across all sources provide a source_id of `-`. The following
18794    /// list shows some examples:
18795    ///
18796    /// + `organizations/{organization_id}/sources/-`
18797    /// + `organizations/{organization_id}/sources/-/locations/{location_id}`
18798    /// + `folders/{folder_id}/sources/-`
18799    /// + `folders/{folder_id}/sources/-locations/{location_id}`
18800    /// + `projects/{projects_id}/sources/-`
18801    /// + `projects/{projects_id}/sources/-/locations/{location_id}`
18802    pub parent: std::string::String,
18803
18804    /// Expression that defines the filter to apply across findings.
18805    /// The expression is a list of one or more restrictions combined via logical
18806    /// operators `AND` and `OR`.
18807    /// Parentheses are supported, and `OR` has higher precedence than `AND`.
18808    ///
18809    /// Restrictions have the form `<field> <operator> <value>` and may have a `-`
18810    /// character in front of them to indicate negation. Examples include:
18811    ///
18812    /// * name
18813    /// * security_marks.marks.marka
18814    ///
18815    /// The supported operators are:
18816    ///
18817    /// * `=` for all value types.
18818    /// * `>`, `<`, `>=`, `<=` for integer values.
18819    /// * `:`, meaning substring matching, for strings.
18820    ///
18821    /// The supported value types are:
18822    ///
18823    /// * string literals in quotes.
18824    /// * integer literals without quotes.
18825    /// * boolean literals `true` and `false` without quotes.
18826    ///
18827    /// The following field and operator combinations are supported:
18828    ///
18829    /// * name: `=`
18830    ///
18831    /// * parent: `=`, `:`
18832    ///
18833    /// * resource_name: `=`, `:`
18834    ///
18835    /// * state: `=`, `:`
18836    ///
18837    /// * category: `=`, `:`
18838    ///
18839    /// * external_uri: `=`, `:`
18840    ///
18841    /// * event_time: `=`, `>`, `<`, `>=`, `<=`
18842    ///
18843    ///   Usage: This should be milliseconds since epoch or an RFC3339 string.
18844    ///   Examples:
18845    ///   `event_time = "2019-06-10T16:07:18-07:00"`
18846    ///   `event_time = 1560208038000`
18847    ///
18848    /// * severity: `=`, `:`
18849    ///
18850    /// * security_marks.marks: `=`, `:`
18851    ///
18852    /// * resource:
18853    ///
18854    ///   * resource.name: `=`, `:`
18855    ///   * resource.parent_name: `=`, `:`
18856    ///   * resource.parent_display_name: `=`, `:`
18857    ///   * resource.project_name: `=`, `:`
18858    ///   * resource.project_display_name: `=`, `:`
18859    ///   * resource.type: `=`, `:`
18860    ///   * resource.folders.resource_folder: `=`, `:`
18861    ///   * resource.display_name: `=`, `:`
18862    pub filter: std::string::String,
18863
18864    /// Expression that defines what fields and order to use for sorting. The
18865    /// string value should follow SQL syntax: comma separated list of fields. For
18866    /// example: "name,parent". The default sorting order
18867    /// is ascending. To specify descending order for a field, a suffix " desc"
18868    /// should be appended to the field name. For example: "name
18869    /// desc,parent". Redundant space characters in the
18870    /// syntax are insignificant. "name desc,parent" and "
18871    /// name     desc  ,   parent  " are equivalent.
18872    ///
18873    /// The following fields are supported:
18874    /// name
18875    /// parent
18876    /// state
18877    /// category
18878    /// resource_name
18879    /// event_time
18880    /// security_marks.marks
18881    pub order_by: std::string::String,
18882
18883    /// A field mask to specify the Finding fields to be listed in the response.
18884    /// An empty field mask will list all fields.
18885    pub field_mask: std::option::Option<wkt::FieldMask>,
18886
18887    /// The value returned by the last `ListFindingsResponse`; indicates
18888    /// that this is a continuation of a prior `ListFindings` call, and
18889    /// that the system should return the next page of data.
18890    pub page_token: std::string::String,
18891
18892    /// The maximum number of results to return in a single response. Default is
18893    /// 10, minimum is 1, maximum is 1000.
18894    pub page_size: i32,
18895
18896    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18897}
18898
18899impl ListFindingsRequest {
18900    pub fn new() -> Self {
18901        std::default::Default::default()
18902    }
18903
18904    /// Sets the value of [parent][crate::model::ListFindingsRequest::parent].
18905    ///
18906    /// # Example
18907    /// ```ignore,no_run
18908    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
18909    /// let x = ListFindingsRequest::new().set_parent("example");
18910    /// ```
18911    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18912        self.parent = v.into();
18913        self
18914    }
18915
18916    /// Sets the value of [filter][crate::model::ListFindingsRequest::filter].
18917    ///
18918    /// # Example
18919    /// ```ignore,no_run
18920    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
18921    /// let x = ListFindingsRequest::new().set_filter("example");
18922    /// ```
18923    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18924        self.filter = v.into();
18925        self
18926    }
18927
18928    /// Sets the value of [order_by][crate::model::ListFindingsRequest::order_by].
18929    ///
18930    /// # Example
18931    /// ```ignore,no_run
18932    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
18933    /// let x = ListFindingsRequest::new().set_order_by("example");
18934    /// ```
18935    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18936        self.order_by = v.into();
18937        self
18938    }
18939
18940    /// Sets the value of [field_mask][crate::model::ListFindingsRequest::field_mask].
18941    ///
18942    /// # Example
18943    /// ```ignore,no_run
18944    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
18945    /// use wkt::FieldMask;
18946    /// let x = ListFindingsRequest::new().set_field_mask(FieldMask::default()/* use setters */);
18947    /// ```
18948    pub fn set_field_mask<T>(mut self, v: T) -> Self
18949    where
18950        T: std::convert::Into<wkt::FieldMask>,
18951    {
18952        self.field_mask = std::option::Option::Some(v.into());
18953        self
18954    }
18955
18956    /// Sets or clears the value of [field_mask][crate::model::ListFindingsRequest::field_mask].
18957    ///
18958    /// # Example
18959    /// ```ignore,no_run
18960    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
18961    /// use wkt::FieldMask;
18962    /// let x = ListFindingsRequest::new().set_or_clear_field_mask(Some(FieldMask::default()/* use setters */));
18963    /// let x = ListFindingsRequest::new().set_or_clear_field_mask(None::<FieldMask>);
18964    /// ```
18965    pub fn set_or_clear_field_mask<T>(mut self, v: std::option::Option<T>) -> Self
18966    where
18967        T: std::convert::Into<wkt::FieldMask>,
18968    {
18969        self.field_mask = v.map(|x| x.into());
18970        self
18971    }
18972
18973    /// Sets the value of [page_token][crate::model::ListFindingsRequest::page_token].
18974    ///
18975    /// # Example
18976    /// ```ignore,no_run
18977    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
18978    /// let x = ListFindingsRequest::new().set_page_token("example");
18979    /// ```
18980    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18981        self.page_token = v.into();
18982        self
18983    }
18984
18985    /// Sets the value of [page_size][crate::model::ListFindingsRequest::page_size].
18986    ///
18987    /// # Example
18988    /// ```ignore,no_run
18989    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
18990    /// let x = ListFindingsRequest::new().set_page_size(42);
18991    /// ```
18992    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18993        self.page_size = v.into();
18994        self
18995    }
18996}
18997
18998impl wkt::message::Message for ListFindingsRequest {
18999    fn typename() -> &'static str {
19000        "type.googleapis.com/google.cloud.securitycenter.v2.ListFindingsRequest"
19001    }
19002}
19003
19004/// Response message for listing findings.
19005#[derive(Clone, Default, PartialEq)]
19006#[non_exhaustive]
19007pub struct ListFindingsResponse {
19008    /// Findings matching the list request.
19009    pub list_findings_results:
19010        std::vec::Vec<crate::model::list_findings_response::ListFindingsResult>,
19011
19012    /// Token to retrieve the next page of results, or empty if there are no more
19013    /// results.
19014    pub next_page_token: std::string::String,
19015
19016    /// The total number of findings matching the query.
19017    pub total_size: i32,
19018
19019    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19020}
19021
19022impl ListFindingsResponse {
19023    pub fn new() -> Self {
19024        std::default::Default::default()
19025    }
19026
19027    /// Sets the value of [list_findings_results][crate::model::ListFindingsResponse::list_findings_results].
19028    ///
19029    /// # Example
19030    /// ```ignore,no_run
19031    /// # use google_cloud_securitycenter_v2::model::ListFindingsResponse;
19032    /// use google_cloud_securitycenter_v2::model::list_findings_response::ListFindingsResult;
19033    /// let x = ListFindingsResponse::new()
19034    ///     .set_list_findings_results([
19035    ///         ListFindingsResult::default()/* use setters */,
19036    ///         ListFindingsResult::default()/* use (different) setters */,
19037    ///     ]);
19038    /// ```
19039    pub fn set_list_findings_results<T, V>(mut self, v: T) -> Self
19040    where
19041        T: std::iter::IntoIterator<Item = V>,
19042        V: std::convert::Into<crate::model::list_findings_response::ListFindingsResult>,
19043    {
19044        use std::iter::Iterator;
19045        self.list_findings_results = v.into_iter().map(|i| i.into()).collect();
19046        self
19047    }
19048
19049    /// Sets the value of [next_page_token][crate::model::ListFindingsResponse::next_page_token].
19050    ///
19051    /// # Example
19052    /// ```ignore,no_run
19053    /// # use google_cloud_securitycenter_v2::model::ListFindingsResponse;
19054    /// let x = ListFindingsResponse::new().set_next_page_token("example");
19055    /// ```
19056    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19057        self.next_page_token = v.into();
19058        self
19059    }
19060
19061    /// Sets the value of [total_size][crate::model::ListFindingsResponse::total_size].
19062    ///
19063    /// # Example
19064    /// ```ignore,no_run
19065    /// # use google_cloud_securitycenter_v2::model::ListFindingsResponse;
19066    /// let x = ListFindingsResponse::new().set_total_size(42);
19067    /// ```
19068    pub fn set_total_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19069        self.total_size = v.into();
19070        self
19071    }
19072}
19073
19074impl wkt::message::Message for ListFindingsResponse {
19075    fn typename() -> &'static str {
19076        "type.googleapis.com/google.cloud.securitycenter.v2.ListFindingsResponse"
19077    }
19078}
19079
19080#[doc(hidden)]
19081impl google_cloud_gax::paginator::internal::PageableResponse for ListFindingsResponse {
19082    type PageItem = crate::model::list_findings_response::ListFindingsResult;
19083
19084    fn items(self) -> std::vec::Vec<Self::PageItem> {
19085        self.list_findings_results
19086    }
19087
19088    fn next_page_token(&self) -> std::string::String {
19089        use std::clone::Clone;
19090        self.next_page_token.clone()
19091    }
19092}
19093
19094/// Defines additional types related to [ListFindingsResponse].
19095pub mod list_findings_response {
19096    #[allow(unused_imports)]
19097    use super::*;
19098
19099    /// Result containing the Finding.
19100    #[derive(Clone, Default, PartialEq)]
19101    #[non_exhaustive]
19102    pub struct ListFindingsResult {
19103        /// Finding matching the search request.
19104        pub finding: std::option::Option<crate::model::Finding>,
19105
19106        /// Output only. Resource that is associated with this finding.
19107        pub resource: std::option::Option<
19108            crate::model::list_findings_response::list_findings_result::Resource,
19109        >,
19110
19111        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19112    }
19113
19114    impl ListFindingsResult {
19115        pub fn new() -> Self {
19116            std::default::Default::default()
19117        }
19118
19119        /// Sets the value of [finding][crate::model::list_findings_response::ListFindingsResult::finding].
19120        ///
19121        /// # Example
19122        /// ```ignore,no_run
19123        /// # use google_cloud_securitycenter_v2::model::list_findings_response::ListFindingsResult;
19124        /// use google_cloud_securitycenter_v2::model::Finding;
19125        /// let x = ListFindingsResult::new().set_finding(Finding::default()/* use setters */);
19126        /// ```
19127        pub fn set_finding<T>(mut self, v: T) -> Self
19128        where
19129            T: std::convert::Into<crate::model::Finding>,
19130        {
19131            self.finding = std::option::Option::Some(v.into());
19132            self
19133        }
19134
19135        /// Sets or clears the value of [finding][crate::model::list_findings_response::ListFindingsResult::finding].
19136        ///
19137        /// # Example
19138        /// ```ignore,no_run
19139        /// # use google_cloud_securitycenter_v2::model::list_findings_response::ListFindingsResult;
19140        /// use google_cloud_securitycenter_v2::model::Finding;
19141        /// let x = ListFindingsResult::new().set_or_clear_finding(Some(Finding::default()/* use setters */));
19142        /// let x = ListFindingsResult::new().set_or_clear_finding(None::<Finding>);
19143        /// ```
19144        pub fn set_or_clear_finding<T>(mut self, v: std::option::Option<T>) -> Self
19145        where
19146            T: std::convert::Into<crate::model::Finding>,
19147        {
19148            self.finding = v.map(|x| x.into());
19149            self
19150        }
19151
19152        /// Sets the value of [resource][crate::model::list_findings_response::ListFindingsResult::resource].
19153        ///
19154        /// # Example
19155        /// ```ignore,no_run
19156        /// # use google_cloud_securitycenter_v2::model::list_findings_response::ListFindingsResult;
19157        /// use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19158        /// let x = ListFindingsResult::new().set_resource(Resource::default()/* use setters */);
19159        /// ```
19160        pub fn set_resource<T>(mut self, v: T) -> Self
19161        where
19162            T: std::convert::Into<
19163                    crate::model::list_findings_response::list_findings_result::Resource,
19164                >,
19165        {
19166            self.resource = std::option::Option::Some(v.into());
19167            self
19168        }
19169
19170        /// Sets or clears the value of [resource][crate::model::list_findings_response::ListFindingsResult::resource].
19171        ///
19172        /// # Example
19173        /// ```ignore,no_run
19174        /// # use google_cloud_securitycenter_v2::model::list_findings_response::ListFindingsResult;
19175        /// use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19176        /// let x = ListFindingsResult::new().set_or_clear_resource(Some(Resource::default()/* use setters */));
19177        /// let x = ListFindingsResult::new().set_or_clear_resource(None::<Resource>);
19178        /// ```
19179        pub fn set_or_clear_resource<T>(mut self, v: std::option::Option<T>) -> Self
19180        where
19181            T: std::convert::Into<
19182                    crate::model::list_findings_response::list_findings_result::Resource,
19183                >,
19184        {
19185            self.resource = v.map(|x| x.into());
19186            self
19187        }
19188    }
19189
19190    impl wkt::message::Message for ListFindingsResult {
19191        fn typename() -> &'static str {
19192            "type.googleapis.com/google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult"
19193        }
19194    }
19195
19196    /// Defines additional types related to [ListFindingsResult].
19197    pub mod list_findings_result {
19198        #[allow(unused_imports)]
19199        use super::*;
19200
19201        /// Information related to the Google Cloud resource that is
19202        /// associated with this finding.
19203        #[derive(Clone, Default, PartialEq)]
19204        #[non_exhaustive]
19205        pub struct Resource {
19206
19207            /// The full resource name of the resource. See:
19208            /// <https://cloud.google.com/apis/design/resource_names#full_resource_name>
19209            pub name: std::string::String,
19210
19211            /// The human readable name of the resource.
19212            pub display_name: std::string::String,
19213
19214            /// The full resource type of the resource.
19215            pub r#type: std::string::String,
19216
19217            /// Indicates which cloud provider the finding is from.
19218            pub cloud_provider: crate::model::CloudProvider,
19219
19220            /// The service or resource provider associated with the resource.
19221            pub service: std::string::String,
19222
19223            /// The region or location of the service (if applicable).
19224            pub location: std::string::String,
19225
19226            /// Provides the path to the resource within the resource hierarchy.
19227            pub resource_path: std::option::Option<crate::model::ResourcePath>,
19228
19229            /// A string representation of the resource path.
19230            /// For Google Cloud, it has the format of
19231            /// `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}`
19232            /// where there can be any number of folders.
19233            /// For AWS, it has the format of
19234            /// `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}`
19235            /// where there can be any number of organizational units.
19236            /// For Azure, it has the format of
19237            /// `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}`
19238            /// where there can be any number of management groups.
19239            pub resource_path_string: std::string::String,
19240
19241            /// The metadata associated with the cloud provider.
19242            pub cloud_provider_metadata: std::option::Option<crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata>,
19243
19244            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19245        }
19246
19247        impl Resource {
19248            pub fn new() -> Self {
19249                std::default::Default::default()
19250            }
19251
19252            /// Sets the value of [name][crate::model::list_findings_response::list_findings_result::Resource::name].
19253            ///
19254            /// # Example
19255            /// ```ignore,no_run
19256            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19257            /// let x = Resource::new().set_name("example");
19258            /// ```
19259            pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19260                self.name = v.into();
19261                self
19262            }
19263
19264            /// Sets the value of [display_name][crate::model::list_findings_response::list_findings_result::Resource::display_name].
19265            ///
19266            /// # Example
19267            /// ```ignore,no_run
19268            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19269            /// let x = Resource::new().set_display_name("example");
19270            /// ```
19271            pub fn set_display_name<T: std::convert::Into<std::string::String>>(
19272                mut self,
19273                v: T,
19274            ) -> Self {
19275                self.display_name = v.into();
19276                self
19277            }
19278
19279            /// Sets the value of [r#type][crate::model::list_findings_response::list_findings_result::Resource::type].
19280            ///
19281            /// # Example
19282            /// ```ignore,no_run
19283            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19284            /// let x = Resource::new().set_type("example");
19285            /// ```
19286            pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19287                self.r#type = v.into();
19288                self
19289            }
19290
19291            /// Sets the value of [cloud_provider][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider].
19292            ///
19293            /// # Example
19294            /// ```ignore,no_run
19295            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19296            /// use google_cloud_securitycenter_v2::model::CloudProvider;
19297            /// let x0 = Resource::new().set_cloud_provider(CloudProvider::GoogleCloudPlatform);
19298            /// let x1 = Resource::new().set_cloud_provider(CloudProvider::AmazonWebServices);
19299            /// let x2 = Resource::new().set_cloud_provider(CloudProvider::MicrosoftAzure);
19300            /// ```
19301            pub fn set_cloud_provider<T: std::convert::Into<crate::model::CloudProvider>>(
19302                mut self,
19303                v: T,
19304            ) -> Self {
19305                self.cloud_provider = v.into();
19306                self
19307            }
19308
19309            /// Sets the value of [service][crate::model::list_findings_response::list_findings_result::Resource::service].
19310            ///
19311            /// # Example
19312            /// ```ignore,no_run
19313            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19314            /// let x = Resource::new().set_service("example");
19315            /// ```
19316            pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19317                self.service = v.into();
19318                self
19319            }
19320
19321            /// Sets the value of [location][crate::model::list_findings_response::list_findings_result::Resource::location].
19322            ///
19323            /// # Example
19324            /// ```ignore,no_run
19325            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19326            /// let x = Resource::new().set_location("example");
19327            /// ```
19328            pub fn set_location<T: std::convert::Into<std::string::String>>(
19329                mut self,
19330                v: T,
19331            ) -> Self {
19332                self.location = v.into();
19333                self
19334            }
19335
19336            /// Sets the value of [resource_path][crate::model::list_findings_response::list_findings_result::Resource::resource_path].
19337            ///
19338            /// # Example
19339            /// ```ignore,no_run
19340            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19341            /// use google_cloud_securitycenter_v2::model::ResourcePath;
19342            /// let x = Resource::new().set_resource_path(ResourcePath::default()/* use setters */);
19343            /// ```
19344            pub fn set_resource_path<T>(mut self, v: T) -> Self
19345            where
19346                T: std::convert::Into<crate::model::ResourcePath>,
19347            {
19348                self.resource_path = std::option::Option::Some(v.into());
19349                self
19350            }
19351
19352            /// Sets or clears the value of [resource_path][crate::model::list_findings_response::list_findings_result::Resource::resource_path].
19353            ///
19354            /// # Example
19355            /// ```ignore,no_run
19356            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19357            /// use google_cloud_securitycenter_v2::model::ResourcePath;
19358            /// let x = Resource::new().set_or_clear_resource_path(Some(ResourcePath::default()/* use setters */));
19359            /// let x = Resource::new().set_or_clear_resource_path(None::<ResourcePath>);
19360            /// ```
19361            pub fn set_or_clear_resource_path<T>(mut self, v: std::option::Option<T>) -> Self
19362            where
19363                T: std::convert::Into<crate::model::ResourcePath>,
19364            {
19365                self.resource_path = v.map(|x| x.into());
19366                self
19367            }
19368
19369            /// Sets the value of [resource_path_string][crate::model::list_findings_response::list_findings_result::Resource::resource_path_string].
19370            ///
19371            /// # Example
19372            /// ```ignore,no_run
19373            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19374            /// let x = Resource::new().set_resource_path_string("example");
19375            /// ```
19376            pub fn set_resource_path_string<T: std::convert::Into<std::string::String>>(
19377                mut self,
19378                v: T,
19379            ) -> Self {
19380                self.resource_path_string = v.into();
19381                self
19382            }
19383
19384            /// Sets the value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata].
19385            ///
19386            /// Note that all the setters affecting `cloud_provider_metadata` are mutually
19387            /// exclusive.
19388            ///
19389            /// # Example
19390            /// ```ignore,no_run
19391            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19392            /// use google_cloud_securitycenter_v2::model::GcpMetadata;
19393            /// let x = Resource::new().set_cloud_provider_metadata(Some(
19394            ///     google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::GcpMetadata(GcpMetadata::default().into())));
19395            /// ```
19396            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
19397            {
19398                self.cloud_provider_metadata = v.into();
19399                self
19400            }
19401
19402            /// The value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata]
19403            /// if it holds a `GcpMetadata`, `None` if the field is not set or
19404            /// holds a different branch.
19405            pub fn gcp_metadata(
19406                &self,
19407            ) -> std::option::Option<&std::boxed::Box<crate::model::GcpMetadata>> {
19408                #[allow(unreachable_patterns)]
19409                self.cloud_provider_metadata.as_ref().and_then(|v| match v {
19410                    crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::GcpMetadata(v) => std::option::Option::Some(v),
19411                    _ => std::option::Option::None,
19412                })
19413            }
19414
19415            /// Sets the value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata]
19416            /// to hold a `GcpMetadata`.
19417            ///
19418            /// Note that all the setters affecting `cloud_provider_metadata` are
19419            /// mutually exclusive.
19420            ///
19421            /// # Example
19422            /// ```ignore,no_run
19423            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19424            /// use google_cloud_securitycenter_v2::model::GcpMetadata;
19425            /// let x = Resource::new().set_gcp_metadata(GcpMetadata::default()/* use setters */);
19426            /// assert!(x.gcp_metadata().is_some());
19427            /// assert!(x.aws_metadata().is_none());
19428            /// assert!(x.azure_metadata().is_none());
19429            /// ```
19430            pub fn set_gcp_metadata<
19431                T: std::convert::Into<std::boxed::Box<crate::model::GcpMetadata>>,
19432            >(
19433                mut self,
19434                v: T,
19435            ) -> Self {
19436                self.cloud_provider_metadata = std::option::Option::Some(
19437                    crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::GcpMetadata(
19438                        v.into()
19439                    )
19440                );
19441                self
19442            }
19443
19444            /// The value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata]
19445            /// if it holds a `AwsMetadata`, `None` if the field is not set or
19446            /// holds a different branch.
19447            pub fn aws_metadata(
19448                &self,
19449            ) -> std::option::Option<&std::boxed::Box<crate::model::AwsMetadata>> {
19450                #[allow(unreachable_patterns)]
19451                self.cloud_provider_metadata.as_ref().and_then(|v| match v {
19452                    crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::AwsMetadata(v) => std::option::Option::Some(v),
19453                    _ => std::option::Option::None,
19454                })
19455            }
19456
19457            /// Sets the value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata]
19458            /// to hold a `AwsMetadata`.
19459            ///
19460            /// Note that all the setters affecting `cloud_provider_metadata` are
19461            /// mutually exclusive.
19462            ///
19463            /// # Example
19464            /// ```ignore,no_run
19465            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19466            /// use google_cloud_securitycenter_v2::model::AwsMetadata;
19467            /// let x = Resource::new().set_aws_metadata(AwsMetadata::default()/* use setters */);
19468            /// assert!(x.aws_metadata().is_some());
19469            /// assert!(x.gcp_metadata().is_none());
19470            /// assert!(x.azure_metadata().is_none());
19471            /// ```
19472            pub fn set_aws_metadata<
19473                T: std::convert::Into<std::boxed::Box<crate::model::AwsMetadata>>,
19474            >(
19475                mut self,
19476                v: T,
19477            ) -> Self {
19478                self.cloud_provider_metadata = std::option::Option::Some(
19479                    crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::AwsMetadata(
19480                        v.into()
19481                    )
19482                );
19483                self
19484            }
19485
19486            /// The value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata]
19487            /// if it holds a `AzureMetadata`, `None` if the field is not set or
19488            /// holds a different branch.
19489            pub fn azure_metadata(
19490                &self,
19491            ) -> std::option::Option<&std::boxed::Box<crate::model::AzureMetadata>> {
19492                #[allow(unreachable_patterns)]
19493                self.cloud_provider_metadata.as_ref().and_then(|v| match v {
19494                    crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::AzureMetadata(v) => std::option::Option::Some(v),
19495                    _ => std::option::Option::None,
19496                })
19497            }
19498
19499            /// Sets the value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata]
19500            /// to hold a `AzureMetadata`.
19501            ///
19502            /// Note that all the setters affecting `cloud_provider_metadata` are
19503            /// mutually exclusive.
19504            ///
19505            /// # Example
19506            /// ```ignore,no_run
19507            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19508            /// use google_cloud_securitycenter_v2::model::AzureMetadata;
19509            /// let x = Resource::new().set_azure_metadata(AzureMetadata::default()/* use setters */);
19510            /// assert!(x.azure_metadata().is_some());
19511            /// assert!(x.gcp_metadata().is_none());
19512            /// assert!(x.aws_metadata().is_none());
19513            /// ```
19514            pub fn set_azure_metadata<
19515                T: std::convert::Into<std::boxed::Box<crate::model::AzureMetadata>>,
19516            >(
19517                mut self,
19518                v: T,
19519            ) -> Self {
19520                self.cloud_provider_metadata = std::option::Option::Some(
19521                    crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::AzureMetadata(
19522                        v.into()
19523                    )
19524                );
19525                self
19526            }
19527        }
19528
19529        impl wkt::message::Message for Resource {
19530            fn typename() -> &'static str {
19531                "type.googleapis.com/google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource"
19532            }
19533        }
19534
19535        /// Defines additional types related to [Resource].
19536        pub mod resource {
19537            #[allow(unused_imports)]
19538            use super::*;
19539
19540            /// The metadata associated with the cloud provider.
19541            #[derive(Clone, Debug, PartialEq)]
19542            #[non_exhaustive]
19543            pub enum CloudProviderMetadata {
19544                /// The GCP metadata associated with the finding.
19545                GcpMetadata(std::boxed::Box<crate::model::GcpMetadata>),
19546                /// The AWS metadata associated with the finding.
19547                AwsMetadata(std::boxed::Box<crate::model::AwsMetadata>),
19548                /// The Azure metadata associated with the finding.
19549                AzureMetadata(std::boxed::Box<crate::model::AzureMetadata>),
19550            }
19551        }
19552    }
19553}
19554
19555/// Request message for listing  mute configs at a given scope e.g. organization,
19556/// folder or project. If no location is specified, default is
19557/// global.
19558#[derive(Clone, Default, PartialEq)]
19559#[non_exhaustive]
19560pub struct ListMuteConfigsRequest {
19561    /// Required. The parent, which owns the collection of mute configs. Its format
19562    /// is `organizations/[organization_id]", "folders/[folder_id]`,
19563    /// `projects/[project_id]`,
19564    /// `organizations/[organization_id]/locations/[location_id]`,
19565    /// `folders/[folder_id]/locations/[location_id]`,
19566    /// `projects/[project_id]/locations/[location_id]`.
19567    pub parent: std::string::String,
19568
19569    /// The maximum number of configs to return. The service may return fewer than
19570    /// this value.
19571    /// If unspecified, at most 10 configs will be returned.
19572    /// The maximum value is 1000; values above 1000 will be coerced to 1000.
19573    pub page_size: i32,
19574
19575    /// A page token, received from a previous `ListMuteConfigs` call.
19576    /// Provide this to retrieve the subsequent page.
19577    ///
19578    /// When paginating, all other parameters provided to `ListMuteConfigs` must
19579    /// match the call that provided the page token.
19580    pub page_token: std::string::String,
19581
19582    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19583}
19584
19585impl ListMuteConfigsRequest {
19586    pub fn new() -> Self {
19587        std::default::Default::default()
19588    }
19589
19590    /// Sets the value of [parent][crate::model::ListMuteConfigsRequest::parent].
19591    ///
19592    /// # Example
19593    /// ```ignore,no_run
19594    /// # use google_cloud_securitycenter_v2::model::ListMuteConfigsRequest;
19595    /// let x = ListMuteConfigsRequest::new().set_parent("example");
19596    /// ```
19597    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19598        self.parent = v.into();
19599        self
19600    }
19601
19602    /// Sets the value of [page_size][crate::model::ListMuteConfigsRequest::page_size].
19603    ///
19604    /// # Example
19605    /// ```ignore,no_run
19606    /// # use google_cloud_securitycenter_v2::model::ListMuteConfigsRequest;
19607    /// let x = ListMuteConfigsRequest::new().set_page_size(42);
19608    /// ```
19609    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19610        self.page_size = v.into();
19611        self
19612    }
19613
19614    /// Sets the value of [page_token][crate::model::ListMuteConfigsRequest::page_token].
19615    ///
19616    /// # Example
19617    /// ```ignore,no_run
19618    /// # use google_cloud_securitycenter_v2::model::ListMuteConfigsRequest;
19619    /// let x = ListMuteConfigsRequest::new().set_page_token("example");
19620    /// ```
19621    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19622        self.page_token = v.into();
19623        self
19624    }
19625}
19626
19627impl wkt::message::Message for ListMuteConfigsRequest {
19628    fn typename() -> &'static str {
19629        "type.googleapis.com/google.cloud.securitycenter.v2.ListMuteConfigsRequest"
19630    }
19631}
19632
19633/// Response message for listing mute configs.
19634#[derive(Clone, Default, PartialEq)]
19635#[non_exhaustive]
19636pub struct ListMuteConfigsResponse {
19637    /// The mute configs from the specified parent.
19638    pub mute_configs: std::vec::Vec<crate::model::MuteConfig>,
19639
19640    /// A token, which can be sent as `page_token` to retrieve the next page.
19641    /// If this field is omitted, there are no subsequent pages.
19642    pub next_page_token: std::string::String,
19643
19644    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19645}
19646
19647impl ListMuteConfigsResponse {
19648    pub fn new() -> Self {
19649        std::default::Default::default()
19650    }
19651
19652    /// Sets the value of [mute_configs][crate::model::ListMuteConfigsResponse::mute_configs].
19653    ///
19654    /// # Example
19655    /// ```ignore,no_run
19656    /// # use google_cloud_securitycenter_v2::model::ListMuteConfigsResponse;
19657    /// use google_cloud_securitycenter_v2::model::MuteConfig;
19658    /// let x = ListMuteConfigsResponse::new()
19659    ///     .set_mute_configs([
19660    ///         MuteConfig::default()/* use setters */,
19661    ///         MuteConfig::default()/* use (different) setters */,
19662    ///     ]);
19663    /// ```
19664    pub fn set_mute_configs<T, V>(mut self, v: T) -> Self
19665    where
19666        T: std::iter::IntoIterator<Item = V>,
19667        V: std::convert::Into<crate::model::MuteConfig>,
19668    {
19669        use std::iter::Iterator;
19670        self.mute_configs = v.into_iter().map(|i| i.into()).collect();
19671        self
19672    }
19673
19674    /// Sets the value of [next_page_token][crate::model::ListMuteConfigsResponse::next_page_token].
19675    ///
19676    /// # Example
19677    /// ```ignore,no_run
19678    /// # use google_cloud_securitycenter_v2::model::ListMuteConfigsResponse;
19679    /// let x = ListMuteConfigsResponse::new().set_next_page_token("example");
19680    /// ```
19681    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19682        self.next_page_token = v.into();
19683        self
19684    }
19685}
19686
19687impl wkt::message::Message for ListMuteConfigsResponse {
19688    fn typename() -> &'static str {
19689        "type.googleapis.com/google.cloud.securitycenter.v2.ListMuteConfigsResponse"
19690    }
19691}
19692
19693#[doc(hidden)]
19694impl google_cloud_gax::paginator::internal::PageableResponse for ListMuteConfigsResponse {
19695    type PageItem = crate::model::MuteConfig;
19696
19697    fn items(self) -> std::vec::Vec<Self::PageItem> {
19698        self.mute_configs
19699    }
19700
19701    fn next_page_token(&self) -> std::string::String {
19702        use std::clone::Clone;
19703        self.next_page_token.clone()
19704    }
19705}
19706
19707/// Request message for listing notification configs.
19708#[derive(Clone, Default, PartialEq)]
19709#[non_exhaustive]
19710pub struct ListNotificationConfigsRequest {
19711    /// Required. The name of the parent in which to list the notification
19712    /// configurations. Its format is
19713    /// "organizations/[organization_id]/locations/[location_id]",
19714    /// "folders/[folder_id]/locations/[location_id]", or
19715    /// "projects/[project_id]/locations/[location_id]".
19716    pub parent: std::string::String,
19717
19718    /// The value returned by the last `ListNotificationConfigsResponse`; indicates
19719    /// that this is a continuation of a prior `ListNotificationConfigs` call, and
19720    /// that the system should return the next page of data.
19721    pub page_token: std::string::String,
19722
19723    /// The maximum number of results to return in a single response. Default is
19724    /// 10, minimum is 1, maximum is 1000.
19725    pub page_size: i32,
19726
19727    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19728}
19729
19730impl ListNotificationConfigsRequest {
19731    pub fn new() -> Self {
19732        std::default::Default::default()
19733    }
19734
19735    /// Sets the value of [parent][crate::model::ListNotificationConfigsRequest::parent].
19736    ///
19737    /// # Example
19738    /// ```ignore,no_run
19739    /// # use google_cloud_securitycenter_v2::model::ListNotificationConfigsRequest;
19740    /// let x = ListNotificationConfigsRequest::new().set_parent("example");
19741    /// ```
19742    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19743        self.parent = v.into();
19744        self
19745    }
19746
19747    /// Sets the value of [page_token][crate::model::ListNotificationConfigsRequest::page_token].
19748    ///
19749    /// # Example
19750    /// ```ignore,no_run
19751    /// # use google_cloud_securitycenter_v2::model::ListNotificationConfigsRequest;
19752    /// let x = ListNotificationConfigsRequest::new().set_page_token("example");
19753    /// ```
19754    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19755        self.page_token = v.into();
19756        self
19757    }
19758
19759    /// Sets the value of [page_size][crate::model::ListNotificationConfigsRequest::page_size].
19760    ///
19761    /// # Example
19762    /// ```ignore,no_run
19763    /// # use google_cloud_securitycenter_v2::model::ListNotificationConfigsRequest;
19764    /// let x = ListNotificationConfigsRequest::new().set_page_size(42);
19765    /// ```
19766    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19767        self.page_size = v.into();
19768        self
19769    }
19770}
19771
19772impl wkt::message::Message for ListNotificationConfigsRequest {
19773    fn typename() -> &'static str {
19774        "type.googleapis.com/google.cloud.securitycenter.v2.ListNotificationConfigsRequest"
19775    }
19776}
19777
19778/// Response message for listing notification configs.
19779#[derive(Clone, Default, PartialEq)]
19780#[non_exhaustive]
19781pub struct ListNotificationConfigsResponse {
19782    /// Notification configs belonging to the requested parent.
19783    pub notification_configs: std::vec::Vec<crate::model::NotificationConfig>,
19784
19785    /// Token to retrieve the next page of results, or empty if there are no more
19786    /// results.
19787    pub next_page_token: std::string::String,
19788
19789    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19790}
19791
19792impl ListNotificationConfigsResponse {
19793    pub fn new() -> Self {
19794        std::default::Default::default()
19795    }
19796
19797    /// Sets the value of [notification_configs][crate::model::ListNotificationConfigsResponse::notification_configs].
19798    ///
19799    /// # Example
19800    /// ```ignore,no_run
19801    /// # use google_cloud_securitycenter_v2::model::ListNotificationConfigsResponse;
19802    /// use google_cloud_securitycenter_v2::model::NotificationConfig;
19803    /// let x = ListNotificationConfigsResponse::new()
19804    ///     .set_notification_configs([
19805    ///         NotificationConfig::default()/* use setters */,
19806    ///         NotificationConfig::default()/* use (different) setters */,
19807    ///     ]);
19808    /// ```
19809    pub fn set_notification_configs<T, V>(mut self, v: T) -> Self
19810    where
19811        T: std::iter::IntoIterator<Item = V>,
19812        V: std::convert::Into<crate::model::NotificationConfig>,
19813    {
19814        use std::iter::Iterator;
19815        self.notification_configs = v.into_iter().map(|i| i.into()).collect();
19816        self
19817    }
19818
19819    /// Sets the value of [next_page_token][crate::model::ListNotificationConfigsResponse::next_page_token].
19820    ///
19821    /// # Example
19822    /// ```ignore,no_run
19823    /// # use google_cloud_securitycenter_v2::model::ListNotificationConfigsResponse;
19824    /// let x = ListNotificationConfigsResponse::new().set_next_page_token("example");
19825    /// ```
19826    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19827        self.next_page_token = v.into();
19828        self
19829    }
19830}
19831
19832impl wkt::message::Message for ListNotificationConfigsResponse {
19833    fn typename() -> &'static str {
19834        "type.googleapis.com/google.cloud.securitycenter.v2.ListNotificationConfigsResponse"
19835    }
19836}
19837
19838#[doc(hidden)]
19839impl google_cloud_gax::paginator::internal::PageableResponse for ListNotificationConfigsResponse {
19840    type PageItem = crate::model::NotificationConfig;
19841
19842    fn items(self) -> std::vec::Vec<Self::PageItem> {
19843        self.notification_configs
19844    }
19845
19846    fn next_page_token(&self) -> std::string::String {
19847        use std::clone::Clone;
19848        self.next_page_token.clone()
19849    }
19850}
19851
19852/// Request message to list resource value configs of a parent
19853#[derive(Clone, Default, PartialEq)]
19854#[non_exhaustive]
19855pub struct ListResourceValueConfigsRequest {
19856    /// Required. The parent, which owns the collection of resource value configs.
19857    /// Its format is
19858    /// `organizations/[organization_id]`
19859    pub parent: std::string::String,
19860
19861    /// The maximum number of configs to return. The service may return fewer than
19862    /// this value.
19863    /// If unspecified, at most 10 configs will be returned.
19864    /// The maximum value is 1000; values above 1000 will be coerced to 1000.
19865    pub page_size: i32,
19866
19867    /// A page token, received from a previous `ListResourceValueConfigs` call.
19868    /// Provide this to retrieve the subsequent page.
19869    ///
19870    /// When paginating, all other parameters provided to
19871    /// `ListResourceValueConfigs` must match the call that provided the
19872    /// page token.
19873    ///
19874    /// page_size can be specified, and the new page_size will be used.
19875    pub page_token: std::string::String,
19876
19877    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19878}
19879
19880impl ListResourceValueConfigsRequest {
19881    pub fn new() -> Self {
19882        std::default::Default::default()
19883    }
19884
19885    /// Sets the value of [parent][crate::model::ListResourceValueConfigsRequest::parent].
19886    ///
19887    /// # Example
19888    /// ```ignore,no_run
19889    /// # use google_cloud_securitycenter_v2::model::ListResourceValueConfigsRequest;
19890    /// let x = ListResourceValueConfigsRequest::new().set_parent("example");
19891    /// ```
19892    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19893        self.parent = v.into();
19894        self
19895    }
19896
19897    /// Sets the value of [page_size][crate::model::ListResourceValueConfigsRequest::page_size].
19898    ///
19899    /// # Example
19900    /// ```ignore,no_run
19901    /// # use google_cloud_securitycenter_v2::model::ListResourceValueConfigsRequest;
19902    /// let x = ListResourceValueConfigsRequest::new().set_page_size(42);
19903    /// ```
19904    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19905        self.page_size = v.into();
19906        self
19907    }
19908
19909    /// Sets the value of [page_token][crate::model::ListResourceValueConfigsRequest::page_token].
19910    ///
19911    /// # Example
19912    /// ```ignore,no_run
19913    /// # use google_cloud_securitycenter_v2::model::ListResourceValueConfigsRequest;
19914    /// let x = ListResourceValueConfigsRequest::new().set_page_token("example");
19915    /// ```
19916    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19917        self.page_token = v.into();
19918        self
19919    }
19920}
19921
19922impl wkt::message::Message for ListResourceValueConfigsRequest {
19923    fn typename() -> &'static str {
19924        "type.googleapis.com/google.cloud.securitycenter.v2.ListResourceValueConfigsRequest"
19925    }
19926}
19927
19928/// Response message to list resource value configs
19929#[derive(Clone, Default, PartialEq)]
19930#[non_exhaustive]
19931pub struct ListResourceValueConfigsResponse {
19932    /// The resource value configs from the specified parent.
19933    pub resource_value_configs: std::vec::Vec<crate::model::ResourceValueConfig>,
19934
19935    /// A token, which can be sent as `page_token` to retrieve the next page.
19936    /// If this field is empty, there are no subsequent pages.
19937    pub next_page_token: std::string::String,
19938
19939    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19940}
19941
19942impl ListResourceValueConfigsResponse {
19943    pub fn new() -> Self {
19944        std::default::Default::default()
19945    }
19946
19947    /// Sets the value of [resource_value_configs][crate::model::ListResourceValueConfigsResponse::resource_value_configs].
19948    ///
19949    /// # Example
19950    /// ```ignore,no_run
19951    /// # use google_cloud_securitycenter_v2::model::ListResourceValueConfigsResponse;
19952    /// use google_cloud_securitycenter_v2::model::ResourceValueConfig;
19953    /// let x = ListResourceValueConfigsResponse::new()
19954    ///     .set_resource_value_configs([
19955    ///         ResourceValueConfig::default()/* use setters */,
19956    ///         ResourceValueConfig::default()/* use (different) setters */,
19957    ///     ]);
19958    /// ```
19959    pub fn set_resource_value_configs<T, V>(mut self, v: T) -> Self
19960    where
19961        T: std::iter::IntoIterator<Item = V>,
19962        V: std::convert::Into<crate::model::ResourceValueConfig>,
19963    {
19964        use std::iter::Iterator;
19965        self.resource_value_configs = v.into_iter().map(|i| i.into()).collect();
19966        self
19967    }
19968
19969    /// Sets the value of [next_page_token][crate::model::ListResourceValueConfigsResponse::next_page_token].
19970    ///
19971    /// # Example
19972    /// ```ignore,no_run
19973    /// # use google_cloud_securitycenter_v2::model::ListResourceValueConfigsResponse;
19974    /// let x = ListResourceValueConfigsResponse::new().set_next_page_token("example");
19975    /// ```
19976    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19977        self.next_page_token = v.into();
19978        self
19979    }
19980}
19981
19982impl wkt::message::Message for ListResourceValueConfigsResponse {
19983    fn typename() -> &'static str {
19984        "type.googleapis.com/google.cloud.securitycenter.v2.ListResourceValueConfigsResponse"
19985    }
19986}
19987
19988#[doc(hidden)]
19989impl google_cloud_gax::paginator::internal::PageableResponse for ListResourceValueConfigsResponse {
19990    type PageItem = crate::model::ResourceValueConfig;
19991
19992    fn items(self) -> std::vec::Vec<Self::PageItem> {
19993        self.resource_value_configs
19994    }
19995
19996    fn next_page_token(&self) -> std::string::String {
19997        use std::clone::Clone;
19998        self.next_page_token.clone()
19999    }
20000}
20001
20002/// Request message for listing sources.
20003#[derive(Clone, Default, PartialEq)]
20004#[non_exhaustive]
20005pub struct ListSourcesRequest {
20006    /// Required. Resource name of the parent of sources to list. Its format should
20007    /// be `organizations/[organization_id]`, `folders/[folder_id]`, or
20008    /// `projects/[project_id]`.
20009    pub parent: std::string::String,
20010
20011    /// The value returned by the last `ListSourcesResponse`; indicates
20012    /// that this is a continuation of a prior `ListSources` call, and
20013    /// that the system should return the next page of data.
20014    pub page_token: std::string::String,
20015
20016    /// The maximum number of results to return in a single response. Default is
20017    /// 10, minimum is 1, maximum is 1000.
20018    pub page_size: i32,
20019
20020    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20021}
20022
20023impl ListSourcesRequest {
20024    pub fn new() -> Self {
20025        std::default::Default::default()
20026    }
20027
20028    /// Sets the value of [parent][crate::model::ListSourcesRequest::parent].
20029    ///
20030    /// # Example
20031    /// ```ignore,no_run
20032    /// # use google_cloud_securitycenter_v2::model::ListSourcesRequest;
20033    /// let x = ListSourcesRequest::new().set_parent("example");
20034    /// ```
20035    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20036        self.parent = v.into();
20037        self
20038    }
20039
20040    /// Sets the value of [page_token][crate::model::ListSourcesRequest::page_token].
20041    ///
20042    /// # Example
20043    /// ```ignore,no_run
20044    /// # use google_cloud_securitycenter_v2::model::ListSourcesRequest;
20045    /// let x = ListSourcesRequest::new().set_page_token("example");
20046    /// ```
20047    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20048        self.page_token = v.into();
20049        self
20050    }
20051
20052    /// Sets the value of [page_size][crate::model::ListSourcesRequest::page_size].
20053    ///
20054    /// # Example
20055    /// ```ignore,no_run
20056    /// # use google_cloud_securitycenter_v2::model::ListSourcesRequest;
20057    /// let x = ListSourcesRequest::new().set_page_size(42);
20058    /// ```
20059    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20060        self.page_size = v.into();
20061        self
20062    }
20063}
20064
20065impl wkt::message::Message for ListSourcesRequest {
20066    fn typename() -> &'static str {
20067        "type.googleapis.com/google.cloud.securitycenter.v2.ListSourcesRequest"
20068    }
20069}
20070
20071/// Response message for listing sources.
20072#[derive(Clone, Default, PartialEq)]
20073#[non_exhaustive]
20074pub struct ListSourcesResponse {
20075    /// Sources belonging to the requested parent.
20076    pub sources: std::vec::Vec<crate::model::Source>,
20077
20078    /// Token to retrieve the next page of results, or empty if there are no more
20079    /// results.
20080    pub next_page_token: std::string::String,
20081
20082    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20083}
20084
20085impl ListSourcesResponse {
20086    pub fn new() -> Self {
20087        std::default::Default::default()
20088    }
20089
20090    /// Sets the value of [sources][crate::model::ListSourcesResponse::sources].
20091    ///
20092    /// # Example
20093    /// ```ignore,no_run
20094    /// # use google_cloud_securitycenter_v2::model::ListSourcesResponse;
20095    /// use google_cloud_securitycenter_v2::model::Source;
20096    /// let x = ListSourcesResponse::new()
20097    ///     .set_sources([
20098    ///         Source::default()/* use setters */,
20099    ///         Source::default()/* use (different) setters */,
20100    ///     ]);
20101    /// ```
20102    pub fn set_sources<T, V>(mut self, v: T) -> Self
20103    where
20104        T: std::iter::IntoIterator<Item = V>,
20105        V: std::convert::Into<crate::model::Source>,
20106    {
20107        use std::iter::Iterator;
20108        self.sources = v.into_iter().map(|i| i.into()).collect();
20109        self
20110    }
20111
20112    /// Sets the value of [next_page_token][crate::model::ListSourcesResponse::next_page_token].
20113    ///
20114    /// # Example
20115    /// ```ignore,no_run
20116    /// # use google_cloud_securitycenter_v2::model::ListSourcesResponse;
20117    /// let x = ListSourcesResponse::new().set_next_page_token("example");
20118    /// ```
20119    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20120        self.next_page_token = v.into();
20121        self
20122    }
20123}
20124
20125impl wkt::message::Message for ListSourcesResponse {
20126    fn typename() -> &'static str {
20127        "type.googleapis.com/google.cloud.securitycenter.v2.ListSourcesResponse"
20128    }
20129}
20130
20131#[doc(hidden)]
20132impl google_cloud_gax::paginator::internal::PageableResponse for ListSourcesResponse {
20133    type PageItem = crate::model::Source;
20134
20135    fn items(self) -> std::vec::Vec<Self::PageItem> {
20136        self.sources
20137    }
20138
20139    fn next_page_token(&self) -> std::string::String {
20140        use std::clone::Clone;
20141        self.next_page_token.clone()
20142    }
20143}
20144
20145/// Request message for listing the valued resources for a given simulation.
20146#[derive(Clone, Default, PartialEq)]
20147#[non_exhaustive]
20148pub struct ListValuedResourcesRequest {
20149    /// Required. Name of parent to list exposed resources.
20150    ///
20151    /// Valid formats:
20152    /// `organizations/{organization}`,
20153    /// `organizations/{organization}/simulations/{simulation}`
20154    /// `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
20155    pub parent: std::string::String,
20156
20157    /// The filter expression that filters the valued resources in the response.
20158    /// Supported fields:
20159    ///
20160    /// * `resource_value` supports =
20161    /// * `resource_type` supports =
20162    pub filter: std::string::String,
20163
20164    /// The value returned by the last `ListValuedResourcesResponse`; indicates
20165    /// that this is a continuation of a prior `ListValuedResources` call, and
20166    /// that the system should return the next page of data.
20167    pub page_token: std::string::String,
20168
20169    /// The maximum number of results to return in a single response. Default is
20170    /// 10, minimum is 1, maximum is 1000.
20171    pub page_size: i32,
20172
20173    /// Optional. The fields by which to order the valued resources response.
20174    ///
20175    /// Supported fields:
20176    ///
20177    /// * `exposed_score`
20178    ///
20179    /// * `resource_value`
20180    ///
20181    /// * `resource_type`
20182    ///
20183    ///
20184    /// Values should be a comma separated list of fields. For example:
20185    /// `exposed_score,resource_value`.
20186    ///
20187    /// The default sorting order is descending. To specify ascending or descending
20188    /// order for a field, append a " ASC" or a " DESC" suffix, respectively; for
20189    /// example: `exposed_score DESC`.
20190    pub order_by: std::string::String,
20191
20192    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20193}
20194
20195impl ListValuedResourcesRequest {
20196    pub fn new() -> Self {
20197        std::default::Default::default()
20198    }
20199
20200    /// Sets the value of [parent][crate::model::ListValuedResourcesRequest::parent].
20201    ///
20202    /// # Example
20203    /// ```ignore,no_run
20204    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesRequest;
20205    /// let x = ListValuedResourcesRequest::new().set_parent("example");
20206    /// ```
20207    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20208        self.parent = v.into();
20209        self
20210    }
20211
20212    /// Sets the value of [filter][crate::model::ListValuedResourcesRequest::filter].
20213    ///
20214    /// # Example
20215    /// ```ignore,no_run
20216    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesRequest;
20217    /// let x = ListValuedResourcesRequest::new().set_filter("example");
20218    /// ```
20219    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20220        self.filter = v.into();
20221        self
20222    }
20223
20224    /// Sets the value of [page_token][crate::model::ListValuedResourcesRequest::page_token].
20225    ///
20226    /// # Example
20227    /// ```ignore,no_run
20228    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesRequest;
20229    /// let x = ListValuedResourcesRequest::new().set_page_token("example");
20230    /// ```
20231    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20232        self.page_token = v.into();
20233        self
20234    }
20235
20236    /// Sets the value of [page_size][crate::model::ListValuedResourcesRequest::page_size].
20237    ///
20238    /// # Example
20239    /// ```ignore,no_run
20240    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesRequest;
20241    /// let x = ListValuedResourcesRequest::new().set_page_size(42);
20242    /// ```
20243    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20244        self.page_size = v.into();
20245        self
20246    }
20247
20248    /// Sets the value of [order_by][crate::model::ListValuedResourcesRequest::order_by].
20249    ///
20250    /// # Example
20251    /// ```ignore,no_run
20252    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesRequest;
20253    /// let x = ListValuedResourcesRequest::new().set_order_by("example");
20254    /// ```
20255    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20256        self.order_by = v.into();
20257        self
20258    }
20259}
20260
20261impl wkt::message::Message for ListValuedResourcesRequest {
20262    fn typename() -> &'static str {
20263        "type.googleapis.com/google.cloud.securitycenter.v2.ListValuedResourcesRequest"
20264    }
20265}
20266
20267/// Response message for listing the valued resources for a given simulation.
20268#[derive(Clone, Default, PartialEq)]
20269#[non_exhaustive]
20270pub struct ListValuedResourcesResponse {
20271    /// The valued resources that the attack path simulation identified.
20272    pub valued_resources: std::vec::Vec<crate::model::ValuedResource>,
20273
20274    /// Token to retrieve the next page of results, or empty if there are no more
20275    /// results.
20276    pub next_page_token: std::string::String,
20277
20278    /// The estimated total number of results matching the query.
20279    pub total_size: i32,
20280
20281    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20282}
20283
20284impl ListValuedResourcesResponse {
20285    pub fn new() -> Self {
20286        std::default::Default::default()
20287    }
20288
20289    /// Sets the value of [valued_resources][crate::model::ListValuedResourcesResponse::valued_resources].
20290    ///
20291    /// # Example
20292    /// ```ignore,no_run
20293    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesResponse;
20294    /// use google_cloud_securitycenter_v2::model::ValuedResource;
20295    /// let x = ListValuedResourcesResponse::new()
20296    ///     .set_valued_resources([
20297    ///         ValuedResource::default()/* use setters */,
20298    ///         ValuedResource::default()/* use (different) setters */,
20299    ///     ]);
20300    /// ```
20301    pub fn set_valued_resources<T, V>(mut self, v: T) -> Self
20302    where
20303        T: std::iter::IntoIterator<Item = V>,
20304        V: std::convert::Into<crate::model::ValuedResource>,
20305    {
20306        use std::iter::Iterator;
20307        self.valued_resources = v.into_iter().map(|i| i.into()).collect();
20308        self
20309    }
20310
20311    /// Sets the value of [next_page_token][crate::model::ListValuedResourcesResponse::next_page_token].
20312    ///
20313    /// # Example
20314    /// ```ignore,no_run
20315    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesResponse;
20316    /// let x = ListValuedResourcesResponse::new().set_next_page_token("example");
20317    /// ```
20318    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20319        self.next_page_token = v.into();
20320        self
20321    }
20322
20323    /// Sets the value of [total_size][crate::model::ListValuedResourcesResponse::total_size].
20324    ///
20325    /// # Example
20326    /// ```ignore,no_run
20327    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesResponse;
20328    /// let x = ListValuedResourcesResponse::new().set_total_size(42);
20329    /// ```
20330    pub fn set_total_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20331        self.total_size = v.into();
20332        self
20333    }
20334}
20335
20336impl wkt::message::Message for ListValuedResourcesResponse {
20337    fn typename() -> &'static str {
20338        "type.googleapis.com/google.cloud.securitycenter.v2.ListValuedResourcesResponse"
20339    }
20340}
20341
20342#[doc(hidden)]
20343impl google_cloud_gax::paginator::internal::PageableResponse for ListValuedResourcesResponse {
20344    type PageItem = crate::model::ValuedResource;
20345
20346    fn items(self) -> std::vec::Vec<Self::PageItem> {
20347        self.valued_resources
20348    }
20349
20350    fn next_page_token(&self) -> std::string::String {
20351        use std::clone::Clone;
20352        self.next_page_token.clone()
20353    }
20354}
20355
20356/// Request message for updating a finding's state.
20357#[derive(Clone, Default, PartialEq)]
20358#[non_exhaustive]
20359pub struct SetFindingStateRequest {
20360    /// Required. The [relative resource
20361    /// name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
20362    /// of the finding. If no location is specified, finding is assumed to be in
20363    /// global. The following list shows some examples:
20364    ///
20365    ///
20366    /// `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
20367    /// +
20368    /// `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
20369    ///
20370    /// + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
20371    ///
20372    /// `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
20373    ///
20374    /// + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
20375    ///
20376    /// `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
20377    pub name: std::string::String,
20378
20379    /// Required. The desired State of the finding.
20380    pub state: crate::model::finding::State,
20381
20382    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20383}
20384
20385impl SetFindingStateRequest {
20386    pub fn new() -> Self {
20387        std::default::Default::default()
20388    }
20389
20390    /// Sets the value of [name][crate::model::SetFindingStateRequest::name].
20391    ///
20392    /// # Example
20393    /// ```ignore,no_run
20394    /// # use google_cloud_securitycenter_v2::model::SetFindingStateRequest;
20395    /// let x = SetFindingStateRequest::new().set_name("example");
20396    /// ```
20397    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20398        self.name = v.into();
20399        self
20400    }
20401
20402    /// Sets the value of [state][crate::model::SetFindingStateRequest::state].
20403    ///
20404    /// # Example
20405    /// ```ignore,no_run
20406    /// # use google_cloud_securitycenter_v2::model::SetFindingStateRequest;
20407    /// use google_cloud_securitycenter_v2::model::finding::State;
20408    /// let x0 = SetFindingStateRequest::new().set_state(State::Active);
20409    /// let x1 = SetFindingStateRequest::new().set_state(State::Inactive);
20410    /// ```
20411    pub fn set_state<T: std::convert::Into<crate::model::finding::State>>(mut self, v: T) -> Self {
20412        self.state = v.into();
20413        self
20414    }
20415}
20416
20417impl wkt::message::Message for SetFindingStateRequest {
20418    fn typename() -> &'static str {
20419        "type.googleapis.com/google.cloud.securitycenter.v2.SetFindingStateRequest"
20420    }
20421}
20422
20423/// Request message for updating a finding's mute status.
20424#[derive(Clone, Default, PartialEq)]
20425#[non_exhaustive]
20426pub struct SetMuteRequest {
20427    /// Required. The [relative resource
20428    /// name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
20429    /// of the finding. If no location is specified, finding is assumed to be in
20430    /// global. The following list shows some examples:
20431    ///
20432    ///
20433    /// `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
20434    /// +
20435    /// `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
20436    ///
20437    /// + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
20438    ///
20439    /// `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
20440    ///
20441    /// + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
20442    ///
20443    /// `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
20444    pub name: std::string::String,
20445
20446    /// Required. The desired state of the Mute.
20447    pub mute: crate::model::finding::Mute,
20448
20449    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20450}
20451
20452impl SetMuteRequest {
20453    pub fn new() -> Self {
20454        std::default::Default::default()
20455    }
20456
20457    /// Sets the value of [name][crate::model::SetMuteRequest::name].
20458    ///
20459    /// # Example
20460    /// ```ignore,no_run
20461    /// # use google_cloud_securitycenter_v2::model::SetMuteRequest;
20462    /// let x = SetMuteRequest::new().set_name("example");
20463    /// ```
20464    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20465        self.name = v.into();
20466        self
20467    }
20468
20469    /// Sets the value of [mute][crate::model::SetMuteRequest::mute].
20470    ///
20471    /// # Example
20472    /// ```ignore,no_run
20473    /// # use google_cloud_securitycenter_v2::model::SetMuteRequest;
20474    /// use google_cloud_securitycenter_v2::model::finding::Mute;
20475    /// let x0 = SetMuteRequest::new().set_mute(Mute::Muted);
20476    /// let x1 = SetMuteRequest::new().set_mute(Mute::Unmuted);
20477    /// let x2 = SetMuteRequest::new().set_mute(Mute::Undefined);
20478    /// ```
20479    pub fn set_mute<T: std::convert::Into<crate::model::finding::Mute>>(mut self, v: T) -> Self {
20480        self.mute = v.into();
20481        self
20482    }
20483}
20484
20485impl wkt::message::Message for SetMuteRequest {
20486    fn typename() -> &'static str {
20487        "type.googleapis.com/google.cloud.securitycenter.v2.SetMuteRequest"
20488    }
20489}
20490
20491/// Request message for updating a BigQuery export.
20492#[derive(Clone, Default, PartialEq)]
20493#[non_exhaustive]
20494pub struct UpdateBigQueryExportRequest {
20495    /// Required. The BigQuery export being updated.
20496    pub big_query_export: std::option::Option<crate::model::BigQueryExport>,
20497
20498    /// The list of fields to be updated.
20499    /// If empty all mutable fields will be updated.
20500    pub update_mask: std::option::Option<wkt::FieldMask>,
20501
20502    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20503}
20504
20505impl UpdateBigQueryExportRequest {
20506    pub fn new() -> Self {
20507        std::default::Default::default()
20508    }
20509
20510    /// Sets the value of [big_query_export][crate::model::UpdateBigQueryExportRequest::big_query_export].
20511    ///
20512    /// # Example
20513    /// ```ignore,no_run
20514    /// # use google_cloud_securitycenter_v2::model::UpdateBigQueryExportRequest;
20515    /// use google_cloud_securitycenter_v2::model::BigQueryExport;
20516    /// let x = UpdateBigQueryExportRequest::new().set_big_query_export(BigQueryExport::default()/* use setters */);
20517    /// ```
20518    pub fn set_big_query_export<T>(mut self, v: T) -> Self
20519    where
20520        T: std::convert::Into<crate::model::BigQueryExport>,
20521    {
20522        self.big_query_export = std::option::Option::Some(v.into());
20523        self
20524    }
20525
20526    /// Sets or clears the value of [big_query_export][crate::model::UpdateBigQueryExportRequest::big_query_export].
20527    ///
20528    /// # Example
20529    /// ```ignore,no_run
20530    /// # use google_cloud_securitycenter_v2::model::UpdateBigQueryExportRequest;
20531    /// use google_cloud_securitycenter_v2::model::BigQueryExport;
20532    /// let x = UpdateBigQueryExportRequest::new().set_or_clear_big_query_export(Some(BigQueryExport::default()/* use setters */));
20533    /// let x = UpdateBigQueryExportRequest::new().set_or_clear_big_query_export(None::<BigQueryExport>);
20534    /// ```
20535    pub fn set_or_clear_big_query_export<T>(mut self, v: std::option::Option<T>) -> Self
20536    where
20537        T: std::convert::Into<crate::model::BigQueryExport>,
20538    {
20539        self.big_query_export = v.map(|x| x.into());
20540        self
20541    }
20542
20543    /// Sets the value of [update_mask][crate::model::UpdateBigQueryExportRequest::update_mask].
20544    ///
20545    /// # Example
20546    /// ```ignore,no_run
20547    /// # use google_cloud_securitycenter_v2::model::UpdateBigQueryExportRequest;
20548    /// use wkt::FieldMask;
20549    /// let x = UpdateBigQueryExportRequest::new().set_update_mask(FieldMask::default()/* use setters */);
20550    /// ```
20551    pub fn set_update_mask<T>(mut self, v: T) -> Self
20552    where
20553        T: std::convert::Into<wkt::FieldMask>,
20554    {
20555        self.update_mask = std::option::Option::Some(v.into());
20556        self
20557    }
20558
20559    /// Sets or clears the value of [update_mask][crate::model::UpdateBigQueryExportRequest::update_mask].
20560    ///
20561    /// # Example
20562    /// ```ignore,no_run
20563    /// # use google_cloud_securitycenter_v2::model::UpdateBigQueryExportRequest;
20564    /// use wkt::FieldMask;
20565    /// let x = UpdateBigQueryExportRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
20566    /// let x = UpdateBigQueryExportRequest::new().set_or_clear_update_mask(None::<FieldMask>);
20567    /// ```
20568    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
20569    where
20570        T: std::convert::Into<wkt::FieldMask>,
20571    {
20572        self.update_mask = v.map(|x| x.into());
20573        self
20574    }
20575}
20576
20577impl wkt::message::Message for UpdateBigQueryExportRequest {
20578    fn typename() -> &'static str {
20579        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateBigQueryExportRequest"
20580    }
20581}
20582
20583/// Request message for updating a ExternalSystem resource.
20584#[derive(Clone, Default, PartialEq)]
20585#[non_exhaustive]
20586pub struct UpdateExternalSystemRequest {
20587    /// Required. The external system resource to update.
20588    pub external_system: std::option::Option<crate::model::ExternalSystem>,
20589
20590    /// The FieldMask to use when updating the external system resource.
20591    ///
20592    /// If empty all mutable fields will be updated.
20593    pub update_mask: std::option::Option<wkt::FieldMask>,
20594
20595    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20596}
20597
20598impl UpdateExternalSystemRequest {
20599    pub fn new() -> Self {
20600        std::default::Default::default()
20601    }
20602
20603    /// Sets the value of [external_system][crate::model::UpdateExternalSystemRequest::external_system].
20604    ///
20605    /// # Example
20606    /// ```ignore,no_run
20607    /// # use google_cloud_securitycenter_v2::model::UpdateExternalSystemRequest;
20608    /// use google_cloud_securitycenter_v2::model::ExternalSystem;
20609    /// let x = UpdateExternalSystemRequest::new().set_external_system(ExternalSystem::default()/* use setters */);
20610    /// ```
20611    pub fn set_external_system<T>(mut self, v: T) -> Self
20612    where
20613        T: std::convert::Into<crate::model::ExternalSystem>,
20614    {
20615        self.external_system = std::option::Option::Some(v.into());
20616        self
20617    }
20618
20619    /// Sets or clears the value of [external_system][crate::model::UpdateExternalSystemRequest::external_system].
20620    ///
20621    /// # Example
20622    /// ```ignore,no_run
20623    /// # use google_cloud_securitycenter_v2::model::UpdateExternalSystemRequest;
20624    /// use google_cloud_securitycenter_v2::model::ExternalSystem;
20625    /// let x = UpdateExternalSystemRequest::new().set_or_clear_external_system(Some(ExternalSystem::default()/* use setters */));
20626    /// let x = UpdateExternalSystemRequest::new().set_or_clear_external_system(None::<ExternalSystem>);
20627    /// ```
20628    pub fn set_or_clear_external_system<T>(mut self, v: std::option::Option<T>) -> Self
20629    where
20630        T: std::convert::Into<crate::model::ExternalSystem>,
20631    {
20632        self.external_system = v.map(|x| x.into());
20633        self
20634    }
20635
20636    /// Sets the value of [update_mask][crate::model::UpdateExternalSystemRequest::update_mask].
20637    ///
20638    /// # Example
20639    /// ```ignore,no_run
20640    /// # use google_cloud_securitycenter_v2::model::UpdateExternalSystemRequest;
20641    /// use wkt::FieldMask;
20642    /// let x = UpdateExternalSystemRequest::new().set_update_mask(FieldMask::default()/* use setters */);
20643    /// ```
20644    pub fn set_update_mask<T>(mut self, v: T) -> Self
20645    where
20646        T: std::convert::Into<wkt::FieldMask>,
20647    {
20648        self.update_mask = std::option::Option::Some(v.into());
20649        self
20650    }
20651
20652    /// Sets or clears the value of [update_mask][crate::model::UpdateExternalSystemRequest::update_mask].
20653    ///
20654    /// # Example
20655    /// ```ignore,no_run
20656    /// # use google_cloud_securitycenter_v2::model::UpdateExternalSystemRequest;
20657    /// use wkt::FieldMask;
20658    /// let x = UpdateExternalSystemRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
20659    /// let x = UpdateExternalSystemRequest::new().set_or_clear_update_mask(None::<FieldMask>);
20660    /// ```
20661    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
20662    where
20663        T: std::convert::Into<wkt::FieldMask>,
20664    {
20665        self.update_mask = v.map(|x| x.into());
20666        self
20667    }
20668}
20669
20670impl wkt::message::Message for UpdateExternalSystemRequest {
20671    fn typename() -> &'static str {
20672        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateExternalSystemRequest"
20673    }
20674}
20675
20676/// Request message for updating or creating a finding.
20677#[derive(Clone, Default, PartialEq)]
20678#[non_exhaustive]
20679pub struct UpdateFindingRequest {
20680    /// Required. The finding resource to update or create if it does not already
20681    /// exist. parent, security_marks, and update_time will be ignored.
20682    ///
20683    /// In the case of creation, the finding id portion of the name must be
20684    /// alphanumeric and less than or equal to 32 characters and greater than 0
20685    /// characters in length.
20686    pub finding: std::option::Option<crate::model::Finding>,
20687
20688    /// The FieldMask to use when updating the finding resource. This field should
20689    /// not be specified when creating a finding.
20690    ///
20691    /// When updating a finding, an empty mask is treated as updating all mutable
20692    /// fields and replacing source_properties.  Individual source_properties can
20693    /// be added/updated by using "source_properties.\<property key\>" in the field
20694    /// mask.
20695    pub update_mask: std::option::Option<wkt::FieldMask>,
20696
20697    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20698}
20699
20700impl UpdateFindingRequest {
20701    pub fn new() -> Self {
20702        std::default::Default::default()
20703    }
20704
20705    /// Sets the value of [finding][crate::model::UpdateFindingRequest::finding].
20706    ///
20707    /// # Example
20708    /// ```ignore,no_run
20709    /// # use google_cloud_securitycenter_v2::model::UpdateFindingRequest;
20710    /// use google_cloud_securitycenter_v2::model::Finding;
20711    /// let x = UpdateFindingRequest::new().set_finding(Finding::default()/* use setters */);
20712    /// ```
20713    pub fn set_finding<T>(mut self, v: T) -> Self
20714    where
20715        T: std::convert::Into<crate::model::Finding>,
20716    {
20717        self.finding = std::option::Option::Some(v.into());
20718        self
20719    }
20720
20721    /// Sets or clears the value of [finding][crate::model::UpdateFindingRequest::finding].
20722    ///
20723    /// # Example
20724    /// ```ignore,no_run
20725    /// # use google_cloud_securitycenter_v2::model::UpdateFindingRequest;
20726    /// use google_cloud_securitycenter_v2::model::Finding;
20727    /// let x = UpdateFindingRequest::new().set_or_clear_finding(Some(Finding::default()/* use setters */));
20728    /// let x = UpdateFindingRequest::new().set_or_clear_finding(None::<Finding>);
20729    /// ```
20730    pub fn set_or_clear_finding<T>(mut self, v: std::option::Option<T>) -> Self
20731    where
20732        T: std::convert::Into<crate::model::Finding>,
20733    {
20734        self.finding = v.map(|x| x.into());
20735        self
20736    }
20737
20738    /// Sets the value of [update_mask][crate::model::UpdateFindingRequest::update_mask].
20739    ///
20740    /// # Example
20741    /// ```ignore,no_run
20742    /// # use google_cloud_securitycenter_v2::model::UpdateFindingRequest;
20743    /// use wkt::FieldMask;
20744    /// let x = UpdateFindingRequest::new().set_update_mask(FieldMask::default()/* use setters */);
20745    /// ```
20746    pub fn set_update_mask<T>(mut self, v: T) -> Self
20747    where
20748        T: std::convert::Into<wkt::FieldMask>,
20749    {
20750        self.update_mask = std::option::Option::Some(v.into());
20751        self
20752    }
20753
20754    /// Sets or clears the value of [update_mask][crate::model::UpdateFindingRequest::update_mask].
20755    ///
20756    /// # Example
20757    /// ```ignore,no_run
20758    /// # use google_cloud_securitycenter_v2::model::UpdateFindingRequest;
20759    /// use wkt::FieldMask;
20760    /// let x = UpdateFindingRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
20761    /// let x = UpdateFindingRequest::new().set_or_clear_update_mask(None::<FieldMask>);
20762    /// ```
20763    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
20764    where
20765        T: std::convert::Into<wkt::FieldMask>,
20766    {
20767        self.update_mask = v.map(|x| x.into());
20768        self
20769    }
20770}
20771
20772impl wkt::message::Message for UpdateFindingRequest {
20773    fn typename() -> &'static str {
20774        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateFindingRequest"
20775    }
20776}
20777
20778/// Request message for updating a mute config.
20779#[derive(Clone, Default, PartialEq)]
20780#[non_exhaustive]
20781pub struct UpdateMuteConfigRequest {
20782    /// Required. The mute config being updated.
20783    pub mute_config: std::option::Option<crate::model::MuteConfig>,
20784
20785    /// The list of fields to be updated.
20786    /// If empty all mutable fields will be updated.
20787    pub update_mask: std::option::Option<wkt::FieldMask>,
20788
20789    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20790}
20791
20792impl UpdateMuteConfigRequest {
20793    pub fn new() -> Self {
20794        std::default::Default::default()
20795    }
20796
20797    /// Sets the value of [mute_config][crate::model::UpdateMuteConfigRequest::mute_config].
20798    ///
20799    /// # Example
20800    /// ```ignore,no_run
20801    /// # use google_cloud_securitycenter_v2::model::UpdateMuteConfigRequest;
20802    /// use google_cloud_securitycenter_v2::model::MuteConfig;
20803    /// let x = UpdateMuteConfigRequest::new().set_mute_config(MuteConfig::default()/* use setters */);
20804    /// ```
20805    pub fn set_mute_config<T>(mut self, v: T) -> Self
20806    where
20807        T: std::convert::Into<crate::model::MuteConfig>,
20808    {
20809        self.mute_config = std::option::Option::Some(v.into());
20810        self
20811    }
20812
20813    /// Sets or clears the value of [mute_config][crate::model::UpdateMuteConfigRequest::mute_config].
20814    ///
20815    /// # Example
20816    /// ```ignore,no_run
20817    /// # use google_cloud_securitycenter_v2::model::UpdateMuteConfigRequest;
20818    /// use google_cloud_securitycenter_v2::model::MuteConfig;
20819    /// let x = UpdateMuteConfigRequest::new().set_or_clear_mute_config(Some(MuteConfig::default()/* use setters */));
20820    /// let x = UpdateMuteConfigRequest::new().set_or_clear_mute_config(None::<MuteConfig>);
20821    /// ```
20822    pub fn set_or_clear_mute_config<T>(mut self, v: std::option::Option<T>) -> Self
20823    where
20824        T: std::convert::Into<crate::model::MuteConfig>,
20825    {
20826        self.mute_config = v.map(|x| x.into());
20827        self
20828    }
20829
20830    /// Sets the value of [update_mask][crate::model::UpdateMuteConfigRequest::update_mask].
20831    ///
20832    /// # Example
20833    /// ```ignore,no_run
20834    /// # use google_cloud_securitycenter_v2::model::UpdateMuteConfigRequest;
20835    /// use wkt::FieldMask;
20836    /// let x = UpdateMuteConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
20837    /// ```
20838    pub fn set_update_mask<T>(mut self, v: T) -> Self
20839    where
20840        T: std::convert::Into<wkt::FieldMask>,
20841    {
20842        self.update_mask = std::option::Option::Some(v.into());
20843        self
20844    }
20845
20846    /// Sets or clears the value of [update_mask][crate::model::UpdateMuteConfigRequest::update_mask].
20847    ///
20848    /// # Example
20849    /// ```ignore,no_run
20850    /// # use google_cloud_securitycenter_v2::model::UpdateMuteConfigRequest;
20851    /// use wkt::FieldMask;
20852    /// let x = UpdateMuteConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
20853    /// let x = UpdateMuteConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
20854    /// ```
20855    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
20856    where
20857        T: std::convert::Into<wkt::FieldMask>,
20858    {
20859        self.update_mask = v.map(|x| x.into());
20860        self
20861    }
20862}
20863
20864impl wkt::message::Message for UpdateMuteConfigRequest {
20865    fn typename() -> &'static str {
20866        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateMuteConfigRequest"
20867    }
20868}
20869
20870/// Request message for updating a notification config.
20871#[derive(Clone, Default, PartialEq)]
20872#[non_exhaustive]
20873pub struct UpdateNotificationConfigRequest {
20874    /// Required. The notification config to update.
20875    pub notification_config: std::option::Option<crate::model::NotificationConfig>,
20876
20877    /// The FieldMask to use when updating the notification config.
20878    ///
20879    /// If empty all mutable fields will be updated.
20880    pub update_mask: std::option::Option<wkt::FieldMask>,
20881
20882    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20883}
20884
20885impl UpdateNotificationConfigRequest {
20886    pub fn new() -> Self {
20887        std::default::Default::default()
20888    }
20889
20890    /// Sets the value of [notification_config][crate::model::UpdateNotificationConfigRequest::notification_config].
20891    ///
20892    /// # Example
20893    /// ```ignore,no_run
20894    /// # use google_cloud_securitycenter_v2::model::UpdateNotificationConfigRequest;
20895    /// use google_cloud_securitycenter_v2::model::NotificationConfig;
20896    /// let x = UpdateNotificationConfigRequest::new().set_notification_config(NotificationConfig::default()/* use setters */);
20897    /// ```
20898    pub fn set_notification_config<T>(mut self, v: T) -> Self
20899    where
20900        T: std::convert::Into<crate::model::NotificationConfig>,
20901    {
20902        self.notification_config = std::option::Option::Some(v.into());
20903        self
20904    }
20905
20906    /// Sets or clears the value of [notification_config][crate::model::UpdateNotificationConfigRequest::notification_config].
20907    ///
20908    /// # Example
20909    /// ```ignore,no_run
20910    /// # use google_cloud_securitycenter_v2::model::UpdateNotificationConfigRequest;
20911    /// use google_cloud_securitycenter_v2::model::NotificationConfig;
20912    /// let x = UpdateNotificationConfigRequest::new().set_or_clear_notification_config(Some(NotificationConfig::default()/* use setters */));
20913    /// let x = UpdateNotificationConfigRequest::new().set_or_clear_notification_config(None::<NotificationConfig>);
20914    /// ```
20915    pub fn set_or_clear_notification_config<T>(mut self, v: std::option::Option<T>) -> Self
20916    where
20917        T: std::convert::Into<crate::model::NotificationConfig>,
20918    {
20919        self.notification_config = v.map(|x| x.into());
20920        self
20921    }
20922
20923    /// Sets the value of [update_mask][crate::model::UpdateNotificationConfigRequest::update_mask].
20924    ///
20925    /// # Example
20926    /// ```ignore,no_run
20927    /// # use google_cloud_securitycenter_v2::model::UpdateNotificationConfigRequest;
20928    /// use wkt::FieldMask;
20929    /// let x = UpdateNotificationConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
20930    /// ```
20931    pub fn set_update_mask<T>(mut self, v: T) -> Self
20932    where
20933        T: std::convert::Into<wkt::FieldMask>,
20934    {
20935        self.update_mask = std::option::Option::Some(v.into());
20936        self
20937    }
20938
20939    /// Sets or clears the value of [update_mask][crate::model::UpdateNotificationConfigRequest::update_mask].
20940    ///
20941    /// # Example
20942    /// ```ignore,no_run
20943    /// # use google_cloud_securitycenter_v2::model::UpdateNotificationConfigRequest;
20944    /// use wkt::FieldMask;
20945    /// let x = UpdateNotificationConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
20946    /// let x = UpdateNotificationConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
20947    /// ```
20948    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
20949    where
20950        T: std::convert::Into<wkt::FieldMask>,
20951    {
20952        self.update_mask = v.map(|x| x.into());
20953        self
20954    }
20955}
20956
20957impl wkt::message::Message for UpdateNotificationConfigRequest {
20958    fn typename() -> &'static str {
20959        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateNotificationConfigRequest"
20960    }
20961}
20962
20963/// Request message to update resource value config
20964#[derive(Clone, Default, PartialEq)]
20965#[non_exhaustive]
20966pub struct UpdateResourceValueConfigRequest {
20967    /// Required. The resource value config being updated.
20968    pub resource_value_config: std::option::Option<crate::model::ResourceValueConfig>,
20969
20970    /// The list of fields to be updated.
20971    /// If empty all mutable fields will be updated.
20972    ///
20973    /// To update nested fields, include the top level field in the mask
20974    /// For example, to update gcp_metadata.resource_type, include the
20975    /// "gcp_metadata" field mask
20976    pub update_mask: std::option::Option<wkt::FieldMask>,
20977
20978    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20979}
20980
20981impl UpdateResourceValueConfigRequest {
20982    pub fn new() -> Self {
20983        std::default::Default::default()
20984    }
20985
20986    /// Sets the value of [resource_value_config][crate::model::UpdateResourceValueConfigRequest::resource_value_config].
20987    ///
20988    /// # Example
20989    /// ```ignore,no_run
20990    /// # use google_cloud_securitycenter_v2::model::UpdateResourceValueConfigRequest;
20991    /// use google_cloud_securitycenter_v2::model::ResourceValueConfig;
20992    /// let x = UpdateResourceValueConfigRequest::new().set_resource_value_config(ResourceValueConfig::default()/* use setters */);
20993    /// ```
20994    pub fn set_resource_value_config<T>(mut self, v: T) -> Self
20995    where
20996        T: std::convert::Into<crate::model::ResourceValueConfig>,
20997    {
20998        self.resource_value_config = std::option::Option::Some(v.into());
20999        self
21000    }
21001
21002    /// Sets or clears the value of [resource_value_config][crate::model::UpdateResourceValueConfigRequest::resource_value_config].
21003    ///
21004    /// # Example
21005    /// ```ignore,no_run
21006    /// # use google_cloud_securitycenter_v2::model::UpdateResourceValueConfigRequest;
21007    /// use google_cloud_securitycenter_v2::model::ResourceValueConfig;
21008    /// let x = UpdateResourceValueConfigRequest::new().set_or_clear_resource_value_config(Some(ResourceValueConfig::default()/* use setters */));
21009    /// let x = UpdateResourceValueConfigRequest::new().set_or_clear_resource_value_config(None::<ResourceValueConfig>);
21010    /// ```
21011    pub fn set_or_clear_resource_value_config<T>(mut self, v: std::option::Option<T>) -> Self
21012    where
21013        T: std::convert::Into<crate::model::ResourceValueConfig>,
21014    {
21015        self.resource_value_config = v.map(|x| x.into());
21016        self
21017    }
21018
21019    /// Sets the value of [update_mask][crate::model::UpdateResourceValueConfigRequest::update_mask].
21020    ///
21021    /// # Example
21022    /// ```ignore,no_run
21023    /// # use google_cloud_securitycenter_v2::model::UpdateResourceValueConfigRequest;
21024    /// use wkt::FieldMask;
21025    /// let x = UpdateResourceValueConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21026    /// ```
21027    pub fn set_update_mask<T>(mut self, v: T) -> Self
21028    where
21029        T: std::convert::Into<wkt::FieldMask>,
21030    {
21031        self.update_mask = std::option::Option::Some(v.into());
21032        self
21033    }
21034
21035    /// Sets or clears the value of [update_mask][crate::model::UpdateResourceValueConfigRequest::update_mask].
21036    ///
21037    /// # Example
21038    /// ```ignore,no_run
21039    /// # use google_cloud_securitycenter_v2::model::UpdateResourceValueConfigRequest;
21040    /// use wkt::FieldMask;
21041    /// let x = UpdateResourceValueConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21042    /// let x = UpdateResourceValueConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21043    /// ```
21044    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21045    where
21046        T: std::convert::Into<wkt::FieldMask>,
21047    {
21048        self.update_mask = v.map(|x| x.into());
21049        self
21050    }
21051}
21052
21053impl wkt::message::Message for UpdateResourceValueConfigRequest {
21054    fn typename() -> &'static str {
21055        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest"
21056    }
21057}
21058
21059/// Request message for updating a SecurityMarks resource.
21060#[derive(Clone, Default, PartialEq)]
21061#[non_exhaustive]
21062pub struct UpdateSecurityMarksRequest {
21063    /// Required. The security marks resource to update.
21064    pub security_marks: std::option::Option<crate::model::SecurityMarks>,
21065
21066    /// The FieldMask to use when updating the security marks resource.
21067    ///
21068    /// The field mask must not contain duplicate fields.
21069    /// If empty or set to "marks", all marks will be replaced.  Individual
21070    /// marks can be updated using "marks.<mark_key>".
21071    pub update_mask: std::option::Option<wkt::FieldMask>,
21072
21073    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21074}
21075
21076impl UpdateSecurityMarksRequest {
21077    pub fn new() -> Self {
21078        std::default::Default::default()
21079    }
21080
21081    /// Sets the value of [security_marks][crate::model::UpdateSecurityMarksRequest::security_marks].
21082    ///
21083    /// # Example
21084    /// ```ignore,no_run
21085    /// # use google_cloud_securitycenter_v2::model::UpdateSecurityMarksRequest;
21086    /// use google_cloud_securitycenter_v2::model::SecurityMarks;
21087    /// let x = UpdateSecurityMarksRequest::new().set_security_marks(SecurityMarks::default()/* use setters */);
21088    /// ```
21089    pub fn set_security_marks<T>(mut self, v: T) -> Self
21090    where
21091        T: std::convert::Into<crate::model::SecurityMarks>,
21092    {
21093        self.security_marks = std::option::Option::Some(v.into());
21094        self
21095    }
21096
21097    /// Sets or clears the value of [security_marks][crate::model::UpdateSecurityMarksRequest::security_marks].
21098    ///
21099    /// # Example
21100    /// ```ignore,no_run
21101    /// # use google_cloud_securitycenter_v2::model::UpdateSecurityMarksRequest;
21102    /// use google_cloud_securitycenter_v2::model::SecurityMarks;
21103    /// let x = UpdateSecurityMarksRequest::new().set_or_clear_security_marks(Some(SecurityMarks::default()/* use setters */));
21104    /// let x = UpdateSecurityMarksRequest::new().set_or_clear_security_marks(None::<SecurityMarks>);
21105    /// ```
21106    pub fn set_or_clear_security_marks<T>(mut self, v: std::option::Option<T>) -> Self
21107    where
21108        T: std::convert::Into<crate::model::SecurityMarks>,
21109    {
21110        self.security_marks = v.map(|x| x.into());
21111        self
21112    }
21113
21114    /// Sets the value of [update_mask][crate::model::UpdateSecurityMarksRequest::update_mask].
21115    ///
21116    /// # Example
21117    /// ```ignore,no_run
21118    /// # use google_cloud_securitycenter_v2::model::UpdateSecurityMarksRequest;
21119    /// use wkt::FieldMask;
21120    /// let x = UpdateSecurityMarksRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21121    /// ```
21122    pub fn set_update_mask<T>(mut self, v: T) -> Self
21123    where
21124        T: std::convert::Into<wkt::FieldMask>,
21125    {
21126        self.update_mask = std::option::Option::Some(v.into());
21127        self
21128    }
21129
21130    /// Sets or clears the value of [update_mask][crate::model::UpdateSecurityMarksRequest::update_mask].
21131    ///
21132    /// # Example
21133    /// ```ignore,no_run
21134    /// # use google_cloud_securitycenter_v2::model::UpdateSecurityMarksRequest;
21135    /// use wkt::FieldMask;
21136    /// let x = UpdateSecurityMarksRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21137    /// let x = UpdateSecurityMarksRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21138    /// ```
21139    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21140    where
21141        T: std::convert::Into<wkt::FieldMask>,
21142    {
21143        self.update_mask = v.map(|x| x.into());
21144        self
21145    }
21146}
21147
21148impl wkt::message::Message for UpdateSecurityMarksRequest {
21149    fn typename() -> &'static str {
21150        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateSecurityMarksRequest"
21151    }
21152}
21153
21154/// Request message for updating a source.
21155#[derive(Clone, Default, PartialEq)]
21156#[non_exhaustive]
21157pub struct UpdateSourceRequest {
21158    /// Required. The source resource to update.
21159    pub source: std::option::Option<crate::model::Source>,
21160
21161    /// The FieldMask to use when updating the source resource.
21162    ///
21163    /// If empty all mutable fields will be updated.
21164    pub update_mask: std::option::Option<wkt::FieldMask>,
21165
21166    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21167}
21168
21169impl UpdateSourceRequest {
21170    pub fn new() -> Self {
21171        std::default::Default::default()
21172    }
21173
21174    /// Sets the value of [source][crate::model::UpdateSourceRequest::source].
21175    ///
21176    /// # Example
21177    /// ```ignore,no_run
21178    /// # use google_cloud_securitycenter_v2::model::UpdateSourceRequest;
21179    /// use google_cloud_securitycenter_v2::model::Source;
21180    /// let x = UpdateSourceRequest::new().set_source(Source::default()/* use setters */);
21181    /// ```
21182    pub fn set_source<T>(mut self, v: T) -> Self
21183    where
21184        T: std::convert::Into<crate::model::Source>,
21185    {
21186        self.source = std::option::Option::Some(v.into());
21187        self
21188    }
21189
21190    /// Sets or clears the value of [source][crate::model::UpdateSourceRequest::source].
21191    ///
21192    /// # Example
21193    /// ```ignore,no_run
21194    /// # use google_cloud_securitycenter_v2::model::UpdateSourceRequest;
21195    /// use google_cloud_securitycenter_v2::model::Source;
21196    /// let x = UpdateSourceRequest::new().set_or_clear_source(Some(Source::default()/* use setters */));
21197    /// let x = UpdateSourceRequest::new().set_or_clear_source(None::<Source>);
21198    /// ```
21199    pub fn set_or_clear_source<T>(mut self, v: std::option::Option<T>) -> Self
21200    where
21201        T: std::convert::Into<crate::model::Source>,
21202    {
21203        self.source = v.map(|x| x.into());
21204        self
21205    }
21206
21207    /// Sets the value of [update_mask][crate::model::UpdateSourceRequest::update_mask].
21208    ///
21209    /// # Example
21210    /// ```ignore,no_run
21211    /// # use google_cloud_securitycenter_v2::model::UpdateSourceRequest;
21212    /// use wkt::FieldMask;
21213    /// let x = UpdateSourceRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21214    /// ```
21215    pub fn set_update_mask<T>(mut self, v: T) -> Self
21216    where
21217        T: std::convert::Into<wkt::FieldMask>,
21218    {
21219        self.update_mask = std::option::Option::Some(v.into());
21220        self
21221    }
21222
21223    /// Sets or clears the value of [update_mask][crate::model::UpdateSourceRequest::update_mask].
21224    ///
21225    /// # Example
21226    /// ```ignore,no_run
21227    /// # use google_cloud_securitycenter_v2::model::UpdateSourceRequest;
21228    /// use wkt::FieldMask;
21229    /// let x = UpdateSourceRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21230    /// let x = UpdateSourceRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21231    /// ```
21232    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21233    where
21234        T: std::convert::Into<wkt::FieldMask>,
21235    {
21236        self.update_mask = v.map(|x| x.into());
21237        self
21238    }
21239}
21240
21241impl wkt::message::Message for UpdateSourceRequest {
21242    fn typename() -> &'static str {
21243        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateSourceRequest"
21244    }
21245}
21246
21247/// Attack path simulation
21248#[derive(Clone, Default, PartialEq)]
21249#[non_exhaustive]
21250pub struct Simulation {
21251    /// Full resource name of the Simulation:
21252    /// `organizations/123/simulations/456`
21253    pub name: std::string::String,
21254
21255    /// Output only. Time simulation was created
21256    pub create_time: std::option::Option<wkt::Timestamp>,
21257
21258    /// Resource value configurations' metadata used in this simulation. Maximum of
21259    /// 100.
21260    pub resource_value_configs_metadata: std::vec::Vec<crate::model::ResourceValueConfigMetadata>,
21261
21262    /// Indicates which cloud provider was used in this simulation.
21263    pub cloud_provider: crate::model::CloudProvider,
21264
21265    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21266}
21267
21268impl Simulation {
21269    pub fn new() -> Self {
21270        std::default::Default::default()
21271    }
21272
21273    /// Sets the value of [name][crate::model::Simulation::name].
21274    ///
21275    /// # Example
21276    /// ```ignore,no_run
21277    /// # use google_cloud_securitycenter_v2::model::Simulation;
21278    /// let x = Simulation::new().set_name("example");
21279    /// ```
21280    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21281        self.name = v.into();
21282        self
21283    }
21284
21285    /// Sets the value of [create_time][crate::model::Simulation::create_time].
21286    ///
21287    /// # Example
21288    /// ```ignore,no_run
21289    /// # use google_cloud_securitycenter_v2::model::Simulation;
21290    /// use wkt::Timestamp;
21291    /// let x = Simulation::new().set_create_time(Timestamp::default()/* use setters */);
21292    /// ```
21293    pub fn set_create_time<T>(mut self, v: T) -> Self
21294    where
21295        T: std::convert::Into<wkt::Timestamp>,
21296    {
21297        self.create_time = std::option::Option::Some(v.into());
21298        self
21299    }
21300
21301    /// Sets or clears the value of [create_time][crate::model::Simulation::create_time].
21302    ///
21303    /// # Example
21304    /// ```ignore,no_run
21305    /// # use google_cloud_securitycenter_v2::model::Simulation;
21306    /// use wkt::Timestamp;
21307    /// let x = Simulation::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
21308    /// let x = Simulation::new().set_or_clear_create_time(None::<Timestamp>);
21309    /// ```
21310    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
21311    where
21312        T: std::convert::Into<wkt::Timestamp>,
21313    {
21314        self.create_time = v.map(|x| x.into());
21315        self
21316    }
21317
21318    /// Sets the value of [resource_value_configs_metadata][crate::model::Simulation::resource_value_configs_metadata].
21319    ///
21320    /// # Example
21321    /// ```ignore,no_run
21322    /// # use google_cloud_securitycenter_v2::model::Simulation;
21323    /// use google_cloud_securitycenter_v2::model::ResourceValueConfigMetadata;
21324    /// let x = Simulation::new()
21325    ///     .set_resource_value_configs_metadata([
21326    ///         ResourceValueConfigMetadata::default()/* use setters */,
21327    ///         ResourceValueConfigMetadata::default()/* use (different) setters */,
21328    ///     ]);
21329    /// ```
21330    pub fn set_resource_value_configs_metadata<T, V>(mut self, v: T) -> Self
21331    where
21332        T: std::iter::IntoIterator<Item = V>,
21333        V: std::convert::Into<crate::model::ResourceValueConfigMetadata>,
21334    {
21335        use std::iter::Iterator;
21336        self.resource_value_configs_metadata = v.into_iter().map(|i| i.into()).collect();
21337        self
21338    }
21339
21340    /// Sets the value of [cloud_provider][crate::model::Simulation::cloud_provider].
21341    ///
21342    /// # Example
21343    /// ```ignore,no_run
21344    /// # use google_cloud_securitycenter_v2::model::Simulation;
21345    /// use google_cloud_securitycenter_v2::model::CloudProvider;
21346    /// let x0 = Simulation::new().set_cloud_provider(CloudProvider::GoogleCloudPlatform);
21347    /// let x1 = Simulation::new().set_cloud_provider(CloudProvider::AmazonWebServices);
21348    /// let x2 = Simulation::new().set_cloud_provider(CloudProvider::MicrosoftAzure);
21349    /// ```
21350    pub fn set_cloud_provider<T: std::convert::Into<crate::model::CloudProvider>>(
21351        mut self,
21352        v: T,
21353    ) -> Self {
21354        self.cloud_provider = v.into();
21355        self
21356    }
21357}
21358
21359impl wkt::message::Message for Simulation {
21360    fn typename() -> &'static str {
21361        "type.googleapis.com/google.cloud.securitycenter.v2.Simulation"
21362    }
21363}
21364
21365/// Security Command Center finding source. A finding source
21366/// is an entity or a mechanism that can produce a finding. A source is like a
21367/// container of findings that come from the same scanner, logger, monitor, and
21368/// other tools.
21369#[derive(Clone, Default, PartialEq)]
21370#[non_exhaustive]
21371pub struct Source {
21372    /// The relative resource name of this source. See:
21373    /// <https://cloud.google.com/apis/design/resource_names#relative_resource_name>
21374    /// Example:
21375    /// "organizations/{organization_id}/sources/{source_id}"
21376    pub name: std::string::String,
21377
21378    /// The source's display name.
21379    /// A source's display name must be unique amongst its siblings, for example,
21380    /// two sources with the same parent can't share the same display name.
21381    /// The display name must have a length between 1 and 64 characters
21382    /// (inclusive).
21383    pub display_name: std::string::String,
21384
21385    /// The description of the source (max of 1024 characters).
21386    /// Example:
21387    /// "Web Security Scanner is a web security scanner for common
21388    /// vulnerabilities in App Engine applications. It can automatically
21389    /// scan and detect four common vulnerabilities, including cross-site-scripting
21390    /// (XSS), Flash injection, mixed content (HTTP in HTTPS), and
21391    /// outdated or insecure libraries."
21392    pub description: std::string::String,
21393
21394    /// The canonical name of the finding source. It's either
21395    /// "organizations/{organization_id}/sources/{source_id}",
21396    /// "folders/{folder_id}/sources/{source_id}", or
21397    /// "projects/{project_number}/sources/{source_id}",
21398    /// depending on the closest CRM ancestor of the resource associated with the
21399    /// finding.
21400    pub canonical_name: std::string::String,
21401
21402    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21403}
21404
21405impl Source {
21406    pub fn new() -> Self {
21407        std::default::Default::default()
21408    }
21409
21410    /// Sets the value of [name][crate::model::Source::name].
21411    ///
21412    /// # Example
21413    /// ```ignore,no_run
21414    /// # use google_cloud_securitycenter_v2::model::Source;
21415    /// let x = Source::new().set_name("example");
21416    /// ```
21417    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21418        self.name = v.into();
21419        self
21420    }
21421
21422    /// Sets the value of [display_name][crate::model::Source::display_name].
21423    ///
21424    /// # Example
21425    /// ```ignore,no_run
21426    /// # use google_cloud_securitycenter_v2::model::Source;
21427    /// let x = Source::new().set_display_name("example");
21428    /// ```
21429    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21430        self.display_name = v.into();
21431        self
21432    }
21433
21434    /// Sets the value of [description][crate::model::Source::description].
21435    ///
21436    /// # Example
21437    /// ```ignore,no_run
21438    /// # use google_cloud_securitycenter_v2::model::Source;
21439    /// let x = Source::new().set_description("example");
21440    /// ```
21441    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21442        self.description = v.into();
21443        self
21444    }
21445
21446    /// Sets the value of [canonical_name][crate::model::Source::canonical_name].
21447    ///
21448    /// # Example
21449    /// ```ignore,no_run
21450    /// # use google_cloud_securitycenter_v2::model::Source;
21451    /// let x = Source::new().set_canonical_name("example");
21452    /// ```
21453    pub fn set_canonical_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21454        self.canonical_name = v.into();
21455        self
21456    }
21457}
21458
21459impl wkt::message::Message for Source {
21460    fn typename() -> &'static str {
21461        "type.googleapis.com/google.cloud.securitycenter.v2.Source"
21462    }
21463}
21464
21465/// Contains details about a group of security issues that, when the issues
21466/// occur together, represent a greater risk than when the issues occur
21467/// independently. A group of such issues is referred to as a toxic
21468/// combination.
21469#[derive(Clone, Default, PartialEq)]
21470#[non_exhaustive]
21471pub struct ToxicCombination {
21472    /// The
21473    /// [Attack exposure
21474    /// score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores)
21475    /// of this toxic combination. The score is a measure of how much this toxic
21476    /// combination exposes one or more high-value resources to potential attack.
21477    pub attack_exposure_score: f64,
21478
21479    /// List of resource names of findings associated with this toxic combination.
21480    /// For example, `organizations/123/sources/456/findings/789`.
21481    pub related_findings: std::vec::Vec<std::string::String>,
21482
21483    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21484}
21485
21486impl ToxicCombination {
21487    pub fn new() -> Self {
21488        std::default::Default::default()
21489    }
21490
21491    /// Sets the value of [attack_exposure_score][crate::model::ToxicCombination::attack_exposure_score].
21492    ///
21493    /// # Example
21494    /// ```ignore,no_run
21495    /// # use google_cloud_securitycenter_v2::model::ToxicCombination;
21496    /// let x = ToxicCombination::new().set_attack_exposure_score(42.0);
21497    /// ```
21498    pub fn set_attack_exposure_score<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
21499        self.attack_exposure_score = v.into();
21500        self
21501    }
21502
21503    /// Sets the value of [related_findings][crate::model::ToxicCombination::related_findings].
21504    ///
21505    /// # Example
21506    /// ```ignore,no_run
21507    /// # use google_cloud_securitycenter_v2::model::ToxicCombination;
21508    /// let x = ToxicCombination::new().set_related_findings(["a", "b", "c"]);
21509    /// ```
21510    pub fn set_related_findings<T, V>(mut self, v: T) -> Self
21511    where
21512        T: std::iter::IntoIterator<Item = V>,
21513        V: std::convert::Into<std::string::String>,
21514    {
21515        use std::iter::Iterator;
21516        self.related_findings = v.into_iter().map(|i| i.into()).collect();
21517        self
21518    }
21519}
21520
21521impl wkt::message::Message for ToxicCombination {
21522    fn typename() -> &'static str {
21523        "type.googleapis.com/google.cloud.securitycenter.v2.ToxicCombination"
21524    }
21525}
21526
21527/// A resource that is determined to have value to a user's system
21528#[derive(Clone, Default, PartialEq)]
21529#[non_exhaustive]
21530pub struct ValuedResource {
21531    /// Valued resource name, for example,
21532    /// e.g.:
21533    /// `organizations/123/simulations/456/valuedResources/789`
21534    pub name: std::string::String,
21535
21536    /// The
21537    /// [full resource
21538    /// name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
21539    /// of the valued resource.
21540    pub resource: std::string::String,
21541
21542    /// The [resource
21543    /// type](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
21544    /// of the valued resource.
21545    pub resource_type: std::string::String,
21546
21547    /// Human-readable name of the valued resource.
21548    pub display_name: std::string::String,
21549
21550    /// How valuable this resource is.
21551    pub resource_value: crate::model::valued_resource::ResourceValue,
21552
21553    /// Exposed score for this valued resource. A value of 0 means no exposure was
21554    /// detected exposure.
21555    pub exposed_score: f64,
21556
21557    /// List of resource value configurations' metadata used to determine the value
21558    /// of this resource. Maximum of 100.
21559    pub resource_value_configs_used: std::vec::Vec<crate::model::ResourceValueConfigMetadata>,
21560
21561    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21562}
21563
21564impl ValuedResource {
21565    pub fn new() -> Self {
21566        std::default::Default::default()
21567    }
21568
21569    /// Sets the value of [name][crate::model::ValuedResource::name].
21570    ///
21571    /// # Example
21572    /// ```ignore,no_run
21573    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
21574    /// let x = ValuedResource::new().set_name("example");
21575    /// ```
21576    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21577        self.name = v.into();
21578        self
21579    }
21580
21581    /// Sets the value of [resource][crate::model::ValuedResource::resource].
21582    ///
21583    /// # Example
21584    /// ```ignore,no_run
21585    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
21586    /// let x = ValuedResource::new().set_resource("example");
21587    /// ```
21588    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21589        self.resource = v.into();
21590        self
21591    }
21592
21593    /// Sets the value of [resource_type][crate::model::ValuedResource::resource_type].
21594    ///
21595    /// # Example
21596    /// ```ignore,no_run
21597    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
21598    /// let x = ValuedResource::new().set_resource_type("example");
21599    /// ```
21600    pub fn set_resource_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21601        self.resource_type = v.into();
21602        self
21603    }
21604
21605    /// Sets the value of [display_name][crate::model::ValuedResource::display_name].
21606    ///
21607    /// # Example
21608    /// ```ignore,no_run
21609    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
21610    /// let x = ValuedResource::new().set_display_name("example");
21611    /// ```
21612    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21613        self.display_name = v.into();
21614        self
21615    }
21616
21617    /// Sets the value of [resource_value][crate::model::ValuedResource::resource_value].
21618    ///
21619    /// # Example
21620    /// ```ignore,no_run
21621    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
21622    /// use google_cloud_securitycenter_v2::model::valued_resource::ResourceValue;
21623    /// let x0 = ValuedResource::new().set_resource_value(ResourceValue::Low);
21624    /// let x1 = ValuedResource::new().set_resource_value(ResourceValue::Medium);
21625    /// let x2 = ValuedResource::new().set_resource_value(ResourceValue::High);
21626    /// ```
21627    pub fn set_resource_value<
21628        T: std::convert::Into<crate::model::valued_resource::ResourceValue>,
21629    >(
21630        mut self,
21631        v: T,
21632    ) -> Self {
21633        self.resource_value = v.into();
21634        self
21635    }
21636
21637    /// Sets the value of [exposed_score][crate::model::ValuedResource::exposed_score].
21638    ///
21639    /// # Example
21640    /// ```ignore,no_run
21641    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
21642    /// let x = ValuedResource::new().set_exposed_score(42.0);
21643    /// ```
21644    pub fn set_exposed_score<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
21645        self.exposed_score = v.into();
21646        self
21647    }
21648
21649    /// Sets the value of [resource_value_configs_used][crate::model::ValuedResource::resource_value_configs_used].
21650    ///
21651    /// # Example
21652    /// ```ignore,no_run
21653    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
21654    /// use google_cloud_securitycenter_v2::model::ResourceValueConfigMetadata;
21655    /// let x = ValuedResource::new()
21656    ///     .set_resource_value_configs_used([
21657    ///         ResourceValueConfigMetadata::default()/* use setters */,
21658    ///         ResourceValueConfigMetadata::default()/* use (different) setters */,
21659    ///     ]);
21660    /// ```
21661    pub fn set_resource_value_configs_used<T, V>(mut self, v: T) -> Self
21662    where
21663        T: std::iter::IntoIterator<Item = V>,
21664        V: std::convert::Into<crate::model::ResourceValueConfigMetadata>,
21665    {
21666        use std::iter::Iterator;
21667        self.resource_value_configs_used = v.into_iter().map(|i| i.into()).collect();
21668        self
21669    }
21670}
21671
21672impl wkt::message::Message for ValuedResource {
21673    fn typename() -> &'static str {
21674        "type.googleapis.com/google.cloud.securitycenter.v2.ValuedResource"
21675    }
21676}
21677
21678/// Defines additional types related to [ValuedResource].
21679pub mod valued_resource {
21680    #[allow(unused_imports)]
21681    use super::*;
21682
21683    /// How valuable the resource is.
21684    ///
21685    /// # Working with unknown values
21686    ///
21687    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
21688    /// additional enum variants at any time. Adding new variants is not considered
21689    /// a breaking change. Applications should write their code in anticipation of:
21690    ///
21691    /// - New values appearing in future releases of the client library, **and**
21692    /// - New values received dynamically, without application changes.
21693    ///
21694    /// Please consult the [Working with enums] section in the user guide for some
21695    /// guidelines.
21696    ///
21697    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
21698    #[derive(Clone, Debug, PartialEq)]
21699    #[non_exhaustive]
21700    pub enum ResourceValue {
21701        /// The resource value isn't specified.
21702        Unspecified,
21703        /// This is a low-value resource.
21704        Low,
21705        /// This is a medium-value resource.
21706        Medium,
21707        /// This is a high-value resource.
21708        High,
21709        /// If set, the enum was initialized with an unknown value.
21710        ///
21711        /// Applications can examine the value using [ResourceValue::value] or
21712        /// [ResourceValue::name].
21713        UnknownValue(resource_value::UnknownValue),
21714    }
21715
21716    #[doc(hidden)]
21717    pub mod resource_value {
21718        #[allow(unused_imports)]
21719        use super::*;
21720        #[derive(Clone, Debug, PartialEq)]
21721        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21722    }
21723
21724    impl ResourceValue {
21725        /// Gets the enum value.
21726        ///
21727        /// Returns `None` if the enum contains an unknown value deserialized from
21728        /// the string representation of enums.
21729        pub fn value(&self) -> std::option::Option<i32> {
21730            match self {
21731                Self::Unspecified => std::option::Option::Some(0),
21732                Self::Low => std::option::Option::Some(1),
21733                Self::Medium => std::option::Option::Some(2),
21734                Self::High => std::option::Option::Some(3),
21735                Self::UnknownValue(u) => u.0.value(),
21736            }
21737        }
21738
21739        /// Gets the enum value as a string.
21740        ///
21741        /// Returns `None` if the enum contains an unknown value deserialized from
21742        /// the integer representation of enums.
21743        pub fn name(&self) -> std::option::Option<&str> {
21744            match self {
21745                Self::Unspecified => std::option::Option::Some("RESOURCE_VALUE_UNSPECIFIED"),
21746                Self::Low => std::option::Option::Some("RESOURCE_VALUE_LOW"),
21747                Self::Medium => std::option::Option::Some("RESOURCE_VALUE_MEDIUM"),
21748                Self::High => std::option::Option::Some("RESOURCE_VALUE_HIGH"),
21749                Self::UnknownValue(u) => u.0.name(),
21750            }
21751        }
21752    }
21753
21754    impl std::default::Default for ResourceValue {
21755        fn default() -> Self {
21756            use std::convert::From;
21757            Self::from(0)
21758        }
21759    }
21760
21761    impl std::fmt::Display for ResourceValue {
21762        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21763            wkt::internal::display_enum(f, self.name(), self.value())
21764        }
21765    }
21766
21767    impl std::convert::From<i32> for ResourceValue {
21768        fn from(value: i32) -> Self {
21769            match value {
21770                0 => Self::Unspecified,
21771                1 => Self::Low,
21772                2 => Self::Medium,
21773                3 => Self::High,
21774                _ => Self::UnknownValue(resource_value::UnknownValue(
21775                    wkt::internal::UnknownEnumValue::Integer(value),
21776                )),
21777            }
21778        }
21779    }
21780
21781    impl std::convert::From<&str> for ResourceValue {
21782        fn from(value: &str) -> Self {
21783            use std::string::ToString;
21784            match value {
21785                "RESOURCE_VALUE_UNSPECIFIED" => Self::Unspecified,
21786                "RESOURCE_VALUE_LOW" => Self::Low,
21787                "RESOURCE_VALUE_MEDIUM" => Self::Medium,
21788                "RESOURCE_VALUE_HIGH" => Self::High,
21789                _ => Self::UnknownValue(resource_value::UnknownValue(
21790                    wkt::internal::UnknownEnumValue::String(value.to_string()),
21791                )),
21792            }
21793        }
21794    }
21795
21796    impl serde::ser::Serialize for ResourceValue {
21797        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21798        where
21799            S: serde::Serializer,
21800        {
21801            match self {
21802                Self::Unspecified => serializer.serialize_i32(0),
21803                Self::Low => serializer.serialize_i32(1),
21804                Self::Medium => serializer.serialize_i32(2),
21805                Self::High => serializer.serialize_i32(3),
21806                Self::UnknownValue(u) => u.0.serialize(serializer),
21807            }
21808        }
21809    }
21810
21811    impl<'de> serde::de::Deserialize<'de> for ResourceValue {
21812        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21813        where
21814            D: serde::Deserializer<'de>,
21815        {
21816            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResourceValue>::new(
21817                ".google.cloud.securitycenter.v2.ValuedResource.ResourceValue",
21818            ))
21819        }
21820    }
21821}
21822
21823/// Metadata about a ResourceValueConfig. For example, id and name.
21824#[derive(Clone, Default, PartialEq)]
21825#[non_exhaustive]
21826pub struct ResourceValueConfigMetadata {
21827    /// Resource value config name
21828    pub name: std::string::String,
21829
21830    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21831}
21832
21833impl ResourceValueConfigMetadata {
21834    pub fn new() -> Self {
21835        std::default::Default::default()
21836    }
21837
21838    /// Sets the value of [name][crate::model::ResourceValueConfigMetadata::name].
21839    ///
21840    /// # Example
21841    /// ```ignore,no_run
21842    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfigMetadata;
21843    /// let x = ResourceValueConfigMetadata::new().set_name("example");
21844    /// ```
21845    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21846        self.name = v.into();
21847        self
21848    }
21849}
21850
21851impl wkt::message::Message for ResourceValueConfigMetadata {
21852    fn typename() -> &'static str {
21853        "type.googleapis.com/google.cloud.securitycenter.v2.ResourceValueConfigMetadata"
21854    }
21855}
21856
21857/// Vertex AI-related information associated with the finding.
21858#[derive(Clone, Default, PartialEq)]
21859#[non_exhaustive]
21860pub struct VertexAi {
21861    /// Datasets associated with the finding.
21862    pub datasets: std::vec::Vec<crate::model::vertex_ai::Dataset>,
21863
21864    /// Pipelines associated with the finding.
21865    pub pipelines: std::vec::Vec<crate::model::vertex_ai::Pipeline>,
21866
21867    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21868}
21869
21870impl VertexAi {
21871    pub fn new() -> Self {
21872        std::default::Default::default()
21873    }
21874
21875    /// Sets the value of [datasets][crate::model::VertexAi::datasets].
21876    ///
21877    /// # Example
21878    /// ```ignore,no_run
21879    /// # use google_cloud_securitycenter_v2::model::VertexAi;
21880    /// use google_cloud_securitycenter_v2::model::vertex_ai::Dataset;
21881    /// let x = VertexAi::new()
21882    ///     .set_datasets([
21883    ///         Dataset::default()/* use setters */,
21884    ///         Dataset::default()/* use (different) setters */,
21885    ///     ]);
21886    /// ```
21887    pub fn set_datasets<T, V>(mut self, v: T) -> Self
21888    where
21889        T: std::iter::IntoIterator<Item = V>,
21890        V: std::convert::Into<crate::model::vertex_ai::Dataset>,
21891    {
21892        use std::iter::Iterator;
21893        self.datasets = v.into_iter().map(|i| i.into()).collect();
21894        self
21895    }
21896
21897    /// Sets the value of [pipelines][crate::model::VertexAi::pipelines].
21898    ///
21899    /// # Example
21900    /// ```ignore,no_run
21901    /// # use google_cloud_securitycenter_v2::model::VertexAi;
21902    /// use google_cloud_securitycenter_v2::model::vertex_ai::Pipeline;
21903    /// let x = VertexAi::new()
21904    ///     .set_pipelines([
21905    ///         Pipeline::default()/* use setters */,
21906    ///         Pipeline::default()/* use (different) setters */,
21907    ///     ]);
21908    /// ```
21909    pub fn set_pipelines<T, V>(mut self, v: T) -> Self
21910    where
21911        T: std::iter::IntoIterator<Item = V>,
21912        V: std::convert::Into<crate::model::vertex_ai::Pipeline>,
21913    {
21914        use std::iter::Iterator;
21915        self.pipelines = v.into_iter().map(|i| i.into()).collect();
21916        self
21917    }
21918}
21919
21920impl wkt::message::Message for VertexAi {
21921    fn typename() -> &'static str {
21922        "type.googleapis.com/google.cloud.securitycenter.v2.VertexAi"
21923    }
21924}
21925
21926/// Defines additional types related to [VertexAi].
21927pub mod vertex_ai {
21928    #[allow(unused_imports)]
21929    use super::*;
21930
21931    /// Vertex AI dataset associated with the finding.
21932    #[derive(Clone, Default, PartialEq)]
21933    #[non_exhaustive]
21934    pub struct Dataset {
21935        /// Resource name of the dataset, e.g.
21936        /// projects/{project}/locations/{location}/datasets/2094040236064505856
21937        pub name: std::string::String,
21938
21939        /// The user defined display name of dataset, e.g. plants-dataset
21940        pub display_name: std::string::String,
21941
21942        /// Data source, such as a BigQuery source URI, e.g.
21943        /// bq://scc-nexus-test.AIPPtest.gsod
21944        pub source: std::string::String,
21945
21946        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21947    }
21948
21949    impl Dataset {
21950        pub fn new() -> Self {
21951            std::default::Default::default()
21952        }
21953
21954        /// Sets the value of [name][crate::model::vertex_ai::Dataset::name].
21955        ///
21956        /// # Example
21957        /// ```ignore,no_run
21958        /// # use google_cloud_securitycenter_v2::model::vertex_ai::Dataset;
21959        /// let x = Dataset::new().set_name("example");
21960        /// ```
21961        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21962            self.name = v.into();
21963            self
21964        }
21965
21966        /// Sets the value of [display_name][crate::model::vertex_ai::Dataset::display_name].
21967        ///
21968        /// # Example
21969        /// ```ignore,no_run
21970        /// # use google_cloud_securitycenter_v2::model::vertex_ai::Dataset;
21971        /// let x = Dataset::new().set_display_name("example");
21972        /// ```
21973        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
21974            mut self,
21975            v: T,
21976        ) -> Self {
21977            self.display_name = v.into();
21978            self
21979        }
21980
21981        /// Sets the value of [source][crate::model::vertex_ai::Dataset::source].
21982        ///
21983        /// # Example
21984        /// ```ignore,no_run
21985        /// # use google_cloud_securitycenter_v2::model::vertex_ai::Dataset;
21986        /// let x = Dataset::new().set_source("example");
21987        /// ```
21988        pub fn set_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21989            self.source = v.into();
21990            self
21991        }
21992    }
21993
21994    impl wkt::message::Message for Dataset {
21995        fn typename() -> &'static str {
21996            "type.googleapis.com/google.cloud.securitycenter.v2.VertexAi.Dataset"
21997        }
21998    }
21999
22000    /// Vertex AI training pipeline associated with the finding.
22001    #[derive(Clone, Default, PartialEq)]
22002    #[non_exhaustive]
22003    pub struct Pipeline {
22004        /// Resource name of the pipeline, e.g.
22005        /// projects/{project}/locations/{location}/trainingPipelines/5253428229225578496
22006        pub name: std::string::String,
22007
22008        /// The user-defined display name of pipeline, e.g. plants-classification
22009        pub display_name: std::string::String,
22010
22011        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22012    }
22013
22014    impl Pipeline {
22015        pub fn new() -> Self {
22016            std::default::Default::default()
22017        }
22018
22019        /// Sets the value of [name][crate::model::vertex_ai::Pipeline::name].
22020        ///
22021        /// # Example
22022        /// ```ignore,no_run
22023        /// # use google_cloud_securitycenter_v2::model::vertex_ai::Pipeline;
22024        /// let x = Pipeline::new().set_name("example");
22025        /// ```
22026        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22027            self.name = v.into();
22028            self
22029        }
22030
22031        /// Sets the value of [display_name][crate::model::vertex_ai::Pipeline::display_name].
22032        ///
22033        /// # Example
22034        /// ```ignore,no_run
22035        /// # use google_cloud_securitycenter_v2::model::vertex_ai::Pipeline;
22036        /// let x = Pipeline::new().set_display_name("example");
22037        /// ```
22038        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
22039            mut self,
22040            v: T,
22041        ) -> Self {
22042            self.display_name = v.into();
22043            self
22044        }
22045    }
22046
22047    impl wkt::message::Message for Pipeline {
22048        fn typename() -> &'static str {
22049            "type.googleapis.com/google.cloud.securitycenter.v2.VertexAi.Pipeline"
22050        }
22051    }
22052}
22053
22054/// Refers to common vulnerability fields e.g. cve, cvss, cwe etc.
22055#[derive(Clone, Default, PartialEq)]
22056#[non_exhaustive]
22057pub struct Vulnerability {
22058    /// CVE stands for Common Vulnerabilities and Exposures
22059    /// (<https://cve.mitre.org/about/>)
22060    pub cve: std::option::Option<crate::model::Cve>,
22061
22062    /// The offending package is relevant to the finding.
22063    pub offending_package: std::option::Option<crate::model::Package>,
22064
22065    /// The fixed package is relevant to the finding.
22066    pub fixed_package: std::option::Option<crate::model::Package>,
22067
22068    /// The security bulletin is relevant to this finding.
22069    pub security_bulletin: std::option::Option<crate::model::SecurityBulletin>,
22070
22071    /// Provider provided risk_score based on multiple factors. The higher the risk
22072    /// score, the more risky the vulnerability is.
22073    pub provider_risk_score: i64,
22074
22075    /// Represents whether the vulnerability is reachable (detected via static
22076    /// analysis)
22077    pub reachable: bool,
22078
22079    /// Represents one or more Common Weakness Enumeration (CWE) information on
22080    /// this vulnerability.
22081    pub cwes: std::vec::Vec<crate::model::Cwe>,
22082
22083    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22084}
22085
22086impl Vulnerability {
22087    pub fn new() -> Self {
22088        std::default::Default::default()
22089    }
22090
22091    /// Sets the value of [cve][crate::model::Vulnerability::cve].
22092    ///
22093    /// # Example
22094    /// ```ignore,no_run
22095    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22096    /// use google_cloud_securitycenter_v2::model::Cve;
22097    /// let x = Vulnerability::new().set_cve(Cve::default()/* use setters */);
22098    /// ```
22099    pub fn set_cve<T>(mut self, v: T) -> Self
22100    where
22101        T: std::convert::Into<crate::model::Cve>,
22102    {
22103        self.cve = std::option::Option::Some(v.into());
22104        self
22105    }
22106
22107    /// Sets or clears the value of [cve][crate::model::Vulnerability::cve].
22108    ///
22109    /// # Example
22110    /// ```ignore,no_run
22111    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22112    /// use google_cloud_securitycenter_v2::model::Cve;
22113    /// let x = Vulnerability::new().set_or_clear_cve(Some(Cve::default()/* use setters */));
22114    /// let x = Vulnerability::new().set_or_clear_cve(None::<Cve>);
22115    /// ```
22116    pub fn set_or_clear_cve<T>(mut self, v: std::option::Option<T>) -> Self
22117    where
22118        T: std::convert::Into<crate::model::Cve>,
22119    {
22120        self.cve = v.map(|x| x.into());
22121        self
22122    }
22123
22124    /// Sets the value of [offending_package][crate::model::Vulnerability::offending_package].
22125    ///
22126    /// # Example
22127    /// ```ignore,no_run
22128    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22129    /// use google_cloud_securitycenter_v2::model::Package;
22130    /// let x = Vulnerability::new().set_offending_package(Package::default()/* use setters */);
22131    /// ```
22132    pub fn set_offending_package<T>(mut self, v: T) -> Self
22133    where
22134        T: std::convert::Into<crate::model::Package>,
22135    {
22136        self.offending_package = std::option::Option::Some(v.into());
22137        self
22138    }
22139
22140    /// Sets or clears the value of [offending_package][crate::model::Vulnerability::offending_package].
22141    ///
22142    /// # Example
22143    /// ```ignore,no_run
22144    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22145    /// use google_cloud_securitycenter_v2::model::Package;
22146    /// let x = Vulnerability::new().set_or_clear_offending_package(Some(Package::default()/* use setters */));
22147    /// let x = Vulnerability::new().set_or_clear_offending_package(None::<Package>);
22148    /// ```
22149    pub fn set_or_clear_offending_package<T>(mut self, v: std::option::Option<T>) -> Self
22150    where
22151        T: std::convert::Into<crate::model::Package>,
22152    {
22153        self.offending_package = v.map(|x| x.into());
22154        self
22155    }
22156
22157    /// Sets the value of [fixed_package][crate::model::Vulnerability::fixed_package].
22158    ///
22159    /// # Example
22160    /// ```ignore,no_run
22161    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22162    /// use google_cloud_securitycenter_v2::model::Package;
22163    /// let x = Vulnerability::new().set_fixed_package(Package::default()/* use setters */);
22164    /// ```
22165    pub fn set_fixed_package<T>(mut self, v: T) -> Self
22166    where
22167        T: std::convert::Into<crate::model::Package>,
22168    {
22169        self.fixed_package = std::option::Option::Some(v.into());
22170        self
22171    }
22172
22173    /// Sets or clears the value of [fixed_package][crate::model::Vulnerability::fixed_package].
22174    ///
22175    /// # Example
22176    /// ```ignore,no_run
22177    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22178    /// use google_cloud_securitycenter_v2::model::Package;
22179    /// let x = Vulnerability::new().set_or_clear_fixed_package(Some(Package::default()/* use setters */));
22180    /// let x = Vulnerability::new().set_or_clear_fixed_package(None::<Package>);
22181    /// ```
22182    pub fn set_or_clear_fixed_package<T>(mut self, v: std::option::Option<T>) -> Self
22183    where
22184        T: std::convert::Into<crate::model::Package>,
22185    {
22186        self.fixed_package = v.map(|x| x.into());
22187        self
22188    }
22189
22190    /// Sets the value of [security_bulletin][crate::model::Vulnerability::security_bulletin].
22191    ///
22192    /// # Example
22193    /// ```ignore,no_run
22194    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22195    /// use google_cloud_securitycenter_v2::model::SecurityBulletin;
22196    /// let x = Vulnerability::new().set_security_bulletin(SecurityBulletin::default()/* use setters */);
22197    /// ```
22198    pub fn set_security_bulletin<T>(mut self, v: T) -> Self
22199    where
22200        T: std::convert::Into<crate::model::SecurityBulletin>,
22201    {
22202        self.security_bulletin = std::option::Option::Some(v.into());
22203        self
22204    }
22205
22206    /// Sets or clears the value of [security_bulletin][crate::model::Vulnerability::security_bulletin].
22207    ///
22208    /// # Example
22209    /// ```ignore,no_run
22210    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22211    /// use google_cloud_securitycenter_v2::model::SecurityBulletin;
22212    /// let x = Vulnerability::new().set_or_clear_security_bulletin(Some(SecurityBulletin::default()/* use setters */));
22213    /// let x = Vulnerability::new().set_or_clear_security_bulletin(None::<SecurityBulletin>);
22214    /// ```
22215    pub fn set_or_clear_security_bulletin<T>(mut self, v: std::option::Option<T>) -> Self
22216    where
22217        T: std::convert::Into<crate::model::SecurityBulletin>,
22218    {
22219        self.security_bulletin = v.map(|x| x.into());
22220        self
22221    }
22222
22223    /// Sets the value of [provider_risk_score][crate::model::Vulnerability::provider_risk_score].
22224    ///
22225    /// # Example
22226    /// ```ignore,no_run
22227    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22228    /// let x = Vulnerability::new().set_provider_risk_score(42);
22229    /// ```
22230    pub fn set_provider_risk_score<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
22231        self.provider_risk_score = v.into();
22232        self
22233    }
22234
22235    /// Sets the value of [reachable][crate::model::Vulnerability::reachable].
22236    ///
22237    /// # Example
22238    /// ```ignore,no_run
22239    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22240    /// let x = Vulnerability::new().set_reachable(true);
22241    /// ```
22242    pub fn set_reachable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22243        self.reachable = v.into();
22244        self
22245    }
22246
22247    /// Sets the value of [cwes][crate::model::Vulnerability::cwes].
22248    ///
22249    /// # Example
22250    /// ```ignore,no_run
22251    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22252    /// use google_cloud_securitycenter_v2::model::Cwe;
22253    /// let x = Vulnerability::new()
22254    ///     .set_cwes([
22255    ///         Cwe::default()/* use setters */,
22256    ///         Cwe::default()/* use (different) setters */,
22257    ///     ]);
22258    /// ```
22259    pub fn set_cwes<T, V>(mut self, v: T) -> Self
22260    where
22261        T: std::iter::IntoIterator<Item = V>,
22262        V: std::convert::Into<crate::model::Cwe>,
22263    {
22264        use std::iter::Iterator;
22265        self.cwes = v.into_iter().map(|i| i.into()).collect();
22266        self
22267    }
22268}
22269
22270impl wkt::message::Message for Vulnerability {
22271    fn typename() -> &'static str {
22272        "type.googleapis.com/google.cloud.securitycenter.v2.Vulnerability"
22273    }
22274}
22275
22276/// CVE stands for Common Vulnerabilities and Exposures.
22277/// Information from the [CVE
22278/// record](https://www.cve.org/ResourcesSupport/Glossary) that describes this
22279/// vulnerability.
22280#[derive(Clone, Default, PartialEq)]
22281#[non_exhaustive]
22282pub struct Cve {
22283    /// The unique identifier for the vulnerability. e.g. CVE-2021-34527
22284    pub id: std::string::String,
22285
22286    /// Additional information about the CVE.
22287    /// e.g. <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527>
22288    pub references: std::vec::Vec<crate::model::Reference>,
22289
22290    /// Describe Common Vulnerability Scoring System specified at
22291    /// <https://www.first.org/cvss/v3.1/specification-document>
22292    pub cvssv3: std::option::Option<crate::model::Cvssv3>,
22293
22294    /// Whether upstream fix is available for the CVE.
22295    pub upstream_fix_available: bool,
22296
22297    /// The potential impact of the vulnerability if it was to be exploited.
22298    pub impact: crate::model::cve::RiskRating,
22299
22300    /// The exploitation activity of the vulnerability in the wild.
22301    pub exploitation_activity: crate::model::cve::ExploitationActivity,
22302
22303    /// Whether or not the vulnerability has been observed in the wild.
22304    pub observed_in_the_wild: bool,
22305
22306    /// Whether or not the vulnerability was zero day when the finding was
22307    /// published.
22308    pub zero_day: bool,
22309
22310    /// Date the first publicly available exploit or PoC was released.
22311    pub exploit_release_date: std::option::Option<wkt::Timestamp>,
22312
22313    /// Date of the earliest known exploitation.
22314    pub first_exploitation_date: std::option::Option<wkt::Timestamp>,
22315
22316    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22317}
22318
22319impl Cve {
22320    pub fn new() -> Self {
22321        std::default::Default::default()
22322    }
22323
22324    /// Sets the value of [id][crate::model::Cve::id].
22325    ///
22326    /// # Example
22327    /// ```ignore,no_run
22328    /// # use google_cloud_securitycenter_v2::model::Cve;
22329    /// let x = Cve::new().set_id("example");
22330    /// ```
22331    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22332        self.id = v.into();
22333        self
22334    }
22335
22336    /// Sets the value of [references][crate::model::Cve::references].
22337    ///
22338    /// # Example
22339    /// ```ignore,no_run
22340    /// # use google_cloud_securitycenter_v2::model::Cve;
22341    /// use google_cloud_securitycenter_v2::model::Reference;
22342    /// let x = Cve::new()
22343    ///     .set_references([
22344    ///         Reference::default()/* use setters */,
22345    ///         Reference::default()/* use (different) setters */,
22346    ///     ]);
22347    /// ```
22348    pub fn set_references<T, V>(mut self, v: T) -> Self
22349    where
22350        T: std::iter::IntoIterator<Item = V>,
22351        V: std::convert::Into<crate::model::Reference>,
22352    {
22353        use std::iter::Iterator;
22354        self.references = v.into_iter().map(|i| i.into()).collect();
22355        self
22356    }
22357
22358    /// Sets the value of [cvssv3][crate::model::Cve::cvssv3].
22359    ///
22360    /// # Example
22361    /// ```ignore,no_run
22362    /// # use google_cloud_securitycenter_v2::model::Cve;
22363    /// use google_cloud_securitycenter_v2::model::Cvssv3;
22364    /// let x = Cve::new().set_cvssv3(Cvssv3::default()/* use setters */);
22365    /// ```
22366    pub fn set_cvssv3<T>(mut self, v: T) -> Self
22367    where
22368        T: std::convert::Into<crate::model::Cvssv3>,
22369    {
22370        self.cvssv3 = std::option::Option::Some(v.into());
22371        self
22372    }
22373
22374    /// Sets or clears the value of [cvssv3][crate::model::Cve::cvssv3].
22375    ///
22376    /// # Example
22377    /// ```ignore,no_run
22378    /// # use google_cloud_securitycenter_v2::model::Cve;
22379    /// use google_cloud_securitycenter_v2::model::Cvssv3;
22380    /// let x = Cve::new().set_or_clear_cvssv3(Some(Cvssv3::default()/* use setters */));
22381    /// let x = Cve::new().set_or_clear_cvssv3(None::<Cvssv3>);
22382    /// ```
22383    pub fn set_or_clear_cvssv3<T>(mut self, v: std::option::Option<T>) -> Self
22384    where
22385        T: std::convert::Into<crate::model::Cvssv3>,
22386    {
22387        self.cvssv3 = v.map(|x| x.into());
22388        self
22389    }
22390
22391    /// Sets the value of [upstream_fix_available][crate::model::Cve::upstream_fix_available].
22392    ///
22393    /// # Example
22394    /// ```ignore,no_run
22395    /// # use google_cloud_securitycenter_v2::model::Cve;
22396    /// let x = Cve::new().set_upstream_fix_available(true);
22397    /// ```
22398    pub fn set_upstream_fix_available<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22399        self.upstream_fix_available = v.into();
22400        self
22401    }
22402
22403    /// Sets the value of [impact][crate::model::Cve::impact].
22404    ///
22405    /// # Example
22406    /// ```ignore,no_run
22407    /// # use google_cloud_securitycenter_v2::model::Cve;
22408    /// use google_cloud_securitycenter_v2::model::cve::RiskRating;
22409    /// let x0 = Cve::new().set_impact(RiskRating::Low);
22410    /// let x1 = Cve::new().set_impact(RiskRating::Medium);
22411    /// let x2 = Cve::new().set_impact(RiskRating::High);
22412    /// ```
22413    pub fn set_impact<T: std::convert::Into<crate::model::cve::RiskRating>>(
22414        mut self,
22415        v: T,
22416    ) -> Self {
22417        self.impact = v.into();
22418        self
22419    }
22420
22421    /// Sets the value of [exploitation_activity][crate::model::Cve::exploitation_activity].
22422    ///
22423    /// # Example
22424    /// ```ignore,no_run
22425    /// # use google_cloud_securitycenter_v2::model::Cve;
22426    /// use google_cloud_securitycenter_v2::model::cve::ExploitationActivity;
22427    /// let x0 = Cve::new().set_exploitation_activity(ExploitationActivity::Wide);
22428    /// let x1 = Cve::new().set_exploitation_activity(ExploitationActivity::Confirmed);
22429    /// let x2 = Cve::new().set_exploitation_activity(ExploitationActivity::Available);
22430    /// ```
22431    pub fn set_exploitation_activity<
22432        T: std::convert::Into<crate::model::cve::ExploitationActivity>,
22433    >(
22434        mut self,
22435        v: T,
22436    ) -> Self {
22437        self.exploitation_activity = v.into();
22438        self
22439    }
22440
22441    /// Sets the value of [observed_in_the_wild][crate::model::Cve::observed_in_the_wild].
22442    ///
22443    /// # Example
22444    /// ```ignore,no_run
22445    /// # use google_cloud_securitycenter_v2::model::Cve;
22446    /// let x = Cve::new().set_observed_in_the_wild(true);
22447    /// ```
22448    pub fn set_observed_in_the_wild<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22449        self.observed_in_the_wild = v.into();
22450        self
22451    }
22452
22453    /// Sets the value of [zero_day][crate::model::Cve::zero_day].
22454    ///
22455    /// # Example
22456    /// ```ignore,no_run
22457    /// # use google_cloud_securitycenter_v2::model::Cve;
22458    /// let x = Cve::new().set_zero_day(true);
22459    /// ```
22460    pub fn set_zero_day<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22461        self.zero_day = v.into();
22462        self
22463    }
22464
22465    /// Sets the value of [exploit_release_date][crate::model::Cve::exploit_release_date].
22466    ///
22467    /// # Example
22468    /// ```ignore,no_run
22469    /// # use google_cloud_securitycenter_v2::model::Cve;
22470    /// use wkt::Timestamp;
22471    /// let x = Cve::new().set_exploit_release_date(Timestamp::default()/* use setters */);
22472    /// ```
22473    pub fn set_exploit_release_date<T>(mut self, v: T) -> Self
22474    where
22475        T: std::convert::Into<wkt::Timestamp>,
22476    {
22477        self.exploit_release_date = std::option::Option::Some(v.into());
22478        self
22479    }
22480
22481    /// Sets or clears the value of [exploit_release_date][crate::model::Cve::exploit_release_date].
22482    ///
22483    /// # Example
22484    /// ```ignore,no_run
22485    /// # use google_cloud_securitycenter_v2::model::Cve;
22486    /// use wkt::Timestamp;
22487    /// let x = Cve::new().set_or_clear_exploit_release_date(Some(Timestamp::default()/* use setters */));
22488    /// let x = Cve::new().set_or_clear_exploit_release_date(None::<Timestamp>);
22489    /// ```
22490    pub fn set_or_clear_exploit_release_date<T>(mut self, v: std::option::Option<T>) -> Self
22491    where
22492        T: std::convert::Into<wkt::Timestamp>,
22493    {
22494        self.exploit_release_date = v.map(|x| x.into());
22495        self
22496    }
22497
22498    /// Sets the value of [first_exploitation_date][crate::model::Cve::first_exploitation_date].
22499    ///
22500    /// # Example
22501    /// ```ignore,no_run
22502    /// # use google_cloud_securitycenter_v2::model::Cve;
22503    /// use wkt::Timestamp;
22504    /// let x = Cve::new().set_first_exploitation_date(Timestamp::default()/* use setters */);
22505    /// ```
22506    pub fn set_first_exploitation_date<T>(mut self, v: T) -> Self
22507    where
22508        T: std::convert::Into<wkt::Timestamp>,
22509    {
22510        self.first_exploitation_date = std::option::Option::Some(v.into());
22511        self
22512    }
22513
22514    /// Sets or clears the value of [first_exploitation_date][crate::model::Cve::first_exploitation_date].
22515    ///
22516    /// # Example
22517    /// ```ignore,no_run
22518    /// # use google_cloud_securitycenter_v2::model::Cve;
22519    /// use wkt::Timestamp;
22520    /// let x = Cve::new().set_or_clear_first_exploitation_date(Some(Timestamp::default()/* use setters */));
22521    /// let x = Cve::new().set_or_clear_first_exploitation_date(None::<Timestamp>);
22522    /// ```
22523    pub fn set_or_clear_first_exploitation_date<T>(mut self, v: std::option::Option<T>) -> Self
22524    where
22525        T: std::convert::Into<wkt::Timestamp>,
22526    {
22527        self.first_exploitation_date = v.map(|x| x.into());
22528        self
22529    }
22530}
22531
22532impl wkt::message::Message for Cve {
22533    fn typename() -> &'static str {
22534        "type.googleapis.com/google.cloud.securitycenter.v2.Cve"
22535    }
22536}
22537
22538/// Defines additional types related to [Cve].
22539pub mod cve {
22540    #[allow(unused_imports)]
22541    use super::*;
22542
22543    /// The possible values of impact of the vulnerability if it was to be
22544    /// exploited.
22545    ///
22546    /// # Working with unknown values
22547    ///
22548    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22549    /// additional enum variants at any time. Adding new variants is not considered
22550    /// a breaking change. Applications should write their code in anticipation of:
22551    ///
22552    /// - New values appearing in future releases of the client library, **and**
22553    /// - New values received dynamically, without application changes.
22554    ///
22555    /// Please consult the [Working with enums] section in the user guide for some
22556    /// guidelines.
22557    ///
22558    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
22559    #[derive(Clone, Debug, PartialEq)]
22560    #[non_exhaustive]
22561    pub enum RiskRating {
22562        /// Invalid or empty value.
22563        Unspecified,
22564        /// Exploitation would have little to no security impact.
22565        Low,
22566        /// Exploitation would enable attackers to perform activities, or could allow
22567        /// attackers to have a direct impact, but would require additional steps.
22568        Medium,
22569        /// Exploitation would enable attackers to have a notable direct impact
22570        /// without needing to overcome any major mitigating factors.
22571        High,
22572        /// Exploitation would fundamentally undermine the security of affected
22573        /// systems, enable actors to perform significant attacks with minimal
22574        /// effort, with little to no mitigating factors to overcome.
22575        Critical,
22576        /// If set, the enum was initialized with an unknown value.
22577        ///
22578        /// Applications can examine the value using [RiskRating::value] or
22579        /// [RiskRating::name].
22580        UnknownValue(risk_rating::UnknownValue),
22581    }
22582
22583    #[doc(hidden)]
22584    pub mod risk_rating {
22585        #[allow(unused_imports)]
22586        use super::*;
22587        #[derive(Clone, Debug, PartialEq)]
22588        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22589    }
22590
22591    impl RiskRating {
22592        /// Gets the enum value.
22593        ///
22594        /// Returns `None` if the enum contains an unknown value deserialized from
22595        /// the string representation of enums.
22596        pub fn value(&self) -> std::option::Option<i32> {
22597            match self {
22598                Self::Unspecified => std::option::Option::Some(0),
22599                Self::Low => std::option::Option::Some(1),
22600                Self::Medium => std::option::Option::Some(2),
22601                Self::High => std::option::Option::Some(3),
22602                Self::Critical => std::option::Option::Some(4),
22603                Self::UnknownValue(u) => u.0.value(),
22604            }
22605        }
22606
22607        /// Gets the enum value as a string.
22608        ///
22609        /// Returns `None` if the enum contains an unknown value deserialized from
22610        /// the integer representation of enums.
22611        pub fn name(&self) -> std::option::Option<&str> {
22612            match self {
22613                Self::Unspecified => std::option::Option::Some("RISK_RATING_UNSPECIFIED"),
22614                Self::Low => std::option::Option::Some("LOW"),
22615                Self::Medium => std::option::Option::Some("MEDIUM"),
22616                Self::High => std::option::Option::Some("HIGH"),
22617                Self::Critical => std::option::Option::Some("CRITICAL"),
22618                Self::UnknownValue(u) => u.0.name(),
22619            }
22620        }
22621    }
22622
22623    impl std::default::Default for RiskRating {
22624        fn default() -> Self {
22625            use std::convert::From;
22626            Self::from(0)
22627        }
22628    }
22629
22630    impl std::fmt::Display for RiskRating {
22631        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22632            wkt::internal::display_enum(f, self.name(), self.value())
22633        }
22634    }
22635
22636    impl std::convert::From<i32> for RiskRating {
22637        fn from(value: i32) -> Self {
22638            match value {
22639                0 => Self::Unspecified,
22640                1 => Self::Low,
22641                2 => Self::Medium,
22642                3 => Self::High,
22643                4 => Self::Critical,
22644                _ => Self::UnknownValue(risk_rating::UnknownValue(
22645                    wkt::internal::UnknownEnumValue::Integer(value),
22646                )),
22647            }
22648        }
22649    }
22650
22651    impl std::convert::From<&str> for RiskRating {
22652        fn from(value: &str) -> Self {
22653            use std::string::ToString;
22654            match value {
22655                "RISK_RATING_UNSPECIFIED" => Self::Unspecified,
22656                "LOW" => Self::Low,
22657                "MEDIUM" => Self::Medium,
22658                "HIGH" => Self::High,
22659                "CRITICAL" => Self::Critical,
22660                _ => Self::UnknownValue(risk_rating::UnknownValue(
22661                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22662                )),
22663            }
22664        }
22665    }
22666
22667    impl serde::ser::Serialize for RiskRating {
22668        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22669        where
22670            S: serde::Serializer,
22671        {
22672            match self {
22673                Self::Unspecified => serializer.serialize_i32(0),
22674                Self::Low => serializer.serialize_i32(1),
22675                Self::Medium => serializer.serialize_i32(2),
22676                Self::High => serializer.serialize_i32(3),
22677                Self::Critical => serializer.serialize_i32(4),
22678                Self::UnknownValue(u) => u.0.serialize(serializer),
22679            }
22680        }
22681    }
22682
22683    impl<'de> serde::de::Deserialize<'de> for RiskRating {
22684        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22685        where
22686            D: serde::Deserializer<'de>,
22687        {
22688            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RiskRating>::new(
22689                ".google.cloud.securitycenter.v2.Cve.RiskRating",
22690            ))
22691        }
22692    }
22693
22694    /// The possible values of exploitation activity of the vulnerability in the
22695    /// wild.
22696    ///
22697    /// # Working with unknown values
22698    ///
22699    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22700    /// additional enum variants at any time. Adding new variants is not considered
22701    /// a breaking change. Applications should write their code in anticipation of:
22702    ///
22703    /// - New values appearing in future releases of the client library, **and**
22704    /// - New values received dynamically, without application changes.
22705    ///
22706    /// Please consult the [Working with enums] section in the user guide for some
22707    /// guidelines.
22708    ///
22709    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
22710    #[derive(Clone, Debug, PartialEq)]
22711    #[non_exhaustive]
22712    pub enum ExploitationActivity {
22713        /// Invalid or empty value.
22714        Unspecified,
22715        /// Exploitation has been reported or confirmed to widely occur.
22716        Wide,
22717        /// Limited reported or confirmed exploitation activities.
22718        Confirmed,
22719        /// Exploit is publicly available.
22720        Available,
22721        /// No known exploitation activity, but has a high potential for
22722        /// exploitation.
22723        Anticipated,
22724        /// No known exploitation activity.
22725        NoKnown,
22726        /// If set, the enum was initialized with an unknown value.
22727        ///
22728        /// Applications can examine the value using [ExploitationActivity::value] or
22729        /// [ExploitationActivity::name].
22730        UnknownValue(exploitation_activity::UnknownValue),
22731    }
22732
22733    #[doc(hidden)]
22734    pub mod exploitation_activity {
22735        #[allow(unused_imports)]
22736        use super::*;
22737        #[derive(Clone, Debug, PartialEq)]
22738        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22739    }
22740
22741    impl ExploitationActivity {
22742        /// Gets the enum value.
22743        ///
22744        /// Returns `None` if the enum contains an unknown value deserialized from
22745        /// the string representation of enums.
22746        pub fn value(&self) -> std::option::Option<i32> {
22747            match self {
22748                Self::Unspecified => std::option::Option::Some(0),
22749                Self::Wide => std::option::Option::Some(1),
22750                Self::Confirmed => std::option::Option::Some(2),
22751                Self::Available => std::option::Option::Some(3),
22752                Self::Anticipated => std::option::Option::Some(4),
22753                Self::NoKnown => std::option::Option::Some(5),
22754                Self::UnknownValue(u) => u.0.value(),
22755            }
22756        }
22757
22758        /// Gets the enum value as a string.
22759        ///
22760        /// Returns `None` if the enum contains an unknown value deserialized from
22761        /// the integer representation of enums.
22762        pub fn name(&self) -> std::option::Option<&str> {
22763            match self {
22764                Self::Unspecified => std::option::Option::Some("EXPLOITATION_ACTIVITY_UNSPECIFIED"),
22765                Self::Wide => std::option::Option::Some("WIDE"),
22766                Self::Confirmed => std::option::Option::Some("CONFIRMED"),
22767                Self::Available => std::option::Option::Some("AVAILABLE"),
22768                Self::Anticipated => std::option::Option::Some("ANTICIPATED"),
22769                Self::NoKnown => std::option::Option::Some("NO_KNOWN"),
22770                Self::UnknownValue(u) => u.0.name(),
22771            }
22772        }
22773    }
22774
22775    impl std::default::Default for ExploitationActivity {
22776        fn default() -> Self {
22777            use std::convert::From;
22778            Self::from(0)
22779        }
22780    }
22781
22782    impl std::fmt::Display for ExploitationActivity {
22783        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22784            wkt::internal::display_enum(f, self.name(), self.value())
22785        }
22786    }
22787
22788    impl std::convert::From<i32> for ExploitationActivity {
22789        fn from(value: i32) -> Self {
22790            match value {
22791                0 => Self::Unspecified,
22792                1 => Self::Wide,
22793                2 => Self::Confirmed,
22794                3 => Self::Available,
22795                4 => Self::Anticipated,
22796                5 => Self::NoKnown,
22797                _ => Self::UnknownValue(exploitation_activity::UnknownValue(
22798                    wkt::internal::UnknownEnumValue::Integer(value),
22799                )),
22800            }
22801        }
22802    }
22803
22804    impl std::convert::From<&str> for ExploitationActivity {
22805        fn from(value: &str) -> Self {
22806            use std::string::ToString;
22807            match value {
22808                "EXPLOITATION_ACTIVITY_UNSPECIFIED" => Self::Unspecified,
22809                "WIDE" => Self::Wide,
22810                "CONFIRMED" => Self::Confirmed,
22811                "AVAILABLE" => Self::Available,
22812                "ANTICIPATED" => Self::Anticipated,
22813                "NO_KNOWN" => Self::NoKnown,
22814                _ => Self::UnknownValue(exploitation_activity::UnknownValue(
22815                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22816                )),
22817            }
22818        }
22819    }
22820
22821    impl serde::ser::Serialize for ExploitationActivity {
22822        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22823        where
22824            S: serde::Serializer,
22825        {
22826            match self {
22827                Self::Unspecified => serializer.serialize_i32(0),
22828                Self::Wide => serializer.serialize_i32(1),
22829                Self::Confirmed => serializer.serialize_i32(2),
22830                Self::Available => serializer.serialize_i32(3),
22831                Self::Anticipated => serializer.serialize_i32(4),
22832                Self::NoKnown => serializer.serialize_i32(5),
22833                Self::UnknownValue(u) => u.0.serialize(serializer),
22834            }
22835        }
22836    }
22837
22838    impl<'de> serde::de::Deserialize<'de> for ExploitationActivity {
22839        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22840        where
22841            D: serde::Deserializer<'de>,
22842        {
22843            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ExploitationActivity>::new(
22844                ".google.cloud.securitycenter.v2.Cve.ExploitationActivity",
22845            ))
22846        }
22847    }
22848}
22849
22850/// Additional Links
22851#[derive(Clone, Default, PartialEq)]
22852#[non_exhaustive]
22853pub struct Reference {
22854    /// Source of the reference e.g. NVD
22855    pub source: std::string::String,
22856
22857    /// Uri for the mentioned source e.g.
22858    /// <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527>.
22859    pub uri: std::string::String,
22860
22861    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22862}
22863
22864impl Reference {
22865    pub fn new() -> Self {
22866        std::default::Default::default()
22867    }
22868
22869    /// Sets the value of [source][crate::model::Reference::source].
22870    ///
22871    /// # Example
22872    /// ```ignore,no_run
22873    /// # use google_cloud_securitycenter_v2::model::Reference;
22874    /// let x = Reference::new().set_source("example");
22875    /// ```
22876    pub fn set_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22877        self.source = v.into();
22878        self
22879    }
22880
22881    /// Sets the value of [uri][crate::model::Reference::uri].
22882    ///
22883    /// # Example
22884    /// ```ignore,no_run
22885    /// # use google_cloud_securitycenter_v2::model::Reference;
22886    /// let x = Reference::new().set_uri("example");
22887    /// ```
22888    pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22889        self.uri = v.into();
22890        self
22891    }
22892}
22893
22894impl wkt::message::Message for Reference {
22895    fn typename() -> &'static str {
22896        "type.googleapis.com/google.cloud.securitycenter.v2.Reference"
22897    }
22898}
22899
22900/// Common Vulnerability Scoring System version 3.
22901#[derive(Clone, Default, PartialEq)]
22902#[non_exhaustive]
22903pub struct Cvssv3 {
22904    /// The base score is a function of the base metric scores.
22905    pub base_score: f64,
22906
22907    /// Base Metrics
22908    /// Represents the intrinsic characteristics of a vulnerability that are
22909    /// constant over time and across user environments.
22910    /// This metric reflects the context by which vulnerability exploitation is
22911    /// possible.
22912    pub attack_vector: crate::model::cvssv_3::AttackVector,
22913
22914    /// This metric describes the conditions beyond the attacker's control that
22915    /// must exist in order to exploit the vulnerability.
22916    pub attack_complexity: crate::model::cvssv_3::AttackComplexity,
22917
22918    /// This metric describes the level of privileges an attacker must possess
22919    /// before successfully exploiting the vulnerability.
22920    pub privileges_required: crate::model::cvssv_3::PrivilegesRequired,
22921
22922    /// This metric captures the requirement for a human user, other than the
22923    /// attacker, to participate in the successful compromise of the vulnerable
22924    /// component.
22925    pub user_interaction: crate::model::cvssv_3::UserInteraction,
22926
22927    /// The Scope metric captures whether a vulnerability in one vulnerable
22928    /// component impacts resources in components beyond its security scope.
22929    pub scope: crate::model::cvssv_3::Scope,
22930
22931    /// This metric measures the impact to the confidentiality of the information
22932    /// resources managed by a software component due to a successfully exploited
22933    /// vulnerability.
22934    pub confidentiality_impact: crate::model::cvssv_3::Impact,
22935
22936    /// This metric measures the impact to integrity of a successfully exploited
22937    /// vulnerability.
22938    pub integrity_impact: crate::model::cvssv_3::Impact,
22939
22940    /// This metric measures the impact to the availability of the impacted
22941    /// component resulting from a successfully exploited vulnerability.
22942    pub availability_impact: crate::model::cvssv_3::Impact,
22943
22944    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22945}
22946
22947impl Cvssv3 {
22948    pub fn new() -> Self {
22949        std::default::Default::default()
22950    }
22951
22952    /// Sets the value of [base_score][crate::model::Cvssv3::base_score].
22953    ///
22954    /// # Example
22955    /// ```ignore,no_run
22956    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
22957    /// let x = Cvssv3::new().set_base_score(42.0);
22958    /// ```
22959    pub fn set_base_score<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
22960        self.base_score = v.into();
22961        self
22962    }
22963
22964    /// Sets the value of [attack_vector][crate::model::Cvssv3::attack_vector].
22965    ///
22966    /// # Example
22967    /// ```ignore,no_run
22968    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
22969    /// use google_cloud_securitycenter_v2::model::cvssv_3::AttackVector;
22970    /// let x0 = Cvssv3::new().set_attack_vector(AttackVector::Network);
22971    /// let x1 = Cvssv3::new().set_attack_vector(AttackVector::Adjacent);
22972    /// let x2 = Cvssv3::new().set_attack_vector(AttackVector::Local);
22973    /// ```
22974    pub fn set_attack_vector<T: std::convert::Into<crate::model::cvssv_3::AttackVector>>(
22975        mut self,
22976        v: T,
22977    ) -> Self {
22978        self.attack_vector = v.into();
22979        self
22980    }
22981
22982    /// Sets the value of [attack_complexity][crate::model::Cvssv3::attack_complexity].
22983    ///
22984    /// # Example
22985    /// ```ignore,no_run
22986    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
22987    /// use google_cloud_securitycenter_v2::model::cvssv_3::AttackComplexity;
22988    /// let x0 = Cvssv3::new().set_attack_complexity(AttackComplexity::Low);
22989    /// let x1 = Cvssv3::new().set_attack_complexity(AttackComplexity::High);
22990    /// ```
22991    pub fn set_attack_complexity<T: std::convert::Into<crate::model::cvssv_3::AttackComplexity>>(
22992        mut self,
22993        v: T,
22994    ) -> Self {
22995        self.attack_complexity = v.into();
22996        self
22997    }
22998
22999    /// Sets the value of [privileges_required][crate::model::Cvssv3::privileges_required].
23000    ///
23001    /// # Example
23002    /// ```ignore,no_run
23003    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23004    /// use google_cloud_securitycenter_v2::model::cvssv_3::PrivilegesRequired;
23005    /// let x0 = Cvssv3::new().set_privileges_required(PrivilegesRequired::None);
23006    /// let x1 = Cvssv3::new().set_privileges_required(PrivilegesRequired::Low);
23007    /// let x2 = Cvssv3::new().set_privileges_required(PrivilegesRequired::High);
23008    /// ```
23009    pub fn set_privileges_required<
23010        T: std::convert::Into<crate::model::cvssv_3::PrivilegesRequired>,
23011    >(
23012        mut self,
23013        v: T,
23014    ) -> Self {
23015        self.privileges_required = v.into();
23016        self
23017    }
23018
23019    /// Sets the value of [user_interaction][crate::model::Cvssv3::user_interaction].
23020    ///
23021    /// # Example
23022    /// ```ignore,no_run
23023    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23024    /// use google_cloud_securitycenter_v2::model::cvssv_3::UserInteraction;
23025    /// let x0 = Cvssv3::new().set_user_interaction(UserInteraction::None);
23026    /// let x1 = Cvssv3::new().set_user_interaction(UserInteraction::Required);
23027    /// ```
23028    pub fn set_user_interaction<T: std::convert::Into<crate::model::cvssv_3::UserInteraction>>(
23029        mut self,
23030        v: T,
23031    ) -> Self {
23032        self.user_interaction = v.into();
23033        self
23034    }
23035
23036    /// Sets the value of [scope][crate::model::Cvssv3::scope].
23037    ///
23038    /// # Example
23039    /// ```ignore,no_run
23040    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23041    /// use google_cloud_securitycenter_v2::model::cvssv_3::Scope;
23042    /// let x0 = Cvssv3::new().set_scope(Scope::Unchanged);
23043    /// let x1 = Cvssv3::new().set_scope(Scope::Changed);
23044    /// ```
23045    pub fn set_scope<T: std::convert::Into<crate::model::cvssv_3::Scope>>(mut self, v: T) -> Self {
23046        self.scope = v.into();
23047        self
23048    }
23049
23050    /// Sets the value of [confidentiality_impact][crate::model::Cvssv3::confidentiality_impact].
23051    ///
23052    /// # Example
23053    /// ```ignore,no_run
23054    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23055    /// use google_cloud_securitycenter_v2::model::cvssv_3::Impact;
23056    /// let x0 = Cvssv3::new().set_confidentiality_impact(Impact::High);
23057    /// let x1 = Cvssv3::new().set_confidentiality_impact(Impact::Low);
23058    /// let x2 = Cvssv3::new().set_confidentiality_impact(Impact::None);
23059    /// ```
23060    pub fn set_confidentiality_impact<T: std::convert::Into<crate::model::cvssv_3::Impact>>(
23061        mut self,
23062        v: T,
23063    ) -> Self {
23064        self.confidentiality_impact = v.into();
23065        self
23066    }
23067
23068    /// Sets the value of [integrity_impact][crate::model::Cvssv3::integrity_impact].
23069    ///
23070    /// # Example
23071    /// ```ignore,no_run
23072    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23073    /// use google_cloud_securitycenter_v2::model::cvssv_3::Impact;
23074    /// let x0 = Cvssv3::new().set_integrity_impact(Impact::High);
23075    /// let x1 = Cvssv3::new().set_integrity_impact(Impact::Low);
23076    /// let x2 = Cvssv3::new().set_integrity_impact(Impact::None);
23077    /// ```
23078    pub fn set_integrity_impact<T: std::convert::Into<crate::model::cvssv_3::Impact>>(
23079        mut self,
23080        v: T,
23081    ) -> Self {
23082        self.integrity_impact = v.into();
23083        self
23084    }
23085
23086    /// Sets the value of [availability_impact][crate::model::Cvssv3::availability_impact].
23087    ///
23088    /// # Example
23089    /// ```ignore,no_run
23090    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23091    /// use google_cloud_securitycenter_v2::model::cvssv_3::Impact;
23092    /// let x0 = Cvssv3::new().set_availability_impact(Impact::High);
23093    /// let x1 = Cvssv3::new().set_availability_impact(Impact::Low);
23094    /// let x2 = Cvssv3::new().set_availability_impact(Impact::None);
23095    /// ```
23096    pub fn set_availability_impact<T: std::convert::Into<crate::model::cvssv_3::Impact>>(
23097        mut self,
23098        v: T,
23099    ) -> Self {
23100        self.availability_impact = v.into();
23101        self
23102    }
23103}
23104
23105impl wkt::message::Message for Cvssv3 {
23106    fn typename() -> &'static str {
23107        "type.googleapis.com/google.cloud.securitycenter.v2.Cvssv3"
23108    }
23109}
23110
23111/// Defines additional types related to [Cvssv3].
23112pub mod cvssv_3 {
23113    #[allow(unused_imports)]
23114    use super::*;
23115
23116    /// This metric reflects the context by which vulnerability exploitation is
23117    /// possible.
23118    ///
23119    /// # Working with unknown values
23120    ///
23121    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23122    /// additional enum variants at any time. Adding new variants is not considered
23123    /// a breaking change. Applications should write their code in anticipation of:
23124    ///
23125    /// - New values appearing in future releases of the client library, **and**
23126    /// - New values received dynamically, without application changes.
23127    ///
23128    /// Please consult the [Working with enums] section in the user guide for some
23129    /// guidelines.
23130    ///
23131    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23132    #[derive(Clone, Debug, PartialEq)]
23133    #[non_exhaustive]
23134    pub enum AttackVector {
23135        /// Invalid value.
23136        Unspecified,
23137        /// The vulnerable component is bound to the network stack and the set of
23138        /// possible attackers extends beyond the other options listed below, up to
23139        /// and including the entire Internet.
23140        Network,
23141        /// The vulnerable component is bound to the network stack, but the attack is
23142        /// limited at the protocol level to a logically adjacent topology.
23143        Adjacent,
23144        /// The vulnerable component is not bound to the network stack and the
23145        /// attacker's path is via read/write/execute capabilities.
23146        Local,
23147        /// The attack requires the attacker to physically touch or manipulate the
23148        /// vulnerable component.
23149        Physical,
23150        /// If set, the enum was initialized with an unknown value.
23151        ///
23152        /// Applications can examine the value using [AttackVector::value] or
23153        /// [AttackVector::name].
23154        UnknownValue(attack_vector::UnknownValue),
23155    }
23156
23157    #[doc(hidden)]
23158    pub mod attack_vector {
23159        #[allow(unused_imports)]
23160        use super::*;
23161        #[derive(Clone, Debug, PartialEq)]
23162        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23163    }
23164
23165    impl AttackVector {
23166        /// Gets the enum value.
23167        ///
23168        /// Returns `None` if the enum contains an unknown value deserialized from
23169        /// the string representation of enums.
23170        pub fn value(&self) -> std::option::Option<i32> {
23171            match self {
23172                Self::Unspecified => std::option::Option::Some(0),
23173                Self::Network => std::option::Option::Some(1),
23174                Self::Adjacent => std::option::Option::Some(2),
23175                Self::Local => std::option::Option::Some(3),
23176                Self::Physical => std::option::Option::Some(4),
23177                Self::UnknownValue(u) => u.0.value(),
23178            }
23179        }
23180
23181        /// Gets the enum value as a string.
23182        ///
23183        /// Returns `None` if the enum contains an unknown value deserialized from
23184        /// the integer representation of enums.
23185        pub fn name(&self) -> std::option::Option<&str> {
23186            match self {
23187                Self::Unspecified => std::option::Option::Some("ATTACK_VECTOR_UNSPECIFIED"),
23188                Self::Network => std::option::Option::Some("ATTACK_VECTOR_NETWORK"),
23189                Self::Adjacent => std::option::Option::Some("ATTACK_VECTOR_ADJACENT"),
23190                Self::Local => std::option::Option::Some("ATTACK_VECTOR_LOCAL"),
23191                Self::Physical => std::option::Option::Some("ATTACK_VECTOR_PHYSICAL"),
23192                Self::UnknownValue(u) => u.0.name(),
23193            }
23194        }
23195    }
23196
23197    impl std::default::Default for AttackVector {
23198        fn default() -> Self {
23199            use std::convert::From;
23200            Self::from(0)
23201        }
23202    }
23203
23204    impl std::fmt::Display for AttackVector {
23205        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23206            wkt::internal::display_enum(f, self.name(), self.value())
23207        }
23208    }
23209
23210    impl std::convert::From<i32> for AttackVector {
23211        fn from(value: i32) -> Self {
23212            match value {
23213                0 => Self::Unspecified,
23214                1 => Self::Network,
23215                2 => Self::Adjacent,
23216                3 => Self::Local,
23217                4 => Self::Physical,
23218                _ => Self::UnknownValue(attack_vector::UnknownValue(
23219                    wkt::internal::UnknownEnumValue::Integer(value),
23220                )),
23221            }
23222        }
23223    }
23224
23225    impl std::convert::From<&str> for AttackVector {
23226        fn from(value: &str) -> Self {
23227            use std::string::ToString;
23228            match value {
23229                "ATTACK_VECTOR_UNSPECIFIED" => Self::Unspecified,
23230                "ATTACK_VECTOR_NETWORK" => Self::Network,
23231                "ATTACK_VECTOR_ADJACENT" => Self::Adjacent,
23232                "ATTACK_VECTOR_LOCAL" => Self::Local,
23233                "ATTACK_VECTOR_PHYSICAL" => Self::Physical,
23234                _ => Self::UnknownValue(attack_vector::UnknownValue(
23235                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23236                )),
23237            }
23238        }
23239    }
23240
23241    impl serde::ser::Serialize for AttackVector {
23242        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23243        where
23244            S: serde::Serializer,
23245        {
23246            match self {
23247                Self::Unspecified => serializer.serialize_i32(0),
23248                Self::Network => serializer.serialize_i32(1),
23249                Self::Adjacent => serializer.serialize_i32(2),
23250                Self::Local => serializer.serialize_i32(3),
23251                Self::Physical => serializer.serialize_i32(4),
23252                Self::UnknownValue(u) => u.0.serialize(serializer),
23253            }
23254        }
23255    }
23256
23257    impl<'de> serde::de::Deserialize<'de> for AttackVector {
23258        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23259        where
23260            D: serde::Deserializer<'de>,
23261        {
23262            deserializer.deserialize_any(wkt::internal::EnumVisitor::<AttackVector>::new(
23263                ".google.cloud.securitycenter.v2.Cvssv3.AttackVector",
23264            ))
23265        }
23266    }
23267
23268    /// This metric describes the conditions beyond the attacker's control that
23269    /// must exist in order to exploit the vulnerability.
23270    ///
23271    /// # Working with unknown values
23272    ///
23273    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23274    /// additional enum variants at any time. Adding new variants is not considered
23275    /// a breaking change. Applications should write their code in anticipation of:
23276    ///
23277    /// - New values appearing in future releases of the client library, **and**
23278    /// - New values received dynamically, without application changes.
23279    ///
23280    /// Please consult the [Working with enums] section in the user guide for some
23281    /// guidelines.
23282    ///
23283    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23284    #[derive(Clone, Debug, PartialEq)]
23285    #[non_exhaustive]
23286    pub enum AttackComplexity {
23287        /// Invalid value.
23288        Unspecified,
23289        /// Specialized access conditions or extenuating circumstances do not exist.
23290        /// An attacker can expect repeatable success when attacking the vulnerable
23291        /// component.
23292        Low,
23293        /// A successful attack depends on conditions beyond the attacker's control.
23294        /// That is, a successful attack cannot be accomplished at will, but requires
23295        /// the attacker to invest in some measurable amount of effort in preparation
23296        /// or execution against the vulnerable component before a successful attack
23297        /// can be expected.
23298        High,
23299        /// If set, the enum was initialized with an unknown value.
23300        ///
23301        /// Applications can examine the value using [AttackComplexity::value] or
23302        /// [AttackComplexity::name].
23303        UnknownValue(attack_complexity::UnknownValue),
23304    }
23305
23306    #[doc(hidden)]
23307    pub mod attack_complexity {
23308        #[allow(unused_imports)]
23309        use super::*;
23310        #[derive(Clone, Debug, PartialEq)]
23311        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23312    }
23313
23314    impl AttackComplexity {
23315        /// Gets the enum value.
23316        ///
23317        /// Returns `None` if the enum contains an unknown value deserialized from
23318        /// the string representation of enums.
23319        pub fn value(&self) -> std::option::Option<i32> {
23320            match self {
23321                Self::Unspecified => std::option::Option::Some(0),
23322                Self::Low => std::option::Option::Some(1),
23323                Self::High => std::option::Option::Some(2),
23324                Self::UnknownValue(u) => u.0.value(),
23325            }
23326        }
23327
23328        /// Gets the enum value as a string.
23329        ///
23330        /// Returns `None` if the enum contains an unknown value deserialized from
23331        /// the integer representation of enums.
23332        pub fn name(&self) -> std::option::Option<&str> {
23333            match self {
23334                Self::Unspecified => std::option::Option::Some("ATTACK_COMPLEXITY_UNSPECIFIED"),
23335                Self::Low => std::option::Option::Some("ATTACK_COMPLEXITY_LOW"),
23336                Self::High => std::option::Option::Some("ATTACK_COMPLEXITY_HIGH"),
23337                Self::UnknownValue(u) => u.0.name(),
23338            }
23339        }
23340    }
23341
23342    impl std::default::Default for AttackComplexity {
23343        fn default() -> Self {
23344            use std::convert::From;
23345            Self::from(0)
23346        }
23347    }
23348
23349    impl std::fmt::Display for AttackComplexity {
23350        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23351            wkt::internal::display_enum(f, self.name(), self.value())
23352        }
23353    }
23354
23355    impl std::convert::From<i32> for AttackComplexity {
23356        fn from(value: i32) -> Self {
23357            match value {
23358                0 => Self::Unspecified,
23359                1 => Self::Low,
23360                2 => Self::High,
23361                _ => Self::UnknownValue(attack_complexity::UnknownValue(
23362                    wkt::internal::UnknownEnumValue::Integer(value),
23363                )),
23364            }
23365        }
23366    }
23367
23368    impl std::convert::From<&str> for AttackComplexity {
23369        fn from(value: &str) -> Self {
23370            use std::string::ToString;
23371            match value {
23372                "ATTACK_COMPLEXITY_UNSPECIFIED" => Self::Unspecified,
23373                "ATTACK_COMPLEXITY_LOW" => Self::Low,
23374                "ATTACK_COMPLEXITY_HIGH" => Self::High,
23375                _ => Self::UnknownValue(attack_complexity::UnknownValue(
23376                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23377                )),
23378            }
23379        }
23380    }
23381
23382    impl serde::ser::Serialize for AttackComplexity {
23383        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23384        where
23385            S: serde::Serializer,
23386        {
23387            match self {
23388                Self::Unspecified => serializer.serialize_i32(0),
23389                Self::Low => serializer.serialize_i32(1),
23390                Self::High => serializer.serialize_i32(2),
23391                Self::UnknownValue(u) => u.0.serialize(serializer),
23392            }
23393        }
23394    }
23395
23396    impl<'de> serde::de::Deserialize<'de> for AttackComplexity {
23397        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23398        where
23399            D: serde::Deserializer<'de>,
23400        {
23401            deserializer.deserialize_any(wkt::internal::EnumVisitor::<AttackComplexity>::new(
23402                ".google.cloud.securitycenter.v2.Cvssv3.AttackComplexity",
23403            ))
23404        }
23405    }
23406
23407    /// This metric describes the level of privileges an attacker must possess
23408    /// before successfully exploiting the vulnerability.
23409    ///
23410    /// # Working with unknown values
23411    ///
23412    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23413    /// additional enum variants at any time. Adding new variants is not considered
23414    /// a breaking change. Applications should write their code in anticipation of:
23415    ///
23416    /// - New values appearing in future releases of the client library, **and**
23417    /// - New values received dynamically, without application changes.
23418    ///
23419    /// Please consult the [Working with enums] section in the user guide for some
23420    /// guidelines.
23421    ///
23422    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23423    #[derive(Clone, Debug, PartialEq)]
23424    #[non_exhaustive]
23425    pub enum PrivilegesRequired {
23426        /// Invalid value.
23427        Unspecified,
23428        /// The attacker is unauthorized prior to attack, and therefore does not
23429        /// require any access to settings or files of the vulnerable system to
23430        /// carry out an attack.
23431        None,
23432        /// The attacker requires privileges that provide basic user capabilities
23433        /// that could normally affect only settings and files owned by a user.
23434        /// Alternatively, an attacker with Low privileges has the ability to access
23435        /// only non-sensitive resources.
23436        Low,
23437        /// The attacker requires privileges that provide significant (e.g.,
23438        /// administrative) control over the vulnerable component allowing access to
23439        /// component-wide settings and files.
23440        High,
23441        /// If set, the enum was initialized with an unknown value.
23442        ///
23443        /// Applications can examine the value using [PrivilegesRequired::value] or
23444        /// [PrivilegesRequired::name].
23445        UnknownValue(privileges_required::UnknownValue),
23446    }
23447
23448    #[doc(hidden)]
23449    pub mod privileges_required {
23450        #[allow(unused_imports)]
23451        use super::*;
23452        #[derive(Clone, Debug, PartialEq)]
23453        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23454    }
23455
23456    impl PrivilegesRequired {
23457        /// Gets the enum value.
23458        ///
23459        /// Returns `None` if the enum contains an unknown value deserialized from
23460        /// the string representation of enums.
23461        pub fn value(&self) -> std::option::Option<i32> {
23462            match self {
23463                Self::Unspecified => std::option::Option::Some(0),
23464                Self::None => std::option::Option::Some(1),
23465                Self::Low => std::option::Option::Some(2),
23466                Self::High => std::option::Option::Some(3),
23467                Self::UnknownValue(u) => u.0.value(),
23468            }
23469        }
23470
23471        /// Gets the enum value as a string.
23472        ///
23473        /// Returns `None` if the enum contains an unknown value deserialized from
23474        /// the integer representation of enums.
23475        pub fn name(&self) -> std::option::Option<&str> {
23476            match self {
23477                Self::Unspecified => std::option::Option::Some("PRIVILEGES_REQUIRED_UNSPECIFIED"),
23478                Self::None => std::option::Option::Some("PRIVILEGES_REQUIRED_NONE"),
23479                Self::Low => std::option::Option::Some("PRIVILEGES_REQUIRED_LOW"),
23480                Self::High => std::option::Option::Some("PRIVILEGES_REQUIRED_HIGH"),
23481                Self::UnknownValue(u) => u.0.name(),
23482            }
23483        }
23484    }
23485
23486    impl std::default::Default for PrivilegesRequired {
23487        fn default() -> Self {
23488            use std::convert::From;
23489            Self::from(0)
23490        }
23491    }
23492
23493    impl std::fmt::Display for PrivilegesRequired {
23494        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23495            wkt::internal::display_enum(f, self.name(), self.value())
23496        }
23497    }
23498
23499    impl std::convert::From<i32> for PrivilegesRequired {
23500        fn from(value: i32) -> Self {
23501            match value {
23502                0 => Self::Unspecified,
23503                1 => Self::None,
23504                2 => Self::Low,
23505                3 => Self::High,
23506                _ => Self::UnknownValue(privileges_required::UnknownValue(
23507                    wkt::internal::UnknownEnumValue::Integer(value),
23508                )),
23509            }
23510        }
23511    }
23512
23513    impl std::convert::From<&str> for PrivilegesRequired {
23514        fn from(value: &str) -> Self {
23515            use std::string::ToString;
23516            match value {
23517                "PRIVILEGES_REQUIRED_UNSPECIFIED" => Self::Unspecified,
23518                "PRIVILEGES_REQUIRED_NONE" => Self::None,
23519                "PRIVILEGES_REQUIRED_LOW" => Self::Low,
23520                "PRIVILEGES_REQUIRED_HIGH" => Self::High,
23521                _ => Self::UnknownValue(privileges_required::UnknownValue(
23522                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23523                )),
23524            }
23525        }
23526    }
23527
23528    impl serde::ser::Serialize for PrivilegesRequired {
23529        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23530        where
23531            S: serde::Serializer,
23532        {
23533            match self {
23534                Self::Unspecified => serializer.serialize_i32(0),
23535                Self::None => serializer.serialize_i32(1),
23536                Self::Low => serializer.serialize_i32(2),
23537                Self::High => serializer.serialize_i32(3),
23538                Self::UnknownValue(u) => u.0.serialize(serializer),
23539            }
23540        }
23541    }
23542
23543    impl<'de> serde::de::Deserialize<'de> for PrivilegesRequired {
23544        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23545        where
23546            D: serde::Deserializer<'de>,
23547        {
23548            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PrivilegesRequired>::new(
23549                ".google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired",
23550            ))
23551        }
23552    }
23553
23554    /// This metric captures the requirement for a human user, other than the
23555    /// attacker, to participate in the successful compromise of the vulnerable
23556    /// component.
23557    ///
23558    /// # Working with unknown values
23559    ///
23560    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23561    /// additional enum variants at any time. Adding new variants is not considered
23562    /// a breaking change. Applications should write their code in anticipation of:
23563    ///
23564    /// - New values appearing in future releases of the client library, **and**
23565    /// - New values received dynamically, without application changes.
23566    ///
23567    /// Please consult the [Working with enums] section in the user guide for some
23568    /// guidelines.
23569    ///
23570    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23571    #[derive(Clone, Debug, PartialEq)]
23572    #[non_exhaustive]
23573    pub enum UserInteraction {
23574        /// Invalid value.
23575        Unspecified,
23576        /// The vulnerable system can be exploited without interaction from any user.
23577        None,
23578        /// Successful exploitation of this vulnerability requires a user to take
23579        /// some action before the vulnerability can be exploited.
23580        Required,
23581        /// If set, the enum was initialized with an unknown value.
23582        ///
23583        /// Applications can examine the value using [UserInteraction::value] or
23584        /// [UserInteraction::name].
23585        UnknownValue(user_interaction::UnknownValue),
23586    }
23587
23588    #[doc(hidden)]
23589    pub mod user_interaction {
23590        #[allow(unused_imports)]
23591        use super::*;
23592        #[derive(Clone, Debug, PartialEq)]
23593        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23594    }
23595
23596    impl UserInteraction {
23597        /// Gets the enum value.
23598        ///
23599        /// Returns `None` if the enum contains an unknown value deserialized from
23600        /// the string representation of enums.
23601        pub fn value(&self) -> std::option::Option<i32> {
23602            match self {
23603                Self::Unspecified => std::option::Option::Some(0),
23604                Self::None => std::option::Option::Some(1),
23605                Self::Required => std::option::Option::Some(2),
23606                Self::UnknownValue(u) => u.0.value(),
23607            }
23608        }
23609
23610        /// Gets the enum value as a string.
23611        ///
23612        /// Returns `None` if the enum contains an unknown value deserialized from
23613        /// the integer representation of enums.
23614        pub fn name(&self) -> std::option::Option<&str> {
23615            match self {
23616                Self::Unspecified => std::option::Option::Some("USER_INTERACTION_UNSPECIFIED"),
23617                Self::None => std::option::Option::Some("USER_INTERACTION_NONE"),
23618                Self::Required => std::option::Option::Some("USER_INTERACTION_REQUIRED"),
23619                Self::UnknownValue(u) => u.0.name(),
23620            }
23621        }
23622    }
23623
23624    impl std::default::Default for UserInteraction {
23625        fn default() -> Self {
23626            use std::convert::From;
23627            Self::from(0)
23628        }
23629    }
23630
23631    impl std::fmt::Display for UserInteraction {
23632        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23633            wkt::internal::display_enum(f, self.name(), self.value())
23634        }
23635    }
23636
23637    impl std::convert::From<i32> for UserInteraction {
23638        fn from(value: i32) -> Self {
23639            match value {
23640                0 => Self::Unspecified,
23641                1 => Self::None,
23642                2 => Self::Required,
23643                _ => Self::UnknownValue(user_interaction::UnknownValue(
23644                    wkt::internal::UnknownEnumValue::Integer(value),
23645                )),
23646            }
23647        }
23648    }
23649
23650    impl std::convert::From<&str> for UserInteraction {
23651        fn from(value: &str) -> Self {
23652            use std::string::ToString;
23653            match value {
23654                "USER_INTERACTION_UNSPECIFIED" => Self::Unspecified,
23655                "USER_INTERACTION_NONE" => Self::None,
23656                "USER_INTERACTION_REQUIRED" => Self::Required,
23657                _ => Self::UnknownValue(user_interaction::UnknownValue(
23658                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23659                )),
23660            }
23661        }
23662    }
23663
23664    impl serde::ser::Serialize for UserInteraction {
23665        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23666        where
23667            S: serde::Serializer,
23668        {
23669            match self {
23670                Self::Unspecified => serializer.serialize_i32(0),
23671                Self::None => serializer.serialize_i32(1),
23672                Self::Required => serializer.serialize_i32(2),
23673                Self::UnknownValue(u) => u.0.serialize(serializer),
23674            }
23675        }
23676    }
23677
23678    impl<'de> serde::de::Deserialize<'de> for UserInteraction {
23679        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23680        where
23681            D: serde::Deserializer<'de>,
23682        {
23683            deserializer.deserialize_any(wkt::internal::EnumVisitor::<UserInteraction>::new(
23684                ".google.cloud.securitycenter.v2.Cvssv3.UserInteraction",
23685            ))
23686        }
23687    }
23688
23689    /// The Scope metric captures whether a vulnerability in one vulnerable
23690    /// component impacts resources in components beyond its security scope.
23691    ///
23692    /// # Working with unknown values
23693    ///
23694    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23695    /// additional enum variants at any time. Adding new variants is not considered
23696    /// a breaking change. Applications should write their code in anticipation of:
23697    ///
23698    /// - New values appearing in future releases of the client library, **and**
23699    /// - New values received dynamically, without application changes.
23700    ///
23701    /// Please consult the [Working with enums] section in the user guide for some
23702    /// guidelines.
23703    ///
23704    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23705    #[derive(Clone, Debug, PartialEq)]
23706    #[non_exhaustive]
23707    pub enum Scope {
23708        /// Invalid value.
23709        Unspecified,
23710        /// An exploited vulnerability can only affect resources managed by the same
23711        /// security authority.
23712        Unchanged,
23713        /// An exploited vulnerability can affect resources beyond the security scope
23714        /// managed by the security authority of the vulnerable component.
23715        Changed,
23716        /// If set, the enum was initialized with an unknown value.
23717        ///
23718        /// Applications can examine the value using [Scope::value] or
23719        /// [Scope::name].
23720        UnknownValue(scope::UnknownValue),
23721    }
23722
23723    #[doc(hidden)]
23724    pub mod scope {
23725        #[allow(unused_imports)]
23726        use super::*;
23727        #[derive(Clone, Debug, PartialEq)]
23728        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23729    }
23730
23731    impl Scope {
23732        /// Gets the enum value.
23733        ///
23734        /// Returns `None` if the enum contains an unknown value deserialized from
23735        /// the string representation of enums.
23736        pub fn value(&self) -> std::option::Option<i32> {
23737            match self {
23738                Self::Unspecified => std::option::Option::Some(0),
23739                Self::Unchanged => std::option::Option::Some(1),
23740                Self::Changed => std::option::Option::Some(2),
23741                Self::UnknownValue(u) => u.0.value(),
23742            }
23743        }
23744
23745        /// Gets the enum value as a string.
23746        ///
23747        /// Returns `None` if the enum contains an unknown value deserialized from
23748        /// the integer representation of enums.
23749        pub fn name(&self) -> std::option::Option<&str> {
23750            match self {
23751                Self::Unspecified => std::option::Option::Some("SCOPE_UNSPECIFIED"),
23752                Self::Unchanged => std::option::Option::Some("SCOPE_UNCHANGED"),
23753                Self::Changed => std::option::Option::Some("SCOPE_CHANGED"),
23754                Self::UnknownValue(u) => u.0.name(),
23755            }
23756        }
23757    }
23758
23759    impl std::default::Default for Scope {
23760        fn default() -> Self {
23761            use std::convert::From;
23762            Self::from(0)
23763        }
23764    }
23765
23766    impl std::fmt::Display for Scope {
23767        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23768            wkt::internal::display_enum(f, self.name(), self.value())
23769        }
23770    }
23771
23772    impl std::convert::From<i32> for Scope {
23773        fn from(value: i32) -> Self {
23774            match value {
23775                0 => Self::Unspecified,
23776                1 => Self::Unchanged,
23777                2 => Self::Changed,
23778                _ => Self::UnknownValue(scope::UnknownValue(
23779                    wkt::internal::UnknownEnumValue::Integer(value),
23780                )),
23781            }
23782        }
23783    }
23784
23785    impl std::convert::From<&str> for Scope {
23786        fn from(value: &str) -> Self {
23787            use std::string::ToString;
23788            match value {
23789                "SCOPE_UNSPECIFIED" => Self::Unspecified,
23790                "SCOPE_UNCHANGED" => Self::Unchanged,
23791                "SCOPE_CHANGED" => Self::Changed,
23792                _ => Self::UnknownValue(scope::UnknownValue(
23793                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23794                )),
23795            }
23796        }
23797    }
23798
23799    impl serde::ser::Serialize for Scope {
23800        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23801        where
23802            S: serde::Serializer,
23803        {
23804            match self {
23805                Self::Unspecified => serializer.serialize_i32(0),
23806                Self::Unchanged => serializer.serialize_i32(1),
23807                Self::Changed => serializer.serialize_i32(2),
23808                Self::UnknownValue(u) => u.0.serialize(serializer),
23809            }
23810        }
23811    }
23812
23813    impl<'de> serde::de::Deserialize<'de> for Scope {
23814        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23815        where
23816            D: serde::Deserializer<'de>,
23817        {
23818            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Scope>::new(
23819                ".google.cloud.securitycenter.v2.Cvssv3.Scope",
23820            ))
23821        }
23822    }
23823
23824    /// The Impact metrics capture the effects of a successfully exploited
23825    /// vulnerability on the component that suffers the worst outcome that is most
23826    /// directly and predictably associated with the attack.
23827    ///
23828    /// # Working with unknown values
23829    ///
23830    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23831    /// additional enum variants at any time. Adding new variants is not considered
23832    /// a breaking change. Applications should write their code in anticipation of:
23833    ///
23834    /// - New values appearing in future releases of the client library, **and**
23835    /// - New values received dynamically, without application changes.
23836    ///
23837    /// Please consult the [Working with enums] section in the user guide for some
23838    /// guidelines.
23839    ///
23840    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23841    #[derive(Clone, Debug, PartialEq)]
23842    #[non_exhaustive]
23843    pub enum Impact {
23844        /// Invalid value.
23845        Unspecified,
23846        /// High impact.
23847        High,
23848        /// Low impact.
23849        Low,
23850        /// No impact.
23851        None,
23852        /// If set, the enum was initialized with an unknown value.
23853        ///
23854        /// Applications can examine the value using [Impact::value] or
23855        /// [Impact::name].
23856        UnknownValue(impact::UnknownValue),
23857    }
23858
23859    #[doc(hidden)]
23860    pub mod impact {
23861        #[allow(unused_imports)]
23862        use super::*;
23863        #[derive(Clone, Debug, PartialEq)]
23864        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23865    }
23866
23867    impl Impact {
23868        /// Gets the enum value.
23869        ///
23870        /// Returns `None` if the enum contains an unknown value deserialized from
23871        /// the string representation of enums.
23872        pub fn value(&self) -> std::option::Option<i32> {
23873            match self {
23874                Self::Unspecified => std::option::Option::Some(0),
23875                Self::High => std::option::Option::Some(1),
23876                Self::Low => std::option::Option::Some(2),
23877                Self::None => std::option::Option::Some(3),
23878                Self::UnknownValue(u) => u.0.value(),
23879            }
23880        }
23881
23882        /// Gets the enum value as a string.
23883        ///
23884        /// Returns `None` if the enum contains an unknown value deserialized from
23885        /// the integer representation of enums.
23886        pub fn name(&self) -> std::option::Option<&str> {
23887            match self {
23888                Self::Unspecified => std::option::Option::Some("IMPACT_UNSPECIFIED"),
23889                Self::High => std::option::Option::Some("IMPACT_HIGH"),
23890                Self::Low => std::option::Option::Some("IMPACT_LOW"),
23891                Self::None => std::option::Option::Some("IMPACT_NONE"),
23892                Self::UnknownValue(u) => u.0.name(),
23893            }
23894        }
23895    }
23896
23897    impl std::default::Default for Impact {
23898        fn default() -> Self {
23899            use std::convert::From;
23900            Self::from(0)
23901        }
23902    }
23903
23904    impl std::fmt::Display for Impact {
23905        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23906            wkt::internal::display_enum(f, self.name(), self.value())
23907        }
23908    }
23909
23910    impl std::convert::From<i32> for Impact {
23911        fn from(value: i32) -> Self {
23912            match value {
23913                0 => Self::Unspecified,
23914                1 => Self::High,
23915                2 => Self::Low,
23916                3 => Self::None,
23917                _ => Self::UnknownValue(impact::UnknownValue(
23918                    wkt::internal::UnknownEnumValue::Integer(value),
23919                )),
23920            }
23921        }
23922    }
23923
23924    impl std::convert::From<&str> for Impact {
23925        fn from(value: &str) -> Self {
23926            use std::string::ToString;
23927            match value {
23928                "IMPACT_UNSPECIFIED" => Self::Unspecified,
23929                "IMPACT_HIGH" => Self::High,
23930                "IMPACT_LOW" => Self::Low,
23931                "IMPACT_NONE" => Self::None,
23932                _ => Self::UnknownValue(impact::UnknownValue(
23933                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23934                )),
23935            }
23936        }
23937    }
23938
23939    impl serde::ser::Serialize for Impact {
23940        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23941        where
23942            S: serde::Serializer,
23943        {
23944            match self {
23945                Self::Unspecified => serializer.serialize_i32(0),
23946                Self::High => serializer.serialize_i32(1),
23947                Self::Low => serializer.serialize_i32(2),
23948                Self::None => serializer.serialize_i32(3),
23949                Self::UnknownValue(u) => u.0.serialize(serializer),
23950            }
23951        }
23952    }
23953
23954    impl<'de> serde::de::Deserialize<'de> for Impact {
23955        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23956        where
23957            D: serde::Deserializer<'de>,
23958        {
23959            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Impact>::new(
23960                ".google.cloud.securitycenter.v2.Cvssv3.Impact",
23961            ))
23962        }
23963    }
23964}
23965
23966/// Package is a generic definition of a package.
23967#[derive(Clone, Default, PartialEq)]
23968#[non_exhaustive]
23969pub struct Package {
23970    /// The name of the package where the vulnerability was detected.
23971    pub package_name: std::string::String,
23972
23973    /// The CPE URI where the vulnerability was detected.
23974    pub cpe_uri: std::string::String,
23975
23976    /// Type of package, for example, os, maven, or go.
23977    pub package_type: std::string::String,
23978
23979    /// The version of the package.
23980    pub package_version: std::string::String,
23981
23982    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23983}
23984
23985impl Package {
23986    pub fn new() -> Self {
23987        std::default::Default::default()
23988    }
23989
23990    /// Sets the value of [package_name][crate::model::Package::package_name].
23991    ///
23992    /// # Example
23993    /// ```ignore,no_run
23994    /// # use google_cloud_securitycenter_v2::model::Package;
23995    /// let x = Package::new().set_package_name("example");
23996    /// ```
23997    pub fn set_package_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23998        self.package_name = v.into();
23999        self
24000    }
24001
24002    /// Sets the value of [cpe_uri][crate::model::Package::cpe_uri].
24003    ///
24004    /// # Example
24005    /// ```ignore,no_run
24006    /// # use google_cloud_securitycenter_v2::model::Package;
24007    /// let x = Package::new().set_cpe_uri("example");
24008    /// ```
24009    pub fn set_cpe_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24010        self.cpe_uri = v.into();
24011        self
24012    }
24013
24014    /// Sets the value of [package_type][crate::model::Package::package_type].
24015    ///
24016    /// # Example
24017    /// ```ignore,no_run
24018    /// # use google_cloud_securitycenter_v2::model::Package;
24019    /// let x = Package::new().set_package_type("example");
24020    /// ```
24021    pub fn set_package_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24022        self.package_type = v.into();
24023        self
24024    }
24025
24026    /// Sets the value of [package_version][crate::model::Package::package_version].
24027    ///
24028    /// # Example
24029    /// ```ignore,no_run
24030    /// # use google_cloud_securitycenter_v2::model::Package;
24031    /// let x = Package::new().set_package_version("example");
24032    /// ```
24033    pub fn set_package_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24034        self.package_version = v.into();
24035        self
24036    }
24037}
24038
24039impl wkt::message::Message for Package {
24040    fn typename() -> &'static str {
24041        "type.googleapis.com/google.cloud.securitycenter.v2.Package"
24042    }
24043}
24044
24045/// SecurityBulletin are notifications of vulnerabilities of Google products.
24046#[derive(Clone, Default, PartialEq)]
24047#[non_exhaustive]
24048pub struct SecurityBulletin {
24049    /// ID of the bulletin corresponding to the vulnerability.
24050    pub bulletin_id: std::string::String,
24051
24052    /// Submission time of this Security Bulletin.
24053    pub submission_time: std::option::Option<wkt::Timestamp>,
24054
24055    /// This represents a version that the cluster receiving this notification
24056    /// should be upgraded to, based on its current version. For example, 1.15.0
24057    pub suggested_upgrade_version: std::string::String,
24058
24059    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24060}
24061
24062impl SecurityBulletin {
24063    pub fn new() -> Self {
24064        std::default::Default::default()
24065    }
24066
24067    /// Sets the value of [bulletin_id][crate::model::SecurityBulletin::bulletin_id].
24068    ///
24069    /// # Example
24070    /// ```ignore,no_run
24071    /// # use google_cloud_securitycenter_v2::model::SecurityBulletin;
24072    /// let x = SecurityBulletin::new().set_bulletin_id("example");
24073    /// ```
24074    pub fn set_bulletin_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24075        self.bulletin_id = v.into();
24076        self
24077    }
24078
24079    /// Sets the value of [submission_time][crate::model::SecurityBulletin::submission_time].
24080    ///
24081    /// # Example
24082    /// ```ignore,no_run
24083    /// # use google_cloud_securitycenter_v2::model::SecurityBulletin;
24084    /// use wkt::Timestamp;
24085    /// let x = SecurityBulletin::new().set_submission_time(Timestamp::default()/* use setters */);
24086    /// ```
24087    pub fn set_submission_time<T>(mut self, v: T) -> Self
24088    where
24089        T: std::convert::Into<wkt::Timestamp>,
24090    {
24091        self.submission_time = std::option::Option::Some(v.into());
24092        self
24093    }
24094
24095    /// Sets or clears the value of [submission_time][crate::model::SecurityBulletin::submission_time].
24096    ///
24097    /// # Example
24098    /// ```ignore,no_run
24099    /// # use google_cloud_securitycenter_v2::model::SecurityBulletin;
24100    /// use wkt::Timestamp;
24101    /// let x = SecurityBulletin::new().set_or_clear_submission_time(Some(Timestamp::default()/* use setters */));
24102    /// let x = SecurityBulletin::new().set_or_clear_submission_time(None::<Timestamp>);
24103    /// ```
24104    pub fn set_or_clear_submission_time<T>(mut self, v: std::option::Option<T>) -> Self
24105    where
24106        T: std::convert::Into<wkt::Timestamp>,
24107    {
24108        self.submission_time = v.map(|x| x.into());
24109        self
24110    }
24111
24112    /// Sets the value of [suggested_upgrade_version][crate::model::SecurityBulletin::suggested_upgrade_version].
24113    ///
24114    /// # Example
24115    /// ```ignore,no_run
24116    /// # use google_cloud_securitycenter_v2::model::SecurityBulletin;
24117    /// let x = SecurityBulletin::new().set_suggested_upgrade_version("example");
24118    /// ```
24119    pub fn set_suggested_upgrade_version<T: std::convert::Into<std::string::String>>(
24120        mut self,
24121        v: T,
24122    ) -> Self {
24123        self.suggested_upgrade_version = v.into();
24124        self
24125    }
24126}
24127
24128impl wkt::message::Message for SecurityBulletin {
24129    fn typename() -> &'static str {
24130        "type.googleapis.com/google.cloud.securitycenter.v2.SecurityBulletin"
24131    }
24132}
24133
24134/// CWE stands for Common Weakness Enumeration. Information about this weakness,
24135/// as described by [CWE](https://cwe.mitre.org/).
24136#[derive(Clone, Default, PartialEq)]
24137#[non_exhaustive]
24138pub struct Cwe {
24139    /// The CWE identifier, e.g. CWE-94
24140    pub id: std::string::String,
24141
24142    /// Any reference to the details on the CWE, for example,
24143    /// <https://cwe.mitre.org/data/definitions/94.html>
24144    pub references: std::vec::Vec<crate::model::Reference>,
24145
24146    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24147}
24148
24149impl Cwe {
24150    pub fn new() -> Self {
24151        std::default::Default::default()
24152    }
24153
24154    /// Sets the value of [id][crate::model::Cwe::id].
24155    ///
24156    /// # Example
24157    /// ```ignore,no_run
24158    /// # use google_cloud_securitycenter_v2::model::Cwe;
24159    /// let x = Cwe::new().set_id("example");
24160    /// ```
24161    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24162        self.id = v.into();
24163        self
24164    }
24165
24166    /// Sets the value of [references][crate::model::Cwe::references].
24167    ///
24168    /// # Example
24169    /// ```ignore,no_run
24170    /// # use google_cloud_securitycenter_v2::model::Cwe;
24171    /// use google_cloud_securitycenter_v2::model::Reference;
24172    /// let x = Cwe::new()
24173    ///     .set_references([
24174    ///         Reference::default()/* use setters */,
24175    ///         Reference::default()/* use (different) setters */,
24176    ///     ]);
24177    /// ```
24178    pub fn set_references<T, V>(mut self, v: T) -> Self
24179    where
24180        T: std::iter::IntoIterator<Item = V>,
24181        V: std::convert::Into<crate::model::Reference>,
24182    {
24183        use std::iter::Iterator;
24184        self.references = v.into_iter().map(|i| i.into()).collect();
24185        self
24186    }
24187}
24188
24189impl wkt::message::Message for Cwe {
24190    fn typename() -> &'static str {
24191        "type.googleapis.com/google.cloud.securitycenter.v2.Cwe"
24192    }
24193}
24194
24195/// JobState represents the state of the job.
24196///
24197/// # Working with unknown values
24198///
24199/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24200/// additional enum variants at any time. Adding new variants is not considered
24201/// a breaking change. Applications should write their code in anticipation of:
24202///
24203/// - New values appearing in future releases of the client library, **and**
24204/// - New values received dynamically, without application changes.
24205///
24206/// Please consult the [Working with enums] section in the user guide for some
24207/// guidelines.
24208///
24209/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24210#[derive(Clone, Debug, PartialEq)]
24211#[non_exhaustive]
24212pub enum JobState {
24213    /// Unspecified represents an unknown state and should not be used.
24214    Unspecified,
24215    /// Job is scheduled and pending for run
24216    Pending,
24217    /// Job in progress
24218    Running,
24219    /// Job has completed with success
24220    Succeeded,
24221    /// Job has completed but with failure
24222    Failed,
24223    /// If set, the enum was initialized with an unknown value.
24224    ///
24225    /// Applications can examine the value using [JobState::value] or
24226    /// [JobState::name].
24227    UnknownValue(job_state::UnknownValue),
24228}
24229
24230#[doc(hidden)]
24231pub mod job_state {
24232    #[allow(unused_imports)]
24233    use super::*;
24234    #[derive(Clone, Debug, PartialEq)]
24235    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24236}
24237
24238impl JobState {
24239    /// Gets the enum value.
24240    ///
24241    /// Returns `None` if the enum contains an unknown value deserialized from
24242    /// the string representation of enums.
24243    pub fn value(&self) -> std::option::Option<i32> {
24244        match self {
24245            Self::Unspecified => std::option::Option::Some(0),
24246            Self::Pending => std::option::Option::Some(1),
24247            Self::Running => std::option::Option::Some(2),
24248            Self::Succeeded => std::option::Option::Some(3),
24249            Self::Failed => std::option::Option::Some(4),
24250            Self::UnknownValue(u) => u.0.value(),
24251        }
24252    }
24253
24254    /// Gets the enum value as a string.
24255    ///
24256    /// Returns `None` if the enum contains an unknown value deserialized from
24257    /// the integer representation of enums.
24258    pub fn name(&self) -> std::option::Option<&str> {
24259        match self {
24260            Self::Unspecified => std::option::Option::Some("JOB_STATE_UNSPECIFIED"),
24261            Self::Pending => std::option::Option::Some("PENDING"),
24262            Self::Running => std::option::Option::Some("RUNNING"),
24263            Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
24264            Self::Failed => std::option::Option::Some("FAILED"),
24265            Self::UnknownValue(u) => u.0.name(),
24266        }
24267    }
24268}
24269
24270impl std::default::Default for JobState {
24271    fn default() -> Self {
24272        use std::convert::From;
24273        Self::from(0)
24274    }
24275}
24276
24277impl std::fmt::Display for JobState {
24278    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24279        wkt::internal::display_enum(f, self.name(), self.value())
24280    }
24281}
24282
24283impl std::convert::From<i32> for JobState {
24284    fn from(value: i32) -> Self {
24285        match value {
24286            0 => Self::Unspecified,
24287            1 => Self::Pending,
24288            2 => Self::Running,
24289            3 => Self::Succeeded,
24290            4 => Self::Failed,
24291            _ => Self::UnknownValue(job_state::UnknownValue(
24292                wkt::internal::UnknownEnumValue::Integer(value),
24293            )),
24294        }
24295    }
24296}
24297
24298impl std::convert::From<&str> for JobState {
24299    fn from(value: &str) -> Self {
24300        use std::string::ToString;
24301        match value {
24302            "JOB_STATE_UNSPECIFIED" => Self::Unspecified,
24303            "PENDING" => Self::Pending,
24304            "RUNNING" => Self::Running,
24305            "SUCCEEDED" => Self::Succeeded,
24306            "FAILED" => Self::Failed,
24307            _ => Self::UnknownValue(job_state::UnknownValue(
24308                wkt::internal::UnknownEnumValue::String(value.to_string()),
24309            )),
24310        }
24311    }
24312}
24313
24314impl serde::ser::Serialize for JobState {
24315    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24316    where
24317        S: serde::Serializer,
24318    {
24319        match self {
24320            Self::Unspecified => serializer.serialize_i32(0),
24321            Self::Pending => serializer.serialize_i32(1),
24322            Self::Running => serializer.serialize_i32(2),
24323            Self::Succeeded => serializer.serialize_i32(3),
24324            Self::Failed => serializer.serialize_i32(4),
24325            Self::UnknownValue(u) => u.0.serialize(serializer),
24326        }
24327    }
24328}
24329
24330impl<'de> serde::de::Deserialize<'de> for JobState {
24331    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24332    where
24333        D: serde::Deserializer<'de>,
24334    {
24335        deserializer.deserialize_any(wkt::internal::EnumVisitor::<JobState>::new(
24336            ".google.cloud.securitycenter.v2.JobState",
24337        ))
24338    }
24339}
24340
24341/// The cloud provider the finding pertains to.
24342///
24343/// # Working with unknown values
24344///
24345/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24346/// additional enum variants at any time. Adding new variants is not considered
24347/// a breaking change. Applications should write their code in anticipation of:
24348///
24349/// - New values appearing in future releases of the client library, **and**
24350/// - New values received dynamically, without application changes.
24351///
24352/// Please consult the [Working with enums] section in the user guide for some
24353/// guidelines.
24354///
24355/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24356#[derive(Clone, Debug, PartialEq)]
24357#[non_exhaustive]
24358pub enum CloudProvider {
24359    /// The cloud provider is unspecified.
24360    Unspecified,
24361    /// The cloud provider is Google Cloud.
24362    GoogleCloudPlatform,
24363    /// The cloud provider is Amazon Web Services.
24364    AmazonWebServices,
24365    /// The cloud provider is Microsoft Azure.
24366    MicrosoftAzure,
24367    /// If set, the enum was initialized with an unknown value.
24368    ///
24369    /// Applications can examine the value using [CloudProvider::value] or
24370    /// [CloudProvider::name].
24371    UnknownValue(cloud_provider::UnknownValue),
24372}
24373
24374#[doc(hidden)]
24375pub mod cloud_provider {
24376    #[allow(unused_imports)]
24377    use super::*;
24378    #[derive(Clone, Debug, PartialEq)]
24379    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24380}
24381
24382impl CloudProvider {
24383    /// Gets the enum value.
24384    ///
24385    /// Returns `None` if the enum contains an unknown value deserialized from
24386    /// the string representation of enums.
24387    pub fn value(&self) -> std::option::Option<i32> {
24388        match self {
24389            Self::Unspecified => std::option::Option::Some(0),
24390            Self::GoogleCloudPlatform => std::option::Option::Some(1),
24391            Self::AmazonWebServices => std::option::Option::Some(2),
24392            Self::MicrosoftAzure => std::option::Option::Some(3),
24393            Self::UnknownValue(u) => u.0.value(),
24394        }
24395    }
24396
24397    /// Gets the enum value as a string.
24398    ///
24399    /// Returns `None` if the enum contains an unknown value deserialized from
24400    /// the integer representation of enums.
24401    pub fn name(&self) -> std::option::Option<&str> {
24402        match self {
24403            Self::Unspecified => std::option::Option::Some("CLOUD_PROVIDER_UNSPECIFIED"),
24404            Self::GoogleCloudPlatform => std::option::Option::Some("GOOGLE_CLOUD_PLATFORM"),
24405            Self::AmazonWebServices => std::option::Option::Some("AMAZON_WEB_SERVICES"),
24406            Self::MicrosoftAzure => std::option::Option::Some("MICROSOFT_AZURE"),
24407            Self::UnknownValue(u) => u.0.name(),
24408        }
24409    }
24410}
24411
24412impl std::default::Default for CloudProvider {
24413    fn default() -> Self {
24414        use std::convert::From;
24415        Self::from(0)
24416    }
24417}
24418
24419impl std::fmt::Display for CloudProvider {
24420    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24421        wkt::internal::display_enum(f, self.name(), self.value())
24422    }
24423}
24424
24425impl std::convert::From<i32> for CloudProvider {
24426    fn from(value: i32) -> Self {
24427        match value {
24428            0 => Self::Unspecified,
24429            1 => Self::GoogleCloudPlatform,
24430            2 => Self::AmazonWebServices,
24431            3 => Self::MicrosoftAzure,
24432            _ => Self::UnknownValue(cloud_provider::UnknownValue(
24433                wkt::internal::UnknownEnumValue::Integer(value),
24434            )),
24435        }
24436    }
24437}
24438
24439impl std::convert::From<&str> for CloudProvider {
24440    fn from(value: &str) -> Self {
24441        use std::string::ToString;
24442        match value {
24443            "CLOUD_PROVIDER_UNSPECIFIED" => Self::Unspecified,
24444            "GOOGLE_CLOUD_PLATFORM" => Self::GoogleCloudPlatform,
24445            "AMAZON_WEB_SERVICES" => Self::AmazonWebServices,
24446            "MICROSOFT_AZURE" => Self::MicrosoftAzure,
24447            _ => Self::UnknownValue(cloud_provider::UnknownValue(
24448                wkt::internal::UnknownEnumValue::String(value.to_string()),
24449            )),
24450        }
24451    }
24452}
24453
24454impl serde::ser::Serialize for CloudProvider {
24455    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24456    where
24457        S: serde::Serializer,
24458    {
24459        match self {
24460            Self::Unspecified => serializer.serialize_i32(0),
24461            Self::GoogleCloudPlatform => serializer.serialize_i32(1),
24462            Self::AmazonWebServices => serializer.serialize_i32(2),
24463            Self::MicrosoftAzure => serializer.serialize_i32(3),
24464            Self::UnknownValue(u) => u.0.serialize(serializer),
24465        }
24466    }
24467}
24468
24469impl<'de> serde::de::Deserialize<'de> for CloudProvider {
24470    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24471    where
24472        D: serde::Deserializer<'de>,
24473    {
24474        deserializer.deserialize_any(wkt::internal::EnumVisitor::<CloudProvider>::new(
24475            ".google.cloud.securitycenter.v2.CloudProvider",
24476        ))
24477    }
24478}
24479
24480/// Value enum to map to a resource
24481///
24482/// # Working with unknown values
24483///
24484/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24485/// additional enum variants at any time. Adding new variants is not considered
24486/// a breaking change. Applications should write their code in anticipation of:
24487///
24488/// - New values appearing in future releases of the client library, **and**
24489/// - New values received dynamically, without application changes.
24490///
24491/// Please consult the [Working with enums] section in the user guide for some
24492/// guidelines.
24493///
24494/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24495#[derive(Clone, Debug, PartialEq)]
24496#[non_exhaustive]
24497pub enum ResourceValue {
24498    /// Unspecific value
24499    Unspecified,
24500    /// High resource value
24501    High,
24502    /// Medium resource value
24503    Medium,
24504    /// Low resource value
24505    Low,
24506    /// No resource value, e.g. ignore these resources
24507    None,
24508    /// If set, the enum was initialized with an unknown value.
24509    ///
24510    /// Applications can examine the value using [ResourceValue::value] or
24511    /// [ResourceValue::name].
24512    UnknownValue(resource_value::UnknownValue),
24513}
24514
24515#[doc(hidden)]
24516pub mod resource_value {
24517    #[allow(unused_imports)]
24518    use super::*;
24519    #[derive(Clone, Debug, PartialEq)]
24520    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24521}
24522
24523impl ResourceValue {
24524    /// Gets the enum value.
24525    ///
24526    /// Returns `None` if the enum contains an unknown value deserialized from
24527    /// the string representation of enums.
24528    pub fn value(&self) -> std::option::Option<i32> {
24529        match self {
24530            Self::Unspecified => std::option::Option::Some(0),
24531            Self::High => std::option::Option::Some(1),
24532            Self::Medium => std::option::Option::Some(2),
24533            Self::Low => std::option::Option::Some(3),
24534            Self::None => std::option::Option::Some(4),
24535            Self::UnknownValue(u) => u.0.value(),
24536        }
24537    }
24538
24539    /// Gets the enum value as a string.
24540    ///
24541    /// Returns `None` if the enum contains an unknown value deserialized from
24542    /// the integer representation of enums.
24543    pub fn name(&self) -> std::option::Option<&str> {
24544        match self {
24545            Self::Unspecified => std::option::Option::Some("RESOURCE_VALUE_UNSPECIFIED"),
24546            Self::High => std::option::Option::Some("HIGH"),
24547            Self::Medium => std::option::Option::Some("MEDIUM"),
24548            Self::Low => std::option::Option::Some("LOW"),
24549            Self::None => std::option::Option::Some("NONE"),
24550            Self::UnknownValue(u) => u.0.name(),
24551        }
24552    }
24553}
24554
24555impl std::default::Default for ResourceValue {
24556    fn default() -> Self {
24557        use std::convert::From;
24558        Self::from(0)
24559    }
24560}
24561
24562impl std::fmt::Display for ResourceValue {
24563    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24564        wkt::internal::display_enum(f, self.name(), self.value())
24565    }
24566}
24567
24568impl std::convert::From<i32> for ResourceValue {
24569    fn from(value: i32) -> Self {
24570        match value {
24571            0 => Self::Unspecified,
24572            1 => Self::High,
24573            2 => Self::Medium,
24574            3 => Self::Low,
24575            4 => Self::None,
24576            _ => Self::UnknownValue(resource_value::UnknownValue(
24577                wkt::internal::UnknownEnumValue::Integer(value),
24578            )),
24579        }
24580    }
24581}
24582
24583impl std::convert::From<&str> for ResourceValue {
24584    fn from(value: &str) -> Self {
24585        use std::string::ToString;
24586        match value {
24587            "RESOURCE_VALUE_UNSPECIFIED" => Self::Unspecified,
24588            "HIGH" => Self::High,
24589            "MEDIUM" => Self::Medium,
24590            "LOW" => Self::Low,
24591            "NONE" => Self::None,
24592            _ => Self::UnknownValue(resource_value::UnknownValue(
24593                wkt::internal::UnknownEnumValue::String(value.to_string()),
24594            )),
24595        }
24596    }
24597}
24598
24599impl serde::ser::Serialize for ResourceValue {
24600    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24601    where
24602        S: serde::Serializer,
24603    {
24604        match self {
24605            Self::Unspecified => serializer.serialize_i32(0),
24606            Self::High => serializer.serialize_i32(1),
24607            Self::Medium => serializer.serialize_i32(2),
24608            Self::Low => serializer.serialize_i32(3),
24609            Self::None => serializer.serialize_i32(4),
24610            Self::UnknownValue(u) => u.0.serialize(serializer),
24611        }
24612    }
24613}
24614
24615impl<'de> serde::de::Deserialize<'de> for ResourceValue {
24616    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24617    where
24618        D: serde::Deserializer<'de>,
24619    {
24620        deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResourceValue>::new(
24621            ".google.cloud.securitycenter.v2.ResourceValue",
24622        ))
24623    }
24624}