Skip to main content

google_cloud_cloudsecuritycompliance_v1/
model.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17#![allow(rustdoc::bare_urls)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![allow(rustdoc::invalid_html_tags)]
20#![allow(rustdoc::redundant_explicit_links)]
21#![no_implicit_prelude]
22extern crate async_trait;
23extern crate bytes;
24extern crate gaxi;
25extern crate google_cloud_gax;
26extern crate google_cloud_location;
27extern crate google_cloud_longrunning;
28extern crate google_cloud_lro;
29extern crate google_cloud_type;
30extern crate serde;
31extern crate serde_json;
32extern crate serde_with;
33extern crate std;
34extern crate tracing;
35extern crate wkt;
36
37mod debug;
38mod deserialize;
39mod serialize;
40
41/// The request message for [GenerateFrameworkAuditScopeReport][].
42#[derive(Clone, Default, PartialEq)]
43#[non_exhaustive]
44pub struct GenerateFrameworkAuditScopeReportRequest {
45    /// Required. The organization, folder or project for the audit report.
46    ///
47    /// Supported formats are the following:
48    ///
49    /// * `projects/{project_id}/locations/{location}`
50    /// * `folders/{folder_id}/locations/{location}`
51    /// * `organizations/{organization_id}/locations/{location}`
52    pub scope: std::string::String,
53
54    /// Required. The format that the scope report bytes is returned in.
55    pub report_format: crate::model::generate_framework_audit_scope_report_request::Format,
56
57    /// Required. The compliance framework that the scope report is generated for.
58    pub compliance_framework: std::string::String,
59
60    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
61}
62
63impl GenerateFrameworkAuditScopeReportRequest {
64    /// Creates a new default instance.
65    pub fn new() -> Self {
66        std::default::Default::default()
67    }
68
69    /// Sets the value of [scope][crate::model::GenerateFrameworkAuditScopeReportRequest::scope].
70    ///
71    /// # Example
72    /// ```ignore,no_run
73    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportRequest;
74    /// let x = GenerateFrameworkAuditScopeReportRequest::new().set_scope("example");
75    /// ```
76    pub fn set_scope<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
77        self.scope = v.into();
78        self
79    }
80
81    /// Sets the value of [report_format][crate::model::GenerateFrameworkAuditScopeReportRequest::report_format].
82    ///
83    /// # Example
84    /// ```ignore,no_run
85    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportRequest;
86    /// use google_cloud_cloudsecuritycompliance_v1::model::generate_framework_audit_scope_report_request::Format;
87    /// let x0 = GenerateFrameworkAuditScopeReportRequest::new().set_report_format(Format::Odf);
88    /// ```
89    pub fn set_report_format<
90        T: std::convert::Into<crate::model::generate_framework_audit_scope_report_request::Format>,
91    >(
92        mut self,
93        v: T,
94    ) -> Self {
95        self.report_format = v.into();
96        self
97    }
98
99    /// Sets the value of [compliance_framework][crate::model::GenerateFrameworkAuditScopeReportRequest::compliance_framework].
100    ///
101    /// # Example
102    /// ```ignore,no_run
103    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportRequest;
104    /// let x = GenerateFrameworkAuditScopeReportRequest::new().set_compliance_framework("example");
105    /// ```
106    pub fn set_compliance_framework<T: std::convert::Into<std::string::String>>(
107        mut self,
108        v: T,
109    ) -> Self {
110        self.compliance_framework = v.into();
111        self
112    }
113}
114
115impl wkt::message::Message for GenerateFrameworkAuditScopeReportRequest {
116    fn typename() -> &'static str {
117        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest"
118    }
119}
120
121/// Defines additional types related to [GenerateFrameworkAuditScopeReportRequest].
122pub mod generate_framework_audit_scope_report_request {
123    #[allow(unused_imports)]
124    use super::*;
125
126    /// The set of options for the audit scope report format.
127    ///
128    /// # Working with unknown values
129    ///
130    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
131    /// additional enum variants at any time. Adding new variants is not considered
132    /// a breaking change. Applications should write their code in anticipation of:
133    ///
134    /// - New values appearing in future releases of the client library, **and**
135    /// - New values received dynamically, without application changes.
136    ///
137    /// Please consult the [Working with enums] section in the user guide for some
138    /// guidelines.
139    ///
140    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
141    #[derive(Clone, Debug, PartialEq)]
142    #[non_exhaustive]
143    pub enum Format {
144        /// Default value. This value is unused.
145        Unspecified,
146        /// The report format is the Open Document Format (ODF).
147        Odf,
148        /// If set, the enum was initialized with an unknown value.
149        ///
150        /// Applications can examine the value using [Format::value] or
151        /// [Format::name].
152        UnknownValue(format::UnknownValue),
153    }
154
155    #[doc(hidden)]
156    pub mod format {
157        #[allow(unused_imports)]
158        use super::*;
159        #[derive(Clone, Debug, PartialEq)]
160        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
161    }
162
163    impl Format {
164        /// Gets the enum value.
165        ///
166        /// Returns `None` if the enum contains an unknown value deserialized from
167        /// the string representation of enums.
168        pub fn value(&self) -> std::option::Option<i32> {
169            match self {
170                Self::Unspecified => std::option::Option::Some(0),
171                Self::Odf => std::option::Option::Some(1),
172                Self::UnknownValue(u) => u.0.value(),
173            }
174        }
175
176        /// Gets the enum value as a string.
177        ///
178        /// Returns `None` if the enum contains an unknown value deserialized from
179        /// the integer representation of enums.
180        pub fn name(&self) -> std::option::Option<&str> {
181            match self {
182                Self::Unspecified => std::option::Option::Some("FORMAT_UNSPECIFIED"),
183                Self::Odf => std::option::Option::Some("ODF"),
184                Self::UnknownValue(u) => u.0.name(),
185            }
186        }
187    }
188
189    impl std::default::Default for Format {
190        fn default() -> Self {
191            use std::convert::From;
192            Self::from(0)
193        }
194    }
195
196    impl std::fmt::Display for Format {
197        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
198            wkt::internal::display_enum(f, self.name(), self.value())
199        }
200    }
201
202    impl std::convert::From<i32> for Format {
203        fn from(value: i32) -> Self {
204            match value {
205                0 => Self::Unspecified,
206                1 => Self::Odf,
207                _ => Self::UnknownValue(format::UnknownValue(
208                    wkt::internal::UnknownEnumValue::Integer(value),
209                )),
210            }
211        }
212    }
213
214    impl std::convert::From<&str> for Format {
215        fn from(value: &str) -> Self {
216            use std::string::ToString;
217            match value {
218                "FORMAT_UNSPECIFIED" => Self::Unspecified,
219                "ODF" => Self::Odf,
220                _ => Self::UnknownValue(format::UnknownValue(
221                    wkt::internal::UnknownEnumValue::String(value.to_string()),
222                )),
223            }
224        }
225    }
226
227    impl serde::ser::Serialize for Format {
228        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
229        where
230            S: serde::Serializer,
231        {
232            match self {
233                Self::Unspecified => serializer.serialize_i32(0),
234                Self::Odf => serializer.serialize_i32(1),
235                Self::UnknownValue(u) => u.0.serialize(serializer),
236            }
237        }
238    }
239
240    impl<'de> serde::de::Deserialize<'de> for Format {
241        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
242        where
243            D: serde::Deserializer<'de>,
244        {
245            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Format>::new(
246                ".google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format"))
247        }
248    }
249}
250
251/// The response message for [GenerateFrameworkAuditScopeReport][].
252#[derive(Clone, Default, PartialEq)]
253#[non_exhaustive]
254pub struct GenerateFrameworkAuditScopeReportResponse {
255    /// Identifier. The name of the audit report, in the format that was
256    /// given in the request.
257    pub name: std::string::String,
258
259    /// Required. The compliance framework that the audit scope report is generated
260    /// for.
261    pub compliance_framework: std::string::String,
262
263    /// The set of options that the audit scope report is exported in.
264    pub audit_report: std::option::Option<
265        crate::model::generate_framework_audit_scope_report_response::AuditReport,
266    >,
267
268    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
269}
270
271impl GenerateFrameworkAuditScopeReportResponse {
272    /// Creates a new default instance.
273    pub fn new() -> Self {
274        std::default::Default::default()
275    }
276
277    /// Sets the value of [name][crate::model::GenerateFrameworkAuditScopeReportResponse::name].
278    ///
279    /// # Example
280    /// ```ignore,no_run
281    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportResponse;
282    /// # let project_id = "project_id";
283    /// # let location_id = "location_id";
284    /// # let generate_framework_audit_scope_report_response_id = "generate_framework_audit_scope_report_response_id";
285    /// let x = GenerateFrameworkAuditScopeReportResponse::new().set_name(format!("projects/{project_id}/locations/{location_id}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response_id}"));
286    /// ```
287    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
288        self.name = v.into();
289        self
290    }
291
292    /// Sets the value of [compliance_framework][crate::model::GenerateFrameworkAuditScopeReportResponse::compliance_framework].
293    ///
294    /// # Example
295    /// ```ignore,no_run
296    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportResponse;
297    /// let x = GenerateFrameworkAuditScopeReportResponse::new().set_compliance_framework("example");
298    /// ```
299    pub fn set_compliance_framework<T: std::convert::Into<std::string::String>>(
300        mut self,
301        v: T,
302    ) -> Self {
303        self.compliance_framework = v.into();
304        self
305    }
306
307    /// Sets the value of [audit_report][crate::model::GenerateFrameworkAuditScopeReportResponse::audit_report].
308    ///
309    /// Note that all the setters affecting `audit_report` are mutually
310    /// exclusive.
311    ///
312    /// # Example
313    /// ```ignore,no_run
314    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportResponse;
315    /// use google_cloud_cloudsecuritycompliance_v1::model::generate_framework_audit_scope_report_response::AuditReport;
316    /// let x = GenerateFrameworkAuditScopeReportResponse::new().set_audit_report(Some(AuditReport::ScopeReportContents(bytes::Bytes::from_static(b"example"))));
317    /// ```
318    pub fn set_audit_report<
319        T: std::convert::Into<
320                std::option::Option<
321                    crate::model::generate_framework_audit_scope_report_response::AuditReport,
322                >,
323            >,
324    >(
325        mut self,
326        v: T,
327    ) -> Self {
328        self.audit_report = v.into();
329        self
330    }
331
332    /// The value of [audit_report][crate::model::GenerateFrameworkAuditScopeReportResponse::audit_report]
333    /// if it holds a `ScopeReportContents`, `None` if the field is not set or
334    /// holds a different branch.
335    pub fn scope_report_contents(&self) -> std::option::Option<&::bytes::Bytes> {
336        #[allow(unreachable_patterns)]
337        self.audit_report.as_ref().and_then(|v| match v {
338            crate::model::generate_framework_audit_scope_report_response::AuditReport::ScopeReportContents(v) => std::option::Option::Some(v),
339            _ => std::option::Option::None,
340        })
341    }
342
343    /// Sets the value of [audit_report][crate::model::GenerateFrameworkAuditScopeReportResponse::audit_report]
344    /// to hold a `ScopeReportContents`.
345    ///
346    /// Note that all the setters affecting `audit_report` are
347    /// mutually exclusive.
348    ///
349    /// # Example
350    /// ```ignore,no_run
351    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportResponse;
352    /// let x = GenerateFrameworkAuditScopeReportResponse::new().set_scope_report_contents(bytes::Bytes::from_static(b"example"));
353    /// assert!(x.scope_report_contents().is_some());
354    /// ```
355    pub fn set_scope_report_contents<T: std::convert::Into<::bytes::Bytes>>(
356        mut self,
357        v: T,
358    ) -> Self {
359        self.audit_report = std::option::Option::Some(
360            crate::model::generate_framework_audit_scope_report_response::AuditReport::ScopeReportContents(
361                v.into()
362            )
363        );
364        self
365    }
366}
367
368impl wkt::message::Message for GenerateFrameworkAuditScopeReportResponse {
369    fn typename() -> &'static str {
370        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse"
371    }
372}
373
374/// Defines additional types related to [GenerateFrameworkAuditScopeReportResponse].
375pub mod generate_framework_audit_scope_report_response {
376    #[allow(unused_imports)]
377    use super::*;
378
379    /// The set of options that the audit scope report is exported in.
380    #[derive(Clone, Debug, PartialEq)]
381    #[non_exhaustive]
382    pub enum AuditReport {
383        /// The audit scope report content in byte format.
384        ScopeReportContents(::bytes::Bytes),
385    }
386}
387
388/// Additional information for an audit operation.
389#[derive(Clone, Default, PartialEq)]
390#[non_exhaustive]
391pub struct ReportSummary {
392    /// Output only. The total number of checks.
393    pub total_count: i32,
394
395    /// Output only. The number of compliant checks.
396    pub compliant_count: i32,
397
398    /// Output only. The number of checks with violations.
399    pub violation_count: i32,
400
401    /// Output only. The number of checks with "manual review needed" status.
402    pub manual_review_needed_count: i32,
403
404    /// Output only. The number of checks that can't be performed due to errors.
405    pub error_count: i32,
406
407    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
408}
409
410impl ReportSummary {
411    /// Creates a new default instance.
412    pub fn new() -> Self {
413        std::default::Default::default()
414    }
415
416    /// Sets the value of [total_count][crate::model::ReportSummary::total_count].
417    ///
418    /// # Example
419    /// ```ignore,no_run
420    /// # use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
421    /// let x = ReportSummary::new().set_total_count(42);
422    /// ```
423    pub fn set_total_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
424        self.total_count = v.into();
425        self
426    }
427
428    /// Sets the value of [compliant_count][crate::model::ReportSummary::compliant_count].
429    ///
430    /// # Example
431    /// ```ignore,no_run
432    /// # use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
433    /// let x = ReportSummary::new().set_compliant_count(42);
434    /// ```
435    pub fn set_compliant_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
436        self.compliant_count = v.into();
437        self
438    }
439
440    /// Sets the value of [violation_count][crate::model::ReportSummary::violation_count].
441    ///
442    /// # Example
443    /// ```ignore,no_run
444    /// # use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
445    /// let x = ReportSummary::new().set_violation_count(42);
446    /// ```
447    pub fn set_violation_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
448        self.violation_count = v.into();
449        self
450    }
451
452    /// Sets the value of [manual_review_needed_count][crate::model::ReportSummary::manual_review_needed_count].
453    ///
454    /// # Example
455    /// ```ignore,no_run
456    /// # use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
457    /// let x = ReportSummary::new().set_manual_review_needed_count(42);
458    /// ```
459    pub fn set_manual_review_needed_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
460        self.manual_review_needed_count = v.into();
461        self
462    }
463
464    /// Sets the value of [error_count][crate::model::ReportSummary::error_count].
465    ///
466    /// # Example
467    /// ```ignore,no_run
468    /// # use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
469    /// let x = ReportSummary::new().set_error_count(42);
470    /// ```
471    pub fn set_error_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
472        self.error_count = v.into();
473        self
474    }
475}
476
477impl wkt::message::Message for ReportSummary {
478    fn typename() -> &'static str {
479        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ReportSummary"
480    }
481}
482
483/// The request message for [CreateFrameworkAudit][].
484#[derive(Clone, Default, PartialEq)]
485#[non_exhaustive]
486pub struct CreateFrameworkAuditRequest {
487    /// Required. The parent resource where this framework audit is created.
488    ///
489    /// Supported formats are the following:
490    ///
491    /// * `organizations/{organization_id}/locations/{location}`
492    /// * `folders/{folder_id}/locations/{location}`
493    /// * `projects/{project_id}/locations/{location}`
494    pub parent: std::string::String,
495
496    /// Optional. The ID to use for the framework audit. The ID becomes the final
497    /// component of the framework audit's full resource name.
498    ///
499    /// The ID must be between 4-63 characters, and valid characters
500    /// are `\[a-z][0-9]-\`.
501    pub framework_audit_id: std::string::String,
502
503    /// Required. The framework audit to create.
504    pub framework_audit: std::option::Option<crate::model::FrameworkAudit>,
505
506    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
507}
508
509impl CreateFrameworkAuditRequest {
510    /// Creates a new default instance.
511    pub fn new() -> Self {
512        std::default::Default::default()
513    }
514
515    /// Sets the value of [parent][crate::model::CreateFrameworkAuditRequest::parent].
516    ///
517    /// # Example
518    /// ```ignore,no_run
519    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkAuditRequest;
520    /// # let project_id = "project_id";
521    /// # let location_id = "location_id";
522    /// let x = CreateFrameworkAuditRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
523    /// ```
524    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
525        self.parent = v.into();
526        self
527    }
528
529    /// Sets the value of [framework_audit_id][crate::model::CreateFrameworkAuditRequest::framework_audit_id].
530    ///
531    /// # Example
532    /// ```ignore,no_run
533    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkAuditRequest;
534    /// let x = CreateFrameworkAuditRequest::new().set_framework_audit_id("example");
535    /// ```
536    pub fn set_framework_audit_id<T: std::convert::Into<std::string::String>>(
537        mut self,
538        v: T,
539    ) -> Self {
540        self.framework_audit_id = v.into();
541        self
542    }
543
544    /// Sets the value of [framework_audit][crate::model::CreateFrameworkAuditRequest::framework_audit].
545    ///
546    /// # Example
547    /// ```ignore,no_run
548    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkAuditRequest;
549    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
550    /// let x = CreateFrameworkAuditRequest::new().set_framework_audit(FrameworkAudit::default()/* use setters */);
551    /// ```
552    pub fn set_framework_audit<T>(mut self, v: T) -> Self
553    where
554        T: std::convert::Into<crate::model::FrameworkAudit>,
555    {
556        self.framework_audit = std::option::Option::Some(v.into());
557        self
558    }
559
560    /// Sets or clears the value of [framework_audit][crate::model::CreateFrameworkAuditRequest::framework_audit].
561    ///
562    /// # Example
563    /// ```ignore,no_run
564    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkAuditRequest;
565    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
566    /// let x = CreateFrameworkAuditRequest::new().set_or_clear_framework_audit(Some(FrameworkAudit::default()/* use setters */));
567    /// let x = CreateFrameworkAuditRequest::new().set_or_clear_framework_audit(None::<FrameworkAudit>);
568    /// ```
569    pub fn set_or_clear_framework_audit<T>(mut self, v: std::option::Option<T>) -> Self
570    where
571        T: std::convert::Into<crate::model::FrameworkAudit>,
572    {
573        self.framework_audit = v.map(|x| x.into());
574        self
575    }
576}
577
578impl wkt::message::Message for CreateFrameworkAuditRequest {
579    fn typename() -> &'static str {
580        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest"
581    }
582}
583
584/// A destination for the framework audit.
585#[derive(Clone, Default, PartialEq)]
586#[non_exhaustive]
587pub struct FrameworkAuditDestination {
588    /// The type of destination.
589    pub destination_type:
590        std::option::Option<crate::model::framework_audit_destination::DestinationType>,
591
592    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
593}
594
595impl FrameworkAuditDestination {
596    /// Creates a new default instance.
597    pub fn new() -> Self {
598        std::default::Default::default()
599    }
600
601    /// Sets the value of [destination_type][crate::model::FrameworkAuditDestination::destination_type].
602    ///
603    /// Note that all the setters affecting `destination_type` are mutually
604    /// exclusive.
605    ///
606    /// # Example
607    /// ```ignore,no_run
608    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAuditDestination;
609    /// use google_cloud_cloudsecuritycompliance_v1::model::BucketDestination;
610    /// let x = FrameworkAuditDestination::new().set_destination_type(Some(
611    ///     google_cloud_cloudsecuritycompliance_v1::model::framework_audit_destination::DestinationType::Bucket(BucketDestination::default().into())));
612    /// ```
613    pub fn set_destination_type<
614        T: std::convert::Into<
615                std::option::Option<crate::model::framework_audit_destination::DestinationType>,
616            >,
617    >(
618        mut self,
619        v: T,
620    ) -> Self {
621        self.destination_type = v.into();
622        self
623    }
624
625    /// The value of [destination_type][crate::model::FrameworkAuditDestination::destination_type]
626    /// if it holds a `Bucket`, `None` if the field is not set or
627    /// holds a different branch.
628    pub fn bucket(&self) -> std::option::Option<&std::boxed::Box<crate::model::BucketDestination>> {
629        #[allow(unreachable_patterns)]
630        self.destination_type.as_ref().and_then(|v| match v {
631            crate::model::framework_audit_destination::DestinationType::Bucket(v) => {
632                std::option::Option::Some(v)
633            }
634            _ => std::option::Option::None,
635        })
636    }
637
638    /// Sets the value of [destination_type][crate::model::FrameworkAuditDestination::destination_type]
639    /// to hold a `Bucket`.
640    ///
641    /// Note that all the setters affecting `destination_type` are
642    /// mutually exclusive.
643    ///
644    /// # Example
645    /// ```ignore,no_run
646    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAuditDestination;
647    /// use google_cloud_cloudsecuritycompliance_v1::model::BucketDestination;
648    /// let x = FrameworkAuditDestination::new().set_bucket(BucketDestination::default()/* use setters */);
649    /// assert!(x.bucket().is_some());
650    /// ```
651    pub fn set_bucket<T: std::convert::Into<std::boxed::Box<crate::model::BucketDestination>>>(
652        mut self,
653        v: T,
654    ) -> Self {
655        self.destination_type = std::option::Option::Some(
656            crate::model::framework_audit_destination::DestinationType::Bucket(v.into()),
657        );
658        self
659    }
660}
661
662impl wkt::message::Message for FrameworkAuditDestination {
663    fn typename() -> &'static str {
664        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination"
665    }
666}
667
668/// Defines additional types related to [FrameworkAuditDestination].
669pub mod framework_audit_destination {
670    #[allow(unused_imports)]
671    use super::*;
672
673    /// The type of destination.
674    #[derive(Clone, Debug, PartialEq)]
675    #[non_exhaustive]
676    pub enum DestinationType {
677        /// The Cloud Storage bucket destination.
678        Bucket(std::boxed::Box<crate::model::BucketDestination>),
679    }
680}
681
682/// A Cloud Storage bucket destination.
683#[derive(Clone, Default, PartialEq)]
684#[non_exhaustive]
685pub struct BucketDestination {
686    /// Required. The URI of the Cloud Storage bucket.
687    pub bucket_uri: std::string::String,
688
689    /// Optional. The format of the framework audit.
690    pub framework_audit_format: crate::model::bucket_destination::Format,
691
692    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
693}
694
695impl BucketDestination {
696    /// Creates a new default instance.
697    pub fn new() -> Self {
698        std::default::Default::default()
699    }
700
701    /// Sets the value of [bucket_uri][crate::model::BucketDestination::bucket_uri].
702    ///
703    /// # Example
704    /// ```ignore,no_run
705    /// # use google_cloud_cloudsecuritycompliance_v1::model::BucketDestination;
706    /// let x = BucketDestination::new().set_bucket_uri("example");
707    /// ```
708    pub fn set_bucket_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
709        self.bucket_uri = v.into();
710        self
711    }
712
713    /// Sets the value of [framework_audit_format][crate::model::BucketDestination::framework_audit_format].
714    ///
715    /// # Example
716    /// ```ignore,no_run
717    /// # use google_cloud_cloudsecuritycompliance_v1::model::BucketDestination;
718    /// use google_cloud_cloudsecuritycompliance_v1::model::bucket_destination::Format;
719    /// let x0 = BucketDestination::new().set_framework_audit_format(Format::Odf);
720    /// ```
721    pub fn set_framework_audit_format<
722        T: std::convert::Into<crate::model::bucket_destination::Format>,
723    >(
724        mut self,
725        v: T,
726    ) -> Self {
727        self.framework_audit_format = v.into();
728        self
729    }
730}
731
732impl wkt::message::Message for BucketDestination {
733    fn typename() -> &'static str {
734        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.BucketDestination"
735    }
736}
737
738/// Defines additional types related to [BucketDestination].
739pub mod bucket_destination {
740    #[allow(unused_imports)]
741    use super::*;
742
743    /// The set of options for the framework audit format.
744    ///
745    /// # Working with unknown values
746    ///
747    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
748    /// additional enum variants at any time. Adding new variants is not considered
749    /// a breaking change. Applications should write their code in anticipation of:
750    ///
751    /// - New values appearing in future releases of the client library, **and**
752    /// - New values received dynamically, without application changes.
753    ///
754    /// Please consult the [Working with enums] section in the user guide for some
755    /// guidelines.
756    ///
757    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
758    #[derive(Clone, Debug, PartialEq)]
759    #[non_exhaustive]
760    pub enum Format {
761        /// Default value. This value is unused.
762        Unspecified,
763        /// The format for the framework audit report is Open Document.
764        Odf,
765        /// If set, the enum was initialized with an unknown value.
766        ///
767        /// Applications can examine the value using [Format::value] or
768        /// [Format::name].
769        UnknownValue(format::UnknownValue),
770    }
771
772    #[doc(hidden)]
773    pub mod format {
774        #[allow(unused_imports)]
775        use super::*;
776        #[derive(Clone, Debug, PartialEq)]
777        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
778    }
779
780    impl Format {
781        /// Gets the enum value.
782        ///
783        /// Returns `None` if the enum contains an unknown value deserialized from
784        /// the string representation of enums.
785        pub fn value(&self) -> std::option::Option<i32> {
786            match self {
787                Self::Unspecified => std::option::Option::Some(0),
788                Self::Odf => std::option::Option::Some(1),
789                Self::UnknownValue(u) => u.0.value(),
790            }
791        }
792
793        /// Gets the enum value as a string.
794        ///
795        /// Returns `None` if the enum contains an unknown value deserialized from
796        /// the integer representation of enums.
797        pub fn name(&self) -> std::option::Option<&str> {
798            match self {
799                Self::Unspecified => std::option::Option::Some("FORMAT_UNSPECIFIED"),
800                Self::Odf => std::option::Option::Some("ODF"),
801                Self::UnknownValue(u) => u.0.name(),
802            }
803        }
804    }
805
806    impl std::default::Default for Format {
807        fn default() -> Self {
808            use std::convert::From;
809            Self::from(0)
810        }
811    }
812
813    impl std::fmt::Display for Format {
814        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
815            wkt::internal::display_enum(f, self.name(), self.value())
816        }
817    }
818
819    impl std::convert::From<i32> for Format {
820        fn from(value: i32) -> Self {
821            match value {
822                0 => Self::Unspecified,
823                1 => Self::Odf,
824                _ => Self::UnknownValue(format::UnknownValue(
825                    wkt::internal::UnknownEnumValue::Integer(value),
826                )),
827            }
828        }
829    }
830
831    impl std::convert::From<&str> for Format {
832        fn from(value: &str) -> Self {
833            use std::string::ToString;
834            match value {
835                "FORMAT_UNSPECIFIED" => Self::Unspecified,
836                "ODF" => Self::Odf,
837                _ => Self::UnknownValue(format::UnknownValue(
838                    wkt::internal::UnknownEnumValue::String(value.to_string()),
839                )),
840            }
841        }
842    }
843
844    impl serde::ser::Serialize for Format {
845        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
846        where
847            S: serde::Serializer,
848        {
849            match self {
850                Self::Unspecified => serializer.serialize_i32(0),
851                Self::Odf => serializer.serialize_i32(1),
852                Self::UnknownValue(u) => u.0.serialize(serializer),
853            }
854        }
855    }
856
857    impl<'de> serde::de::Deserialize<'de> for Format {
858        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
859        where
860            D: serde::Deserializer<'de>,
861        {
862            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Format>::new(
863                ".google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format",
864            ))
865        }
866    }
867}
868
869/// A framework audit.
870#[derive(Clone, Default, PartialEq)]
871#[non_exhaustive]
872pub struct FrameworkAudit {
873    /// Output only. Identifier. The name of the framework audit.
874    pub name: std::string::String,
875
876    /// Output only. The ID of the framework audit.
877    pub framework_audit_id: std::string::String,
878
879    /// Output only. The compliance framework used for the audit.
880    pub compliance_framework: std::string::String,
881
882    /// Output only. The scope of the audit.
883    pub scope: std::string::String,
884
885    /// Required. The destination for the audit reports.
886    pub framework_audit_destination: std::option::Option<crate::model::FrameworkAuditDestination>,
887
888    /// Output only. The time that the audit started.
889    pub start_time: std::option::Option<wkt::Timestamp>,
890
891    /// Output only. The time that the audit finished.
892    pub finish_time: std::option::Option<wkt::Timestamp>,
893
894    /// Output only. The overall compliance state of the audit.
895    pub compliance_state: crate::model::ComplianceState,
896
897    /// Output only. The summary of the report.
898    pub report_summary: std::option::Option<crate::model::ReportSummary>,
899
900    /// Optional. The details for the cloud control groups within this audit.
901    pub cloud_control_group_audit_details:
902        std::vec::Vec<crate::model::CloudControlGroupAuditDetails>,
903
904    /// Optional. The details for the cloud controls within this audit.
905    pub cloud_control_audit_details: std::vec::Vec<crate::model::CloudControlAuditDetails>,
906
907    /// Output only. The ID of the long-running operation.
908    pub operation_id: std::string::String,
909
910    /// Output only. The framework audit state of the audit.
911    pub state: crate::model::framework_audit::State,
912
913    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
914}
915
916impl FrameworkAudit {
917    /// Creates a new default instance.
918    pub fn new() -> Self {
919        std::default::Default::default()
920    }
921
922    /// Sets the value of [name][crate::model::FrameworkAudit::name].
923    ///
924    /// # Example
925    /// ```ignore,no_run
926    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
927    /// # let project_id = "project_id";
928    /// # let location_id = "location_id";
929    /// # let framework_audit_id = "framework_audit_id";
930    /// let x = FrameworkAudit::new().set_name(format!("projects/{project_id}/locations/{location_id}/frameworkAudits/{framework_audit_id}"));
931    /// ```
932    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
933        self.name = v.into();
934        self
935    }
936
937    /// Sets the value of [framework_audit_id][crate::model::FrameworkAudit::framework_audit_id].
938    ///
939    /// # Example
940    /// ```ignore,no_run
941    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
942    /// let x = FrameworkAudit::new().set_framework_audit_id("example");
943    /// ```
944    pub fn set_framework_audit_id<T: std::convert::Into<std::string::String>>(
945        mut self,
946        v: T,
947    ) -> Self {
948        self.framework_audit_id = v.into();
949        self
950    }
951
952    /// Sets the value of [compliance_framework][crate::model::FrameworkAudit::compliance_framework].
953    ///
954    /// # Example
955    /// ```ignore,no_run
956    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
957    /// let x = FrameworkAudit::new().set_compliance_framework("example");
958    /// ```
959    pub fn set_compliance_framework<T: std::convert::Into<std::string::String>>(
960        mut self,
961        v: T,
962    ) -> Self {
963        self.compliance_framework = v.into();
964        self
965    }
966
967    /// Sets the value of [scope][crate::model::FrameworkAudit::scope].
968    ///
969    /// # Example
970    /// ```ignore,no_run
971    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
972    /// let x = FrameworkAudit::new().set_scope("example");
973    /// ```
974    pub fn set_scope<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
975        self.scope = v.into();
976        self
977    }
978
979    /// Sets the value of [framework_audit_destination][crate::model::FrameworkAudit::framework_audit_destination].
980    ///
981    /// # Example
982    /// ```ignore,no_run
983    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
984    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAuditDestination;
985    /// let x = FrameworkAudit::new().set_framework_audit_destination(FrameworkAuditDestination::default()/* use setters */);
986    /// ```
987    pub fn set_framework_audit_destination<T>(mut self, v: T) -> Self
988    where
989        T: std::convert::Into<crate::model::FrameworkAuditDestination>,
990    {
991        self.framework_audit_destination = std::option::Option::Some(v.into());
992        self
993    }
994
995    /// Sets or clears the value of [framework_audit_destination][crate::model::FrameworkAudit::framework_audit_destination].
996    ///
997    /// # Example
998    /// ```ignore,no_run
999    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1000    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAuditDestination;
1001    /// let x = FrameworkAudit::new().set_or_clear_framework_audit_destination(Some(FrameworkAuditDestination::default()/* use setters */));
1002    /// let x = FrameworkAudit::new().set_or_clear_framework_audit_destination(None::<FrameworkAuditDestination>);
1003    /// ```
1004    pub fn set_or_clear_framework_audit_destination<T>(mut self, v: std::option::Option<T>) -> Self
1005    where
1006        T: std::convert::Into<crate::model::FrameworkAuditDestination>,
1007    {
1008        self.framework_audit_destination = v.map(|x| x.into());
1009        self
1010    }
1011
1012    /// Sets the value of [start_time][crate::model::FrameworkAudit::start_time].
1013    ///
1014    /// # Example
1015    /// ```ignore,no_run
1016    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1017    /// use wkt::Timestamp;
1018    /// let x = FrameworkAudit::new().set_start_time(Timestamp::default()/* use setters */);
1019    /// ```
1020    pub fn set_start_time<T>(mut self, v: T) -> Self
1021    where
1022        T: std::convert::Into<wkt::Timestamp>,
1023    {
1024        self.start_time = std::option::Option::Some(v.into());
1025        self
1026    }
1027
1028    /// Sets or clears the value of [start_time][crate::model::FrameworkAudit::start_time].
1029    ///
1030    /// # Example
1031    /// ```ignore,no_run
1032    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1033    /// use wkt::Timestamp;
1034    /// let x = FrameworkAudit::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
1035    /// let x = FrameworkAudit::new().set_or_clear_start_time(None::<Timestamp>);
1036    /// ```
1037    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
1038    where
1039        T: std::convert::Into<wkt::Timestamp>,
1040    {
1041        self.start_time = v.map(|x| x.into());
1042        self
1043    }
1044
1045    /// Sets the value of [finish_time][crate::model::FrameworkAudit::finish_time].
1046    ///
1047    /// # Example
1048    /// ```ignore,no_run
1049    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1050    /// use wkt::Timestamp;
1051    /// let x = FrameworkAudit::new().set_finish_time(Timestamp::default()/* use setters */);
1052    /// ```
1053    pub fn set_finish_time<T>(mut self, v: T) -> Self
1054    where
1055        T: std::convert::Into<wkt::Timestamp>,
1056    {
1057        self.finish_time = std::option::Option::Some(v.into());
1058        self
1059    }
1060
1061    /// Sets or clears the value of [finish_time][crate::model::FrameworkAudit::finish_time].
1062    ///
1063    /// # Example
1064    /// ```ignore,no_run
1065    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1066    /// use wkt::Timestamp;
1067    /// let x = FrameworkAudit::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1068    /// let x = FrameworkAudit::new().set_or_clear_finish_time(None::<Timestamp>);
1069    /// ```
1070    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1071    where
1072        T: std::convert::Into<wkt::Timestamp>,
1073    {
1074        self.finish_time = v.map(|x| x.into());
1075        self
1076    }
1077
1078    /// Sets the value of [compliance_state][crate::model::FrameworkAudit::compliance_state].
1079    ///
1080    /// # Example
1081    /// ```ignore,no_run
1082    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1083    /// use google_cloud_cloudsecuritycompliance_v1::model::ComplianceState;
1084    /// let x0 = FrameworkAudit::new().set_compliance_state(ComplianceState::Compliant);
1085    /// let x1 = FrameworkAudit::new().set_compliance_state(ComplianceState::Violation);
1086    /// let x2 = FrameworkAudit::new().set_compliance_state(ComplianceState::ManualReviewNeeded);
1087    /// ```
1088    pub fn set_compliance_state<T: std::convert::Into<crate::model::ComplianceState>>(
1089        mut self,
1090        v: T,
1091    ) -> Self {
1092        self.compliance_state = v.into();
1093        self
1094    }
1095
1096    /// Sets the value of [report_summary][crate::model::FrameworkAudit::report_summary].
1097    ///
1098    /// # Example
1099    /// ```ignore,no_run
1100    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1101    /// use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
1102    /// let x = FrameworkAudit::new().set_report_summary(ReportSummary::default()/* use setters */);
1103    /// ```
1104    pub fn set_report_summary<T>(mut self, v: T) -> Self
1105    where
1106        T: std::convert::Into<crate::model::ReportSummary>,
1107    {
1108        self.report_summary = std::option::Option::Some(v.into());
1109        self
1110    }
1111
1112    /// Sets or clears the value of [report_summary][crate::model::FrameworkAudit::report_summary].
1113    ///
1114    /// # Example
1115    /// ```ignore,no_run
1116    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1117    /// use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
1118    /// let x = FrameworkAudit::new().set_or_clear_report_summary(Some(ReportSummary::default()/* use setters */));
1119    /// let x = FrameworkAudit::new().set_or_clear_report_summary(None::<ReportSummary>);
1120    /// ```
1121    pub fn set_or_clear_report_summary<T>(mut self, v: std::option::Option<T>) -> Self
1122    where
1123        T: std::convert::Into<crate::model::ReportSummary>,
1124    {
1125        self.report_summary = v.map(|x| x.into());
1126        self
1127    }
1128
1129    /// Sets the value of [cloud_control_group_audit_details][crate::model::FrameworkAudit::cloud_control_group_audit_details].
1130    ///
1131    /// # Example
1132    /// ```ignore,no_run
1133    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1134    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1135    /// let x = FrameworkAudit::new()
1136    ///     .set_cloud_control_group_audit_details([
1137    ///         CloudControlGroupAuditDetails::default()/* use setters */,
1138    ///         CloudControlGroupAuditDetails::default()/* use (different) setters */,
1139    ///     ]);
1140    /// ```
1141    pub fn set_cloud_control_group_audit_details<T, V>(mut self, v: T) -> Self
1142    where
1143        T: std::iter::IntoIterator<Item = V>,
1144        V: std::convert::Into<crate::model::CloudControlGroupAuditDetails>,
1145    {
1146        use std::iter::Iterator;
1147        self.cloud_control_group_audit_details = v.into_iter().map(|i| i.into()).collect();
1148        self
1149    }
1150
1151    /// Sets the value of [cloud_control_audit_details][crate::model::FrameworkAudit::cloud_control_audit_details].
1152    ///
1153    /// # Example
1154    /// ```ignore,no_run
1155    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1156    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
1157    /// let x = FrameworkAudit::new()
1158    ///     .set_cloud_control_audit_details([
1159    ///         CloudControlAuditDetails::default()/* use setters */,
1160    ///         CloudControlAuditDetails::default()/* use (different) setters */,
1161    ///     ]);
1162    /// ```
1163    pub fn set_cloud_control_audit_details<T, V>(mut self, v: T) -> Self
1164    where
1165        T: std::iter::IntoIterator<Item = V>,
1166        V: std::convert::Into<crate::model::CloudControlAuditDetails>,
1167    {
1168        use std::iter::Iterator;
1169        self.cloud_control_audit_details = v.into_iter().map(|i| i.into()).collect();
1170        self
1171    }
1172
1173    /// Sets the value of [operation_id][crate::model::FrameworkAudit::operation_id].
1174    ///
1175    /// # Example
1176    /// ```ignore,no_run
1177    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1178    /// let x = FrameworkAudit::new().set_operation_id("example");
1179    /// ```
1180    pub fn set_operation_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1181        self.operation_id = v.into();
1182        self
1183    }
1184
1185    /// Sets the value of [state][crate::model::FrameworkAudit::state].
1186    ///
1187    /// # Example
1188    /// ```ignore,no_run
1189    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1190    /// use google_cloud_cloudsecuritycompliance_v1::model::framework_audit::State;
1191    /// let x0 = FrameworkAudit::new().set_state(State::Scheduled);
1192    /// let x1 = FrameworkAudit::new().set_state(State::Running);
1193    /// let x2 = FrameworkAudit::new().set_state(State::Uploading);
1194    /// ```
1195    pub fn set_state<T: std::convert::Into<crate::model::framework_audit::State>>(
1196        mut self,
1197        v: T,
1198    ) -> Self {
1199        self.state = v.into();
1200        self
1201    }
1202}
1203
1204impl wkt::message::Message for FrameworkAudit {
1205    fn typename() -> &'static str {
1206        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkAudit"
1207    }
1208}
1209
1210/// Defines additional types related to [FrameworkAudit].
1211pub mod framework_audit {
1212    #[allow(unused_imports)]
1213    use super::*;
1214
1215    /// The state of the framework audit.
1216    ///
1217    /// # Working with unknown values
1218    ///
1219    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1220    /// additional enum variants at any time. Adding new variants is not considered
1221    /// a breaking change. Applications should write their code in anticipation of:
1222    ///
1223    /// - New values appearing in future releases of the client library, **and**
1224    /// - New values received dynamically, without application changes.
1225    ///
1226    /// Please consult the [Working with enums] section in the user guide for some
1227    /// guidelines.
1228    ///
1229    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1230    #[derive(Clone, Debug, PartialEq)]
1231    #[non_exhaustive]
1232    pub enum State {
1233        /// Default value. This value is unused.
1234        Unspecified,
1235        /// The audit is scheduled.
1236        Scheduled,
1237        /// The audit is running.
1238        Running,
1239        /// The audit results are being uploaded.
1240        Uploading,
1241        /// The audit failed.
1242        Failed,
1243        /// The audit completed successfully.
1244        Succeeded,
1245        /// If set, the enum was initialized with an unknown value.
1246        ///
1247        /// Applications can examine the value using [State::value] or
1248        /// [State::name].
1249        UnknownValue(state::UnknownValue),
1250    }
1251
1252    #[doc(hidden)]
1253    pub mod state {
1254        #[allow(unused_imports)]
1255        use super::*;
1256        #[derive(Clone, Debug, PartialEq)]
1257        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1258    }
1259
1260    impl State {
1261        /// Gets the enum value.
1262        ///
1263        /// Returns `None` if the enum contains an unknown value deserialized from
1264        /// the string representation of enums.
1265        pub fn value(&self) -> std::option::Option<i32> {
1266            match self {
1267                Self::Unspecified => std::option::Option::Some(0),
1268                Self::Scheduled => std::option::Option::Some(1),
1269                Self::Running => std::option::Option::Some(2),
1270                Self::Uploading => std::option::Option::Some(3),
1271                Self::Failed => std::option::Option::Some(4),
1272                Self::Succeeded => std::option::Option::Some(5),
1273                Self::UnknownValue(u) => u.0.value(),
1274            }
1275        }
1276
1277        /// Gets the enum value as a string.
1278        ///
1279        /// Returns `None` if the enum contains an unknown value deserialized from
1280        /// the integer representation of enums.
1281        pub fn name(&self) -> std::option::Option<&str> {
1282            match self {
1283                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
1284                Self::Scheduled => std::option::Option::Some("SCHEDULED"),
1285                Self::Running => std::option::Option::Some("RUNNING"),
1286                Self::Uploading => std::option::Option::Some("UPLOADING"),
1287                Self::Failed => std::option::Option::Some("FAILED"),
1288                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
1289                Self::UnknownValue(u) => u.0.name(),
1290            }
1291        }
1292    }
1293
1294    impl std::default::Default for State {
1295        fn default() -> Self {
1296            use std::convert::From;
1297            Self::from(0)
1298        }
1299    }
1300
1301    impl std::fmt::Display for State {
1302        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1303            wkt::internal::display_enum(f, self.name(), self.value())
1304        }
1305    }
1306
1307    impl std::convert::From<i32> for State {
1308        fn from(value: i32) -> Self {
1309            match value {
1310                0 => Self::Unspecified,
1311                1 => Self::Scheduled,
1312                2 => Self::Running,
1313                3 => Self::Uploading,
1314                4 => Self::Failed,
1315                5 => Self::Succeeded,
1316                _ => Self::UnknownValue(state::UnknownValue(
1317                    wkt::internal::UnknownEnumValue::Integer(value),
1318                )),
1319            }
1320        }
1321    }
1322
1323    impl std::convert::From<&str> for State {
1324        fn from(value: &str) -> Self {
1325            use std::string::ToString;
1326            match value {
1327                "STATE_UNSPECIFIED" => Self::Unspecified,
1328                "SCHEDULED" => Self::Scheduled,
1329                "RUNNING" => Self::Running,
1330                "UPLOADING" => Self::Uploading,
1331                "FAILED" => Self::Failed,
1332                "SUCCEEDED" => Self::Succeeded,
1333                _ => Self::UnknownValue(state::UnknownValue(
1334                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1335                )),
1336            }
1337        }
1338    }
1339
1340    impl serde::ser::Serialize for State {
1341        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1342        where
1343            S: serde::Serializer,
1344        {
1345            match self {
1346                Self::Unspecified => serializer.serialize_i32(0),
1347                Self::Scheduled => serializer.serialize_i32(1),
1348                Self::Running => serializer.serialize_i32(2),
1349                Self::Uploading => serializer.serialize_i32(3),
1350                Self::Failed => serializer.serialize_i32(4),
1351                Self::Succeeded => serializer.serialize_i32(5),
1352                Self::UnknownValue(u) => u.0.serialize(serializer),
1353            }
1354        }
1355    }
1356
1357    impl<'de> serde::de::Deserialize<'de> for State {
1358        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1359        where
1360            D: serde::Deserializer<'de>,
1361        {
1362            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
1363                ".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State",
1364            ))
1365        }
1366    }
1367}
1368
1369/// The request message for [ListFrameworkAudits][].
1370#[derive(Clone, Default, PartialEq)]
1371#[non_exhaustive]
1372pub struct ListFrameworkAuditsRequest {
1373    /// Required. The parent resource where the framework audits are listed.
1374    ///
1375    /// Supported formats are the following:
1376    ///
1377    /// * `organizations/{organization_id}/locations/{location}`
1378    /// * `folders/{folder_id}/locations/{location}`
1379    /// * `projects/{project_id}/locations/{location}`
1380    pub parent: std::string::String,
1381
1382    /// Optional. The maximum number of framework audits to return. The service
1383    /// might return fewer audits than this value. If unspecified, a maximum of 10
1384    /// framework audits are returned. The maximum value is 50; values above 50 are
1385    /// limited to 50.
1386    pub page_size: i32,
1387
1388    /// Optional. The `next_page_token` value that's returned from a previous list
1389    /// request, if any.
1390    pub page_token: std::string::String,
1391
1392    /// Optional. The filters to apply to the framework audits.
1393    /// Supported filters are `compliance_framework`, `compliance_state`,
1394    /// `create_time,` and `framework_audit_name`. If the filter is invalid, an
1395    /// invalid argument error is returned.
1396    /// For syntax details, see [AIP-160][<https://google.aip.dev/160>].
1397    pub filter: std::string::String,
1398
1399    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1400}
1401
1402impl ListFrameworkAuditsRequest {
1403    /// Creates a new default instance.
1404    pub fn new() -> Self {
1405        std::default::Default::default()
1406    }
1407
1408    /// Sets the value of [parent][crate::model::ListFrameworkAuditsRequest::parent].
1409    ///
1410    /// # Example
1411    /// ```ignore,no_run
1412    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkAuditsRequest;
1413    /// # let project_id = "project_id";
1414    /// # let location_id = "location_id";
1415    /// let x = ListFrameworkAuditsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
1416    /// ```
1417    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1418        self.parent = v.into();
1419        self
1420    }
1421
1422    /// Sets the value of [page_size][crate::model::ListFrameworkAuditsRequest::page_size].
1423    ///
1424    /// # Example
1425    /// ```ignore,no_run
1426    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkAuditsRequest;
1427    /// let x = ListFrameworkAuditsRequest::new().set_page_size(42);
1428    /// ```
1429    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1430        self.page_size = v.into();
1431        self
1432    }
1433
1434    /// Sets the value of [page_token][crate::model::ListFrameworkAuditsRequest::page_token].
1435    ///
1436    /// # Example
1437    /// ```ignore,no_run
1438    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkAuditsRequest;
1439    /// let x = ListFrameworkAuditsRequest::new().set_page_token("example");
1440    /// ```
1441    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1442        self.page_token = v.into();
1443        self
1444    }
1445
1446    /// Sets the value of [filter][crate::model::ListFrameworkAuditsRequest::filter].
1447    ///
1448    /// # Example
1449    /// ```ignore,no_run
1450    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkAuditsRequest;
1451    /// let x = ListFrameworkAuditsRequest::new().set_filter("example");
1452    /// ```
1453    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1454        self.filter = v.into();
1455        self
1456    }
1457}
1458
1459impl wkt::message::Message for ListFrameworkAuditsRequest {
1460    fn typename() -> &'static str {
1461        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest"
1462    }
1463}
1464
1465/// The response message for [ListFrameworkAudits][].
1466#[derive(Clone, Default, PartialEq)]
1467#[non_exhaustive]
1468pub struct ListFrameworkAuditsResponse {
1469    /// The framework audits.
1470    pub framework_audits: std::vec::Vec<crate::model::FrameworkAudit>,
1471
1472    /// A token, which you can send as the `page_token` to retrieve the next page.
1473    /// If this field is omitted, there are no subsequent pages.
1474    pub next_page_token: std::string::String,
1475
1476    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1477}
1478
1479impl ListFrameworkAuditsResponse {
1480    /// Creates a new default instance.
1481    pub fn new() -> Self {
1482        std::default::Default::default()
1483    }
1484
1485    /// Sets the value of [framework_audits][crate::model::ListFrameworkAuditsResponse::framework_audits].
1486    ///
1487    /// # Example
1488    /// ```ignore,no_run
1489    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkAuditsResponse;
1490    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1491    /// let x = ListFrameworkAuditsResponse::new()
1492    ///     .set_framework_audits([
1493    ///         FrameworkAudit::default()/* use setters */,
1494    ///         FrameworkAudit::default()/* use (different) setters */,
1495    ///     ]);
1496    /// ```
1497    pub fn set_framework_audits<T, V>(mut self, v: T) -> Self
1498    where
1499        T: std::iter::IntoIterator<Item = V>,
1500        V: std::convert::Into<crate::model::FrameworkAudit>,
1501    {
1502        use std::iter::Iterator;
1503        self.framework_audits = v.into_iter().map(|i| i.into()).collect();
1504        self
1505    }
1506
1507    /// Sets the value of [next_page_token][crate::model::ListFrameworkAuditsResponse::next_page_token].
1508    ///
1509    /// # Example
1510    /// ```ignore,no_run
1511    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkAuditsResponse;
1512    /// let x = ListFrameworkAuditsResponse::new().set_next_page_token("example");
1513    /// ```
1514    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1515        self.next_page_token = v.into();
1516        self
1517    }
1518}
1519
1520impl wkt::message::Message for ListFrameworkAuditsResponse {
1521    fn typename() -> &'static str {
1522        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse"
1523    }
1524}
1525
1526#[doc(hidden)]
1527impl google_cloud_gax::paginator::internal::PageableResponse for ListFrameworkAuditsResponse {
1528    type PageItem = crate::model::FrameworkAudit;
1529
1530    fn items(self) -> std::vec::Vec<Self::PageItem> {
1531        self.framework_audits
1532    }
1533
1534    fn next_page_token(&self) -> std::string::String {
1535        use std::clone::Clone;
1536        self.next_page_token.clone()
1537    }
1538}
1539
1540/// The request message for [GetFrameworkAudit][].
1541#[derive(Clone, Default, PartialEq)]
1542#[non_exhaustive]
1543pub struct GetFrameworkAuditRequest {
1544    /// Required. The name of the framework audit to retrieve.
1545    ///
1546    /// Supported formats are the following:
1547    ///
1548    /// * `organizations/{organization_id}/locations/{location}/frameworkAudits/{frameworkAuditName}`
1549    /// * `folders/{folder_id}/locations/{location}/frameworkAudits/{frameworkAuditName}`
1550    /// * `projects/{project_id}/locations/{location}/frameworkAudits/{frameworkAuditName}`
1551    pub name: std::string::String,
1552
1553    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1554}
1555
1556impl GetFrameworkAuditRequest {
1557    /// Creates a new default instance.
1558    pub fn new() -> Self {
1559        std::default::Default::default()
1560    }
1561
1562    /// Sets the value of [name][crate::model::GetFrameworkAuditRequest::name].
1563    ///
1564    /// # Example
1565    /// ```ignore,no_run
1566    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetFrameworkAuditRequest;
1567    /// # let project_id = "project_id";
1568    /// # let location_id = "location_id";
1569    /// # let framework_audit_id = "framework_audit_id";
1570    /// let x = GetFrameworkAuditRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/frameworkAudits/{framework_audit_id}"));
1571    /// ```
1572    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1573        self.name = v.into();
1574        self
1575    }
1576}
1577
1578impl wkt::message::Message for GetFrameworkAuditRequest {
1579    fn typename() -> &'static str {
1580        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest"
1581    }
1582}
1583
1584/// The details for a cloud control group.
1585#[derive(Clone, Default, PartialEq)]
1586#[non_exhaustive]
1587pub struct CloudControlGroupAuditDetails {
1588    /// Output only. The ID of the cloud control group.
1589    pub cloud_control_group_id: std::string::String,
1590
1591    /// Output only. The display name of the cloud control group.
1592    pub display_name: std::string::String,
1593
1594    /// Output only. The description of the cloud control group.
1595    pub description: std::string::String,
1596
1597    /// Output only. The responsibility type.
1598    pub responsibility_type: std::string::String,
1599
1600    /// Output only. The description of Google's responsibility.
1601    pub google_responsibility_description: std::string::String,
1602
1603    /// Output only. The implementation of Google's responsibility.
1604    pub google_responsibility_implementation: std::string::String,
1605
1606    /// Output only. The description of your responsibility.
1607    pub customer_responsibility_description: std::string::String,
1608
1609    /// Output only. The implementation of your responsibility.
1610    pub customer_responsibility_implementation: std::string::String,
1611
1612    /// Output only. The compliance state of the control group.
1613    pub compliance_state: crate::model::ComplianceState,
1614
1615    /// Output only. The ID of the regulatory control.
1616    pub control_id: std::string::String,
1617
1618    /// Output only. The control family.
1619    pub control_family: std::option::Option<crate::model::ControlFamily>,
1620
1621    /// Output only. The details for the cloud controls within this group.
1622    pub cloud_control_details: std::vec::Vec<crate::model::CloudControlAuditDetails>,
1623
1624    /// Output only. The summary of the report.
1625    pub report_summary: std::option::Option<crate::model::ReportSummary>,
1626
1627    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1628}
1629
1630impl CloudControlGroupAuditDetails {
1631    /// Creates a new default instance.
1632    pub fn new() -> Self {
1633        std::default::Default::default()
1634    }
1635
1636    /// Sets the value of [cloud_control_group_id][crate::model::CloudControlGroupAuditDetails::cloud_control_group_id].
1637    ///
1638    /// # Example
1639    /// ```ignore,no_run
1640    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1641    /// let x = CloudControlGroupAuditDetails::new().set_cloud_control_group_id("example");
1642    /// ```
1643    pub fn set_cloud_control_group_id<T: std::convert::Into<std::string::String>>(
1644        mut self,
1645        v: T,
1646    ) -> Self {
1647        self.cloud_control_group_id = v.into();
1648        self
1649    }
1650
1651    /// Sets the value of [display_name][crate::model::CloudControlGroupAuditDetails::display_name].
1652    ///
1653    /// # Example
1654    /// ```ignore,no_run
1655    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1656    /// let x = CloudControlGroupAuditDetails::new().set_display_name("example");
1657    /// ```
1658    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1659        self.display_name = v.into();
1660        self
1661    }
1662
1663    /// Sets the value of [description][crate::model::CloudControlGroupAuditDetails::description].
1664    ///
1665    /// # Example
1666    /// ```ignore,no_run
1667    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1668    /// let x = CloudControlGroupAuditDetails::new().set_description("example");
1669    /// ```
1670    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1671        self.description = v.into();
1672        self
1673    }
1674
1675    /// Sets the value of [responsibility_type][crate::model::CloudControlGroupAuditDetails::responsibility_type].
1676    ///
1677    /// # Example
1678    /// ```ignore,no_run
1679    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1680    /// let x = CloudControlGroupAuditDetails::new().set_responsibility_type("example");
1681    /// ```
1682    pub fn set_responsibility_type<T: std::convert::Into<std::string::String>>(
1683        mut self,
1684        v: T,
1685    ) -> Self {
1686        self.responsibility_type = v.into();
1687        self
1688    }
1689
1690    /// Sets the value of [google_responsibility_description][crate::model::CloudControlGroupAuditDetails::google_responsibility_description].
1691    ///
1692    /// # Example
1693    /// ```ignore,no_run
1694    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1695    /// let x = CloudControlGroupAuditDetails::new().set_google_responsibility_description("example");
1696    /// ```
1697    pub fn set_google_responsibility_description<T: std::convert::Into<std::string::String>>(
1698        mut self,
1699        v: T,
1700    ) -> Self {
1701        self.google_responsibility_description = v.into();
1702        self
1703    }
1704
1705    /// Sets the value of [google_responsibility_implementation][crate::model::CloudControlGroupAuditDetails::google_responsibility_implementation].
1706    ///
1707    /// # Example
1708    /// ```ignore,no_run
1709    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1710    /// let x = CloudControlGroupAuditDetails::new().set_google_responsibility_implementation("example");
1711    /// ```
1712    pub fn set_google_responsibility_implementation<T: std::convert::Into<std::string::String>>(
1713        mut self,
1714        v: T,
1715    ) -> Self {
1716        self.google_responsibility_implementation = v.into();
1717        self
1718    }
1719
1720    /// Sets the value of [customer_responsibility_description][crate::model::CloudControlGroupAuditDetails::customer_responsibility_description].
1721    ///
1722    /// # Example
1723    /// ```ignore,no_run
1724    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1725    /// let x = CloudControlGroupAuditDetails::new().set_customer_responsibility_description("example");
1726    /// ```
1727    pub fn set_customer_responsibility_description<T: std::convert::Into<std::string::String>>(
1728        mut self,
1729        v: T,
1730    ) -> Self {
1731        self.customer_responsibility_description = v.into();
1732        self
1733    }
1734
1735    /// Sets the value of [customer_responsibility_implementation][crate::model::CloudControlGroupAuditDetails::customer_responsibility_implementation].
1736    ///
1737    /// # Example
1738    /// ```ignore,no_run
1739    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1740    /// let x = CloudControlGroupAuditDetails::new().set_customer_responsibility_implementation("example");
1741    /// ```
1742    pub fn set_customer_responsibility_implementation<
1743        T: std::convert::Into<std::string::String>,
1744    >(
1745        mut self,
1746        v: T,
1747    ) -> Self {
1748        self.customer_responsibility_implementation = v.into();
1749        self
1750    }
1751
1752    /// Sets the value of [compliance_state][crate::model::CloudControlGroupAuditDetails::compliance_state].
1753    ///
1754    /// # Example
1755    /// ```ignore,no_run
1756    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1757    /// use google_cloud_cloudsecuritycompliance_v1::model::ComplianceState;
1758    /// let x0 = CloudControlGroupAuditDetails::new().set_compliance_state(ComplianceState::Compliant);
1759    /// let x1 = CloudControlGroupAuditDetails::new().set_compliance_state(ComplianceState::Violation);
1760    /// let x2 = CloudControlGroupAuditDetails::new().set_compliance_state(ComplianceState::ManualReviewNeeded);
1761    /// ```
1762    pub fn set_compliance_state<T: std::convert::Into<crate::model::ComplianceState>>(
1763        mut self,
1764        v: T,
1765    ) -> Self {
1766        self.compliance_state = v.into();
1767        self
1768    }
1769
1770    /// Sets the value of [control_id][crate::model::CloudControlGroupAuditDetails::control_id].
1771    ///
1772    /// # Example
1773    /// ```ignore,no_run
1774    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1775    /// let x = CloudControlGroupAuditDetails::new().set_control_id("example");
1776    /// ```
1777    pub fn set_control_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1778        self.control_id = v.into();
1779        self
1780    }
1781
1782    /// Sets the value of [control_family][crate::model::CloudControlGroupAuditDetails::control_family].
1783    ///
1784    /// # Example
1785    /// ```ignore,no_run
1786    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1787    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlFamily;
1788    /// let x = CloudControlGroupAuditDetails::new().set_control_family(ControlFamily::default()/* use setters */);
1789    /// ```
1790    pub fn set_control_family<T>(mut self, v: T) -> Self
1791    where
1792        T: std::convert::Into<crate::model::ControlFamily>,
1793    {
1794        self.control_family = std::option::Option::Some(v.into());
1795        self
1796    }
1797
1798    /// Sets or clears the value of [control_family][crate::model::CloudControlGroupAuditDetails::control_family].
1799    ///
1800    /// # Example
1801    /// ```ignore,no_run
1802    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1803    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlFamily;
1804    /// let x = CloudControlGroupAuditDetails::new().set_or_clear_control_family(Some(ControlFamily::default()/* use setters */));
1805    /// let x = CloudControlGroupAuditDetails::new().set_or_clear_control_family(None::<ControlFamily>);
1806    /// ```
1807    pub fn set_or_clear_control_family<T>(mut self, v: std::option::Option<T>) -> Self
1808    where
1809        T: std::convert::Into<crate::model::ControlFamily>,
1810    {
1811        self.control_family = v.map(|x| x.into());
1812        self
1813    }
1814
1815    /// Sets the value of [cloud_control_details][crate::model::CloudControlGroupAuditDetails::cloud_control_details].
1816    ///
1817    /// # Example
1818    /// ```ignore,no_run
1819    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1820    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
1821    /// let x = CloudControlGroupAuditDetails::new()
1822    ///     .set_cloud_control_details([
1823    ///         CloudControlAuditDetails::default()/* use setters */,
1824    ///         CloudControlAuditDetails::default()/* use (different) setters */,
1825    ///     ]);
1826    /// ```
1827    pub fn set_cloud_control_details<T, V>(mut self, v: T) -> Self
1828    where
1829        T: std::iter::IntoIterator<Item = V>,
1830        V: std::convert::Into<crate::model::CloudControlAuditDetails>,
1831    {
1832        use std::iter::Iterator;
1833        self.cloud_control_details = v.into_iter().map(|i| i.into()).collect();
1834        self
1835    }
1836
1837    /// Sets the value of [report_summary][crate::model::CloudControlGroupAuditDetails::report_summary].
1838    ///
1839    /// # Example
1840    /// ```ignore,no_run
1841    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1842    /// use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
1843    /// let x = CloudControlGroupAuditDetails::new().set_report_summary(ReportSummary::default()/* use setters */);
1844    /// ```
1845    pub fn set_report_summary<T>(mut self, v: T) -> Self
1846    where
1847        T: std::convert::Into<crate::model::ReportSummary>,
1848    {
1849        self.report_summary = std::option::Option::Some(v.into());
1850        self
1851    }
1852
1853    /// Sets or clears the value of [report_summary][crate::model::CloudControlGroupAuditDetails::report_summary].
1854    ///
1855    /// # Example
1856    /// ```ignore,no_run
1857    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1858    /// use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
1859    /// let x = CloudControlGroupAuditDetails::new().set_or_clear_report_summary(Some(ReportSummary::default()/* use setters */));
1860    /// let x = CloudControlGroupAuditDetails::new().set_or_clear_report_summary(None::<ReportSummary>);
1861    /// ```
1862    pub fn set_or_clear_report_summary<T>(mut self, v: std::option::Option<T>) -> Self
1863    where
1864        T: std::convert::Into<crate::model::ReportSummary>,
1865    {
1866        self.report_summary = v.map(|x| x.into());
1867        self
1868    }
1869}
1870
1871impl wkt::message::Message for CloudControlGroupAuditDetails {
1872    fn typename() -> &'static str {
1873        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails"
1874    }
1875}
1876
1877/// The details for a finding.
1878#[derive(Clone, Default, PartialEq)]
1879#[non_exhaustive]
1880pub struct FindingDetails {
1881    /// Output only. The name of the finding.
1882    pub name: std::string::String,
1883
1884    /// Output only. The compliance state of the finding.
1885    pub compliance_state: crate::model::ComplianceState,
1886
1887    /// Output only. The observation details for the finding.
1888    pub observation: std::option::Option<crate::model::ObservationDetails>,
1889
1890    /// Output only. The evidence details for the finding.
1891    pub evidence: std::option::Option<crate::model::EvidenceDetails>,
1892
1893    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1894}
1895
1896impl FindingDetails {
1897    /// Creates a new default instance.
1898    pub fn new() -> Self {
1899        std::default::Default::default()
1900    }
1901
1902    /// Sets the value of [name][crate::model::FindingDetails::name].
1903    ///
1904    /// # Example
1905    /// ```ignore,no_run
1906    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
1907    /// let x = FindingDetails::new().set_name("example");
1908    /// ```
1909    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1910        self.name = v.into();
1911        self
1912    }
1913
1914    /// Sets the value of [compliance_state][crate::model::FindingDetails::compliance_state].
1915    ///
1916    /// # Example
1917    /// ```ignore,no_run
1918    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
1919    /// use google_cloud_cloudsecuritycompliance_v1::model::ComplianceState;
1920    /// let x0 = FindingDetails::new().set_compliance_state(ComplianceState::Compliant);
1921    /// let x1 = FindingDetails::new().set_compliance_state(ComplianceState::Violation);
1922    /// let x2 = FindingDetails::new().set_compliance_state(ComplianceState::ManualReviewNeeded);
1923    /// ```
1924    pub fn set_compliance_state<T: std::convert::Into<crate::model::ComplianceState>>(
1925        mut self,
1926        v: T,
1927    ) -> Self {
1928        self.compliance_state = v.into();
1929        self
1930    }
1931
1932    /// Sets the value of [observation][crate::model::FindingDetails::observation].
1933    ///
1934    /// # Example
1935    /// ```ignore,no_run
1936    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
1937    /// use google_cloud_cloudsecuritycompliance_v1::model::ObservationDetails;
1938    /// let x = FindingDetails::new().set_observation(ObservationDetails::default()/* use setters */);
1939    /// ```
1940    pub fn set_observation<T>(mut self, v: T) -> Self
1941    where
1942        T: std::convert::Into<crate::model::ObservationDetails>,
1943    {
1944        self.observation = std::option::Option::Some(v.into());
1945        self
1946    }
1947
1948    /// Sets or clears the value of [observation][crate::model::FindingDetails::observation].
1949    ///
1950    /// # Example
1951    /// ```ignore,no_run
1952    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
1953    /// use google_cloud_cloudsecuritycompliance_v1::model::ObservationDetails;
1954    /// let x = FindingDetails::new().set_or_clear_observation(Some(ObservationDetails::default()/* use setters */));
1955    /// let x = FindingDetails::new().set_or_clear_observation(None::<ObservationDetails>);
1956    /// ```
1957    pub fn set_or_clear_observation<T>(mut self, v: std::option::Option<T>) -> Self
1958    where
1959        T: std::convert::Into<crate::model::ObservationDetails>,
1960    {
1961        self.observation = v.map(|x| x.into());
1962        self
1963    }
1964
1965    /// Sets the value of [evidence][crate::model::FindingDetails::evidence].
1966    ///
1967    /// # Example
1968    /// ```ignore,no_run
1969    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
1970    /// use google_cloud_cloudsecuritycompliance_v1::model::EvidenceDetails;
1971    /// let x = FindingDetails::new().set_evidence(EvidenceDetails::default()/* use setters */);
1972    /// ```
1973    pub fn set_evidence<T>(mut self, v: T) -> Self
1974    where
1975        T: std::convert::Into<crate::model::EvidenceDetails>,
1976    {
1977        self.evidence = std::option::Option::Some(v.into());
1978        self
1979    }
1980
1981    /// Sets or clears the value of [evidence][crate::model::FindingDetails::evidence].
1982    ///
1983    /// # Example
1984    /// ```ignore,no_run
1985    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
1986    /// use google_cloud_cloudsecuritycompliance_v1::model::EvidenceDetails;
1987    /// let x = FindingDetails::new().set_or_clear_evidence(Some(EvidenceDetails::default()/* use setters */));
1988    /// let x = FindingDetails::new().set_or_clear_evidence(None::<EvidenceDetails>);
1989    /// ```
1990    pub fn set_or_clear_evidence<T>(mut self, v: std::option::Option<T>) -> Self
1991    where
1992        T: std::convert::Into<crate::model::EvidenceDetails>,
1993    {
1994        self.evidence = v.map(|x| x.into());
1995        self
1996    }
1997}
1998
1999impl wkt::message::Message for FindingDetails {
2000    fn typename() -> &'static str {
2001        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FindingDetails"
2002    }
2003}
2004
2005/// The observation details for a finding.
2006#[derive(Clone, Default, PartialEq)]
2007#[non_exhaustive]
2008pub struct ObservationDetails {
2009    /// Output only. The current value.
2010    pub current_value: std::string::String,
2011
2012    /// Optional. The expected value.
2013    pub expected_value: std::string::String,
2014
2015    /// Output only. Any guidance for the observation.
2016    pub guidance: std::string::String,
2017
2018    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2019}
2020
2021impl ObservationDetails {
2022    /// Creates a new default instance.
2023    pub fn new() -> Self {
2024        std::default::Default::default()
2025    }
2026
2027    /// Sets the value of [current_value][crate::model::ObservationDetails::current_value].
2028    ///
2029    /// # Example
2030    /// ```ignore,no_run
2031    /// # use google_cloud_cloudsecuritycompliance_v1::model::ObservationDetails;
2032    /// let x = ObservationDetails::new().set_current_value("example");
2033    /// ```
2034    pub fn set_current_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2035        self.current_value = v.into();
2036        self
2037    }
2038
2039    /// Sets the value of [expected_value][crate::model::ObservationDetails::expected_value].
2040    ///
2041    /// # Example
2042    /// ```ignore,no_run
2043    /// # use google_cloud_cloudsecuritycompliance_v1::model::ObservationDetails;
2044    /// let x = ObservationDetails::new().set_expected_value("example");
2045    /// ```
2046    pub fn set_expected_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2047        self.expected_value = v.into();
2048        self
2049    }
2050
2051    /// Sets the value of [guidance][crate::model::ObservationDetails::guidance].
2052    ///
2053    /// # Example
2054    /// ```ignore,no_run
2055    /// # use google_cloud_cloudsecuritycompliance_v1::model::ObservationDetails;
2056    /// let x = ObservationDetails::new().set_guidance("example");
2057    /// ```
2058    pub fn set_guidance<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2059        self.guidance = v.into();
2060        self
2061    }
2062}
2063
2064impl wkt::message::Message for ObservationDetails {
2065    fn typename() -> &'static str {
2066        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ObservationDetails"
2067    }
2068}
2069
2070/// The evidence details for a finding.
2071#[derive(Clone, Default, PartialEq)]
2072#[non_exhaustive]
2073pub struct EvidenceDetails {
2074    /// Output only. The resource identifier.
2075    pub resource: std::string::String,
2076
2077    /// Output only. The service identifier.
2078    pub service: std::string::String,
2079
2080    /// Output only. The path to the evidence.
2081    pub evidence_path: std::string::String,
2082
2083    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2084}
2085
2086impl EvidenceDetails {
2087    /// Creates a new default instance.
2088    pub fn new() -> Self {
2089        std::default::Default::default()
2090    }
2091
2092    /// Sets the value of [resource][crate::model::EvidenceDetails::resource].
2093    ///
2094    /// # Example
2095    /// ```ignore,no_run
2096    /// # use google_cloud_cloudsecuritycompliance_v1::model::EvidenceDetails;
2097    /// let x = EvidenceDetails::new().set_resource("example");
2098    /// ```
2099    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2100        self.resource = v.into();
2101        self
2102    }
2103
2104    /// Sets the value of [service][crate::model::EvidenceDetails::service].
2105    ///
2106    /// # Example
2107    /// ```ignore,no_run
2108    /// # use google_cloud_cloudsecuritycompliance_v1::model::EvidenceDetails;
2109    /// let x = EvidenceDetails::new().set_service("example");
2110    /// ```
2111    pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2112        self.service = v.into();
2113        self
2114    }
2115
2116    /// Sets the value of [evidence_path][crate::model::EvidenceDetails::evidence_path].
2117    ///
2118    /// # Example
2119    /// ```ignore,no_run
2120    /// # use google_cloud_cloudsecuritycompliance_v1::model::EvidenceDetails;
2121    /// let x = EvidenceDetails::new().set_evidence_path("example");
2122    /// ```
2123    pub fn set_evidence_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2124        self.evidence_path = v.into();
2125        self
2126    }
2127}
2128
2129impl wkt::message::Message for EvidenceDetails {
2130    fn typename() -> &'static str {
2131        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.EvidenceDetails"
2132    }
2133}
2134
2135/// The details for a cloud control audit.
2136#[derive(Clone, Default, PartialEq)]
2137#[non_exhaustive]
2138pub struct CloudControlAuditDetails {
2139    /// Output only. The name of the cloud control.
2140    pub cloud_control: std::string::String,
2141
2142    /// Output only. The ID of the cloud control.
2143    pub cloud_control_id: std::string::String,
2144
2145    /// Output only. The description of the cloud control.
2146    pub cloud_control_description: std::string::String,
2147
2148    /// Output only. The overall status of the findings for the control.
2149    pub compliance_state: crate::model::ComplianceState,
2150
2151    /// Output only. The summary of the report.
2152    pub report_summary: std::option::Option<crate::model::ReportSummary>,
2153
2154    /// Output only. The findings for the control.
2155    pub findings: std::vec::Vec<crate::model::FindingDetails>,
2156
2157    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2158}
2159
2160impl CloudControlAuditDetails {
2161    /// Creates a new default instance.
2162    pub fn new() -> Self {
2163        std::default::Default::default()
2164    }
2165
2166    /// Sets the value of [cloud_control][crate::model::CloudControlAuditDetails::cloud_control].
2167    ///
2168    /// # Example
2169    /// ```ignore,no_run
2170    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2171    /// let x = CloudControlAuditDetails::new().set_cloud_control("example");
2172    /// ```
2173    pub fn set_cloud_control<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2174        self.cloud_control = v.into();
2175        self
2176    }
2177
2178    /// Sets the value of [cloud_control_id][crate::model::CloudControlAuditDetails::cloud_control_id].
2179    ///
2180    /// # Example
2181    /// ```ignore,no_run
2182    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2183    /// let x = CloudControlAuditDetails::new().set_cloud_control_id("example");
2184    /// ```
2185    pub fn set_cloud_control_id<T: std::convert::Into<std::string::String>>(
2186        mut self,
2187        v: T,
2188    ) -> Self {
2189        self.cloud_control_id = v.into();
2190        self
2191    }
2192
2193    /// Sets the value of [cloud_control_description][crate::model::CloudControlAuditDetails::cloud_control_description].
2194    ///
2195    /// # Example
2196    /// ```ignore,no_run
2197    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2198    /// let x = CloudControlAuditDetails::new().set_cloud_control_description("example");
2199    /// ```
2200    pub fn set_cloud_control_description<T: std::convert::Into<std::string::String>>(
2201        mut self,
2202        v: T,
2203    ) -> Self {
2204        self.cloud_control_description = v.into();
2205        self
2206    }
2207
2208    /// Sets the value of [compliance_state][crate::model::CloudControlAuditDetails::compliance_state].
2209    ///
2210    /// # Example
2211    /// ```ignore,no_run
2212    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2213    /// use google_cloud_cloudsecuritycompliance_v1::model::ComplianceState;
2214    /// let x0 = CloudControlAuditDetails::new().set_compliance_state(ComplianceState::Compliant);
2215    /// let x1 = CloudControlAuditDetails::new().set_compliance_state(ComplianceState::Violation);
2216    /// let x2 = CloudControlAuditDetails::new().set_compliance_state(ComplianceState::ManualReviewNeeded);
2217    /// ```
2218    pub fn set_compliance_state<T: std::convert::Into<crate::model::ComplianceState>>(
2219        mut self,
2220        v: T,
2221    ) -> Self {
2222        self.compliance_state = v.into();
2223        self
2224    }
2225
2226    /// Sets the value of [report_summary][crate::model::CloudControlAuditDetails::report_summary].
2227    ///
2228    /// # Example
2229    /// ```ignore,no_run
2230    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2231    /// use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
2232    /// let x = CloudControlAuditDetails::new().set_report_summary(ReportSummary::default()/* use setters */);
2233    /// ```
2234    pub fn set_report_summary<T>(mut self, v: T) -> Self
2235    where
2236        T: std::convert::Into<crate::model::ReportSummary>,
2237    {
2238        self.report_summary = std::option::Option::Some(v.into());
2239        self
2240    }
2241
2242    /// Sets or clears the value of [report_summary][crate::model::CloudControlAuditDetails::report_summary].
2243    ///
2244    /// # Example
2245    /// ```ignore,no_run
2246    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2247    /// use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
2248    /// let x = CloudControlAuditDetails::new().set_or_clear_report_summary(Some(ReportSummary::default()/* use setters */));
2249    /// let x = CloudControlAuditDetails::new().set_or_clear_report_summary(None::<ReportSummary>);
2250    /// ```
2251    pub fn set_or_clear_report_summary<T>(mut self, v: std::option::Option<T>) -> Self
2252    where
2253        T: std::convert::Into<crate::model::ReportSummary>,
2254    {
2255        self.report_summary = v.map(|x| x.into());
2256        self
2257    }
2258
2259    /// Sets the value of [findings][crate::model::CloudControlAuditDetails::findings].
2260    ///
2261    /// # Example
2262    /// ```ignore,no_run
2263    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2264    /// use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
2265    /// let x = CloudControlAuditDetails::new()
2266    ///     .set_findings([
2267    ///         FindingDetails::default()/* use setters */,
2268    ///         FindingDetails::default()/* use (different) setters */,
2269    ///     ]);
2270    /// ```
2271    pub fn set_findings<T, V>(mut self, v: T) -> Self
2272    where
2273        T: std::iter::IntoIterator<Item = V>,
2274        V: std::convert::Into<crate::model::FindingDetails>,
2275    {
2276        use std::iter::Iterator;
2277        self.findings = v.into_iter().map(|i| i.into()).collect();
2278        self
2279    }
2280}
2281
2282impl wkt::message::Message for CloudControlAuditDetails {
2283    fn typename() -> &'static str {
2284        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails"
2285    }
2286}
2287
2288/// The request message for [UpdateCmEnrollment][].
2289#[derive(Clone, Default, PartialEq)]
2290#[non_exhaustive]
2291pub struct UpdateCmEnrollmentRequest {
2292    /// Required. The Compliance Manager enrollment to update.
2293    /// The `name` field is used to identify the settings that you want to update.
2294    pub cm_enrollment: std::option::Option<crate::model::CmEnrollment>,
2295
2296    /// Optional. The list of fields that you want to update.
2297    pub update_mask: std::option::Option<wkt::FieldMask>,
2298
2299    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2300}
2301
2302impl UpdateCmEnrollmentRequest {
2303    /// Creates a new default instance.
2304    pub fn new() -> Self {
2305        std::default::Default::default()
2306    }
2307
2308    /// Sets the value of [cm_enrollment][crate::model::UpdateCmEnrollmentRequest::cm_enrollment].
2309    ///
2310    /// # Example
2311    /// ```ignore,no_run
2312    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCmEnrollmentRequest;
2313    /// use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2314    /// let x = UpdateCmEnrollmentRequest::new().set_cm_enrollment(CmEnrollment::default()/* use setters */);
2315    /// ```
2316    pub fn set_cm_enrollment<T>(mut self, v: T) -> Self
2317    where
2318        T: std::convert::Into<crate::model::CmEnrollment>,
2319    {
2320        self.cm_enrollment = std::option::Option::Some(v.into());
2321        self
2322    }
2323
2324    /// Sets or clears the value of [cm_enrollment][crate::model::UpdateCmEnrollmentRequest::cm_enrollment].
2325    ///
2326    /// # Example
2327    /// ```ignore,no_run
2328    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCmEnrollmentRequest;
2329    /// use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2330    /// let x = UpdateCmEnrollmentRequest::new().set_or_clear_cm_enrollment(Some(CmEnrollment::default()/* use setters */));
2331    /// let x = UpdateCmEnrollmentRequest::new().set_or_clear_cm_enrollment(None::<CmEnrollment>);
2332    /// ```
2333    pub fn set_or_clear_cm_enrollment<T>(mut self, v: std::option::Option<T>) -> Self
2334    where
2335        T: std::convert::Into<crate::model::CmEnrollment>,
2336    {
2337        self.cm_enrollment = v.map(|x| x.into());
2338        self
2339    }
2340
2341    /// Sets the value of [update_mask][crate::model::UpdateCmEnrollmentRequest::update_mask].
2342    ///
2343    /// # Example
2344    /// ```ignore,no_run
2345    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCmEnrollmentRequest;
2346    /// use wkt::FieldMask;
2347    /// let x = UpdateCmEnrollmentRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2348    /// ```
2349    pub fn set_update_mask<T>(mut self, v: T) -> Self
2350    where
2351        T: std::convert::Into<wkt::FieldMask>,
2352    {
2353        self.update_mask = std::option::Option::Some(v.into());
2354        self
2355    }
2356
2357    /// Sets or clears the value of [update_mask][crate::model::UpdateCmEnrollmentRequest::update_mask].
2358    ///
2359    /// # Example
2360    /// ```ignore,no_run
2361    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCmEnrollmentRequest;
2362    /// use wkt::FieldMask;
2363    /// let x = UpdateCmEnrollmentRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2364    /// let x = UpdateCmEnrollmentRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2365    /// ```
2366    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2367    where
2368        T: std::convert::Into<wkt::FieldMask>,
2369    {
2370        self.update_mask = v.map(|x| x.into());
2371        self
2372    }
2373}
2374
2375impl wkt::message::Message for UpdateCmEnrollmentRequest {
2376    fn typename() -> &'static str {
2377        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest"
2378    }
2379}
2380
2381/// The request message for [CalculateEffectiveCmEnrollment][].
2382#[derive(Clone, Default, PartialEq)]
2383#[non_exhaustive]
2384pub struct CalculateEffectiveCmEnrollmentRequest {
2385    /// Required. The name of the Compliance Manager enrollment to calculate.
2386    ///
2387    /// Supported formats are the following:
2388    ///
2389    /// * `organizations/{organization_id}/locations/{location}/cmEnrollment`
2390    /// * `folders/{folder_id}/locations/{location}/cmEnrollment`
2391    /// * `projects/{project_id}/locations/{location}/cmEnrollment`
2392    pub name: std::string::String,
2393
2394    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2395}
2396
2397impl CalculateEffectiveCmEnrollmentRequest {
2398    /// Creates a new default instance.
2399    pub fn new() -> Self {
2400        std::default::Default::default()
2401    }
2402
2403    /// Sets the value of [name][crate::model::CalculateEffectiveCmEnrollmentRequest::name].
2404    ///
2405    /// # Example
2406    /// ```ignore,no_run
2407    /// # use google_cloud_cloudsecuritycompliance_v1::model::CalculateEffectiveCmEnrollmentRequest;
2408    /// # let organization_id = "organization_id";
2409    /// # let location_id = "location_id";
2410    /// let x = CalculateEffectiveCmEnrollmentRequest::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/cmEnrollment"));
2411    /// ```
2412    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2413        self.name = v.into();
2414        self
2415    }
2416}
2417
2418impl wkt::message::Message for CalculateEffectiveCmEnrollmentRequest {
2419    fn typename() -> &'static str {
2420        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest"
2421    }
2422}
2423
2424/// The settings for Compliance Manager at a specific resource scope.=
2425#[derive(Clone, Default, PartialEq)]
2426#[non_exhaustive]
2427pub struct CmEnrollment {
2428    /// Identifier. The name of the Compliance Manager enrollment.
2429    ///
2430    /// Supported formats are the following:
2431    ///
2432    /// * `organizations/{organization_id}/locations/{location}/cmEnrollment`
2433    /// * `folders/{folder_id}/locations/{location}/cmEnrollment`
2434    /// * `projects/{project_id}/locations/{location}/cmEnrollment`
2435    pub name: std::string::String,
2436
2437    /// Optional. Whether the resource is enrolled in Compliance Manager.
2438    /// This setting is inherited by all descendants.
2439    pub enrolled: bool,
2440
2441    /// Optional. The audit configuration for Compliance Manager.
2442    /// If set at a scope, this configuration overrides any inherited audit
2443    /// configuration.
2444    pub audit_config: std::option::Option<crate::model::AuditConfig>,
2445
2446    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2447}
2448
2449impl CmEnrollment {
2450    /// Creates a new default instance.
2451    pub fn new() -> Self {
2452        std::default::Default::default()
2453    }
2454
2455    /// Sets the value of [name][crate::model::CmEnrollment::name].
2456    ///
2457    /// # Example
2458    /// ```ignore,no_run
2459    /// # use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2460    /// # let organization_id = "organization_id";
2461    /// # let location_id = "location_id";
2462    /// let x = CmEnrollment::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/cmEnrollment"));
2463    /// ```
2464    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2465        self.name = v.into();
2466        self
2467    }
2468
2469    /// Sets the value of [enrolled][crate::model::CmEnrollment::enrolled].
2470    ///
2471    /// # Example
2472    /// ```ignore,no_run
2473    /// # use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2474    /// let x = CmEnrollment::new().set_enrolled(true);
2475    /// ```
2476    pub fn set_enrolled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2477        self.enrolled = v.into();
2478        self
2479    }
2480
2481    /// Sets the value of [audit_config][crate::model::CmEnrollment::audit_config].
2482    ///
2483    /// # Example
2484    /// ```ignore,no_run
2485    /// # use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2486    /// use google_cloud_cloudsecuritycompliance_v1::model::AuditConfig;
2487    /// let x = CmEnrollment::new().set_audit_config(AuditConfig::default()/* use setters */);
2488    /// ```
2489    pub fn set_audit_config<T>(mut self, v: T) -> Self
2490    where
2491        T: std::convert::Into<crate::model::AuditConfig>,
2492    {
2493        self.audit_config = std::option::Option::Some(v.into());
2494        self
2495    }
2496
2497    /// Sets or clears the value of [audit_config][crate::model::CmEnrollment::audit_config].
2498    ///
2499    /// # Example
2500    /// ```ignore,no_run
2501    /// # use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2502    /// use google_cloud_cloudsecuritycompliance_v1::model::AuditConfig;
2503    /// let x = CmEnrollment::new().set_or_clear_audit_config(Some(AuditConfig::default()/* use setters */));
2504    /// let x = CmEnrollment::new().set_or_clear_audit_config(None::<AuditConfig>);
2505    /// ```
2506    pub fn set_or_clear_audit_config<T>(mut self, v: std::option::Option<T>) -> Self
2507    where
2508        T: std::convert::Into<crate::model::AuditConfig>,
2509    {
2510        self.audit_config = v.map(|x| x.into());
2511        self
2512    }
2513}
2514
2515impl wkt::message::Message for CmEnrollment {
2516    fn typename() -> &'static str {
2517        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CmEnrollment"
2518    }
2519}
2520
2521/// The response message for [CalculateEffectiveCmEnrollment][].
2522#[derive(Clone, Default, PartialEq)]
2523#[non_exhaustive]
2524pub struct CalculateEffectiveCmEnrollmentResponse {
2525    /// The effective Compliance Manager enrollment for the resource.
2526    pub cm_enrollment: std::option::Option<crate::model::CmEnrollment>,
2527
2528    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2529}
2530
2531impl CalculateEffectiveCmEnrollmentResponse {
2532    /// Creates a new default instance.
2533    pub fn new() -> Self {
2534        std::default::Default::default()
2535    }
2536
2537    /// Sets the value of [cm_enrollment][crate::model::CalculateEffectiveCmEnrollmentResponse::cm_enrollment].
2538    ///
2539    /// # Example
2540    /// ```ignore,no_run
2541    /// # use google_cloud_cloudsecuritycompliance_v1::model::CalculateEffectiveCmEnrollmentResponse;
2542    /// use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2543    /// let x = CalculateEffectiveCmEnrollmentResponse::new().set_cm_enrollment(CmEnrollment::default()/* use setters */);
2544    /// ```
2545    pub fn set_cm_enrollment<T>(mut self, v: T) -> Self
2546    where
2547        T: std::convert::Into<crate::model::CmEnrollment>,
2548    {
2549        self.cm_enrollment = std::option::Option::Some(v.into());
2550        self
2551    }
2552
2553    /// Sets or clears the value of [cm_enrollment][crate::model::CalculateEffectiveCmEnrollmentResponse::cm_enrollment].
2554    ///
2555    /// # Example
2556    /// ```ignore,no_run
2557    /// # use google_cloud_cloudsecuritycompliance_v1::model::CalculateEffectiveCmEnrollmentResponse;
2558    /// use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2559    /// let x = CalculateEffectiveCmEnrollmentResponse::new().set_or_clear_cm_enrollment(Some(CmEnrollment::default()/* use setters */));
2560    /// let x = CalculateEffectiveCmEnrollmentResponse::new().set_or_clear_cm_enrollment(None::<CmEnrollment>);
2561    /// ```
2562    pub fn set_or_clear_cm_enrollment<T>(mut self, v: std::option::Option<T>) -> Self
2563    where
2564        T: std::convert::Into<crate::model::CmEnrollment>,
2565    {
2566        self.cm_enrollment = v.map(|x| x.into());
2567        self
2568    }
2569}
2570
2571impl wkt::message::Message for CalculateEffectiveCmEnrollmentResponse {
2572    fn typename() -> &'static str {
2573        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse"
2574    }
2575}
2576
2577/// The audit configuration for Compliance Manager.
2578#[derive(Clone, Default, PartialEq)]
2579#[non_exhaustive]
2580pub struct AuditConfig {
2581    /// Required. The list of destinations that can be selected for uploading audit
2582    /// reports to.
2583    pub destinations: std::vec::Vec<crate::model::audit_config::CmEligibleDestination>,
2584
2585    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2586}
2587
2588impl AuditConfig {
2589    /// Creates a new default instance.
2590    pub fn new() -> Self {
2591        std::default::Default::default()
2592    }
2593
2594    /// Sets the value of [destinations][crate::model::AuditConfig::destinations].
2595    ///
2596    /// # Example
2597    /// ```ignore,no_run
2598    /// # use google_cloud_cloudsecuritycompliance_v1::model::AuditConfig;
2599    /// use google_cloud_cloudsecuritycompliance_v1::model::audit_config::CmEligibleDestination;
2600    /// let x = AuditConfig::new()
2601    ///     .set_destinations([
2602    ///         CmEligibleDestination::default()/* use setters */,
2603    ///         CmEligibleDestination::default()/* use (different) setters */,
2604    ///     ]);
2605    /// ```
2606    pub fn set_destinations<T, V>(mut self, v: T) -> Self
2607    where
2608        T: std::iter::IntoIterator<Item = V>,
2609        V: std::convert::Into<crate::model::audit_config::CmEligibleDestination>,
2610    {
2611        use std::iter::Iterator;
2612        self.destinations = v.into_iter().map(|i| i.into()).collect();
2613        self
2614    }
2615}
2616
2617impl wkt::message::Message for AuditConfig {
2618    fn typename() -> &'static str {
2619        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AuditConfig"
2620    }
2621}
2622
2623/// Defines additional types related to [AuditConfig].
2624pub mod audit_config {
2625    #[allow(unused_imports)]
2626    use super::*;
2627
2628    /// The destination details where audit reports are
2629    /// uploaded.
2630    #[derive(Clone, Default, PartialEq)]
2631    #[non_exhaustive]
2632    pub struct CmEligibleDestination {
2633        /// Set of options for the report destination location.
2634        pub cm_eligible_destinations: std::option::Option<
2635            crate::model::audit_config::cm_eligible_destination::CmEligibleDestinations,
2636        >,
2637
2638        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2639    }
2640
2641    impl CmEligibleDestination {
2642        /// Creates a new default instance.
2643        pub fn new() -> Self {
2644            std::default::Default::default()
2645        }
2646
2647        /// Sets the value of [cm_eligible_destinations][crate::model::audit_config::CmEligibleDestination::cm_eligible_destinations].
2648        ///
2649        /// Note that all the setters affecting `cm_eligible_destinations` are mutually
2650        /// exclusive.
2651        ///
2652        /// # Example
2653        /// ```ignore,no_run
2654        /// # use google_cloud_cloudsecuritycompliance_v1::model::audit_config::CmEligibleDestination;
2655        /// use google_cloud_cloudsecuritycompliance_v1::model::audit_config::cm_eligible_destination::CmEligibleDestinations;
2656        /// let x = CmEligibleDestination::new().set_cm_eligible_destinations(Some(CmEligibleDestinations::GcsBucket("example".to_string())));
2657        /// ```
2658        pub fn set_cm_eligible_destinations<
2659            T: std::convert::Into<
2660                    std::option::Option<
2661                        crate::model::audit_config::cm_eligible_destination::CmEligibleDestinations,
2662                    >,
2663                >,
2664        >(
2665            mut self,
2666            v: T,
2667        ) -> Self {
2668            self.cm_eligible_destinations = v.into();
2669            self
2670        }
2671
2672        /// The value of [cm_eligible_destinations][crate::model::audit_config::CmEligibleDestination::cm_eligible_destinations]
2673        /// if it holds a `GcsBucket`, `None` if the field is not set or
2674        /// holds a different branch.
2675        pub fn gcs_bucket(&self) -> std::option::Option<&std::string::String> {
2676            #[allow(unreachable_patterns)]
2677            self.cm_eligible_destinations.as_ref().and_then(|v| match v {
2678                crate::model::audit_config::cm_eligible_destination::CmEligibleDestinations::GcsBucket(v) => std::option::Option::Some(v),
2679                _ => std::option::Option::None,
2680            })
2681        }
2682
2683        /// Sets the value of [cm_eligible_destinations][crate::model::audit_config::CmEligibleDestination::cm_eligible_destinations]
2684        /// to hold a `GcsBucket`.
2685        ///
2686        /// Note that all the setters affecting `cm_eligible_destinations` are
2687        /// mutually exclusive.
2688        ///
2689        /// # Example
2690        /// ```ignore,no_run
2691        /// # use google_cloud_cloudsecuritycompliance_v1::model::audit_config::CmEligibleDestination;
2692        /// let x = CmEligibleDestination::new().set_gcs_bucket("example");
2693        /// assert!(x.gcs_bucket().is_some());
2694        /// ```
2695        pub fn set_gcs_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2696            self.cm_eligible_destinations = std::option::Option::Some(
2697                crate::model::audit_config::cm_eligible_destination::CmEligibleDestinations::GcsBucket(
2698                    v.into()
2699                )
2700            );
2701            self
2702        }
2703    }
2704
2705    impl wkt::message::Message for CmEligibleDestination {
2706        fn typename() -> &'static str {
2707            "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination"
2708        }
2709    }
2710
2711    /// Defines additional types related to [CmEligibleDestination].
2712    pub mod cm_eligible_destination {
2713        #[allow(unused_imports)]
2714        use super::*;
2715
2716        /// Set of options for the report destination location.
2717        #[derive(Clone, Debug, PartialEq)]
2718        #[non_exhaustive]
2719        pub enum CmEligibleDestinations {
2720            /// The Cloud Storage bucket where audit reports and evidences can be
2721            /// uploaded. The format is `gs://{bucket_name}`.
2722            GcsBucket(std::string::String),
2723        }
2724    }
2725}
2726
2727/// A framework is a collection of cloud controls and regulatory controls
2728/// that represent security best practices or industry-defined standards such as
2729/// FedRAMP or NIST.
2730#[derive(Clone, Default, PartialEq)]
2731#[non_exhaustive]
2732pub struct Framework {
2733    /// Required. Identifier. The name of the framework, in one of the following
2734    /// formats:
2735    /// `organizations/{organization}/locations/{location}/frameworks/{framework}`
2736    /// or
2737    /// `projects/{project}/locations/{location}/frameworks/{framework}`.
2738    ///
2739    /// The only supported location is `global`.
2740    pub name: std::string::String,
2741
2742    /// Output only. The major version of the framework, which is incremented in
2743    /// ascending order.
2744    pub major_revision_id: i64,
2745
2746    /// Optional. The friendly name of the framework. The maximum length is 200
2747    /// characters.
2748    pub display_name: std::string::String,
2749
2750    /// Optional. The description of the framework. The maximum length is 2000
2751    /// characters.
2752    pub description: std::string::String,
2753
2754    /// Output only. The type of framework.
2755    pub r#type: crate::model::framework::FrameworkType,
2756
2757    /// Optional. The cloud control details that are directly added without any
2758    /// grouping in the framework.
2759    pub cloud_control_details: std::vec::Vec<crate::model::CloudControlDetails>,
2760
2761    /// Optional. The category of the framework.
2762    pub category: std::vec::Vec<crate::model::FrameworkCategory>,
2763
2764    /// Output only. The cloud providers that are supported by the framework.
2765    pub supported_cloud_providers: std::vec::Vec<crate::model::CloudProvider>,
2766
2767    /// Output only. The target resource types that are supported by the framework.
2768    pub supported_target_resource_types: std::vec::Vec<crate::model::TargetResourceType>,
2769
2770    /// Output only. The supported enforcement modes of the framework.
2771    pub supported_enforcement_modes: std::vec::Vec<crate::model::EnforcementMode>,
2772
2773    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2774}
2775
2776impl Framework {
2777    /// Creates a new default instance.
2778    pub fn new() -> Self {
2779        std::default::Default::default()
2780    }
2781
2782    /// Sets the value of [name][crate::model::Framework::name].
2783    ///
2784    /// # Example
2785    /// ```ignore,no_run
2786    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2787    /// # let organization_id = "organization_id";
2788    /// # let location_id = "location_id";
2789    /// # let framework_id = "framework_id";
2790    /// let x = Framework::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/frameworks/{framework_id}"));
2791    /// ```
2792    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2793        self.name = v.into();
2794        self
2795    }
2796
2797    /// Sets the value of [major_revision_id][crate::model::Framework::major_revision_id].
2798    ///
2799    /// # Example
2800    /// ```ignore,no_run
2801    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2802    /// let x = Framework::new().set_major_revision_id(42);
2803    /// ```
2804    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2805        self.major_revision_id = v.into();
2806        self
2807    }
2808
2809    /// Sets the value of [display_name][crate::model::Framework::display_name].
2810    ///
2811    /// # Example
2812    /// ```ignore,no_run
2813    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2814    /// let x = Framework::new().set_display_name("example");
2815    /// ```
2816    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2817        self.display_name = v.into();
2818        self
2819    }
2820
2821    /// Sets the value of [description][crate::model::Framework::description].
2822    ///
2823    /// # Example
2824    /// ```ignore,no_run
2825    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2826    /// let x = Framework::new().set_description("example");
2827    /// ```
2828    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2829        self.description = v.into();
2830        self
2831    }
2832
2833    /// Sets the value of [r#type][crate::model::Framework::type].
2834    ///
2835    /// # Example
2836    /// ```ignore,no_run
2837    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2838    /// use google_cloud_cloudsecuritycompliance_v1::model::framework::FrameworkType;
2839    /// let x0 = Framework::new().set_type(FrameworkType::BuiltIn);
2840    /// let x1 = Framework::new().set_type(FrameworkType::Custom);
2841    /// ```
2842    pub fn set_type<T: std::convert::Into<crate::model::framework::FrameworkType>>(
2843        mut self,
2844        v: T,
2845    ) -> Self {
2846        self.r#type = v.into();
2847        self
2848    }
2849
2850    /// Sets the value of [cloud_control_details][crate::model::Framework::cloud_control_details].
2851    ///
2852    /// # Example
2853    /// ```ignore,no_run
2854    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2855    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDetails;
2856    /// let x = Framework::new()
2857    ///     .set_cloud_control_details([
2858    ///         CloudControlDetails::default()/* use setters */,
2859    ///         CloudControlDetails::default()/* use (different) setters */,
2860    ///     ]);
2861    /// ```
2862    pub fn set_cloud_control_details<T, V>(mut self, v: T) -> Self
2863    where
2864        T: std::iter::IntoIterator<Item = V>,
2865        V: std::convert::Into<crate::model::CloudControlDetails>,
2866    {
2867        use std::iter::Iterator;
2868        self.cloud_control_details = v.into_iter().map(|i| i.into()).collect();
2869        self
2870    }
2871
2872    /// Sets the value of [category][crate::model::Framework::category].
2873    ///
2874    /// # Example
2875    /// ```ignore,no_run
2876    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2877    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkCategory;
2878    /// let x = Framework::new().set_category([
2879    ///     FrameworkCategory::IndustryDefinedStandard,
2880    ///     FrameworkCategory::AssuredWorkloads,
2881    ///     FrameworkCategory::DataSecurity,
2882    /// ]);
2883    /// ```
2884    pub fn set_category<T, V>(mut self, v: T) -> Self
2885    where
2886        T: std::iter::IntoIterator<Item = V>,
2887        V: std::convert::Into<crate::model::FrameworkCategory>,
2888    {
2889        use std::iter::Iterator;
2890        self.category = v.into_iter().map(|i| i.into()).collect();
2891        self
2892    }
2893
2894    /// Sets the value of [supported_cloud_providers][crate::model::Framework::supported_cloud_providers].
2895    ///
2896    /// # Example
2897    /// ```ignore,no_run
2898    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2899    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudProvider;
2900    /// let x = Framework::new().set_supported_cloud_providers([
2901    ///     CloudProvider::Aws,
2902    ///     CloudProvider::Azure,
2903    ///     CloudProvider::Gcp,
2904    /// ]);
2905    /// ```
2906    pub fn set_supported_cloud_providers<T, V>(mut self, v: T) -> Self
2907    where
2908        T: std::iter::IntoIterator<Item = V>,
2909        V: std::convert::Into<crate::model::CloudProvider>,
2910    {
2911        use std::iter::Iterator;
2912        self.supported_cloud_providers = v.into_iter().map(|i| i.into()).collect();
2913        self
2914    }
2915
2916    /// Sets the value of [supported_target_resource_types][crate::model::Framework::supported_target_resource_types].
2917    ///
2918    /// # Example
2919    /// ```ignore,no_run
2920    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2921    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceType;
2922    /// let x = Framework::new().set_supported_target_resource_types([
2923    ///     TargetResourceType::TargetResourceCrmTypeOrg,
2924    ///     TargetResourceType::TargetResourceCrmTypeFolder,
2925    ///     TargetResourceType::TargetResourceCrmTypeProject,
2926    /// ]);
2927    /// ```
2928    pub fn set_supported_target_resource_types<T, V>(mut self, v: T) -> Self
2929    where
2930        T: std::iter::IntoIterator<Item = V>,
2931        V: std::convert::Into<crate::model::TargetResourceType>,
2932    {
2933        use std::iter::Iterator;
2934        self.supported_target_resource_types = v.into_iter().map(|i| i.into()).collect();
2935        self
2936    }
2937
2938    /// Sets the value of [supported_enforcement_modes][crate::model::Framework::supported_enforcement_modes].
2939    ///
2940    /// # Example
2941    /// ```ignore,no_run
2942    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2943    /// use google_cloud_cloudsecuritycompliance_v1::model::EnforcementMode;
2944    /// let x = Framework::new().set_supported_enforcement_modes([
2945    ///     EnforcementMode::Preventive,
2946    ///     EnforcementMode::Detective,
2947    ///     EnforcementMode::Audit,
2948    /// ]);
2949    /// ```
2950    pub fn set_supported_enforcement_modes<T, V>(mut self, v: T) -> Self
2951    where
2952        T: std::iter::IntoIterator<Item = V>,
2953        V: std::convert::Into<crate::model::EnforcementMode>,
2954    {
2955        use std::iter::Iterator;
2956        self.supported_enforcement_modes = v.into_iter().map(|i| i.into()).collect();
2957        self
2958    }
2959}
2960
2961impl wkt::message::Message for Framework {
2962    fn typename() -> &'static str {
2963        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.Framework"
2964    }
2965}
2966
2967/// Defines additional types related to [Framework].
2968pub mod framework {
2969    #[allow(unused_imports)]
2970    use super::*;
2971
2972    /// The type of framework.
2973    ///
2974    /// # Working with unknown values
2975    ///
2976    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2977    /// additional enum variants at any time. Adding new variants is not considered
2978    /// a breaking change. Applications should write their code in anticipation of:
2979    ///
2980    /// - New values appearing in future releases of the client library, **and**
2981    /// - New values received dynamically, without application changes.
2982    ///
2983    /// Please consult the [Working with enums] section in the user guide for some
2984    /// guidelines.
2985    ///
2986    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
2987    #[derive(Clone, Debug, PartialEq)]
2988    #[non_exhaustive]
2989    pub enum FrameworkType {
2990        /// Default value. This value is unused.
2991        Unspecified,
2992        /// A framework that's provided and managed by Google.
2993        BuiltIn,
2994        /// A framework that's created and managed by you.
2995        Custom,
2996        /// If set, the enum was initialized with an unknown value.
2997        ///
2998        /// Applications can examine the value using [FrameworkType::value] or
2999        /// [FrameworkType::name].
3000        UnknownValue(framework_type::UnknownValue),
3001    }
3002
3003    #[doc(hidden)]
3004    pub mod framework_type {
3005        #[allow(unused_imports)]
3006        use super::*;
3007        #[derive(Clone, Debug, PartialEq)]
3008        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3009    }
3010
3011    impl FrameworkType {
3012        /// Gets the enum value.
3013        ///
3014        /// Returns `None` if the enum contains an unknown value deserialized from
3015        /// the string representation of enums.
3016        pub fn value(&self) -> std::option::Option<i32> {
3017            match self {
3018                Self::Unspecified => std::option::Option::Some(0),
3019                Self::BuiltIn => std::option::Option::Some(1),
3020                Self::Custom => std::option::Option::Some(2),
3021                Self::UnknownValue(u) => u.0.value(),
3022            }
3023        }
3024
3025        /// Gets the enum value as a string.
3026        ///
3027        /// Returns `None` if the enum contains an unknown value deserialized from
3028        /// the integer representation of enums.
3029        pub fn name(&self) -> std::option::Option<&str> {
3030            match self {
3031                Self::Unspecified => std::option::Option::Some("FRAMEWORK_TYPE_UNSPECIFIED"),
3032                Self::BuiltIn => std::option::Option::Some("BUILT_IN"),
3033                Self::Custom => std::option::Option::Some("CUSTOM"),
3034                Self::UnknownValue(u) => u.0.name(),
3035            }
3036        }
3037    }
3038
3039    impl std::default::Default for FrameworkType {
3040        fn default() -> Self {
3041            use std::convert::From;
3042            Self::from(0)
3043        }
3044    }
3045
3046    impl std::fmt::Display for FrameworkType {
3047        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3048            wkt::internal::display_enum(f, self.name(), self.value())
3049        }
3050    }
3051
3052    impl std::convert::From<i32> for FrameworkType {
3053        fn from(value: i32) -> Self {
3054            match value {
3055                0 => Self::Unspecified,
3056                1 => Self::BuiltIn,
3057                2 => Self::Custom,
3058                _ => Self::UnknownValue(framework_type::UnknownValue(
3059                    wkt::internal::UnknownEnumValue::Integer(value),
3060                )),
3061            }
3062        }
3063    }
3064
3065    impl std::convert::From<&str> for FrameworkType {
3066        fn from(value: &str) -> Self {
3067            use std::string::ToString;
3068            match value {
3069                "FRAMEWORK_TYPE_UNSPECIFIED" => Self::Unspecified,
3070                "BUILT_IN" => Self::BuiltIn,
3071                "CUSTOM" => Self::Custom,
3072                _ => Self::UnknownValue(framework_type::UnknownValue(
3073                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3074                )),
3075            }
3076        }
3077    }
3078
3079    impl serde::ser::Serialize for FrameworkType {
3080        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3081        where
3082            S: serde::Serializer,
3083        {
3084            match self {
3085                Self::Unspecified => serializer.serialize_i32(0),
3086                Self::BuiltIn => serializer.serialize_i32(1),
3087                Self::Custom => serializer.serialize_i32(2),
3088                Self::UnknownValue(u) => u.0.serialize(serializer),
3089            }
3090        }
3091    }
3092
3093    impl<'de> serde::de::Deserialize<'de> for FrameworkType {
3094        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3095        where
3096            D: serde::Deserializer<'de>,
3097        {
3098            deserializer.deserialize_any(wkt::internal::EnumVisitor::<FrameworkType>::new(
3099                ".google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType",
3100            ))
3101        }
3102    }
3103}
3104
3105/// The details of a cloud control.
3106#[derive(Clone, Default, PartialEq)]
3107#[non_exhaustive]
3108pub struct CloudControlDetails {
3109    /// Required. The name of the cloud control, in one of the following formats:
3110    /// `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}`
3111    /// or
3112    /// `projects/{project}/locations/{location}/cloudControls/{cloud_control}`.
3113    ///
3114    /// The only supported location is `global`.
3115    pub name: std::string::String,
3116
3117    /// Required. The major version of the cloud control.
3118    pub major_revision_id: i64,
3119
3120    /// Optional. Parameters are key-value pairs that let you provide your custom
3121    /// location requirements, environment requirements, or other settings that are
3122    /// relevant to the cloud control. An example parameter is
3123    /// `{"name": "location","value": "us-west-1"}`.
3124    pub parameters: std::vec::Vec<crate::model::Parameter>,
3125
3126    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3127}
3128
3129impl CloudControlDetails {
3130    /// Creates a new default instance.
3131    pub fn new() -> Self {
3132        std::default::Default::default()
3133    }
3134
3135    /// Sets the value of [name][crate::model::CloudControlDetails::name].
3136    ///
3137    /// # Example
3138    /// ```ignore,no_run
3139    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDetails;
3140    /// let x = CloudControlDetails::new().set_name("example");
3141    /// ```
3142    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3143        self.name = v.into();
3144        self
3145    }
3146
3147    /// Sets the value of [major_revision_id][crate::model::CloudControlDetails::major_revision_id].
3148    ///
3149    /// # Example
3150    /// ```ignore,no_run
3151    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDetails;
3152    /// let x = CloudControlDetails::new().set_major_revision_id(42);
3153    /// ```
3154    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3155        self.major_revision_id = v.into();
3156        self
3157    }
3158
3159    /// Sets the value of [parameters][crate::model::CloudControlDetails::parameters].
3160    ///
3161    /// # Example
3162    /// ```ignore,no_run
3163    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDetails;
3164    /// use google_cloud_cloudsecuritycompliance_v1::model::Parameter;
3165    /// let x = CloudControlDetails::new()
3166    ///     .set_parameters([
3167    ///         Parameter::default()/* use setters */,
3168    ///         Parameter::default()/* use (different) setters */,
3169    ///     ]);
3170    /// ```
3171    pub fn set_parameters<T, V>(mut self, v: T) -> Self
3172    where
3173        T: std::iter::IntoIterator<Item = V>,
3174        V: std::convert::Into<crate::model::Parameter>,
3175    {
3176        use std::iter::Iterator;
3177        self.parameters = v.into_iter().map(|i| i.into()).collect();
3178        self
3179    }
3180}
3181
3182impl wkt::message::Message for CloudControlDetails {
3183    fn typename() -> &'static str {
3184        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlDetails"
3185    }
3186}
3187
3188/// The reference of a framework, in one of the following formats:
3189///
3190/// - `organizations/{organization}/locations/{location}/frameworks/{framework}`
3191/// - `projects/{project}/locations/{location}/frameworks/{framework}`.
3192///
3193/// The only supported location is `global`.
3194#[derive(Clone, Default, PartialEq)]
3195#[non_exhaustive]
3196pub struct FrameworkReference {
3197    /// Required. The major version of the framework. If not specified, the version
3198    /// corresponds to the latest version of the framework.
3199    pub framework: std::string::String,
3200
3201    /// Optional. The major version of the framework. If not specified, the version
3202    /// corresponds to the latest version of the framework.
3203    pub major_revision_id: std::option::Option<i64>,
3204
3205    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3206}
3207
3208impl FrameworkReference {
3209    /// Creates a new default instance.
3210    pub fn new() -> Self {
3211        std::default::Default::default()
3212    }
3213
3214    /// Sets the value of [framework][crate::model::FrameworkReference::framework].
3215    ///
3216    /// # Example
3217    /// ```ignore,no_run
3218    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
3219    /// # let organization_id = "organization_id";
3220    /// # let location_id = "location_id";
3221    /// # let framework_id = "framework_id";
3222    /// let x = FrameworkReference::new().set_framework(format!("organizations/{organization_id}/locations/{location_id}/frameworks/{framework_id}"));
3223    /// ```
3224    pub fn set_framework<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3225        self.framework = v.into();
3226        self
3227    }
3228
3229    /// Sets the value of [major_revision_id][crate::model::FrameworkReference::major_revision_id].
3230    ///
3231    /// # Example
3232    /// ```ignore,no_run
3233    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
3234    /// let x = FrameworkReference::new().set_major_revision_id(42);
3235    /// ```
3236    pub fn set_major_revision_id<T>(mut self, v: T) -> Self
3237    where
3238        T: std::convert::Into<i64>,
3239    {
3240        self.major_revision_id = std::option::Option::Some(v.into());
3241        self
3242    }
3243
3244    /// Sets or clears the value of [major_revision_id][crate::model::FrameworkReference::major_revision_id].
3245    ///
3246    /// # Example
3247    /// ```ignore,no_run
3248    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
3249    /// let x = FrameworkReference::new().set_or_clear_major_revision_id(Some(42));
3250    /// let x = FrameworkReference::new().set_or_clear_major_revision_id(None::<i32>);
3251    /// ```
3252    pub fn set_or_clear_major_revision_id<T>(mut self, v: std::option::Option<T>) -> Self
3253    where
3254        T: std::convert::Into<i64>,
3255    {
3256        self.major_revision_id = v.map(|x| x.into());
3257        self
3258    }
3259}
3260
3261impl wkt::message::Message for FrameworkReference {
3262    fn typename() -> &'static str {
3263        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkReference"
3264    }
3265}
3266
3267/// Parameters are key-value pairs that let you provide your custom location
3268/// requirements, environment requirements, or other settings that are
3269/// relevant to the cloud control.
3270#[derive(Clone, Default, PartialEq)]
3271#[non_exhaustive]
3272pub struct Parameter {
3273    /// Required. The name or key of the parameter.
3274    pub name: std::string::String,
3275
3276    /// Required. The value of the parameter.
3277    pub parameter_value: std::option::Option<std::boxed::Box<crate::model::ParamValue>>,
3278
3279    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3280}
3281
3282impl Parameter {
3283    /// Creates a new default instance.
3284    pub fn new() -> Self {
3285        std::default::Default::default()
3286    }
3287
3288    /// Sets the value of [name][crate::model::Parameter::name].
3289    ///
3290    /// # Example
3291    /// ```ignore,no_run
3292    /// # use google_cloud_cloudsecuritycompliance_v1::model::Parameter;
3293    /// let x = Parameter::new().set_name("example");
3294    /// ```
3295    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3296        self.name = v.into();
3297        self
3298    }
3299
3300    /// Sets the value of [parameter_value][crate::model::Parameter::parameter_value].
3301    ///
3302    /// # Example
3303    /// ```ignore,no_run
3304    /// # use google_cloud_cloudsecuritycompliance_v1::model::Parameter;
3305    /// use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
3306    /// let x = Parameter::new().set_parameter_value(ParamValue::default()/* use setters */);
3307    /// ```
3308    pub fn set_parameter_value<T>(mut self, v: T) -> Self
3309    where
3310        T: std::convert::Into<crate::model::ParamValue>,
3311    {
3312        self.parameter_value = std::option::Option::Some(std::boxed::Box::new(v.into()));
3313        self
3314    }
3315
3316    /// Sets or clears the value of [parameter_value][crate::model::Parameter::parameter_value].
3317    ///
3318    /// # Example
3319    /// ```ignore,no_run
3320    /// # use google_cloud_cloudsecuritycompliance_v1::model::Parameter;
3321    /// use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
3322    /// let x = Parameter::new().set_or_clear_parameter_value(Some(ParamValue::default()/* use setters */));
3323    /// let x = Parameter::new().set_or_clear_parameter_value(None::<ParamValue>);
3324    /// ```
3325    pub fn set_or_clear_parameter_value<T>(mut self, v: std::option::Option<T>) -> Self
3326    where
3327        T: std::convert::Into<crate::model::ParamValue>,
3328    {
3329        self.parameter_value = v.map(|x| std::boxed::Box::new(x.into()));
3330        self
3331    }
3332}
3333
3334impl wkt::message::Message for Parameter {
3335    fn typename() -> &'static str {
3336        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.Parameter"
3337    }
3338}
3339
3340/// A cloud control is a set of rules and associated metadata that you can
3341/// use to define your organization's security or compliance intent.
3342#[derive(Clone, Default, PartialEq)]
3343#[non_exhaustive]
3344pub struct CloudControl {
3345    /// Required. Identifier. The name of the cloud control, in either of the
3346    /// formats:
3347    /// `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}`
3348    /// or
3349    /// `projects/{project}/locations/{location}/cloudControls/{cloud_control}`.
3350    ///
3351    /// The only supported location is `global`.
3352    pub name: std::string::String,
3353
3354    /// Output only. The major version of the cloud control, which is incremented
3355    /// in ascending order.
3356    pub major_revision_id: i64,
3357
3358    /// Optional. A description of the cloud control. The maximum length is 2000
3359    /// characters.
3360    pub description: std::string::String,
3361
3362    /// Optional. The friendly name of the cloud control. The maximum length is 200
3363    /// characters.
3364    pub display_name: std::string::String,
3365
3366    /// Output only. The supported enforcement modes for the cloud control.
3367    pub supported_enforcement_modes: std::vec::Vec<crate::model::EnforcementMode>,
3368
3369    /// Optional. The parameter specifications for the cloud control.
3370    pub parameter_spec: std::vec::Vec<crate::model::ParameterSpec>,
3371
3372    /// Optional. The rules that you can enforce to meet your security or
3373    /// compliance intent.
3374    pub rules: std::vec::Vec<crate::model::Rule>,
3375
3376    /// Optional. The severity of the findings that are generated by the cloud
3377    /// control.
3378    pub severity: crate::model::Severity,
3379
3380    /// Optional. The finding category for the cloud control findings. The maximum
3381    /// length is 255 characters.
3382    pub finding_category: std::string::String,
3383
3384    /// Optional. The supported cloud providers.
3385    pub supported_cloud_providers: std::vec::Vec<crate::model::CloudProvider>,
3386
3387    /// Output only. The frameworks that include this cloud control.
3388    pub related_frameworks: std::vec::Vec<std::string::String>,
3389
3390    /// Optional. The remediation steps for the cloud control findings. The
3391    /// maximum length is 400 characters.
3392    pub remediation_steps: std::string::String,
3393
3394    /// Optional. The categories for the cloud control.
3395    pub categories: std::vec::Vec<crate::model::CloudControlCategory>,
3396
3397    /// Output only. The time that the cloud control was last updated.
3398    /// `create_time` is used because a new cloud control is created
3399    /// whenever an existing cloud control is updated.
3400    pub create_time: std::option::Option<wkt::Timestamp>,
3401
3402    /// Optional. The target resource types that are supported by the cloud
3403    /// control.
3404    pub supported_target_resource_types: std::vec::Vec<crate::model::TargetResourceType>,
3405
3406    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3407}
3408
3409impl CloudControl {
3410    /// Creates a new default instance.
3411    pub fn new() -> Self {
3412        std::default::Default::default()
3413    }
3414
3415    /// Sets the value of [name][crate::model::CloudControl::name].
3416    ///
3417    /// # Example
3418    /// ```ignore,no_run
3419    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3420    /// # let organization_id = "organization_id";
3421    /// # let location_id = "location_id";
3422    /// # let cloud_control_id = "cloud_control_id";
3423    /// let x = CloudControl::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/cloudControls/{cloud_control_id}"));
3424    /// ```
3425    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3426        self.name = v.into();
3427        self
3428    }
3429
3430    /// Sets the value of [major_revision_id][crate::model::CloudControl::major_revision_id].
3431    ///
3432    /// # Example
3433    /// ```ignore,no_run
3434    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3435    /// let x = CloudControl::new().set_major_revision_id(42);
3436    /// ```
3437    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3438        self.major_revision_id = v.into();
3439        self
3440    }
3441
3442    /// Sets the value of [description][crate::model::CloudControl::description].
3443    ///
3444    /// # Example
3445    /// ```ignore,no_run
3446    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3447    /// let x = CloudControl::new().set_description("example");
3448    /// ```
3449    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3450        self.description = v.into();
3451        self
3452    }
3453
3454    /// Sets the value of [display_name][crate::model::CloudControl::display_name].
3455    ///
3456    /// # Example
3457    /// ```ignore,no_run
3458    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3459    /// let x = CloudControl::new().set_display_name("example");
3460    /// ```
3461    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3462        self.display_name = v.into();
3463        self
3464    }
3465
3466    /// Sets the value of [supported_enforcement_modes][crate::model::CloudControl::supported_enforcement_modes].
3467    ///
3468    /// # Example
3469    /// ```ignore,no_run
3470    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3471    /// use google_cloud_cloudsecuritycompliance_v1::model::EnforcementMode;
3472    /// let x = CloudControl::new().set_supported_enforcement_modes([
3473    ///     EnforcementMode::Preventive,
3474    ///     EnforcementMode::Detective,
3475    ///     EnforcementMode::Audit,
3476    /// ]);
3477    /// ```
3478    pub fn set_supported_enforcement_modes<T, V>(mut self, v: T) -> Self
3479    where
3480        T: std::iter::IntoIterator<Item = V>,
3481        V: std::convert::Into<crate::model::EnforcementMode>,
3482    {
3483        use std::iter::Iterator;
3484        self.supported_enforcement_modes = v.into_iter().map(|i| i.into()).collect();
3485        self
3486    }
3487
3488    /// Sets the value of [parameter_spec][crate::model::CloudControl::parameter_spec].
3489    ///
3490    /// # Example
3491    /// ```ignore,no_run
3492    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3493    /// use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3494    /// let x = CloudControl::new()
3495    ///     .set_parameter_spec([
3496    ///         ParameterSpec::default()/* use setters */,
3497    ///         ParameterSpec::default()/* use (different) setters */,
3498    ///     ]);
3499    /// ```
3500    pub fn set_parameter_spec<T, V>(mut self, v: T) -> Self
3501    where
3502        T: std::iter::IntoIterator<Item = V>,
3503        V: std::convert::Into<crate::model::ParameterSpec>,
3504    {
3505        use std::iter::Iterator;
3506        self.parameter_spec = v.into_iter().map(|i| i.into()).collect();
3507        self
3508    }
3509
3510    /// Sets the value of [rules][crate::model::CloudControl::rules].
3511    ///
3512    /// # Example
3513    /// ```ignore,no_run
3514    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3515    /// use google_cloud_cloudsecuritycompliance_v1::model::Rule;
3516    /// let x = CloudControl::new()
3517    ///     .set_rules([
3518    ///         Rule::default()/* use setters */,
3519    ///         Rule::default()/* use (different) setters */,
3520    ///     ]);
3521    /// ```
3522    pub fn set_rules<T, V>(mut self, v: T) -> Self
3523    where
3524        T: std::iter::IntoIterator<Item = V>,
3525        V: std::convert::Into<crate::model::Rule>,
3526    {
3527        use std::iter::Iterator;
3528        self.rules = v.into_iter().map(|i| i.into()).collect();
3529        self
3530    }
3531
3532    /// Sets the value of [severity][crate::model::CloudControl::severity].
3533    ///
3534    /// # Example
3535    /// ```ignore,no_run
3536    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3537    /// use google_cloud_cloudsecuritycompliance_v1::model::Severity;
3538    /// let x0 = CloudControl::new().set_severity(Severity::Critical);
3539    /// let x1 = CloudControl::new().set_severity(Severity::High);
3540    /// let x2 = CloudControl::new().set_severity(Severity::Medium);
3541    /// ```
3542    pub fn set_severity<T: std::convert::Into<crate::model::Severity>>(mut self, v: T) -> Self {
3543        self.severity = v.into();
3544        self
3545    }
3546
3547    /// Sets the value of [finding_category][crate::model::CloudControl::finding_category].
3548    ///
3549    /// # Example
3550    /// ```ignore,no_run
3551    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3552    /// let x = CloudControl::new().set_finding_category("example");
3553    /// ```
3554    pub fn set_finding_category<T: std::convert::Into<std::string::String>>(
3555        mut self,
3556        v: T,
3557    ) -> Self {
3558        self.finding_category = v.into();
3559        self
3560    }
3561
3562    /// Sets the value of [supported_cloud_providers][crate::model::CloudControl::supported_cloud_providers].
3563    ///
3564    /// # Example
3565    /// ```ignore,no_run
3566    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3567    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudProvider;
3568    /// let x = CloudControl::new().set_supported_cloud_providers([
3569    ///     CloudProvider::Aws,
3570    ///     CloudProvider::Azure,
3571    ///     CloudProvider::Gcp,
3572    /// ]);
3573    /// ```
3574    pub fn set_supported_cloud_providers<T, V>(mut self, v: T) -> Self
3575    where
3576        T: std::iter::IntoIterator<Item = V>,
3577        V: std::convert::Into<crate::model::CloudProvider>,
3578    {
3579        use std::iter::Iterator;
3580        self.supported_cloud_providers = v.into_iter().map(|i| i.into()).collect();
3581        self
3582    }
3583
3584    /// Sets the value of [related_frameworks][crate::model::CloudControl::related_frameworks].
3585    ///
3586    /// # Example
3587    /// ```ignore,no_run
3588    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3589    /// let x = CloudControl::new().set_related_frameworks(["a", "b", "c"]);
3590    /// ```
3591    pub fn set_related_frameworks<T, V>(mut self, v: T) -> Self
3592    where
3593        T: std::iter::IntoIterator<Item = V>,
3594        V: std::convert::Into<std::string::String>,
3595    {
3596        use std::iter::Iterator;
3597        self.related_frameworks = v.into_iter().map(|i| i.into()).collect();
3598        self
3599    }
3600
3601    /// Sets the value of [remediation_steps][crate::model::CloudControl::remediation_steps].
3602    ///
3603    /// # Example
3604    /// ```ignore,no_run
3605    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3606    /// let x = CloudControl::new().set_remediation_steps("example");
3607    /// ```
3608    pub fn set_remediation_steps<T: std::convert::Into<std::string::String>>(
3609        mut self,
3610        v: T,
3611    ) -> Self {
3612        self.remediation_steps = v.into();
3613        self
3614    }
3615
3616    /// Sets the value of [categories][crate::model::CloudControl::categories].
3617    ///
3618    /// # Example
3619    /// ```ignore,no_run
3620    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3621    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlCategory;
3622    /// let x = CloudControl::new().set_categories([
3623    ///     CloudControlCategory::CcCategoryInfrastructure,
3624    ///     CloudControlCategory::CcCategoryArtificialIntelligence,
3625    ///     CloudControlCategory::CcCategoryPhysicalSecurity,
3626    /// ]);
3627    /// ```
3628    pub fn set_categories<T, V>(mut self, v: T) -> Self
3629    where
3630        T: std::iter::IntoIterator<Item = V>,
3631        V: std::convert::Into<crate::model::CloudControlCategory>,
3632    {
3633        use std::iter::Iterator;
3634        self.categories = v.into_iter().map(|i| i.into()).collect();
3635        self
3636    }
3637
3638    /// Sets the value of [create_time][crate::model::CloudControl::create_time].
3639    ///
3640    /// # Example
3641    /// ```ignore,no_run
3642    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3643    /// use wkt::Timestamp;
3644    /// let x = CloudControl::new().set_create_time(Timestamp::default()/* use setters */);
3645    /// ```
3646    pub fn set_create_time<T>(mut self, v: T) -> Self
3647    where
3648        T: std::convert::Into<wkt::Timestamp>,
3649    {
3650        self.create_time = std::option::Option::Some(v.into());
3651        self
3652    }
3653
3654    /// Sets or clears the value of [create_time][crate::model::CloudControl::create_time].
3655    ///
3656    /// # Example
3657    /// ```ignore,no_run
3658    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3659    /// use wkt::Timestamp;
3660    /// let x = CloudControl::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
3661    /// let x = CloudControl::new().set_or_clear_create_time(None::<Timestamp>);
3662    /// ```
3663    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3664    where
3665        T: std::convert::Into<wkt::Timestamp>,
3666    {
3667        self.create_time = v.map(|x| x.into());
3668        self
3669    }
3670
3671    /// Sets the value of [supported_target_resource_types][crate::model::CloudControl::supported_target_resource_types].
3672    ///
3673    /// # Example
3674    /// ```ignore,no_run
3675    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3676    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceType;
3677    /// let x = CloudControl::new().set_supported_target_resource_types([
3678    ///     TargetResourceType::TargetResourceCrmTypeOrg,
3679    ///     TargetResourceType::TargetResourceCrmTypeFolder,
3680    ///     TargetResourceType::TargetResourceCrmTypeProject,
3681    /// ]);
3682    /// ```
3683    pub fn set_supported_target_resource_types<T, V>(mut self, v: T) -> Self
3684    where
3685        T: std::iter::IntoIterator<Item = V>,
3686        V: std::convert::Into<crate::model::TargetResourceType>,
3687    {
3688        use std::iter::Iterator;
3689        self.supported_target_resource_types = v.into_iter().map(|i| i.into()).collect();
3690        self
3691    }
3692}
3693
3694impl wkt::message::Message for CloudControl {
3695    fn typename() -> &'static str {
3696        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControl"
3697    }
3698}
3699
3700/// Defines additional types related to [CloudControl].
3701pub mod cloud_control {
3702    #[allow(unused_imports)]
3703    use super::*;
3704
3705    /// The type of cloud control.
3706    ///
3707    /// # Working with unknown values
3708    ///
3709    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3710    /// additional enum variants at any time. Adding new variants is not considered
3711    /// a breaking change. Applications should write their code in anticipation of:
3712    ///
3713    /// - New values appearing in future releases of the client library, **and**
3714    /// - New values received dynamically, without application changes.
3715    ///
3716    /// Please consult the [Working with enums] section in the user guide for some
3717    /// guidelines.
3718    ///
3719    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
3720    #[derive(Clone, Debug, PartialEq)]
3721    #[non_exhaustive]
3722    pub enum Type {
3723        /// Default value. This value is unused.
3724        Unspecified,
3725        /// A cloud control that's created and managed by you.
3726        Custom,
3727        /// A cloud control that's provided and managed by Google.
3728        BuiltIn,
3729        /// If set, the enum was initialized with an unknown value.
3730        ///
3731        /// Applications can examine the value using [Type::value] or
3732        /// [Type::name].
3733        UnknownValue(r#type::UnknownValue),
3734    }
3735
3736    #[doc(hidden)]
3737    pub mod r#type {
3738        #[allow(unused_imports)]
3739        use super::*;
3740        #[derive(Clone, Debug, PartialEq)]
3741        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3742    }
3743
3744    impl Type {
3745        /// Gets the enum value.
3746        ///
3747        /// Returns `None` if the enum contains an unknown value deserialized from
3748        /// the string representation of enums.
3749        pub fn value(&self) -> std::option::Option<i32> {
3750            match self {
3751                Self::Unspecified => std::option::Option::Some(0),
3752                Self::Custom => std::option::Option::Some(1),
3753                Self::BuiltIn => std::option::Option::Some(2),
3754                Self::UnknownValue(u) => u.0.value(),
3755            }
3756        }
3757
3758        /// Gets the enum value as a string.
3759        ///
3760        /// Returns `None` if the enum contains an unknown value deserialized from
3761        /// the integer representation of enums.
3762        pub fn name(&self) -> std::option::Option<&str> {
3763            match self {
3764                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
3765                Self::Custom => std::option::Option::Some("CUSTOM"),
3766                Self::BuiltIn => std::option::Option::Some("BUILT_IN"),
3767                Self::UnknownValue(u) => u.0.name(),
3768            }
3769        }
3770    }
3771
3772    impl std::default::Default for Type {
3773        fn default() -> Self {
3774            use std::convert::From;
3775            Self::from(0)
3776        }
3777    }
3778
3779    impl std::fmt::Display for Type {
3780        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3781            wkt::internal::display_enum(f, self.name(), self.value())
3782        }
3783    }
3784
3785    impl std::convert::From<i32> for Type {
3786        fn from(value: i32) -> Self {
3787            match value {
3788                0 => Self::Unspecified,
3789                1 => Self::Custom,
3790                2 => Self::BuiltIn,
3791                _ => Self::UnknownValue(r#type::UnknownValue(
3792                    wkt::internal::UnknownEnumValue::Integer(value),
3793                )),
3794            }
3795        }
3796    }
3797
3798    impl std::convert::From<&str> for Type {
3799        fn from(value: &str) -> Self {
3800            use std::string::ToString;
3801            match value {
3802                "TYPE_UNSPECIFIED" => Self::Unspecified,
3803                "CUSTOM" => Self::Custom,
3804                "BUILT_IN" => Self::BuiltIn,
3805                _ => Self::UnknownValue(r#type::UnknownValue(
3806                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3807                )),
3808            }
3809        }
3810    }
3811
3812    impl serde::ser::Serialize for Type {
3813        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3814        where
3815            S: serde::Serializer,
3816        {
3817            match self {
3818                Self::Unspecified => serializer.serialize_i32(0),
3819                Self::Custom => serializer.serialize_i32(1),
3820                Self::BuiltIn => serializer.serialize_i32(2),
3821                Self::UnknownValue(u) => u.0.serialize(serializer),
3822            }
3823        }
3824    }
3825
3826    impl<'de> serde::de::Deserialize<'de> for Type {
3827        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3828        where
3829            D: serde::Deserializer<'de>,
3830        {
3831            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
3832                ".google.cloud.cloudsecuritycompliance.v1.CloudControl.Type",
3833            ))
3834        }
3835    }
3836}
3837
3838/// The parameter specification for the cloud control.
3839#[derive(Clone, Default, PartialEq)]
3840#[non_exhaustive]
3841pub struct ParameterSpec {
3842    /// Required. The name of the parameter.
3843    pub name: std::string::String,
3844
3845    /// Optional. The friendly name of the parameter. The maximum length is 200
3846    /// characters.
3847    pub display_name: std::string::String,
3848
3849    /// Optional. The description of the parameter. The maximum length is 2000
3850    /// characters.
3851    pub description: std::string::String,
3852
3853    /// Required. Whether the parameter is required.
3854    pub is_required: bool,
3855
3856    /// Required. The parameter value type.
3857    pub value_type: crate::model::parameter_spec::ValueType,
3858
3859    /// Optional. The default value of the parameter.
3860    pub default_value: std::option::Option<crate::model::ParamValue>,
3861
3862    /// Optional. The list of parameter substitutions.
3863    pub substitution_rules: std::vec::Vec<crate::model::ParameterSubstitutionRule>,
3864
3865    /// Optional. The parameter specification for `oneOf` attributes.
3866    pub sub_parameters: std::vec::Vec<crate::model::ParameterSpec>,
3867
3868    /// Optional. The permitted set of values for the parameter.
3869    pub validation: std::option::Option<crate::model::Validation>,
3870
3871    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3872}
3873
3874impl ParameterSpec {
3875    /// Creates a new default instance.
3876    pub fn new() -> Self {
3877        std::default::Default::default()
3878    }
3879
3880    /// Sets the value of [name][crate::model::ParameterSpec::name].
3881    ///
3882    /// # Example
3883    /// ```ignore,no_run
3884    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3885    /// let x = ParameterSpec::new().set_name("example");
3886    /// ```
3887    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3888        self.name = v.into();
3889        self
3890    }
3891
3892    /// Sets the value of [display_name][crate::model::ParameterSpec::display_name].
3893    ///
3894    /// # Example
3895    /// ```ignore,no_run
3896    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3897    /// let x = ParameterSpec::new().set_display_name("example");
3898    /// ```
3899    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3900        self.display_name = v.into();
3901        self
3902    }
3903
3904    /// Sets the value of [description][crate::model::ParameterSpec::description].
3905    ///
3906    /// # Example
3907    /// ```ignore,no_run
3908    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3909    /// let x = ParameterSpec::new().set_description("example");
3910    /// ```
3911    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3912        self.description = v.into();
3913        self
3914    }
3915
3916    /// Sets the value of [is_required][crate::model::ParameterSpec::is_required].
3917    ///
3918    /// # Example
3919    /// ```ignore,no_run
3920    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3921    /// let x = ParameterSpec::new().set_is_required(true);
3922    /// ```
3923    pub fn set_is_required<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3924        self.is_required = v.into();
3925        self
3926    }
3927
3928    /// Sets the value of [value_type][crate::model::ParameterSpec::value_type].
3929    ///
3930    /// # Example
3931    /// ```ignore,no_run
3932    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3933    /// use google_cloud_cloudsecuritycompliance_v1::model::parameter_spec::ValueType;
3934    /// let x0 = ParameterSpec::new().set_value_type(ValueType::String);
3935    /// let x1 = ParameterSpec::new().set_value_type(ValueType::Boolean);
3936    /// let x2 = ParameterSpec::new().set_value_type(ValueType::Stringlist);
3937    /// ```
3938    pub fn set_value_type<T: std::convert::Into<crate::model::parameter_spec::ValueType>>(
3939        mut self,
3940        v: T,
3941    ) -> Self {
3942        self.value_type = v.into();
3943        self
3944    }
3945
3946    /// Sets the value of [default_value][crate::model::ParameterSpec::default_value].
3947    ///
3948    /// # Example
3949    /// ```ignore,no_run
3950    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3951    /// use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
3952    /// let x = ParameterSpec::new().set_default_value(ParamValue::default()/* use setters */);
3953    /// ```
3954    pub fn set_default_value<T>(mut self, v: T) -> Self
3955    where
3956        T: std::convert::Into<crate::model::ParamValue>,
3957    {
3958        self.default_value = std::option::Option::Some(v.into());
3959        self
3960    }
3961
3962    /// Sets or clears the value of [default_value][crate::model::ParameterSpec::default_value].
3963    ///
3964    /// # Example
3965    /// ```ignore,no_run
3966    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3967    /// use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
3968    /// let x = ParameterSpec::new().set_or_clear_default_value(Some(ParamValue::default()/* use setters */));
3969    /// let x = ParameterSpec::new().set_or_clear_default_value(None::<ParamValue>);
3970    /// ```
3971    pub fn set_or_clear_default_value<T>(mut self, v: std::option::Option<T>) -> Self
3972    where
3973        T: std::convert::Into<crate::model::ParamValue>,
3974    {
3975        self.default_value = v.map(|x| x.into());
3976        self
3977    }
3978
3979    /// Sets the value of [substitution_rules][crate::model::ParameterSpec::substitution_rules].
3980    ///
3981    /// # Example
3982    /// ```ignore,no_run
3983    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3984    /// use google_cloud_cloudsecuritycompliance_v1::model::ParameterSubstitutionRule;
3985    /// let x = ParameterSpec::new()
3986    ///     .set_substitution_rules([
3987    ///         ParameterSubstitutionRule::default()/* use setters */,
3988    ///         ParameterSubstitutionRule::default()/* use (different) setters */,
3989    ///     ]);
3990    /// ```
3991    pub fn set_substitution_rules<T, V>(mut self, v: T) -> Self
3992    where
3993        T: std::iter::IntoIterator<Item = V>,
3994        V: std::convert::Into<crate::model::ParameterSubstitutionRule>,
3995    {
3996        use std::iter::Iterator;
3997        self.substitution_rules = v.into_iter().map(|i| i.into()).collect();
3998        self
3999    }
4000
4001    /// Sets the value of [sub_parameters][crate::model::ParameterSpec::sub_parameters].
4002    ///
4003    /// # Example
4004    /// ```ignore,no_run
4005    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
4006    /// let x = ParameterSpec::new()
4007    ///     .set_sub_parameters([
4008    ///         ParameterSpec::default()/* use setters */,
4009    ///         ParameterSpec::default()/* use (different) setters */,
4010    ///     ]);
4011    /// ```
4012    pub fn set_sub_parameters<T, V>(mut self, v: T) -> Self
4013    where
4014        T: std::iter::IntoIterator<Item = V>,
4015        V: std::convert::Into<crate::model::ParameterSpec>,
4016    {
4017        use std::iter::Iterator;
4018        self.sub_parameters = v.into_iter().map(|i| i.into()).collect();
4019        self
4020    }
4021
4022    /// Sets the value of [validation][crate::model::ParameterSpec::validation].
4023    ///
4024    /// # Example
4025    /// ```ignore,no_run
4026    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
4027    /// use google_cloud_cloudsecuritycompliance_v1::model::Validation;
4028    /// let x = ParameterSpec::new().set_validation(Validation::default()/* use setters */);
4029    /// ```
4030    pub fn set_validation<T>(mut self, v: T) -> Self
4031    where
4032        T: std::convert::Into<crate::model::Validation>,
4033    {
4034        self.validation = std::option::Option::Some(v.into());
4035        self
4036    }
4037
4038    /// Sets or clears the value of [validation][crate::model::ParameterSpec::validation].
4039    ///
4040    /// # Example
4041    /// ```ignore,no_run
4042    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
4043    /// use google_cloud_cloudsecuritycompliance_v1::model::Validation;
4044    /// let x = ParameterSpec::new().set_or_clear_validation(Some(Validation::default()/* use setters */));
4045    /// let x = ParameterSpec::new().set_or_clear_validation(None::<Validation>);
4046    /// ```
4047    pub fn set_or_clear_validation<T>(mut self, v: std::option::Option<T>) -> Self
4048    where
4049        T: std::convert::Into<crate::model::Validation>,
4050    {
4051        self.validation = v.map(|x| x.into());
4052        self
4053    }
4054}
4055
4056impl wkt::message::Message for ParameterSpec {
4057    fn typename() -> &'static str {
4058        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ParameterSpec"
4059    }
4060}
4061
4062/// Defines additional types related to [ParameterSpec].
4063pub mod parameter_spec {
4064    #[allow(unused_imports)]
4065    use super::*;
4066
4067    /// The type of parameter value.
4068    ///
4069    /// # Working with unknown values
4070    ///
4071    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4072    /// additional enum variants at any time. Adding new variants is not considered
4073    /// a breaking change. Applications should write their code in anticipation of:
4074    ///
4075    /// - New values appearing in future releases of the client library, **and**
4076    /// - New values received dynamically, without application changes.
4077    ///
4078    /// Please consult the [Working with enums] section in the user guide for some
4079    /// guidelines.
4080    ///
4081    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
4082    #[derive(Clone, Debug, PartialEq)]
4083    #[non_exhaustive]
4084    pub enum ValueType {
4085        /// Default value. This value is unused.
4086        Unspecified,
4087        /// A string value.
4088        String,
4089        /// A boolean value.
4090        Boolean,
4091        /// A string list value.
4092        Stringlist,
4093        /// A numeric value.
4094        Number,
4095        /// A oneOf value.
4096        Oneof,
4097        /// If set, the enum was initialized with an unknown value.
4098        ///
4099        /// Applications can examine the value using [ValueType::value] or
4100        /// [ValueType::name].
4101        UnknownValue(value_type::UnknownValue),
4102    }
4103
4104    #[doc(hidden)]
4105    pub mod value_type {
4106        #[allow(unused_imports)]
4107        use super::*;
4108        #[derive(Clone, Debug, PartialEq)]
4109        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4110    }
4111
4112    impl ValueType {
4113        /// Gets the enum value.
4114        ///
4115        /// Returns `None` if the enum contains an unknown value deserialized from
4116        /// the string representation of enums.
4117        pub fn value(&self) -> std::option::Option<i32> {
4118            match self {
4119                Self::Unspecified => std::option::Option::Some(0),
4120                Self::String => std::option::Option::Some(3),
4121                Self::Boolean => std::option::Option::Some(4),
4122                Self::Stringlist => std::option::Option::Some(5),
4123                Self::Number => std::option::Option::Some(6),
4124                Self::Oneof => std::option::Option::Some(7),
4125                Self::UnknownValue(u) => u.0.value(),
4126            }
4127        }
4128
4129        /// Gets the enum value as a string.
4130        ///
4131        /// Returns `None` if the enum contains an unknown value deserialized from
4132        /// the integer representation of enums.
4133        pub fn name(&self) -> std::option::Option<&str> {
4134            match self {
4135                Self::Unspecified => std::option::Option::Some("VALUE_TYPE_UNSPECIFIED"),
4136                Self::String => std::option::Option::Some("STRING"),
4137                Self::Boolean => std::option::Option::Some("BOOLEAN"),
4138                Self::Stringlist => std::option::Option::Some("STRINGLIST"),
4139                Self::Number => std::option::Option::Some("NUMBER"),
4140                Self::Oneof => std::option::Option::Some("ONEOF"),
4141                Self::UnknownValue(u) => u.0.name(),
4142            }
4143        }
4144    }
4145
4146    impl std::default::Default for ValueType {
4147        fn default() -> Self {
4148            use std::convert::From;
4149            Self::from(0)
4150        }
4151    }
4152
4153    impl std::fmt::Display for ValueType {
4154        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4155            wkt::internal::display_enum(f, self.name(), self.value())
4156        }
4157    }
4158
4159    impl std::convert::From<i32> for ValueType {
4160        fn from(value: i32) -> Self {
4161            match value {
4162                0 => Self::Unspecified,
4163                3 => Self::String,
4164                4 => Self::Boolean,
4165                5 => Self::Stringlist,
4166                6 => Self::Number,
4167                7 => Self::Oneof,
4168                _ => Self::UnknownValue(value_type::UnknownValue(
4169                    wkt::internal::UnknownEnumValue::Integer(value),
4170                )),
4171            }
4172        }
4173    }
4174
4175    impl std::convert::From<&str> for ValueType {
4176        fn from(value: &str) -> Self {
4177            use std::string::ToString;
4178            match value {
4179                "VALUE_TYPE_UNSPECIFIED" => Self::Unspecified,
4180                "STRING" => Self::String,
4181                "BOOLEAN" => Self::Boolean,
4182                "STRINGLIST" => Self::Stringlist,
4183                "NUMBER" => Self::Number,
4184                "ONEOF" => Self::Oneof,
4185                _ => Self::UnknownValue(value_type::UnknownValue(
4186                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4187                )),
4188            }
4189        }
4190    }
4191
4192    impl serde::ser::Serialize for ValueType {
4193        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4194        where
4195            S: serde::Serializer,
4196        {
4197            match self {
4198                Self::Unspecified => serializer.serialize_i32(0),
4199                Self::String => serializer.serialize_i32(3),
4200                Self::Boolean => serializer.serialize_i32(4),
4201                Self::Stringlist => serializer.serialize_i32(5),
4202                Self::Number => serializer.serialize_i32(6),
4203                Self::Oneof => serializer.serialize_i32(7),
4204                Self::UnknownValue(u) => u.0.serialize(serializer),
4205            }
4206        }
4207    }
4208
4209    impl<'de> serde::de::Deserialize<'de> for ValueType {
4210        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4211        where
4212            D: serde::Deserializer<'de>,
4213        {
4214            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ValueType>::new(
4215                ".google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType",
4216            ))
4217        }
4218    }
4219}
4220
4221/// The validation of the parameter.
4222#[derive(Clone, Default, PartialEq)]
4223#[non_exhaustive]
4224pub struct Validation {
4225    /// Defines validators for parameter values.
4226    pub constraint: std::option::Option<crate::model::validation::Constraint>,
4227
4228    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4229}
4230
4231impl Validation {
4232    /// Creates a new default instance.
4233    pub fn new() -> Self {
4234        std::default::Default::default()
4235    }
4236
4237    /// Sets the value of [constraint][crate::model::Validation::constraint].
4238    ///
4239    /// Note that all the setters affecting `constraint` are mutually
4240    /// exclusive.
4241    ///
4242    /// # Example
4243    /// ```ignore,no_run
4244    /// # use google_cloud_cloudsecuritycompliance_v1::model::Validation;
4245    /// use google_cloud_cloudsecuritycompliance_v1::model::AllowedValues;
4246    /// let x = Validation::new().set_constraint(Some(
4247    ///     google_cloud_cloudsecuritycompliance_v1::model::validation::Constraint::AllowedValues(AllowedValues::default().into())));
4248    /// ```
4249    pub fn set_constraint<
4250        T: std::convert::Into<std::option::Option<crate::model::validation::Constraint>>,
4251    >(
4252        mut self,
4253        v: T,
4254    ) -> Self {
4255        self.constraint = v.into();
4256        self
4257    }
4258
4259    /// The value of [constraint][crate::model::Validation::constraint]
4260    /// if it holds a `AllowedValues`, `None` if the field is not set or
4261    /// holds a different branch.
4262    pub fn allowed_values(
4263        &self,
4264    ) -> std::option::Option<&std::boxed::Box<crate::model::AllowedValues>> {
4265        #[allow(unreachable_patterns)]
4266        self.constraint.as_ref().and_then(|v| match v {
4267            crate::model::validation::Constraint::AllowedValues(v) => std::option::Option::Some(v),
4268            _ => std::option::Option::None,
4269        })
4270    }
4271
4272    /// Sets the value of [constraint][crate::model::Validation::constraint]
4273    /// to hold a `AllowedValues`.
4274    ///
4275    /// Note that all the setters affecting `constraint` are
4276    /// mutually exclusive.
4277    ///
4278    /// # Example
4279    /// ```ignore,no_run
4280    /// # use google_cloud_cloudsecuritycompliance_v1::model::Validation;
4281    /// use google_cloud_cloudsecuritycompliance_v1::model::AllowedValues;
4282    /// let x = Validation::new().set_allowed_values(AllowedValues::default()/* use setters */);
4283    /// assert!(x.allowed_values().is_some());
4284    /// assert!(x.int_range().is_none());
4285    /// assert!(x.regexp_pattern().is_none());
4286    /// ```
4287    pub fn set_allowed_values<
4288        T: std::convert::Into<std::boxed::Box<crate::model::AllowedValues>>,
4289    >(
4290        mut self,
4291        v: T,
4292    ) -> Self {
4293        self.constraint = std::option::Option::Some(
4294            crate::model::validation::Constraint::AllowedValues(v.into()),
4295        );
4296        self
4297    }
4298
4299    /// The value of [constraint][crate::model::Validation::constraint]
4300    /// if it holds a `IntRange`, `None` if the field is not set or
4301    /// holds a different branch.
4302    pub fn int_range(&self) -> std::option::Option<&std::boxed::Box<crate::model::IntRange>> {
4303        #[allow(unreachable_patterns)]
4304        self.constraint.as_ref().and_then(|v| match v {
4305            crate::model::validation::Constraint::IntRange(v) => std::option::Option::Some(v),
4306            _ => std::option::Option::None,
4307        })
4308    }
4309
4310    /// Sets the value of [constraint][crate::model::Validation::constraint]
4311    /// to hold a `IntRange`.
4312    ///
4313    /// Note that all the setters affecting `constraint` are
4314    /// mutually exclusive.
4315    ///
4316    /// # Example
4317    /// ```ignore,no_run
4318    /// # use google_cloud_cloudsecuritycompliance_v1::model::Validation;
4319    /// use google_cloud_cloudsecuritycompliance_v1::model::IntRange;
4320    /// let x = Validation::new().set_int_range(IntRange::default()/* use setters */);
4321    /// assert!(x.int_range().is_some());
4322    /// assert!(x.allowed_values().is_none());
4323    /// assert!(x.regexp_pattern().is_none());
4324    /// ```
4325    pub fn set_int_range<T: std::convert::Into<std::boxed::Box<crate::model::IntRange>>>(
4326        mut self,
4327        v: T,
4328    ) -> Self {
4329        self.constraint =
4330            std::option::Option::Some(crate::model::validation::Constraint::IntRange(v.into()));
4331        self
4332    }
4333
4334    /// The value of [constraint][crate::model::Validation::constraint]
4335    /// if it holds a `RegexpPattern`, `None` if the field is not set or
4336    /// holds a different branch.
4337    pub fn regexp_pattern(
4338        &self,
4339    ) -> std::option::Option<&std::boxed::Box<crate::model::RegexpPattern>> {
4340        #[allow(unreachable_patterns)]
4341        self.constraint.as_ref().and_then(|v| match v {
4342            crate::model::validation::Constraint::RegexpPattern(v) => std::option::Option::Some(v),
4343            _ => std::option::Option::None,
4344        })
4345    }
4346
4347    /// Sets the value of [constraint][crate::model::Validation::constraint]
4348    /// to hold a `RegexpPattern`.
4349    ///
4350    /// Note that all the setters affecting `constraint` are
4351    /// mutually exclusive.
4352    ///
4353    /// # Example
4354    /// ```ignore,no_run
4355    /// # use google_cloud_cloudsecuritycompliance_v1::model::Validation;
4356    /// use google_cloud_cloudsecuritycompliance_v1::model::RegexpPattern;
4357    /// let x = Validation::new().set_regexp_pattern(RegexpPattern::default()/* use setters */);
4358    /// assert!(x.regexp_pattern().is_some());
4359    /// assert!(x.allowed_values().is_none());
4360    /// assert!(x.int_range().is_none());
4361    /// ```
4362    pub fn set_regexp_pattern<
4363        T: std::convert::Into<std::boxed::Box<crate::model::RegexpPattern>>,
4364    >(
4365        mut self,
4366        v: T,
4367    ) -> Self {
4368        self.constraint = std::option::Option::Some(
4369            crate::model::validation::Constraint::RegexpPattern(v.into()),
4370        );
4371        self
4372    }
4373}
4374
4375impl wkt::message::Message for Validation {
4376    fn typename() -> &'static str {
4377        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.Validation"
4378    }
4379}
4380
4381/// Defines additional types related to [Validation].
4382pub mod validation {
4383    #[allow(unused_imports)]
4384    use super::*;
4385
4386    /// Defines validators for parameter values.
4387    #[derive(Clone, Debug, PartialEq)]
4388    #[non_exhaustive]
4389    pub enum Constraint {
4390        /// The permitted set of values for the parameter.
4391        AllowedValues(std::boxed::Box<crate::model::AllowedValues>),
4392        /// The permitted range for numeric parameters.
4393        IntRange(std::boxed::Box<crate::model::IntRange>),
4394        /// The regular expression for string parameters.
4395        RegexpPattern(std::boxed::Box<crate::model::RegexpPattern>),
4396    }
4397}
4398
4399/// The allowed set of values for the parameter.
4400#[derive(Clone, Default, PartialEq)]
4401#[non_exhaustive]
4402pub struct AllowedValues {
4403    /// Required. The list of allowed values for the parameter.
4404    pub values: std::vec::Vec<crate::model::ParamValue>,
4405
4406    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4407}
4408
4409impl AllowedValues {
4410    /// Creates a new default instance.
4411    pub fn new() -> Self {
4412        std::default::Default::default()
4413    }
4414
4415    /// Sets the value of [values][crate::model::AllowedValues::values].
4416    ///
4417    /// # Example
4418    /// ```ignore,no_run
4419    /// # use google_cloud_cloudsecuritycompliance_v1::model::AllowedValues;
4420    /// use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4421    /// let x = AllowedValues::new()
4422    ///     .set_values([
4423    ///         ParamValue::default()/* use setters */,
4424    ///         ParamValue::default()/* use (different) setters */,
4425    ///     ]);
4426    /// ```
4427    pub fn set_values<T, V>(mut self, v: T) -> Self
4428    where
4429        T: std::iter::IntoIterator<Item = V>,
4430        V: std::convert::Into<crate::model::ParamValue>,
4431    {
4432        use std::iter::Iterator;
4433        self.values = v.into_iter().map(|i| i.into()).collect();
4434        self
4435    }
4436}
4437
4438impl wkt::message::Message for AllowedValues {
4439    fn typename() -> &'static str {
4440        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AllowedValues"
4441    }
4442}
4443
4444/// The regular expression (regex) validator for parameter values.
4445#[derive(Clone, Default, PartialEq)]
4446#[non_exhaustive]
4447pub struct RegexpPattern {
4448    /// Required. The regex pattern to match the values of the parameter with.
4449    pub pattern: std::string::String,
4450
4451    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4452}
4453
4454impl RegexpPattern {
4455    /// Creates a new default instance.
4456    pub fn new() -> Self {
4457        std::default::Default::default()
4458    }
4459
4460    /// Sets the value of [pattern][crate::model::RegexpPattern::pattern].
4461    ///
4462    /// # Example
4463    /// ```ignore,no_run
4464    /// # use google_cloud_cloudsecuritycompliance_v1::model::RegexpPattern;
4465    /// let x = RegexpPattern::new().set_pattern("example");
4466    /// ```
4467    pub fn set_pattern<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4468        self.pattern = v.into();
4469        self
4470    }
4471}
4472
4473impl wkt::message::Message for RegexpPattern {
4474    fn typename() -> &'static str {
4475        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.RegexpPattern"
4476    }
4477}
4478
4479/// The number range for number parameters.
4480#[derive(Clone, Default, PartialEq)]
4481#[non_exhaustive]
4482pub struct IntRange {
4483    /// Required. The minimum permitted value for the numeric parameter
4484    /// (inclusive).
4485    pub min: i64,
4486
4487    /// Required. The maximum permitted value for the numeric parameter
4488    /// (inclusive).
4489    pub max: i64,
4490
4491    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4492}
4493
4494impl IntRange {
4495    /// Creates a new default instance.
4496    pub fn new() -> Self {
4497        std::default::Default::default()
4498    }
4499
4500    /// Sets the value of [min][crate::model::IntRange::min].
4501    ///
4502    /// # Example
4503    /// ```ignore,no_run
4504    /// # use google_cloud_cloudsecuritycompliance_v1::model::IntRange;
4505    /// let x = IntRange::new().set_min(42);
4506    /// ```
4507    pub fn set_min<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
4508        self.min = v.into();
4509        self
4510    }
4511
4512    /// Sets the value of [max][crate::model::IntRange::max].
4513    ///
4514    /// # Example
4515    /// ```ignore,no_run
4516    /// # use google_cloud_cloudsecuritycompliance_v1::model::IntRange;
4517    /// let x = IntRange::new().set_max(42);
4518    /// ```
4519    pub fn set_max<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
4520        self.max = v.into();
4521        self
4522    }
4523}
4524
4525impl wkt::message::Message for IntRange {
4526    fn typename() -> &'static str {
4527        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.IntRange"
4528    }
4529}
4530
4531/// A list of strings for the parameter value.
4532#[derive(Clone, Default, PartialEq)]
4533#[non_exhaustive]
4534pub struct StringList {
4535    /// Required. The strings in the list.
4536    pub values: std::vec::Vec<std::string::String>,
4537
4538    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4539}
4540
4541impl StringList {
4542    /// Creates a new default instance.
4543    pub fn new() -> Self {
4544        std::default::Default::default()
4545    }
4546
4547    /// Sets the value of [values][crate::model::StringList::values].
4548    ///
4549    /// # Example
4550    /// ```ignore,no_run
4551    /// # use google_cloud_cloudsecuritycompliance_v1::model::StringList;
4552    /// let x = StringList::new().set_values(["a", "b", "c"]);
4553    /// ```
4554    pub fn set_values<T, V>(mut self, v: T) -> Self
4555    where
4556        T: std::iter::IntoIterator<Item = V>,
4557        V: std::convert::Into<std::string::String>,
4558    {
4559        use std::iter::Iterator;
4560        self.values = v.into_iter().map(|i| i.into()).collect();
4561        self
4562    }
4563}
4564
4565impl wkt::message::Message for StringList {
4566    fn typename() -> &'static str {
4567        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.StringList"
4568    }
4569}
4570
4571/// The possible parameter value types.
4572#[derive(Clone, Default, PartialEq)]
4573#[non_exhaustive]
4574pub struct ParamValue {
4575    /// The list of possible parameter value types.
4576    pub kind: std::option::Option<crate::model::param_value::Kind>,
4577
4578    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4579}
4580
4581impl ParamValue {
4582    /// Creates a new default instance.
4583    pub fn new() -> Self {
4584        std::default::Default::default()
4585    }
4586
4587    /// Sets the value of [kind][crate::model::ParamValue::kind].
4588    ///
4589    /// Note that all the setters affecting `kind` are mutually
4590    /// exclusive.
4591    ///
4592    /// # Example
4593    /// ```ignore,no_run
4594    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4595    /// use google_cloud_cloudsecuritycompliance_v1::model::param_value::Kind;
4596    /// let x = ParamValue::new().set_kind(Some(Kind::StringValue("example".to_string())));
4597    /// ```
4598    pub fn set_kind<T: std::convert::Into<std::option::Option<crate::model::param_value::Kind>>>(
4599        mut self,
4600        v: T,
4601    ) -> Self {
4602        self.kind = v.into();
4603        self
4604    }
4605
4606    /// The value of [kind][crate::model::ParamValue::kind]
4607    /// if it holds a `StringValue`, `None` if the field is not set or
4608    /// holds a different branch.
4609    pub fn string_value(&self) -> std::option::Option<&std::string::String> {
4610        #[allow(unreachable_patterns)]
4611        self.kind.as_ref().and_then(|v| match v {
4612            crate::model::param_value::Kind::StringValue(v) => std::option::Option::Some(v),
4613            _ => std::option::Option::None,
4614        })
4615    }
4616
4617    /// Sets the value of [kind][crate::model::ParamValue::kind]
4618    /// to hold a `StringValue`.
4619    ///
4620    /// Note that all the setters affecting `kind` are
4621    /// mutually exclusive.
4622    ///
4623    /// # Example
4624    /// ```ignore,no_run
4625    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4626    /// let x = ParamValue::new().set_string_value("example");
4627    /// assert!(x.string_value().is_some());
4628    /// assert!(x.bool_value().is_none());
4629    /// assert!(x.string_list_value().is_none());
4630    /// assert!(x.number_value().is_none());
4631    /// assert!(x.oneof_value().is_none());
4632    /// ```
4633    pub fn set_string_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4634        self.kind =
4635            std::option::Option::Some(crate::model::param_value::Kind::StringValue(v.into()));
4636        self
4637    }
4638
4639    /// The value of [kind][crate::model::ParamValue::kind]
4640    /// if it holds a `BoolValue`, `None` if the field is not set or
4641    /// holds a different branch.
4642    pub fn bool_value(&self) -> std::option::Option<&bool> {
4643        #[allow(unreachable_patterns)]
4644        self.kind.as_ref().and_then(|v| match v {
4645            crate::model::param_value::Kind::BoolValue(v) => std::option::Option::Some(v),
4646            _ => std::option::Option::None,
4647        })
4648    }
4649
4650    /// Sets the value of [kind][crate::model::ParamValue::kind]
4651    /// to hold a `BoolValue`.
4652    ///
4653    /// Note that all the setters affecting `kind` are
4654    /// mutually exclusive.
4655    ///
4656    /// # Example
4657    /// ```ignore,no_run
4658    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4659    /// let x = ParamValue::new().set_bool_value(true);
4660    /// assert!(x.bool_value().is_some());
4661    /// assert!(x.string_value().is_none());
4662    /// assert!(x.string_list_value().is_none());
4663    /// assert!(x.number_value().is_none());
4664    /// assert!(x.oneof_value().is_none());
4665    /// ```
4666    pub fn set_bool_value<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4667        self.kind = std::option::Option::Some(crate::model::param_value::Kind::BoolValue(v.into()));
4668        self
4669    }
4670
4671    /// The value of [kind][crate::model::ParamValue::kind]
4672    /// if it holds a `StringListValue`, `None` if the field is not set or
4673    /// holds a different branch.
4674    pub fn string_list_value(
4675        &self,
4676    ) -> std::option::Option<&std::boxed::Box<crate::model::StringList>> {
4677        #[allow(unreachable_patterns)]
4678        self.kind.as_ref().and_then(|v| match v {
4679            crate::model::param_value::Kind::StringListValue(v) => std::option::Option::Some(v),
4680            _ => std::option::Option::None,
4681        })
4682    }
4683
4684    /// Sets the value of [kind][crate::model::ParamValue::kind]
4685    /// to hold a `StringListValue`.
4686    ///
4687    /// Note that all the setters affecting `kind` are
4688    /// mutually exclusive.
4689    ///
4690    /// # Example
4691    /// ```ignore,no_run
4692    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4693    /// use google_cloud_cloudsecuritycompliance_v1::model::StringList;
4694    /// let x = ParamValue::new().set_string_list_value(StringList::default()/* use setters */);
4695    /// assert!(x.string_list_value().is_some());
4696    /// assert!(x.string_value().is_none());
4697    /// assert!(x.bool_value().is_none());
4698    /// assert!(x.number_value().is_none());
4699    /// assert!(x.oneof_value().is_none());
4700    /// ```
4701    pub fn set_string_list_value<
4702        T: std::convert::Into<std::boxed::Box<crate::model::StringList>>,
4703    >(
4704        mut self,
4705        v: T,
4706    ) -> Self {
4707        self.kind =
4708            std::option::Option::Some(crate::model::param_value::Kind::StringListValue(v.into()));
4709        self
4710    }
4711
4712    /// The value of [kind][crate::model::ParamValue::kind]
4713    /// if it holds a `NumberValue`, `None` if the field is not set or
4714    /// holds a different branch.
4715    pub fn number_value(&self) -> std::option::Option<&f64> {
4716        #[allow(unreachable_patterns)]
4717        self.kind.as_ref().and_then(|v| match v {
4718            crate::model::param_value::Kind::NumberValue(v) => std::option::Option::Some(v),
4719            _ => std::option::Option::None,
4720        })
4721    }
4722
4723    /// Sets the value of [kind][crate::model::ParamValue::kind]
4724    /// to hold a `NumberValue`.
4725    ///
4726    /// Note that all the setters affecting `kind` are
4727    /// mutually exclusive.
4728    ///
4729    /// # Example
4730    /// ```ignore,no_run
4731    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4732    /// let x = ParamValue::new().set_number_value(42.0);
4733    /// assert!(x.number_value().is_some());
4734    /// assert!(x.string_value().is_none());
4735    /// assert!(x.bool_value().is_none());
4736    /// assert!(x.string_list_value().is_none());
4737    /// assert!(x.oneof_value().is_none());
4738    /// ```
4739    pub fn set_number_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
4740        self.kind =
4741            std::option::Option::Some(crate::model::param_value::Kind::NumberValue(v.into()));
4742        self
4743    }
4744
4745    /// The value of [kind][crate::model::ParamValue::kind]
4746    /// if it holds a `OneofValue`, `None` if the field is not set or
4747    /// holds a different branch.
4748    pub fn oneof_value(&self) -> std::option::Option<&std::boxed::Box<crate::model::Parameter>> {
4749        #[allow(unreachable_patterns)]
4750        self.kind.as_ref().and_then(|v| match v {
4751            crate::model::param_value::Kind::OneofValue(v) => std::option::Option::Some(v),
4752            _ => std::option::Option::None,
4753        })
4754    }
4755
4756    /// Sets the value of [kind][crate::model::ParamValue::kind]
4757    /// to hold a `OneofValue`.
4758    ///
4759    /// Note that all the setters affecting `kind` are
4760    /// mutually exclusive.
4761    ///
4762    /// # Example
4763    /// ```ignore,no_run
4764    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4765    /// use google_cloud_cloudsecuritycompliance_v1::model::Parameter;
4766    /// let x = ParamValue::new().set_oneof_value(Parameter::default()/* use setters */);
4767    /// assert!(x.oneof_value().is_some());
4768    /// assert!(x.string_value().is_none());
4769    /// assert!(x.bool_value().is_none());
4770    /// assert!(x.string_list_value().is_none());
4771    /// assert!(x.number_value().is_none());
4772    /// ```
4773    pub fn set_oneof_value<T: std::convert::Into<std::boxed::Box<crate::model::Parameter>>>(
4774        mut self,
4775        v: T,
4776    ) -> Self {
4777        self.kind =
4778            std::option::Option::Some(crate::model::param_value::Kind::OneofValue(v.into()));
4779        self
4780    }
4781}
4782
4783impl wkt::message::Message for ParamValue {
4784    fn typename() -> &'static str {
4785        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ParamValue"
4786    }
4787}
4788
4789/// Defines additional types related to [ParamValue].
4790pub mod param_value {
4791    #[allow(unused_imports)]
4792    use super::*;
4793
4794    /// The list of possible parameter value types.
4795    #[derive(Clone, Debug, PartialEq)]
4796    #[non_exhaustive]
4797    pub enum Kind {
4798        /// Optional. A string value.
4799        StringValue(std::string::String),
4800        /// Optional. A boolean value.
4801        BoolValue(bool),
4802        /// Optional. A repeated string.
4803        StringListValue(std::boxed::Box<crate::model::StringList>),
4804        /// Optional. A double value.
4805        NumberValue(f64),
4806        /// Optional. Sub-parameter values.
4807        OneofValue(std::boxed::Box<crate::model::Parameter>),
4808    }
4809}
4810
4811/// The parameter substitution rules.
4812#[derive(Clone, Default, PartialEq)]
4813#[non_exhaustive]
4814pub struct ParameterSubstitutionRule {
4815    /// The type of substitution.
4816    pub substitution_type:
4817        std::option::Option<crate::model::parameter_substitution_rule::SubstitutionType>,
4818
4819    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4820}
4821
4822impl ParameterSubstitutionRule {
4823    /// Creates a new default instance.
4824    pub fn new() -> Self {
4825        std::default::Default::default()
4826    }
4827
4828    /// Sets the value of [substitution_type][crate::model::ParameterSubstitutionRule::substitution_type].
4829    ///
4830    /// Note that all the setters affecting `substitution_type` are mutually
4831    /// exclusive.
4832    ///
4833    /// # Example
4834    /// ```ignore,no_run
4835    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSubstitutionRule;
4836    /// use google_cloud_cloudsecuritycompliance_v1::model::PlaceholderSubstitutionRule;
4837    /// let x = ParameterSubstitutionRule::new().set_substitution_type(Some(
4838    ///     google_cloud_cloudsecuritycompliance_v1::model::parameter_substitution_rule::SubstitutionType::PlaceholderSubstitutionRule(PlaceholderSubstitutionRule::default().into())));
4839    /// ```
4840    pub fn set_substitution_type<
4841        T: std::convert::Into<
4842                std::option::Option<crate::model::parameter_substitution_rule::SubstitutionType>,
4843            >,
4844    >(
4845        mut self,
4846        v: T,
4847    ) -> Self {
4848        self.substitution_type = v.into();
4849        self
4850    }
4851
4852    /// The value of [substitution_type][crate::model::ParameterSubstitutionRule::substitution_type]
4853    /// if it holds a `PlaceholderSubstitutionRule`, `None` if the field is not set or
4854    /// holds a different branch.
4855    pub fn placeholder_substitution_rule(
4856        &self,
4857    ) -> std::option::Option<&std::boxed::Box<crate::model::PlaceholderSubstitutionRule>> {
4858        #[allow(unreachable_patterns)]
4859        self.substitution_type.as_ref().and_then(|v| match v {
4860            crate::model::parameter_substitution_rule::SubstitutionType::PlaceholderSubstitutionRule(v) => std::option::Option::Some(v),
4861            _ => std::option::Option::None,
4862        })
4863    }
4864
4865    /// Sets the value of [substitution_type][crate::model::ParameterSubstitutionRule::substitution_type]
4866    /// to hold a `PlaceholderSubstitutionRule`.
4867    ///
4868    /// Note that all the setters affecting `substitution_type` are
4869    /// mutually exclusive.
4870    ///
4871    /// # Example
4872    /// ```ignore,no_run
4873    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSubstitutionRule;
4874    /// use google_cloud_cloudsecuritycompliance_v1::model::PlaceholderSubstitutionRule;
4875    /// let x = ParameterSubstitutionRule::new().set_placeholder_substitution_rule(PlaceholderSubstitutionRule::default()/* use setters */);
4876    /// assert!(x.placeholder_substitution_rule().is_some());
4877    /// assert!(x.attribute_substitution_rule().is_none());
4878    /// ```
4879    pub fn set_placeholder_substitution_rule<
4880        T: std::convert::Into<std::boxed::Box<crate::model::PlaceholderSubstitutionRule>>,
4881    >(
4882        mut self,
4883        v: T,
4884    ) -> Self {
4885        self.substitution_type = std::option::Option::Some(
4886            crate::model::parameter_substitution_rule::SubstitutionType::PlaceholderSubstitutionRule(
4887                v.into()
4888            )
4889        );
4890        self
4891    }
4892
4893    /// The value of [substitution_type][crate::model::ParameterSubstitutionRule::substitution_type]
4894    /// if it holds a `AttributeSubstitutionRule`, `None` if the field is not set or
4895    /// holds a different branch.
4896    pub fn attribute_substitution_rule(
4897        &self,
4898    ) -> std::option::Option<&std::boxed::Box<crate::model::AttributeSubstitutionRule>> {
4899        #[allow(unreachable_patterns)]
4900        self.substitution_type.as_ref().and_then(|v| match v {
4901            crate::model::parameter_substitution_rule::SubstitutionType::AttributeSubstitutionRule(v) => std::option::Option::Some(v),
4902            _ => std::option::Option::None,
4903        })
4904    }
4905
4906    /// Sets the value of [substitution_type][crate::model::ParameterSubstitutionRule::substitution_type]
4907    /// to hold a `AttributeSubstitutionRule`.
4908    ///
4909    /// Note that all the setters affecting `substitution_type` are
4910    /// mutually exclusive.
4911    ///
4912    /// # Example
4913    /// ```ignore,no_run
4914    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSubstitutionRule;
4915    /// use google_cloud_cloudsecuritycompliance_v1::model::AttributeSubstitutionRule;
4916    /// let x = ParameterSubstitutionRule::new().set_attribute_substitution_rule(AttributeSubstitutionRule::default()/* use setters */);
4917    /// assert!(x.attribute_substitution_rule().is_some());
4918    /// assert!(x.placeholder_substitution_rule().is_none());
4919    /// ```
4920    pub fn set_attribute_substitution_rule<
4921        T: std::convert::Into<std::boxed::Box<crate::model::AttributeSubstitutionRule>>,
4922    >(
4923        mut self,
4924        v: T,
4925    ) -> Self {
4926        self.substitution_type = std::option::Option::Some(
4927            crate::model::parameter_substitution_rule::SubstitutionType::AttributeSubstitutionRule(
4928                v.into(),
4929            ),
4930        );
4931        self
4932    }
4933}
4934
4935impl wkt::message::Message for ParameterSubstitutionRule {
4936    fn typename() -> &'static str {
4937        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule"
4938    }
4939}
4940
4941/// Defines additional types related to [ParameterSubstitutionRule].
4942pub mod parameter_substitution_rule {
4943    #[allow(unused_imports)]
4944    use super::*;
4945
4946    /// The type of substitution.
4947    #[derive(Clone, Debug, PartialEq)]
4948    #[non_exhaustive]
4949    pub enum SubstitutionType {
4950        /// The placeholder substitution rule.
4951        PlaceholderSubstitutionRule(std::boxed::Box<crate::model::PlaceholderSubstitutionRule>),
4952        /// The attribute substitution rule.
4953        AttributeSubstitutionRule(std::boxed::Box<crate::model::AttributeSubstitutionRule>),
4954    }
4955}
4956
4957/// The attribute at the given path that's substituted entirely.
4958#[derive(Clone, Default, PartialEq)]
4959#[non_exhaustive]
4960pub struct AttributeSubstitutionRule {
4961    /// The fully qualified proto attribute path, in dot notation.
4962    /// For example: `rules[0].cel_expression.resource_types_values`
4963    pub attribute: std::string::String,
4964
4965    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4966}
4967
4968impl AttributeSubstitutionRule {
4969    /// Creates a new default instance.
4970    pub fn new() -> Self {
4971        std::default::Default::default()
4972    }
4973
4974    /// Sets the value of [attribute][crate::model::AttributeSubstitutionRule::attribute].
4975    ///
4976    /// # Example
4977    /// ```ignore,no_run
4978    /// # use google_cloud_cloudsecuritycompliance_v1::model::AttributeSubstitutionRule;
4979    /// let x = AttributeSubstitutionRule::new().set_attribute("example");
4980    /// ```
4981    pub fn set_attribute<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4982        self.attribute = v.into();
4983        self
4984    }
4985}
4986
4987impl wkt::message::Message for AttributeSubstitutionRule {
4988    fn typename() -> &'static str {
4989        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule"
4990    }
4991}
4992
4993/// The placeholder that's substituted in the rendered string.
4994#[derive(Clone, Default, PartialEq)]
4995#[non_exhaustive]
4996pub struct PlaceholderSubstitutionRule {
4997    /// The fully qualified proto attribute path, in dot notation.
4998    pub attribute: std::string::String,
4999
5000    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5001}
5002
5003impl PlaceholderSubstitutionRule {
5004    /// Creates a new default instance.
5005    pub fn new() -> Self {
5006        std::default::Default::default()
5007    }
5008
5009    /// Sets the value of [attribute][crate::model::PlaceholderSubstitutionRule::attribute].
5010    ///
5011    /// # Example
5012    /// ```ignore,no_run
5013    /// # use google_cloud_cloudsecuritycompliance_v1::model::PlaceholderSubstitutionRule;
5014    /// let x = PlaceholderSubstitutionRule::new().set_attribute("example");
5015    /// ```
5016    pub fn set_attribute<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5017        self.attribute = v.into();
5018        self
5019    }
5020}
5021
5022impl wkt::message::Message for PlaceholderSubstitutionRule {
5023    fn typename() -> &'static str {
5024        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule"
5025    }
5026}
5027
5028/// A rule in the cloud control.
5029#[derive(Clone, Default, PartialEq)]
5030#[non_exhaustive]
5031pub struct Rule {
5032    /// Optional. The rule description. The maximum length is 2000 characters.
5033    pub description: std::string::String,
5034
5035    /// Required. The functionality that's enabled by the rule.
5036    pub rule_action_types: std::vec::Vec<crate::model::RuleActionType>,
5037
5038    /// The rule implementation.
5039    pub implementation: std::option::Option<crate::model::rule::Implementation>,
5040
5041    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5042}
5043
5044impl Rule {
5045    /// Creates a new default instance.
5046    pub fn new() -> Self {
5047        std::default::Default::default()
5048    }
5049
5050    /// Sets the value of [description][crate::model::Rule::description].
5051    ///
5052    /// # Example
5053    /// ```ignore,no_run
5054    /// # use google_cloud_cloudsecuritycompliance_v1::model::Rule;
5055    /// let x = Rule::new().set_description("example");
5056    /// ```
5057    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5058        self.description = v.into();
5059        self
5060    }
5061
5062    /// Sets the value of [rule_action_types][crate::model::Rule::rule_action_types].
5063    ///
5064    /// # Example
5065    /// ```ignore,no_run
5066    /// # use google_cloud_cloudsecuritycompliance_v1::model::Rule;
5067    /// use google_cloud_cloudsecuritycompliance_v1::model::RuleActionType;
5068    /// let x = Rule::new().set_rule_action_types([
5069    ///     RuleActionType::Preventive,
5070    ///     RuleActionType::Detective,
5071    ///     RuleActionType::Audit,
5072    /// ]);
5073    /// ```
5074    pub fn set_rule_action_types<T, V>(mut self, v: T) -> Self
5075    where
5076        T: std::iter::IntoIterator<Item = V>,
5077        V: std::convert::Into<crate::model::RuleActionType>,
5078    {
5079        use std::iter::Iterator;
5080        self.rule_action_types = v.into_iter().map(|i| i.into()).collect();
5081        self
5082    }
5083
5084    /// Sets the value of [implementation][crate::model::Rule::implementation].
5085    ///
5086    /// Note that all the setters affecting `implementation` are mutually
5087    /// exclusive.
5088    ///
5089    /// # Example
5090    /// ```ignore,no_run
5091    /// # use google_cloud_cloudsecuritycompliance_v1::model::Rule;
5092    /// use google_cloud_cloudsecuritycompliance_v1::model::CELExpression;
5093    /// let x = Rule::new().set_implementation(Some(
5094    ///     google_cloud_cloudsecuritycompliance_v1::model::rule::Implementation::CelExpression(CELExpression::default().into())));
5095    /// ```
5096    pub fn set_implementation<
5097        T: std::convert::Into<std::option::Option<crate::model::rule::Implementation>>,
5098    >(
5099        mut self,
5100        v: T,
5101    ) -> Self {
5102        self.implementation = v.into();
5103        self
5104    }
5105
5106    /// The value of [implementation][crate::model::Rule::implementation]
5107    /// if it holds a `CelExpression`, `None` if the field is not set or
5108    /// holds a different branch.
5109    pub fn cel_expression(
5110        &self,
5111    ) -> std::option::Option<&std::boxed::Box<crate::model::CELExpression>> {
5112        #[allow(unreachable_patterns)]
5113        self.implementation.as_ref().and_then(|v| match v {
5114            crate::model::rule::Implementation::CelExpression(v) => std::option::Option::Some(v),
5115            _ => std::option::Option::None,
5116        })
5117    }
5118
5119    /// Sets the value of [implementation][crate::model::Rule::implementation]
5120    /// to hold a `CelExpression`.
5121    ///
5122    /// Note that all the setters affecting `implementation` are
5123    /// mutually exclusive.
5124    ///
5125    /// # Example
5126    /// ```ignore,no_run
5127    /// # use google_cloud_cloudsecuritycompliance_v1::model::Rule;
5128    /// use google_cloud_cloudsecuritycompliance_v1::model::CELExpression;
5129    /// let x = Rule::new().set_cel_expression(CELExpression::default()/* use setters */);
5130    /// assert!(x.cel_expression().is_some());
5131    /// ```
5132    pub fn set_cel_expression<
5133        T: std::convert::Into<std::boxed::Box<crate::model::CELExpression>>,
5134    >(
5135        mut self,
5136        v: T,
5137    ) -> Self {
5138        self.implementation =
5139            std::option::Option::Some(crate::model::rule::Implementation::CelExpression(v.into()));
5140        self
5141    }
5142}
5143
5144impl wkt::message::Message for Rule {
5145    fn typename() -> &'static str {
5146        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.Rule"
5147    }
5148}
5149
5150/// Defines additional types related to [Rule].
5151pub mod rule {
5152    #[allow(unused_imports)]
5153    use super::*;
5154
5155    /// The rule implementation.
5156    #[derive(Clone, Debug, PartialEq)]
5157    #[non_exhaustive]
5158    pub enum Implementation {
5159        /// The rule's logic expression in Common Expression Language (CEL).
5160        CelExpression(std::boxed::Box<crate::model::CELExpression>),
5161    }
5162}
5163
5164/// A Common Expression Language (CEL) expression that's used to create a rule.
5165#[derive(Clone, Default, PartialEq)]
5166#[non_exhaustive]
5167pub struct CELExpression {
5168    /// Required. The logical expression in CEL. The maximum length of the
5169    /// condition is 1000 characters. For more information, see [CEL
5170    /// expression](https://cloud.google.com/security-command-center/docs/compliance-manager-write-cel-expressions).
5171    pub expression: std::string::String,
5172
5173    /// The criteria of the CEL expression.
5174    pub criteria: std::option::Option<crate::model::cel_expression::Criteria>,
5175
5176    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5177}
5178
5179impl CELExpression {
5180    /// Creates a new default instance.
5181    pub fn new() -> Self {
5182        std::default::Default::default()
5183    }
5184
5185    /// Sets the value of [expression][crate::model::CELExpression::expression].
5186    ///
5187    /// # Example
5188    /// ```ignore,no_run
5189    /// # use google_cloud_cloudsecuritycompliance_v1::model::CELExpression;
5190    /// let x = CELExpression::new().set_expression("example");
5191    /// ```
5192    pub fn set_expression<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5193        self.expression = v.into();
5194        self
5195    }
5196
5197    /// Sets the value of [criteria][crate::model::CELExpression::criteria].
5198    ///
5199    /// Note that all the setters affecting `criteria` are mutually
5200    /// exclusive.
5201    ///
5202    /// # Example
5203    /// ```ignore,no_run
5204    /// # use google_cloud_cloudsecuritycompliance_v1::model::CELExpression;
5205    /// use google_cloud_cloudsecuritycompliance_v1::model::StringList;
5206    /// let x = CELExpression::new().set_criteria(Some(
5207    ///     google_cloud_cloudsecuritycompliance_v1::model::cel_expression::Criteria::ResourceTypesValues(StringList::default().into())));
5208    /// ```
5209    pub fn set_criteria<
5210        T: std::convert::Into<std::option::Option<crate::model::cel_expression::Criteria>>,
5211    >(
5212        mut self,
5213        v: T,
5214    ) -> Self {
5215        self.criteria = v.into();
5216        self
5217    }
5218
5219    /// The value of [criteria][crate::model::CELExpression::criteria]
5220    /// if it holds a `ResourceTypesValues`, `None` if the field is not set or
5221    /// holds a different branch.
5222    pub fn resource_types_values(
5223        &self,
5224    ) -> std::option::Option<&std::boxed::Box<crate::model::StringList>> {
5225        #[allow(unreachable_patterns)]
5226        self.criteria.as_ref().and_then(|v| match v {
5227            crate::model::cel_expression::Criteria::ResourceTypesValues(v) => {
5228                std::option::Option::Some(v)
5229            }
5230            _ => std::option::Option::None,
5231        })
5232    }
5233
5234    /// Sets the value of [criteria][crate::model::CELExpression::criteria]
5235    /// to hold a `ResourceTypesValues`.
5236    ///
5237    /// Note that all the setters affecting `criteria` are
5238    /// mutually exclusive.
5239    ///
5240    /// # Example
5241    /// ```ignore,no_run
5242    /// # use google_cloud_cloudsecuritycompliance_v1::model::CELExpression;
5243    /// use google_cloud_cloudsecuritycompliance_v1::model::StringList;
5244    /// let x = CELExpression::new().set_resource_types_values(StringList::default()/* use setters */);
5245    /// assert!(x.resource_types_values().is_some());
5246    /// ```
5247    pub fn set_resource_types_values<
5248        T: std::convert::Into<std::boxed::Box<crate::model::StringList>>,
5249    >(
5250        mut self,
5251        v: T,
5252    ) -> Self {
5253        self.criteria = std::option::Option::Some(
5254            crate::model::cel_expression::Criteria::ResourceTypesValues(v.into()),
5255        );
5256        self
5257    }
5258}
5259
5260impl wkt::message::Message for CELExpression {
5261    fn typename() -> &'static str {
5262        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CELExpression"
5263    }
5264}
5265
5266/// Defines additional types related to [CELExpression].
5267pub mod cel_expression {
5268    #[allow(unused_imports)]
5269    use super::*;
5270
5271    /// The criteria of the CEL expression.
5272    #[derive(Clone, Debug, PartialEq)]
5273    #[non_exhaustive]
5274    pub enum Criteria {
5275        /// The resource instance types on which this expression is defined.
5276        /// The format is `<SERVICE_NAME>/<type>`.
5277        /// For example: `compute.googleapis.com/Instance`
5278        ResourceTypesValues(std::boxed::Box<crate::model::StringList>),
5279    }
5280}
5281
5282/// The metadata for the long-running operation.
5283#[derive(Clone, Default, PartialEq)]
5284#[non_exhaustive]
5285pub struct OperationMetadata {
5286    /// Output only. The time the operation was created.
5287    pub create_time: std::option::Option<wkt::Timestamp>,
5288
5289    /// Output only. The time the operation finished running.
5290    pub end_time: std::option::Option<wkt::Timestamp>,
5291
5292    /// Output only. The server-defined resource path for the target of the
5293    /// operation.
5294    pub target: std::string::String,
5295
5296    /// Output only. The name of the verb that was executed by the operation.
5297    pub verb: std::string::String,
5298
5299    /// Output only. The human-readable status of the operation, if any.
5300    pub status_message: std::string::String,
5301
5302    /// Output only. Identifies whether the user has requested that the operation
5303    /// be cancelled. If an operation was cancelled successfully, then the field
5304    /// [google.longrunning.Operation.error][google.longrunning.Operation.error]
5305    /// contains the value [google.rpc.Code.CANCELLED][google.rpc.Code.CANCELLED].
5306    ///
5307    /// [google.longrunning.Operation.error]: google_cloud_longrunning::model::Operation::result
5308    pub requested_cancellation: bool,
5309
5310    /// Output only. The API version that was used to start the operation.
5311    pub api_version: std::string::String,
5312
5313    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5314}
5315
5316impl OperationMetadata {
5317    /// Creates a new default instance.
5318    pub fn new() -> Self {
5319        std::default::Default::default()
5320    }
5321
5322    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
5323    ///
5324    /// # Example
5325    /// ```ignore,no_run
5326    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5327    /// use wkt::Timestamp;
5328    /// let x = OperationMetadata::new().set_create_time(Timestamp::default()/* use setters */);
5329    /// ```
5330    pub fn set_create_time<T>(mut self, v: T) -> Self
5331    where
5332        T: std::convert::Into<wkt::Timestamp>,
5333    {
5334        self.create_time = std::option::Option::Some(v.into());
5335        self
5336    }
5337
5338    /// Sets or clears the value of [create_time][crate::model::OperationMetadata::create_time].
5339    ///
5340    /// # Example
5341    /// ```ignore,no_run
5342    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5343    /// use wkt::Timestamp;
5344    /// let x = OperationMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
5345    /// let x = OperationMetadata::new().set_or_clear_create_time(None::<Timestamp>);
5346    /// ```
5347    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5348    where
5349        T: std::convert::Into<wkt::Timestamp>,
5350    {
5351        self.create_time = v.map(|x| x.into());
5352        self
5353    }
5354
5355    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
5356    ///
5357    /// # Example
5358    /// ```ignore,no_run
5359    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5360    /// use wkt::Timestamp;
5361    /// let x = OperationMetadata::new().set_end_time(Timestamp::default()/* use setters */);
5362    /// ```
5363    pub fn set_end_time<T>(mut self, v: T) -> Self
5364    where
5365        T: std::convert::Into<wkt::Timestamp>,
5366    {
5367        self.end_time = std::option::Option::Some(v.into());
5368        self
5369    }
5370
5371    /// Sets or clears the value of [end_time][crate::model::OperationMetadata::end_time].
5372    ///
5373    /// # Example
5374    /// ```ignore,no_run
5375    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5376    /// use wkt::Timestamp;
5377    /// let x = OperationMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
5378    /// let x = OperationMetadata::new().set_or_clear_end_time(None::<Timestamp>);
5379    /// ```
5380    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
5381    where
5382        T: std::convert::Into<wkt::Timestamp>,
5383    {
5384        self.end_time = v.map(|x| x.into());
5385        self
5386    }
5387
5388    /// Sets the value of [target][crate::model::OperationMetadata::target].
5389    ///
5390    /// # Example
5391    /// ```ignore,no_run
5392    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5393    /// let x = OperationMetadata::new().set_target("example");
5394    /// ```
5395    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5396        self.target = v.into();
5397        self
5398    }
5399
5400    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
5401    ///
5402    /// # Example
5403    /// ```ignore,no_run
5404    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5405    /// let x = OperationMetadata::new().set_verb("example");
5406    /// ```
5407    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5408        self.verb = v.into();
5409        self
5410    }
5411
5412    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
5413    ///
5414    /// # Example
5415    /// ```ignore,no_run
5416    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5417    /// let x = OperationMetadata::new().set_status_message("example");
5418    /// ```
5419    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5420        self.status_message = v.into();
5421        self
5422    }
5423
5424    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
5425    ///
5426    /// # Example
5427    /// ```ignore,no_run
5428    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5429    /// let x = OperationMetadata::new().set_requested_cancellation(true);
5430    /// ```
5431    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5432        self.requested_cancellation = v.into();
5433        self
5434    }
5435
5436    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
5437    ///
5438    /// # Example
5439    /// ```ignore,no_run
5440    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5441    /// let x = OperationMetadata::new().set_api_version("example");
5442    /// ```
5443    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5444        self.api_version = v.into();
5445        self
5446    }
5447}
5448
5449impl wkt::message::Message for OperationMetadata {
5450    fn typename() -> &'static str {
5451        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.OperationMetadata"
5452    }
5453}
5454
5455/// The regulatory control.
5456#[derive(Clone, Default, PartialEq)]
5457#[non_exhaustive]
5458pub struct Control {
5459    /// Output only. The name of a regulatory control, in one of the following
5460    /// formats:
5461    ///
5462    /// - `organizations/{organization}/locations/{location}/controls/{control}`
5463    /// - `projects/{project}/locations/{location}/controls/{control}`.
5464    ///
5465    /// The only supported location is `global`.
5466    pub name: std::string::String,
5467
5468    /// Output only. The friendly name for the regulatory control.
5469    pub display_name: std::string::String,
5470
5471    /// Output only. The description of the regulatory control.
5472    pub description: std::string::String,
5473
5474    /// Output only. The regulatory group that the control belongs to.
5475    pub family: crate::model::control::Family,
5476
5477    /// Output only. The regulatory family that the control belongs to.
5478    pub control_family: std::option::Option<crate::model::ControlFamily>,
5479
5480    /// Output only. The entity that's responsible for the control, whether Google,
5481    /// you as the customer, or both.
5482    pub responsibility_type: crate::model::RegulatoryControlResponsibilityType,
5483
5484    /// Output only. A description of Google's responsibility for the regulatory
5485    /// control.
5486    pub google_responsibility_description: std::string::String,
5487
5488    /// Output only. A description of Google's responsibility for implementing the
5489    /// regulatory control.
5490    pub google_responsibility_implementation: std::string::String,
5491
5492    /// Output only. A description of your responsibility for the regulatory
5493    /// control.
5494    pub customer_responsibility_description: std::string::String,
5495
5496    /// Output only. A description of the your responsibility for implementing the
5497    /// regulatory control.
5498    pub customer_responsibility_implementation: std::string::String,
5499
5500    /// Output only. A description of the responsibility that's shared between
5501    /// Google and you in implementing this control.
5502    pub shared_responsibility_description: std::string::String,
5503
5504    /// Output only. A link to the documentation that's related to this control.
5505    pub additional_content_uri: std::string::String,
5506
5507    /// Output only. The frameworks that include this control.
5508    pub related_frameworks: std::vec::Vec<std::string::String>,
5509
5510    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5511}
5512
5513impl Control {
5514    /// Creates a new default instance.
5515    pub fn new() -> Self {
5516        std::default::Default::default()
5517    }
5518
5519    /// Sets the value of [name][crate::model::Control::name].
5520    ///
5521    /// # Example
5522    /// ```ignore,no_run
5523    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5524    /// # let organization_id = "organization_id";
5525    /// # let location_id = "location_id";
5526    /// # let control_id = "control_id";
5527    /// let x = Control::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/controls/{control_id}"));
5528    /// ```
5529    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5530        self.name = v.into();
5531        self
5532    }
5533
5534    /// Sets the value of [display_name][crate::model::Control::display_name].
5535    ///
5536    /// # Example
5537    /// ```ignore,no_run
5538    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5539    /// let x = Control::new().set_display_name("example");
5540    /// ```
5541    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5542        self.display_name = v.into();
5543        self
5544    }
5545
5546    /// Sets the value of [description][crate::model::Control::description].
5547    ///
5548    /// # Example
5549    /// ```ignore,no_run
5550    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5551    /// let x = Control::new().set_description("example");
5552    /// ```
5553    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5554        self.description = v.into();
5555        self
5556    }
5557
5558    /// Sets the value of [family][crate::model::Control::family].
5559    ///
5560    /// # Example
5561    /// ```ignore,no_run
5562    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5563    /// use google_cloud_cloudsecuritycompliance_v1::model::control::Family;
5564    /// let x0 = Control::new().set_family(Family::Ac);
5565    /// let x1 = Control::new().set_family(Family::At);
5566    /// let x2 = Control::new().set_family(Family::Au);
5567    /// ```
5568    pub fn set_family<T: std::convert::Into<crate::model::control::Family>>(
5569        mut self,
5570        v: T,
5571    ) -> Self {
5572        self.family = v.into();
5573        self
5574    }
5575
5576    /// Sets the value of [control_family][crate::model::Control::control_family].
5577    ///
5578    /// # Example
5579    /// ```ignore,no_run
5580    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5581    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlFamily;
5582    /// let x = Control::new().set_control_family(ControlFamily::default()/* use setters */);
5583    /// ```
5584    pub fn set_control_family<T>(mut self, v: T) -> Self
5585    where
5586        T: std::convert::Into<crate::model::ControlFamily>,
5587    {
5588        self.control_family = std::option::Option::Some(v.into());
5589        self
5590    }
5591
5592    /// Sets or clears the value of [control_family][crate::model::Control::control_family].
5593    ///
5594    /// # Example
5595    /// ```ignore,no_run
5596    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5597    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlFamily;
5598    /// let x = Control::new().set_or_clear_control_family(Some(ControlFamily::default()/* use setters */));
5599    /// let x = Control::new().set_or_clear_control_family(None::<ControlFamily>);
5600    /// ```
5601    pub fn set_or_clear_control_family<T>(mut self, v: std::option::Option<T>) -> Self
5602    where
5603        T: std::convert::Into<crate::model::ControlFamily>,
5604    {
5605        self.control_family = v.map(|x| x.into());
5606        self
5607    }
5608
5609    /// Sets the value of [responsibility_type][crate::model::Control::responsibility_type].
5610    ///
5611    /// # Example
5612    /// ```ignore,no_run
5613    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5614    /// use google_cloud_cloudsecuritycompliance_v1::model::RegulatoryControlResponsibilityType;
5615    /// let x0 = Control::new().set_responsibility_type(RegulatoryControlResponsibilityType::Google);
5616    /// let x1 = Control::new().set_responsibility_type(RegulatoryControlResponsibilityType::Customer);
5617    /// let x2 = Control::new().set_responsibility_type(RegulatoryControlResponsibilityType::Shared);
5618    /// ```
5619    pub fn set_responsibility_type<
5620        T: std::convert::Into<crate::model::RegulatoryControlResponsibilityType>,
5621    >(
5622        mut self,
5623        v: T,
5624    ) -> Self {
5625        self.responsibility_type = v.into();
5626        self
5627    }
5628
5629    /// Sets the value of [google_responsibility_description][crate::model::Control::google_responsibility_description].
5630    ///
5631    /// # Example
5632    /// ```ignore,no_run
5633    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5634    /// let x = Control::new().set_google_responsibility_description("example");
5635    /// ```
5636    pub fn set_google_responsibility_description<T: std::convert::Into<std::string::String>>(
5637        mut self,
5638        v: T,
5639    ) -> Self {
5640        self.google_responsibility_description = v.into();
5641        self
5642    }
5643
5644    /// Sets the value of [google_responsibility_implementation][crate::model::Control::google_responsibility_implementation].
5645    ///
5646    /// # Example
5647    /// ```ignore,no_run
5648    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5649    /// let x = Control::new().set_google_responsibility_implementation("example");
5650    /// ```
5651    pub fn set_google_responsibility_implementation<T: std::convert::Into<std::string::String>>(
5652        mut self,
5653        v: T,
5654    ) -> Self {
5655        self.google_responsibility_implementation = v.into();
5656        self
5657    }
5658
5659    /// Sets the value of [customer_responsibility_description][crate::model::Control::customer_responsibility_description].
5660    ///
5661    /// # Example
5662    /// ```ignore,no_run
5663    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5664    /// let x = Control::new().set_customer_responsibility_description("example");
5665    /// ```
5666    pub fn set_customer_responsibility_description<T: std::convert::Into<std::string::String>>(
5667        mut self,
5668        v: T,
5669    ) -> Self {
5670        self.customer_responsibility_description = v.into();
5671        self
5672    }
5673
5674    /// Sets the value of [customer_responsibility_implementation][crate::model::Control::customer_responsibility_implementation].
5675    ///
5676    /// # Example
5677    /// ```ignore,no_run
5678    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5679    /// let x = Control::new().set_customer_responsibility_implementation("example");
5680    /// ```
5681    pub fn set_customer_responsibility_implementation<
5682        T: std::convert::Into<std::string::String>,
5683    >(
5684        mut self,
5685        v: T,
5686    ) -> Self {
5687        self.customer_responsibility_implementation = v.into();
5688        self
5689    }
5690
5691    /// Sets the value of [shared_responsibility_description][crate::model::Control::shared_responsibility_description].
5692    ///
5693    /// # Example
5694    /// ```ignore,no_run
5695    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5696    /// let x = Control::new().set_shared_responsibility_description("example");
5697    /// ```
5698    pub fn set_shared_responsibility_description<T: std::convert::Into<std::string::String>>(
5699        mut self,
5700        v: T,
5701    ) -> Self {
5702        self.shared_responsibility_description = v.into();
5703        self
5704    }
5705
5706    /// Sets the value of [additional_content_uri][crate::model::Control::additional_content_uri].
5707    ///
5708    /// # Example
5709    /// ```ignore,no_run
5710    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5711    /// let x = Control::new().set_additional_content_uri("example");
5712    /// ```
5713    pub fn set_additional_content_uri<T: std::convert::Into<std::string::String>>(
5714        mut self,
5715        v: T,
5716    ) -> Self {
5717        self.additional_content_uri = v.into();
5718        self
5719    }
5720
5721    /// Sets the value of [related_frameworks][crate::model::Control::related_frameworks].
5722    ///
5723    /// # Example
5724    /// ```ignore,no_run
5725    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5726    /// let x = Control::new().set_related_frameworks(["a", "b", "c"]);
5727    /// ```
5728    pub fn set_related_frameworks<T, V>(mut self, v: T) -> Self
5729    where
5730        T: std::iter::IntoIterator<Item = V>,
5731        V: std::convert::Into<std::string::String>,
5732    {
5733        use std::iter::Iterator;
5734        self.related_frameworks = v.into_iter().map(|i| i.into()).collect();
5735        self
5736    }
5737}
5738
5739impl wkt::message::Message for Control {
5740    fn typename() -> &'static str {
5741        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.Control"
5742    }
5743}
5744
5745/// Defines additional types related to [Control].
5746pub mod control {
5747    #[allow(unused_imports)]
5748    use super::*;
5749
5750    /// The regulatory control family.
5751    ///
5752    /// # Working with unknown values
5753    ///
5754    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5755    /// additional enum variants at any time. Adding new variants is not considered
5756    /// a breaking change. Applications should write their code in anticipation of:
5757    ///
5758    /// - New values appearing in future releases of the client library, **and**
5759    /// - New values received dynamically, without application changes.
5760    ///
5761    /// Please consult the [Working with enums] section in the user guide for some
5762    /// guidelines.
5763    ///
5764    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
5765    #[derive(Clone, Debug, PartialEq)]
5766    #[non_exhaustive]
5767    pub enum Family {
5768        /// Default value. This value is unused.
5769        Unspecified,
5770        /// Access control
5771        Ac,
5772        /// Awareness and araining
5773        At,
5774        /// Audit and accountability
5775        Au,
5776        /// Certification, accreditation, and security assessments
5777        Ca,
5778        /// Configuration management
5779        Cm,
5780        /// Contingency planning
5781        Cp,
5782        /// Identification and authentication
5783        Ia,
5784        /// Incident response
5785        Ir,
5786        /// Maintenance
5787        Ma,
5788        /// Media protection
5789        Mp,
5790        /// Physical and environmental protection
5791        Pe,
5792        /// Security planning
5793        Pl,
5794        /// Personnel aecurity
5795        Ps,
5796        /// Risk assessment
5797        Ra,
5798        /// System services and acquisition
5799        Sa,
5800        /// System and communications protection
5801        Sc,
5802        /// System and information integrity
5803        Si,
5804        /// Supply chain risk management
5805        Sr,
5806        /// If set, the enum was initialized with an unknown value.
5807        ///
5808        /// Applications can examine the value using [Family::value] or
5809        /// [Family::name].
5810        UnknownValue(family::UnknownValue),
5811    }
5812
5813    #[doc(hidden)]
5814    pub mod family {
5815        #[allow(unused_imports)]
5816        use super::*;
5817        #[derive(Clone, Debug, PartialEq)]
5818        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5819    }
5820
5821    impl Family {
5822        /// Gets the enum value.
5823        ///
5824        /// Returns `None` if the enum contains an unknown value deserialized from
5825        /// the string representation of enums.
5826        pub fn value(&self) -> std::option::Option<i32> {
5827            match self {
5828                Self::Unspecified => std::option::Option::Some(0),
5829                Self::Ac => std::option::Option::Some(1),
5830                Self::At => std::option::Option::Some(2),
5831                Self::Au => std::option::Option::Some(3),
5832                Self::Ca => std::option::Option::Some(4),
5833                Self::Cm => std::option::Option::Some(5),
5834                Self::Cp => std::option::Option::Some(6),
5835                Self::Ia => std::option::Option::Some(7),
5836                Self::Ir => std::option::Option::Some(8),
5837                Self::Ma => std::option::Option::Some(9),
5838                Self::Mp => std::option::Option::Some(10),
5839                Self::Pe => std::option::Option::Some(11),
5840                Self::Pl => std::option::Option::Some(12),
5841                Self::Ps => std::option::Option::Some(13),
5842                Self::Ra => std::option::Option::Some(14),
5843                Self::Sa => std::option::Option::Some(15),
5844                Self::Sc => std::option::Option::Some(16),
5845                Self::Si => std::option::Option::Some(17),
5846                Self::Sr => std::option::Option::Some(18),
5847                Self::UnknownValue(u) => u.0.value(),
5848            }
5849        }
5850
5851        /// Gets the enum value as a string.
5852        ///
5853        /// Returns `None` if the enum contains an unknown value deserialized from
5854        /// the integer representation of enums.
5855        pub fn name(&self) -> std::option::Option<&str> {
5856            match self {
5857                Self::Unspecified => std::option::Option::Some("FAMILY_UNSPECIFIED"),
5858                Self::Ac => std::option::Option::Some("AC"),
5859                Self::At => std::option::Option::Some("AT"),
5860                Self::Au => std::option::Option::Some("AU"),
5861                Self::Ca => std::option::Option::Some("CA"),
5862                Self::Cm => std::option::Option::Some("CM"),
5863                Self::Cp => std::option::Option::Some("CP"),
5864                Self::Ia => std::option::Option::Some("IA"),
5865                Self::Ir => std::option::Option::Some("IR"),
5866                Self::Ma => std::option::Option::Some("MA"),
5867                Self::Mp => std::option::Option::Some("MP"),
5868                Self::Pe => std::option::Option::Some("PE"),
5869                Self::Pl => std::option::Option::Some("PL"),
5870                Self::Ps => std::option::Option::Some("PS"),
5871                Self::Ra => std::option::Option::Some("RA"),
5872                Self::Sa => std::option::Option::Some("SA"),
5873                Self::Sc => std::option::Option::Some("SC"),
5874                Self::Si => std::option::Option::Some("SI"),
5875                Self::Sr => std::option::Option::Some("SR"),
5876                Self::UnknownValue(u) => u.0.name(),
5877            }
5878        }
5879    }
5880
5881    impl std::default::Default for Family {
5882        fn default() -> Self {
5883            use std::convert::From;
5884            Self::from(0)
5885        }
5886    }
5887
5888    impl std::fmt::Display for Family {
5889        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5890            wkt::internal::display_enum(f, self.name(), self.value())
5891        }
5892    }
5893
5894    impl std::convert::From<i32> for Family {
5895        fn from(value: i32) -> Self {
5896            match value {
5897                0 => Self::Unspecified,
5898                1 => Self::Ac,
5899                2 => Self::At,
5900                3 => Self::Au,
5901                4 => Self::Ca,
5902                5 => Self::Cm,
5903                6 => Self::Cp,
5904                7 => Self::Ia,
5905                8 => Self::Ir,
5906                9 => Self::Ma,
5907                10 => Self::Mp,
5908                11 => Self::Pe,
5909                12 => Self::Pl,
5910                13 => Self::Ps,
5911                14 => Self::Ra,
5912                15 => Self::Sa,
5913                16 => Self::Sc,
5914                17 => Self::Si,
5915                18 => Self::Sr,
5916                _ => Self::UnknownValue(family::UnknownValue(
5917                    wkt::internal::UnknownEnumValue::Integer(value),
5918                )),
5919            }
5920        }
5921    }
5922
5923    impl std::convert::From<&str> for Family {
5924        fn from(value: &str) -> Self {
5925            use std::string::ToString;
5926            match value {
5927                "FAMILY_UNSPECIFIED" => Self::Unspecified,
5928                "AC" => Self::Ac,
5929                "AT" => Self::At,
5930                "AU" => Self::Au,
5931                "CA" => Self::Ca,
5932                "CM" => Self::Cm,
5933                "CP" => Self::Cp,
5934                "IA" => Self::Ia,
5935                "IR" => Self::Ir,
5936                "MA" => Self::Ma,
5937                "MP" => Self::Mp,
5938                "PE" => Self::Pe,
5939                "PL" => Self::Pl,
5940                "PS" => Self::Ps,
5941                "RA" => Self::Ra,
5942                "SA" => Self::Sa,
5943                "SC" => Self::Sc,
5944                "SI" => Self::Si,
5945                "SR" => Self::Sr,
5946                _ => Self::UnknownValue(family::UnknownValue(
5947                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5948                )),
5949            }
5950        }
5951    }
5952
5953    impl serde::ser::Serialize for Family {
5954        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5955        where
5956            S: serde::Serializer,
5957        {
5958            match self {
5959                Self::Unspecified => serializer.serialize_i32(0),
5960                Self::Ac => serializer.serialize_i32(1),
5961                Self::At => serializer.serialize_i32(2),
5962                Self::Au => serializer.serialize_i32(3),
5963                Self::Ca => serializer.serialize_i32(4),
5964                Self::Cm => serializer.serialize_i32(5),
5965                Self::Cp => serializer.serialize_i32(6),
5966                Self::Ia => serializer.serialize_i32(7),
5967                Self::Ir => serializer.serialize_i32(8),
5968                Self::Ma => serializer.serialize_i32(9),
5969                Self::Mp => serializer.serialize_i32(10),
5970                Self::Pe => serializer.serialize_i32(11),
5971                Self::Pl => serializer.serialize_i32(12),
5972                Self::Ps => serializer.serialize_i32(13),
5973                Self::Ra => serializer.serialize_i32(14),
5974                Self::Sa => serializer.serialize_i32(15),
5975                Self::Sc => serializer.serialize_i32(16),
5976                Self::Si => serializer.serialize_i32(17),
5977                Self::Sr => serializer.serialize_i32(18),
5978                Self::UnknownValue(u) => u.0.serialize(serializer),
5979            }
5980        }
5981    }
5982
5983    impl<'de> serde::de::Deserialize<'de> for Family {
5984        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5985        where
5986            D: serde::Deserializer<'de>,
5987        {
5988            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Family>::new(
5989                ".google.cloud.cloudsecuritycompliance.v1.Control.Family",
5990            ))
5991        }
5992    }
5993}
5994
5995/// The regulatory family of the control.
5996#[derive(Clone, Default, PartialEq)]
5997#[non_exhaustive]
5998pub struct ControlFamily {
5999    /// The identifier for the regulatory control family.
6000    pub family_id: std::string::String,
6001
6002    /// The friendly name for the regulatory control family.
6003    pub display_name: std::string::String,
6004
6005    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6006}
6007
6008impl ControlFamily {
6009    /// Creates a new default instance.
6010    pub fn new() -> Self {
6011        std::default::Default::default()
6012    }
6013
6014    /// Sets the value of [family_id][crate::model::ControlFamily::family_id].
6015    ///
6016    /// # Example
6017    /// ```ignore,no_run
6018    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlFamily;
6019    /// let x = ControlFamily::new().set_family_id("example");
6020    /// ```
6021    pub fn set_family_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6022        self.family_id = v.into();
6023        self
6024    }
6025
6026    /// Sets the value of [display_name][crate::model::ControlFamily::display_name].
6027    ///
6028    /// # Example
6029    /// ```ignore,no_run
6030    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlFamily;
6031    /// let x = ControlFamily::new().set_display_name("example");
6032    /// ```
6033    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6034        self.display_name = v.into();
6035        self
6036    }
6037}
6038
6039impl wkt::message::Message for ControlFamily {
6040    fn typename() -> &'static str {
6041        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ControlFamily"
6042    }
6043}
6044
6045/// Request message for [ListFrameworks][].
6046#[derive(Clone, Default, PartialEq)]
6047#[non_exhaustive]
6048pub struct ListFrameworksRequest {
6049    /// Required. The parent resource name, in one of the following formats:
6050    ///
6051    /// - `organizations/{organization}/locations/{location}`
6052    /// - `projects/{project}/locations/{location}`.
6053    ///
6054    /// The only supported location is `global`.
6055    pub parent: std::string::String,
6056
6057    /// Optional. The maximum number of frameworks to return. The default value is
6058    /// `500`.
6059    ///
6060    /// If you exceed the maximum value of `1000`, then the service uses the
6061    /// maximum value.
6062    pub page_size: i32,
6063
6064    /// Optional. A pagination token returned from a previous request to list
6065    /// frameworks. Provide this token to retrieve the next page of results.
6066    pub page_token: std::string::String,
6067
6068    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6069}
6070
6071impl ListFrameworksRequest {
6072    /// Creates a new default instance.
6073    pub fn new() -> Self {
6074        std::default::Default::default()
6075    }
6076
6077    /// Sets the value of [parent][crate::model::ListFrameworksRequest::parent].
6078    ///
6079    /// # Example
6080    /// ```ignore,no_run
6081    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworksRequest;
6082    /// # let organization_id = "organization_id";
6083    /// # let location_id = "location_id";
6084    /// let x = ListFrameworksRequest::new().set_parent(format!("organizations/{organization_id}/locations/{location_id}"));
6085    /// ```
6086    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6087        self.parent = v.into();
6088        self
6089    }
6090
6091    /// Sets the value of [page_size][crate::model::ListFrameworksRequest::page_size].
6092    ///
6093    /// # Example
6094    /// ```ignore,no_run
6095    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworksRequest;
6096    /// let x = ListFrameworksRequest::new().set_page_size(42);
6097    /// ```
6098    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6099        self.page_size = v.into();
6100        self
6101    }
6102
6103    /// Sets the value of [page_token][crate::model::ListFrameworksRequest::page_token].
6104    ///
6105    /// # Example
6106    /// ```ignore,no_run
6107    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworksRequest;
6108    /// let x = ListFrameworksRequest::new().set_page_token("example");
6109    /// ```
6110    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6111        self.page_token = v.into();
6112        self
6113    }
6114}
6115
6116impl wkt::message::Message for ListFrameworksRequest {
6117    fn typename() -> &'static str {
6118        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest"
6119    }
6120}
6121
6122/// The response message for [ListFrameworks][].
6123/// Returns a paginated list of Framework resources.
6124#[derive(Clone, Default, PartialEq)]
6125#[non_exhaustive]
6126pub struct ListFrameworksResponse {
6127    /// The list of framework resources.
6128    pub frameworks: std::vec::Vec<crate::model::Framework>,
6129
6130    /// A pagination token. To retrieve the next page of results, call the method
6131    /// again with this token.
6132    pub next_page_token: std::string::String,
6133
6134    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6135}
6136
6137impl ListFrameworksResponse {
6138    /// Creates a new default instance.
6139    pub fn new() -> Self {
6140        std::default::Default::default()
6141    }
6142
6143    /// Sets the value of [frameworks][crate::model::ListFrameworksResponse::frameworks].
6144    ///
6145    /// # Example
6146    /// ```ignore,no_run
6147    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworksResponse;
6148    /// use google_cloud_cloudsecuritycompliance_v1::model::Framework;
6149    /// let x = ListFrameworksResponse::new()
6150    ///     .set_frameworks([
6151    ///         Framework::default()/* use setters */,
6152    ///         Framework::default()/* use (different) setters */,
6153    ///     ]);
6154    /// ```
6155    pub fn set_frameworks<T, V>(mut self, v: T) -> Self
6156    where
6157        T: std::iter::IntoIterator<Item = V>,
6158        V: std::convert::Into<crate::model::Framework>,
6159    {
6160        use std::iter::Iterator;
6161        self.frameworks = v.into_iter().map(|i| i.into()).collect();
6162        self
6163    }
6164
6165    /// Sets the value of [next_page_token][crate::model::ListFrameworksResponse::next_page_token].
6166    ///
6167    /// # Example
6168    /// ```ignore,no_run
6169    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworksResponse;
6170    /// let x = ListFrameworksResponse::new().set_next_page_token("example");
6171    /// ```
6172    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6173        self.next_page_token = v.into();
6174        self
6175    }
6176}
6177
6178impl wkt::message::Message for ListFrameworksResponse {
6179    fn typename() -> &'static str {
6180        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse"
6181    }
6182}
6183
6184#[doc(hidden)]
6185impl google_cloud_gax::paginator::internal::PageableResponse for ListFrameworksResponse {
6186    type PageItem = crate::model::Framework;
6187
6188    fn items(self) -> std::vec::Vec<Self::PageItem> {
6189        self.frameworks
6190    }
6191
6192    fn next_page_token(&self) -> std::string::String {
6193        use std::clone::Clone;
6194        self.next_page_token.clone()
6195    }
6196}
6197
6198/// The request message for [GetFramework][].
6199#[derive(Clone, Default, PartialEq)]
6200#[non_exhaustive]
6201pub struct GetFrameworkRequest {
6202    /// Required. The name of the framework to retrieve, in one of the following
6203    /// formats:
6204    /// `organizations/{organization}/locations/{location}/frameworks/{framework}`
6205    /// or
6206    /// `projects/{project}/locations/{location}/frameworks/{framework}`.
6207    ///
6208    /// The only supported location is `global`.
6209    pub name: std::string::String,
6210
6211    /// Optional. The framework major version to retrieve. If not specified, the
6212    /// most recently updated `revision_id` is retrieved.
6213    pub major_revision_id: i64,
6214
6215    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6216}
6217
6218impl GetFrameworkRequest {
6219    /// Creates a new default instance.
6220    pub fn new() -> Self {
6221        std::default::Default::default()
6222    }
6223
6224    /// Sets the value of [name][crate::model::GetFrameworkRequest::name].
6225    ///
6226    /// # Example
6227    /// ```ignore,no_run
6228    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetFrameworkRequest;
6229    /// # let organization_id = "organization_id";
6230    /// # let location_id = "location_id";
6231    /// # let framework_id = "framework_id";
6232    /// let x = GetFrameworkRequest::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/frameworks/{framework_id}"));
6233    /// ```
6234    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6235        self.name = v.into();
6236        self
6237    }
6238
6239    /// Sets the value of [major_revision_id][crate::model::GetFrameworkRequest::major_revision_id].
6240    ///
6241    /// # Example
6242    /// ```ignore,no_run
6243    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetFrameworkRequest;
6244    /// let x = GetFrameworkRequest::new().set_major_revision_id(42);
6245    /// ```
6246    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
6247        self.major_revision_id = v.into();
6248        self
6249    }
6250}
6251
6252impl wkt::message::Message for GetFrameworkRequest {
6253    fn typename() -> &'static str {
6254        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest"
6255    }
6256}
6257
6258/// The request message for [CreateFramework][].
6259#[derive(Clone, Default, PartialEq)]
6260#[non_exhaustive]
6261pub struct CreateFrameworkRequest {
6262    /// Required. The parent resource name, in one of the following formats:
6263    ///
6264    /// - `organizations/{organization}/locations/{location}`
6265    /// - `projects/{project}/locations/{location}`.
6266    ///
6267    /// The only supported location is `global`.
6268    pub parent: std::string::String,
6269
6270    /// Required. The identifier (ID) of the framework. The ID is not the full name
6271    /// of the framework; it's the last part of the full name of the framework.
6272    pub framework_id: std::string::String,
6273
6274    /// Required. The resource being created.
6275    pub framework: std::option::Option<crate::model::Framework>,
6276
6277    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6278}
6279
6280impl CreateFrameworkRequest {
6281    /// Creates a new default instance.
6282    pub fn new() -> Self {
6283        std::default::Default::default()
6284    }
6285
6286    /// Sets the value of [parent][crate::model::CreateFrameworkRequest::parent].
6287    ///
6288    /// # Example
6289    /// ```ignore,no_run
6290    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkRequest;
6291    /// # let organization_id = "organization_id";
6292    /// # let location_id = "location_id";
6293    /// let x = CreateFrameworkRequest::new().set_parent(format!("organizations/{organization_id}/locations/{location_id}"));
6294    /// ```
6295    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6296        self.parent = v.into();
6297        self
6298    }
6299
6300    /// Sets the value of [framework_id][crate::model::CreateFrameworkRequest::framework_id].
6301    ///
6302    /// # Example
6303    /// ```ignore,no_run
6304    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkRequest;
6305    /// let x = CreateFrameworkRequest::new().set_framework_id("example");
6306    /// ```
6307    pub fn set_framework_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6308        self.framework_id = v.into();
6309        self
6310    }
6311
6312    /// Sets the value of [framework][crate::model::CreateFrameworkRequest::framework].
6313    ///
6314    /// # Example
6315    /// ```ignore,no_run
6316    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkRequest;
6317    /// use google_cloud_cloudsecuritycompliance_v1::model::Framework;
6318    /// let x = CreateFrameworkRequest::new().set_framework(Framework::default()/* use setters */);
6319    /// ```
6320    pub fn set_framework<T>(mut self, v: T) -> Self
6321    where
6322        T: std::convert::Into<crate::model::Framework>,
6323    {
6324        self.framework = std::option::Option::Some(v.into());
6325        self
6326    }
6327
6328    /// Sets or clears the value of [framework][crate::model::CreateFrameworkRequest::framework].
6329    ///
6330    /// # Example
6331    /// ```ignore,no_run
6332    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkRequest;
6333    /// use google_cloud_cloudsecuritycompliance_v1::model::Framework;
6334    /// let x = CreateFrameworkRequest::new().set_or_clear_framework(Some(Framework::default()/* use setters */));
6335    /// let x = CreateFrameworkRequest::new().set_or_clear_framework(None::<Framework>);
6336    /// ```
6337    pub fn set_or_clear_framework<T>(mut self, v: std::option::Option<T>) -> Self
6338    where
6339        T: std::convert::Into<crate::model::Framework>,
6340    {
6341        self.framework = v.map(|x| x.into());
6342        self
6343    }
6344}
6345
6346impl wkt::message::Message for CreateFrameworkRequest {
6347    fn typename() -> &'static str {
6348        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest"
6349    }
6350}
6351
6352/// The request message for [UpdateFramework][].
6353#[derive(Clone, Default, PartialEq)]
6354#[non_exhaustive]
6355pub struct UpdateFrameworkRequest {
6356    /// Optional. A field mask is used to specify the fields to be overwritten in
6357    /// the framework resource by the update. The fields specified in the
6358    /// `update_mask` are relative to the resource, not the full request. A field
6359    /// is overwritten if it is in the mask. If you don't provide a mask then all
6360    /// fields present in the request will be overwritten.
6361    pub update_mask: std::option::Option<wkt::FieldMask>,
6362
6363    /// Required. The resource that is being updated.
6364    pub framework: std::option::Option<crate::model::Framework>,
6365
6366    /// Optional. The major version ID of the framework to update.
6367    pub major_revision_id: i64,
6368
6369    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6370}
6371
6372impl UpdateFrameworkRequest {
6373    /// Creates a new default instance.
6374    pub fn new() -> Self {
6375        std::default::Default::default()
6376    }
6377
6378    /// Sets the value of [update_mask][crate::model::UpdateFrameworkRequest::update_mask].
6379    ///
6380    /// # Example
6381    /// ```ignore,no_run
6382    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateFrameworkRequest;
6383    /// use wkt::FieldMask;
6384    /// let x = UpdateFrameworkRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6385    /// ```
6386    pub fn set_update_mask<T>(mut self, v: T) -> Self
6387    where
6388        T: std::convert::Into<wkt::FieldMask>,
6389    {
6390        self.update_mask = std::option::Option::Some(v.into());
6391        self
6392    }
6393
6394    /// Sets or clears the value of [update_mask][crate::model::UpdateFrameworkRequest::update_mask].
6395    ///
6396    /// # Example
6397    /// ```ignore,no_run
6398    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateFrameworkRequest;
6399    /// use wkt::FieldMask;
6400    /// let x = UpdateFrameworkRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6401    /// let x = UpdateFrameworkRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6402    /// ```
6403    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6404    where
6405        T: std::convert::Into<wkt::FieldMask>,
6406    {
6407        self.update_mask = v.map(|x| x.into());
6408        self
6409    }
6410
6411    /// Sets the value of [framework][crate::model::UpdateFrameworkRequest::framework].
6412    ///
6413    /// # Example
6414    /// ```ignore,no_run
6415    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateFrameworkRequest;
6416    /// use google_cloud_cloudsecuritycompliance_v1::model::Framework;
6417    /// let x = UpdateFrameworkRequest::new().set_framework(Framework::default()/* use setters */);
6418    /// ```
6419    pub fn set_framework<T>(mut self, v: T) -> Self
6420    where
6421        T: std::convert::Into<crate::model::Framework>,
6422    {
6423        self.framework = std::option::Option::Some(v.into());
6424        self
6425    }
6426
6427    /// Sets or clears the value of [framework][crate::model::UpdateFrameworkRequest::framework].
6428    ///
6429    /// # Example
6430    /// ```ignore,no_run
6431    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateFrameworkRequest;
6432    /// use google_cloud_cloudsecuritycompliance_v1::model::Framework;
6433    /// let x = UpdateFrameworkRequest::new().set_or_clear_framework(Some(Framework::default()/* use setters */));
6434    /// let x = UpdateFrameworkRequest::new().set_or_clear_framework(None::<Framework>);
6435    /// ```
6436    pub fn set_or_clear_framework<T>(mut self, v: std::option::Option<T>) -> Self
6437    where
6438        T: std::convert::Into<crate::model::Framework>,
6439    {
6440        self.framework = v.map(|x| x.into());
6441        self
6442    }
6443
6444    /// Sets the value of [major_revision_id][crate::model::UpdateFrameworkRequest::major_revision_id].
6445    ///
6446    /// # Example
6447    /// ```ignore,no_run
6448    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateFrameworkRequest;
6449    /// let x = UpdateFrameworkRequest::new().set_major_revision_id(42);
6450    /// ```
6451    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
6452        self.major_revision_id = v.into();
6453        self
6454    }
6455}
6456
6457impl wkt::message::Message for UpdateFrameworkRequest {
6458    fn typename() -> &'static str {
6459        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest"
6460    }
6461}
6462
6463/// Request message for [DeleteFramework][].
6464#[derive(Clone, Default, PartialEq)]
6465#[non_exhaustive]
6466pub struct DeleteFrameworkRequest {
6467    /// Required. The name of the resource, in one of the following formats:
6468    /// `organizations/{organization}/locations/{location}/frameworks/{framework}`
6469    /// or
6470    /// `projects/{project}/locations/{location}/frameworks/{framework}`.
6471    ///
6472    /// The only supported location is `global`.
6473    pub name: std::string::String,
6474
6475    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6476}
6477
6478impl DeleteFrameworkRequest {
6479    /// Creates a new default instance.
6480    pub fn new() -> Self {
6481        std::default::Default::default()
6482    }
6483
6484    /// Sets the value of [name][crate::model::DeleteFrameworkRequest::name].
6485    ///
6486    /// # Example
6487    /// ```ignore,no_run
6488    /// # use google_cloud_cloudsecuritycompliance_v1::model::DeleteFrameworkRequest;
6489    /// # let organization_id = "organization_id";
6490    /// # let location_id = "location_id";
6491    /// # let framework_id = "framework_id";
6492    /// let x = DeleteFrameworkRequest::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/frameworks/{framework_id}"));
6493    /// ```
6494    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6495        self.name = v.into();
6496        self
6497    }
6498}
6499
6500impl wkt::message::Message for DeleteFrameworkRequest {
6501    fn typename() -> &'static str {
6502        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest"
6503    }
6504}
6505
6506/// Request message for [ListCloudControls][].
6507#[derive(Clone, Default, PartialEq)]
6508#[non_exhaustive]
6509pub struct ListCloudControlsRequest {
6510    /// Required. The parent resource name, in one of the following formats:
6511    ///
6512    /// - `organizations/{organization}/locations/{location}`
6513    /// - `projects/{project}/locations/{location}`.
6514    ///
6515    /// The only supported location is `global`.
6516    pub parent: std::string::String,
6517
6518    /// Optional. The maximum number of cloud controls to return. The default value
6519    /// is `500`.
6520    ///
6521    /// If you exceed the maximum value of `1000`, then the service uses the
6522    /// maximum value.
6523    pub page_size: i32,
6524
6525    /// Optional. A pagination token that's returned from a previous request to
6526    /// list cloud controls. Provide this token to retrieve the next page of
6527    /// results.
6528    ///
6529    /// When paginating, the parent that you provide to the
6530    /// [ListCloudControls][google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls]
6531    /// request must match the call that provided the page token.
6532    ///
6533    /// [google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls]: crate::client::Config::list_cloud_controls
6534    pub page_token: std::string::String,
6535
6536    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6537}
6538
6539impl ListCloudControlsRequest {
6540    /// Creates a new default instance.
6541    pub fn new() -> Self {
6542        std::default::Default::default()
6543    }
6544
6545    /// Sets the value of [parent][crate::model::ListCloudControlsRequest::parent].
6546    ///
6547    /// # Example
6548    /// ```ignore,no_run
6549    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlsRequest;
6550    /// # let organization_id = "organization_id";
6551    /// # let location_id = "location_id";
6552    /// let x = ListCloudControlsRequest::new().set_parent(format!("organizations/{organization_id}/locations/{location_id}"));
6553    /// ```
6554    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6555        self.parent = v.into();
6556        self
6557    }
6558
6559    /// Sets the value of [page_size][crate::model::ListCloudControlsRequest::page_size].
6560    ///
6561    /// # Example
6562    /// ```ignore,no_run
6563    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlsRequest;
6564    /// let x = ListCloudControlsRequest::new().set_page_size(42);
6565    /// ```
6566    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6567        self.page_size = v.into();
6568        self
6569    }
6570
6571    /// Sets the value of [page_token][crate::model::ListCloudControlsRequest::page_token].
6572    ///
6573    /// # Example
6574    /// ```ignore,no_run
6575    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlsRequest;
6576    /// let x = ListCloudControlsRequest::new().set_page_token("example");
6577    /// ```
6578    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6579        self.page_token = v.into();
6580        self
6581    }
6582}
6583
6584impl wkt::message::Message for ListCloudControlsRequest {
6585    fn typename() -> &'static str {
6586        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest"
6587    }
6588}
6589
6590/// The response message for [ListCloudControls][].
6591#[derive(Clone, Default, PartialEq)]
6592#[non_exhaustive]
6593pub struct ListCloudControlsResponse {
6594    /// The list of CloudControl resources.
6595    pub cloud_controls: std::vec::Vec<crate::model::CloudControl>,
6596
6597    /// A pagination token. To retrieve the next page of results, call the method
6598    /// again with this token.
6599    pub next_page_token: std::string::String,
6600
6601    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6602}
6603
6604impl ListCloudControlsResponse {
6605    /// Creates a new default instance.
6606    pub fn new() -> Self {
6607        std::default::Default::default()
6608    }
6609
6610    /// Sets the value of [cloud_controls][crate::model::ListCloudControlsResponse::cloud_controls].
6611    ///
6612    /// # Example
6613    /// ```ignore,no_run
6614    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlsResponse;
6615    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
6616    /// let x = ListCloudControlsResponse::new()
6617    ///     .set_cloud_controls([
6618    ///         CloudControl::default()/* use setters */,
6619    ///         CloudControl::default()/* use (different) setters */,
6620    ///     ]);
6621    /// ```
6622    pub fn set_cloud_controls<T, V>(mut self, v: T) -> Self
6623    where
6624        T: std::iter::IntoIterator<Item = V>,
6625        V: std::convert::Into<crate::model::CloudControl>,
6626    {
6627        use std::iter::Iterator;
6628        self.cloud_controls = v.into_iter().map(|i| i.into()).collect();
6629        self
6630    }
6631
6632    /// Sets the value of [next_page_token][crate::model::ListCloudControlsResponse::next_page_token].
6633    ///
6634    /// # Example
6635    /// ```ignore,no_run
6636    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlsResponse;
6637    /// let x = ListCloudControlsResponse::new().set_next_page_token("example");
6638    /// ```
6639    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6640        self.next_page_token = v.into();
6641        self
6642    }
6643}
6644
6645impl wkt::message::Message for ListCloudControlsResponse {
6646    fn typename() -> &'static str {
6647        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse"
6648    }
6649}
6650
6651#[doc(hidden)]
6652impl google_cloud_gax::paginator::internal::PageableResponse for ListCloudControlsResponse {
6653    type PageItem = crate::model::CloudControl;
6654
6655    fn items(self) -> std::vec::Vec<Self::PageItem> {
6656        self.cloud_controls
6657    }
6658
6659    fn next_page_token(&self) -> std::string::String {
6660        use std::clone::Clone;
6661        self.next_page_token.clone()
6662    }
6663}
6664
6665/// The request message for [GetCloudControl][].
6666#[derive(Clone, Default, PartialEq)]
6667#[non_exhaustive]
6668pub struct GetCloudControlRequest {
6669    /// Required. The name of the cloud control to retrieve, in one of the
6670    /// following formats:
6671    /// `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}`
6672    /// or
6673    /// `projects/{project}/locations/{location}/cloudControls/{cloud_control}`.
6674    ///
6675    /// The only supported location is `global`.
6676    pub name: std::string::String,
6677
6678    /// Optional. The major version of the cloud control to retrieve. If not
6679    /// specified, the most recently updated `revision_id` is retrieved.
6680    pub major_revision_id: i64,
6681
6682    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6683}
6684
6685impl GetCloudControlRequest {
6686    /// Creates a new default instance.
6687    pub fn new() -> Self {
6688        std::default::Default::default()
6689    }
6690
6691    /// Sets the value of [name][crate::model::GetCloudControlRequest::name].
6692    ///
6693    /// # Example
6694    /// ```ignore,no_run
6695    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetCloudControlRequest;
6696    /// # let organization_id = "organization_id";
6697    /// # let location_id = "location_id";
6698    /// # let cloud_control_id = "cloud_control_id";
6699    /// let x = GetCloudControlRequest::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/cloudControls/{cloud_control_id}"));
6700    /// ```
6701    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6702        self.name = v.into();
6703        self
6704    }
6705
6706    /// Sets the value of [major_revision_id][crate::model::GetCloudControlRequest::major_revision_id].
6707    ///
6708    /// # Example
6709    /// ```ignore,no_run
6710    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetCloudControlRequest;
6711    /// let x = GetCloudControlRequest::new().set_major_revision_id(42);
6712    /// ```
6713    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
6714        self.major_revision_id = v.into();
6715        self
6716    }
6717}
6718
6719impl wkt::message::Message for GetCloudControlRequest {
6720    fn typename() -> &'static str {
6721        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest"
6722    }
6723}
6724
6725/// The request message for [CreateCloudControl][].
6726#[derive(Clone, Default, PartialEq)]
6727#[non_exhaustive]
6728pub struct CreateCloudControlRequest {
6729    /// Required. The parent resource name, in one of the following formats:
6730    ///
6731    /// - `organizations/{organization}/locations/{location}`.
6732    /// - `projects/{project}/locations/{location}`.
6733    ///
6734    /// The only supported location is `global`.
6735    pub parent: std::string::String,
6736
6737    /// Required. The identifier for the cloud control, which is the last segment
6738    /// of the cloud control name. The format is
6739    /// `^[a-zA-Z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$`.
6740    pub cloud_control_id: std::string::String,
6741
6742    /// Required. The cloud control that's being created.
6743    pub cloud_control: std::option::Option<crate::model::CloudControl>,
6744
6745    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6746}
6747
6748impl CreateCloudControlRequest {
6749    /// Creates a new default instance.
6750    pub fn new() -> Self {
6751        std::default::Default::default()
6752    }
6753
6754    /// Sets the value of [parent][crate::model::CreateCloudControlRequest::parent].
6755    ///
6756    /// # Example
6757    /// ```ignore,no_run
6758    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateCloudControlRequest;
6759    /// # let organization_id = "organization_id";
6760    /// # let location_id = "location_id";
6761    /// let x = CreateCloudControlRequest::new().set_parent(format!("organizations/{organization_id}/locations/{location_id}"));
6762    /// ```
6763    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6764        self.parent = v.into();
6765        self
6766    }
6767
6768    /// Sets the value of [cloud_control_id][crate::model::CreateCloudControlRequest::cloud_control_id].
6769    ///
6770    /// # Example
6771    /// ```ignore,no_run
6772    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateCloudControlRequest;
6773    /// let x = CreateCloudControlRequest::new().set_cloud_control_id("example");
6774    /// ```
6775    pub fn set_cloud_control_id<T: std::convert::Into<std::string::String>>(
6776        mut self,
6777        v: T,
6778    ) -> Self {
6779        self.cloud_control_id = v.into();
6780        self
6781    }
6782
6783    /// Sets the value of [cloud_control][crate::model::CreateCloudControlRequest::cloud_control].
6784    ///
6785    /// # Example
6786    /// ```ignore,no_run
6787    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateCloudControlRequest;
6788    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
6789    /// let x = CreateCloudControlRequest::new().set_cloud_control(CloudControl::default()/* use setters */);
6790    /// ```
6791    pub fn set_cloud_control<T>(mut self, v: T) -> Self
6792    where
6793        T: std::convert::Into<crate::model::CloudControl>,
6794    {
6795        self.cloud_control = std::option::Option::Some(v.into());
6796        self
6797    }
6798
6799    /// Sets or clears the value of [cloud_control][crate::model::CreateCloudControlRequest::cloud_control].
6800    ///
6801    /// # Example
6802    /// ```ignore,no_run
6803    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateCloudControlRequest;
6804    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
6805    /// let x = CreateCloudControlRequest::new().set_or_clear_cloud_control(Some(CloudControl::default()/* use setters */));
6806    /// let x = CreateCloudControlRequest::new().set_or_clear_cloud_control(None::<CloudControl>);
6807    /// ```
6808    pub fn set_or_clear_cloud_control<T>(mut self, v: std::option::Option<T>) -> Self
6809    where
6810        T: std::convert::Into<crate::model::CloudControl>,
6811    {
6812        self.cloud_control = v.map(|x| x.into());
6813        self
6814    }
6815}
6816
6817impl wkt::message::Message for CreateCloudControlRequest {
6818    fn typename() -> &'static str {
6819        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest"
6820    }
6821}
6822
6823/// The request message for [UpdateCloudControl][].
6824#[derive(Clone, Default, PartialEq)]
6825#[non_exhaustive]
6826pub struct UpdateCloudControlRequest {
6827    /// Optional. Use a field mask to specify the fields to be overwritten in the
6828    /// cloud control during the update.
6829    /// The fields that you specify in the `update_mask` are relative to the
6830    /// cloud control, not the full request. A field is overwritten if it is in
6831    /// the mask. If you don't provide a mask, all fields in the request
6832    /// are updated.
6833    ///
6834    /// You can update the following fields:
6835    ///
6836    /// - Display name
6837    /// - Description
6838    /// - Parameters
6839    /// - Rules
6840    /// - Parameter specification
6841    pub update_mask: std::option::Option<wkt::FieldMask>,
6842
6843    /// Required. The cloud control that you're updating.
6844    pub cloud_control: std::option::Option<crate::model::CloudControl>,
6845
6846    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6847}
6848
6849impl UpdateCloudControlRequest {
6850    /// Creates a new default instance.
6851    pub fn new() -> Self {
6852        std::default::Default::default()
6853    }
6854
6855    /// Sets the value of [update_mask][crate::model::UpdateCloudControlRequest::update_mask].
6856    ///
6857    /// # Example
6858    /// ```ignore,no_run
6859    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCloudControlRequest;
6860    /// use wkt::FieldMask;
6861    /// let x = UpdateCloudControlRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6862    /// ```
6863    pub fn set_update_mask<T>(mut self, v: T) -> Self
6864    where
6865        T: std::convert::Into<wkt::FieldMask>,
6866    {
6867        self.update_mask = std::option::Option::Some(v.into());
6868        self
6869    }
6870
6871    /// Sets or clears the value of [update_mask][crate::model::UpdateCloudControlRequest::update_mask].
6872    ///
6873    /// # Example
6874    /// ```ignore,no_run
6875    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCloudControlRequest;
6876    /// use wkt::FieldMask;
6877    /// let x = UpdateCloudControlRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6878    /// let x = UpdateCloudControlRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6879    /// ```
6880    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6881    where
6882        T: std::convert::Into<wkt::FieldMask>,
6883    {
6884        self.update_mask = v.map(|x| x.into());
6885        self
6886    }
6887
6888    /// Sets the value of [cloud_control][crate::model::UpdateCloudControlRequest::cloud_control].
6889    ///
6890    /// # Example
6891    /// ```ignore,no_run
6892    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCloudControlRequest;
6893    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
6894    /// let x = UpdateCloudControlRequest::new().set_cloud_control(CloudControl::default()/* use setters */);
6895    /// ```
6896    pub fn set_cloud_control<T>(mut self, v: T) -> Self
6897    where
6898        T: std::convert::Into<crate::model::CloudControl>,
6899    {
6900        self.cloud_control = std::option::Option::Some(v.into());
6901        self
6902    }
6903
6904    /// Sets or clears the value of [cloud_control][crate::model::UpdateCloudControlRequest::cloud_control].
6905    ///
6906    /// # Example
6907    /// ```ignore,no_run
6908    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCloudControlRequest;
6909    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
6910    /// let x = UpdateCloudControlRequest::new().set_or_clear_cloud_control(Some(CloudControl::default()/* use setters */));
6911    /// let x = UpdateCloudControlRequest::new().set_or_clear_cloud_control(None::<CloudControl>);
6912    /// ```
6913    pub fn set_or_clear_cloud_control<T>(mut self, v: std::option::Option<T>) -> Self
6914    where
6915        T: std::convert::Into<crate::model::CloudControl>,
6916    {
6917        self.cloud_control = v.map(|x| x.into());
6918        self
6919    }
6920}
6921
6922impl wkt::message::Message for UpdateCloudControlRequest {
6923    fn typename() -> &'static str {
6924        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest"
6925    }
6926}
6927
6928/// The request message for [DeleteCloudControl][].
6929#[derive(Clone, Default, PartialEq)]
6930#[non_exhaustive]
6931pub struct DeleteCloudControlRequest {
6932    /// Required. The name of the cloud control to delete, in one of the following
6933    /// formats:
6934    /// `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}`
6935    /// or
6936    /// `projects/{project}/locations/{location}/CloudControls/{CloudControl}`.
6937    ///
6938    /// The only supported location is `global`.
6939    pub name: std::string::String,
6940
6941    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6942}
6943
6944impl DeleteCloudControlRequest {
6945    /// Creates a new default instance.
6946    pub fn new() -> Self {
6947        std::default::Default::default()
6948    }
6949
6950    /// Sets the value of [name][crate::model::DeleteCloudControlRequest::name].
6951    ///
6952    /// # Example
6953    /// ```ignore,no_run
6954    /// # use google_cloud_cloudsecuritycompliance_v1::model::DeleteCloudControlRequest;
6955    /// # let organization_id = "organization_id";
6956    /// # let location_id = "location_id";
6957    /// # let cloud_control_id = "cloud_control_id";
6958    /// let x = DeleteCloudControlRequest::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/cloudControls/{cloud_control_id}"));
6959    /// ```
6960    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6961        self.name = v.into();
6962        self
6963    }
6964}
6965
6966impl wkt::message::Message for DeleteCloudControlRequest {
6967    fn typename() -> &'static str {
6968        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest"
6969    }
6970}
6971
6972/// Framework deployments represent the assignment of a framework to a target
6973/// resource. Supported target resources are organizations, folders, and
6974/// projects.
6975#[derive(Clone, Default, PartialEq)]
6976#[non_exhaustive]
6977pub struct FrameworkDeployment {
6978    /// Identifier. The name of the framework deployment, in the format
6979    /// `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}`
6980    /// or
6981    /// `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`.
6982    /// The only supported location is `global`.
6983    pub name: std::string::String,
6984
6985    /// Required. The details of the target resource that you want to deploy the
6986    /// framework to. You can specify an existing resource, or create a new one.
6987    pub target_resource_config: std::option::Option<crate::model::TargetResourceConfig>,
6988
6989    /// Output only. The target resource to deploy the framework to, in one  the
6990    /// following formats:
6991    ///
6992    /// - `organizations/{organizationID}`
6993    /// - `folders/{folderID}`
6994    /// - `projects/{projectID}`
6995    pub computed_target_resource: std::string::String,
6996
6997    /// Required. A reference to the framework that you're deploying.
6998    pub framework: std::option::Option<crate::model::FrameworkReference>,
6999
7000    /// Optional. A user-provided description of the framework deployment.
7001    pub description: std::string::String,
7002
7003    /// Required. The deployment mode and parameters for each of the cloud controls
7004    /// in the framework. Every cloud control in the framework includes metadata.
7005    pub cloud_control_metadata: std::vec::Vec<crate::model::CloudControlMetadata>,
7006
7007    /// Output only. The state for the framework deployment.
7008    pub deployment_state: crate::model::DeploymentState,
7009
7010    /// Output only. The time at which the resource was created.
7011    pub create_time: std::option::Option<wkt::Timestamp>,
7012
7013    /// Output only. The time at which the resource last updated.
7014    pub update_time: std::option::Option<wkt::Timestamp>,
7015
7016    /// Optional. To prevent concurrent updates from overwriting each other, always
7017    /// provide the `etag` when you update a framework deployment. You can also
7018    /// provide the `etag` when you delete a framework deployment, to help
7019    /// ensure that you're deleting the intended version of the
7020    /// framework deployment.
7021    pub etag: std::string::String,
7022
7023    /// Output only. The display name of the target resource.
7024    pub target_resource_display_name: std::string::String,
7025
7026    /// Output only. The references to the cloud control deployments. The reference
7027    /// includes all the cloud control deployments that are in the framework or in
7028    /// a cloud control group.
7029    ///
7030    /// For example, if a framework deployment deploys two
7031    /// cloud controls, `cc-deployment-1` and `cc-deployment-2`, then the
7032    /// references are:
7033    ///
7034    /// ```norust
7035    /// {
7036    ///  cloud_control_deployment_reference: {
7037    ///    cloud_control_deployment:
7038    ///    "organizations/{organization}/locations/{location}/cloudControlDeployments/cc-deployment-1"
7039    ///  },
7040    ///  cloud_control_deployment_reference: {
7041    ///   cloud_control_deployment:
7042    ///   "organizations/{organization}/locations/{location}/cloudControlDeployments/cc-deployment-2"
7043    ///  }
7044    /// ```
7045    pub cloud_control_deployment_references:
7046        std::vec::Vec<crate::model::CloudControlDeploymentReference>,
7047
7048    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7049}
7050
7051impl FrameworkDeployment {
7052    /// Creates a new default instance.
7053    pub fn new() -> Self {
7054        std::default::Default::default()
7055    }
7056
7057    /// Sets the value of [name][crate::model::FrameworkDeployment::name].
7058    ///
7059    /// # Example
7060    /// ```ignore,no_run
7061    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7062    /// # let organization_id = "organization_id";
7063    /// # let location_id = "location_id";
7064    /// # let framework_deployment_id = "framework_deployment_id";
7065    /// let x = FrameworkDeployment::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/frameworkDeployments/{framework_deployment_id}"));
7066    /// ```
7067    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7068        self.name = v.into();
7069        self
7070    }
7071
7072    /// Sets the value of [target_resource_config][crate::model::FrameworkDeployment::target_resource_config].
7073    ///
7074    /// # Example
7075    /// ```ignore,no_run
7076    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7077    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
7078    /// let x = FrameworkDeployment::new().set_target_resource_config(TargetResourceConfig::default()/* use setters */);
7079    /// ```
7080    pub fn set_target_resource_config<T>(mut self, v: T) -> Self
7081    where
7082        T: std::convert::Into<crate::model::TargetResourceConfig>,
7083    {
7084        self.target_resource_config = std::option::Option::Some(v.into());
7085        self
7086    }
7087
7088    /// Sets or clears the value of [target_resource_config][crate::model::FrameworkDeployment::target_resource_config].
7089    ///
7090    /// # Example
7091    /// ```ignore,no_run
7092    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7093    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
7094    /// let x = FrameworkDeployment::new().set_or_clear_target_resource_config(Some(TargetResourceConfig::default()/* use setters */));
7095    /// let x = FrameworkDeployment::new().set_or_clear_target_resource_config(None::<TargetResourceConfig>);
7096    /// ```
7097    pub fn set_or_clear_target_resource_config<T>(mut self, v: std::option::Option<T>) -> Self
7098    where
7099        T: std::convert::Into<crate::model::TargetResourceConfig>,
7100    {
7101        self.target_resource_config = v.map(|x| x.into());
7102        self
7103    }
7104
7105    /// Sets the value of [computed_target_resource][crate::model::FrameworkDeployment::computed_target_resource].
7106    ///
7107    /// # Example
7108    /// ```ignore,no_run
7109    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7110    /// let x = FrameworkDeployment::new().set_computed_target_resource("example");
7111    /// ```
7112    pub fn set_computed_target_resource<T: std::convert::Into<std::string::String>>(
7113        mut self,
7114        v: T,
7115    ) -> Self {
7116        self.computed_target_resource = v.into();
7117        self
7118    }
7119
7120    /// Sets the value of [framework][crate::model::FrameworkDeployment::framework].
7121    ///
7122    /// # Example
7123    /// ```ignore,no_run
7124    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7125    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
7126    /// let x = FrameworkDeployment::new().set_framework(FrameworkReference::default()/* use setters */);
7127    /// ```
7128    pub fn set_framework<T>(mut self, v: T) -> Self
7129    where
7130        T: std::convert::Into<crate::model::FrameworkReference>,
7131    {
7132        self.framework = std::option::Option::Some(v.into());
7133        self
7134    }
7135
7136    /// Sets or clears the value of [framework][crate::model::FrameworkDeployment::framework].
7137    ///
7138    /// # Example
7139    /// ```ignore,no_run
7140    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7141    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
7142    /// let x = FrameworkDeployment::new().set_or_clear_framework(Some(FrameworkReference::default()/* use setters */));
7143    /// let x = FrameworkDeployment::new().set_or_clear_framework(None::<FrameworkReference>);
7144    /// ```
7145    pub fn set_or_clear_framework<T>(mut self, v: std::option::Option<T>) -> Self
7146    where
7147        T: std::convert::Into<crate::model::FrameworkReference>,
7148    {
7149        self.framework = v.map(|x| x.into());
7150        self
7151    }
7152
7153    /// Sets the value of [description][crate::model::FrameworkDeployment::description].
7154    ///
7155    /// # Example
7156    /// ```ignore,no_run
7157    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7158    /// let x = FrameworkDeployment::new().set_description("example");
7159    /// ```
7160    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7161        self.description = v.into();
7162        self
7163    }
7164
7165    /// Sets the value of [cloud_control_metadata][crate::model::FrameworkDeployment::cloud_control_metadata].
7166    ///
7167    /// # Example
7168    /// ```ignore,no_run
7169    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7170    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlMetadata;
7171    /// let x = FrameworkDeployment::new()
7172    ///     .set_cloud_control_metadata([
7173    ///         CloudControlMetadata::default()/* use setters */,
7174    ///         CloudControlMetadata::default()/* use (different) setters */,
7175    ///     ]);
7176    /// ```
7177    pub fn set_cloud_control_metadata<T, V>(mut self, v: T) -> Self
7178    where
7179        T: std::iter::IntoIterator<Item = V>,
7180        V: std::convert::Into<crate::model::CloudControlMetadata>,
7181    {
7182        use std::iter::Iterator;
7183        self.cloud_control_metadata = v.into_iter().map(|i| i.into()).collect();
7184        self
7185    }
7186
7187    /// Sets the value of [deployment_state][crate::model::FrameworkDeployment::deployment_state].
7188    ///
7189    /// # Example
7190    /// ```ignore,no_run
7191    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7192    /// use google_cloud_cloudsecuritycompliance_v1::model::DeploymentState;
7193    /// let x0 = FrameworkDeployment::new().set_deployment_state(DeploymentState::Validating);
7194    /// let x1 = FrameworkDeployment::new().set_deployment_state(DeploymentState::Creating);
7195    /// let x2 = FrameworkDeployment::new().set_deployment_state(DeploymentState::Deleting);
7196    /// ```
7197    pub fn set_deployment_state<T: std::convert::Into<crate::model::DeploymentState>>(
7198        mut self,
7199        v: T,
7200    ) -> Self {
7201        self.deployment_state = v.into();
7202        self
7203    }
7204
7205    /// Sets the value of [create_time][crate::model::FrameworkDeployment::create_time].
7206    ///
7207    /// # Example
7208    /// ```ignore,no_run
7209    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7210    /// use wkt::Timestamp;
7211    /// let x = FrameworkDeployment::new().set_create_time(Timestamp::default()/* use setters */);
7212    /// ```
7213    pub fn set_create_time<T>(mut self, v: T) -> Self
7214    where
7215        T: std::convert::Into<wkt::Timestamp>,
7216    {
7217        self.create_time = std::option::Option::Some(v.into());
7218        self
7219    }
7220
7221    /// Sets or clears the value of [create_time][crate::model::FrameworkDeployment::create_time].
7222    ///
7223    /// # Example
7224    /// ```ignore,no_run
7225    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7226    /// use wkt::Timestamp;
7227    /// let x = FrameworkDeployment::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
7228    /// let x = FrameworkDeployment::new().set_or_clear_create_time(None::<Timestamp>);
7229    /// ```
7230    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7231    where
7232        T: std::convert::Into<wkt::Timestamp>,
7233    {
7234        self.create_time = v.map(|x| x.into());
7235        self
7236    }
7237
7238    /// Sets the value of [update_time][crate::model::FrameworkDeployment::update_time].
7239    ///
7240    /// # Example
7241    /// ```ignore,no_run
7242    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7243    /// use wkt::Timestamp;
7244    /// let x = FrameworkDeployment::new().set_update_time(Timestamp::default()/* use setters */);
7245    /// ```
7246    pub fn set_update_time<T>(mut self, v: T) -> Self
7247    where
7248        T: std::convert::Into<wkt::Timestamp>,
7249    {
7250        self.update_time = std::option::Option::Some(v.into());
7251        self
7252    }
7253
7254    /// Sets or clears the value of [update_time][crate::model::FrameworkDeployment::update_time].
7255    ///
7256    /// # Example
7257    /// ```ignore,no_run
7258    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7259    /// use wkt::Timestamp;
7260    /// let x = FrameworkDeployment::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
7261    /// let x = FrameworkDeployment::new().set_or_clear_update_time(None::<Timestamp>);
7262    /// ```
7263    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
7264    where
7265        T: std::convert::Into<wkt::Timestamp>,
7266    {
7267        self.update_time = v.map(|x| x.into());
7268        self
7269    }
7270
7271    /// Sets the value of [etag][crate::model::FrameworkDeployment::etag].
7272    ///
7273    /// # Example
7274    /// ```ignore,no_run
7275    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7276    /// let x = FrameworkDeployment::new().set_etag("example");
7277    /// ```
7278    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7279        self.etag = v.into();
7280        self
7281    }
7282
7283    /// Sets the value of [target_resource_display_name][crate::model::FrameworkDeployment::target_resource_display_name].
7284    ///
7285    /// # Example
7286    /// ```ignore,no_run
7287    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7288    /// let x = FrameworkDeployment::new().set_target_resource_display_name("example");
7289    /// ```
7290    pub fn set_target_resource_display_name<T: std::convert::Into<std::string::String>>(
7291        mut self,
7292        v: T,
7293    ) -> Self {
7294        self.target_resource_display_name = v.into();
7295        self
7296    }
7297
7298    /// Sets the value of [cloud_control_deployment_references][crate::model::FrameworkDeployment::cloud_control_deployment_references].
7299    ///
7300    /// # Example
7301    /// ```ignore,no_run
7302    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7303    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeploymentReference;
7304    /// let x = FrameworkDeployment::new()
7305    ///     .set_cloud_control_deployment_references([
7306    ///         CloudControlDeploymentReference::default()/* use setters */,
7307    ///         CloudControlDeploymentReference::default()/* use (different) setters */,
7308    ///     ]);
7309    /// ```
7310    pub fn set_cloud_control_deployment_references<T, V>(mut self, v: T) -> Self
7311    where
7312        T: std::iter::IntoIterator<Item = V>,
7313        V: std::convert::Into<crate::model::CloudControlDeploymentReference>,
7314    {
7315        use std::iter::Iterator;
7316        self.cloud_control_deployment_references = v.into_iter().map(|i| i.into()).collect();
7317        self
7318    }
7319}
7320
7321impl wkt::message::Message for FrameworkDeployment {
7322    fn typename() -> &'static str {
7323        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment"
7324    }
7325}
7326
7327/// A cloud control deployment represents the deployment of a particular cloud
7328/// control on a target resource. Supported target resources are
7329/// `organizations/{organizationID}`, `folders/{folderID}`, and
7330/// `projects/{projectID}`.
7331#[derive(Clone, Default, PartialEq)]
7332#[non_exhaustive]
7333pub struct CloudControlDeployment {
7334    /// Identifier. The name for the cloud control deployment, in the format
7335    /// `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`
7336    /// or
7337    /// `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`.
7338    /// The only supported location is `global`.
7339    pub name: std::string::String,
7340
7341    /// Required. The details of the target resource that the cloud control is
7342    /// deployed You can use an existing target resource or create a new target.
7343    pub target_resource_config: std::option::Option<crate::model::TargetResourceConfig>,
7344
7345    /// Output only. The resource that the cloud control is deployed on, in one of
7346    /// the following formats:
7347    ///
7348    /// - `organizations/{organizationID}`
7349    /// - `folders/{folderID}`
7350    /// - `projects/{projectID}`
7351    pub target_resource: std::string::String,
7352
7353    /// Required. The deployment mode and parameters for the cloud control.
7354    pub cloud_control_metadata: std::option::Option<crate::model::CloudControlMetadata>,
7355
7356    /// Optional. A friendly description for the cloud control deployment.
7357    pub description: std::string::String,
7358
7359    /// Output only. The state of the cloud control deployment.
7360    pub deployment_state: crate::model::DeploymentState,
7361
7362    /// Output only. The time when the resource was created.
7363    pub create_time: std::option::Option<wkt::Timestamp>,
7364
7365    /// Output only. The time when the resource was last updated.
7366    pub update_time: std::option::Option<wkt::Timestamp>,
7367
7368    /// Optional. To prevent concurrent updates from overwriting each other,
7369    /// provide the `etag` when you update a cloud control deployment. You can also
7370    /// provide the `etag` when you delete a cloud control deployment to help
7371    /// ensure that you're deleting the intended version of the
7372    /// deployment.
7373    pub etag: std::string::String,
7374
7375    /// Output only. The cloud control after the given parameters are substituted.
7376    pub parameter_substituted_cloud_control: std::option::Option<crate::model::CloudControl>,
7377
7378    /// Output only. The references to the framework deployments that this cloud
7379    /// control deployment is part of. A cloud control deployment can be part of
7380    /// multiple framework deployments.
7381    pub framework_deployment_references: std::vec::Vec<crate::model::FrameworkDeploymentReference>,
7382
7383    /// Output only. The display name of the target resource.
7384    pub target_resource_display_name: std::string::String,
7385
7386    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7387}
7388
7389impl CloudControlDeployment {
7390    /// Creates a new default instance.
7391    pub fn new() -> Self {
7392        std::default::Default::default()
7393    }
7394
7395    /// Sets the value of [name][crate::model::CloudControlDeployment::name].
7396    ///
7397    /// # Example
7398    /// ```ignore,no_run
7399    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7400    /// # let organization_id = "organization_id";
7401    /// # let location_id = "location_id";
7402    /// # let cloud_control_deployment_id = "cloud_control_deployment_id";
7403    /// let x = CloudControlDeployment::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/cloudControlDeployments/{cloud_control_deployment_id}"));
7404    /// ```
7405    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7406        self.name = v.into();
7407        self
7408    }
7409
7410    /// Sets the value of [target_resource_config][crate::model::CloudControlDeployment::target_resource_config].
7411    ///
7412    /// # Example
7413    /// ```ignore,no_run
7414    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7415    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
7416    /// let x = CloudControlDeployment::new().set_target_resource_config(TargetResourceConfig::default()/* use setters */);
7417    /// ```
7418    pub fn set_target_resource_config<T>(mut self, v: T) -> Self
7419    where
7420        T: std::convert::Into<crate::model::TargetResourceConfig>,
7421    {
7422        self.target_resource_config = std::option::Option::Some(v.into());
7423        self
7424    }
7425
7426    /// Sets or clears the value of [target_resource_config][crate::model::CloudControlDeployment::target_resource_config].
7427    ///
7428    /// # Example
7429    /// ```ignore,no_run
7430    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7431    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
7432    /// let x = CloudControlDeployment::new().set_or_clear_target_resource_config(Some(TargetResourceConfig::default()/* use setters */));
7433    /// let x = CloudControlDeployment::new().set_or_clear_target_resource_config(None::<TargetResourceConfig>);
7434    /// ```
7435    pub fn set_or_clear_target_resource_config<T>(mut self, v: std::option::Option<T>) -> Self
7436    where
7437        T: std::convert::Into<crate::model::TargetResourceConfig>,
7438    {
7439        self.target_resource_config = v.map(|x| x.into());
7440        self
7441    }
7442
7443    /// Sets the value of [target_resource][crate::model::CloudControlDeployment::target_resource].
7444    ///
7445    /// # Example
7446    /// ```ignore,no_run
7447    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7448    /// let x = CloudControlDeployment::new().set_target_resource("example");
7449    /// ```
7450    pub fn set_target_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7451        self.target_resource = v.into();
7452        self
7453    }
7454
7455    /// Sets the value of [cloud_control_metadata][crate::model::CloudControlDeployment::cloud_control_metadata].
7456    ///
7457    /// # Example
7458    /// ```ignore,no_run
7459    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7460    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlMetadata;
7461    /// let x = CloudControlDeployment::new().set_cloud_control_metadata(CloudControlMetadata::default()/* use setters */);
7462    /// ```
7463    pub fn set_cloud_control_metadata<T>(mut self, v: T) -> Self
7464    where
7465        T: std::convert::Into<crate::model::CloudControlMetadata>,
7466    {
7467        self.cloud_control_metadata = std::option::Option::Some(v.into());
7468        self
7469    }
7470
7471    /// Sets or clears the value of [cloud_control_metadata][crate::model::CloudControlDeployment::cloud_control_metadata].
7472    ///
7473    /// # Example
7474    /// ```ignore,no_run
7475    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7476    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlMetadata;
7477    /// let x = CloudControlDeployment::new().set_or_clear_cloud_control_metadata(Some(CloudControlMetadata::default()/* use setters */));
7478    /// let x = CloudControlDeployment::new().set_or_clear_cloud_control_metadata(None::<CloudControlMetadata>);
7479    /// ```
7480    pub fn set_or_clear_cloud_control_metadata<T>(mut self, v: std::option::Option<T>) -> Self
7481    where
7482        T: std::convert::Into<crate::model::CloudControlMetadata>,
7483    {
7484        self.cloud_control_metadata = v.map(|x| x.into());
7485        self
7486    }
7487
7488    /// Sets the value of [description][crate::model::CloudControlDeployment::description].
7489    ///
7490    /// # Example
7491    /// ```ignore,no_run
7492    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7493    /// let x = CloudControlDeployment::new().set_description("example");
7494    /// ```
7495    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7496        self.description = v.into();
7497        self
7498    }
7499
7500    /// Sets the value of [deployment_state][crate::model::CloudControlDeployment::deployment_state].
7501    ///
7502    /// # Example
7503    /// ```ignore,no_run
7504    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7505    /// use google_cloud_cloudsecuritycompliance_v1::model::DeploymentState;
7506    /// let x0 = CloudControlDeployment::new().set_deployment_state(DeploymentState::Validating);
7507    /// let x1 = CloudControlDeployment::new().set_deployment_state(DeploymentState::Creating);
7508    /// let x2 = CloudControlDeployment::new().set_deployment_state(DeploymentState::Deleting);
7509    /// ```
7510    pub fn set_deployment_state<T: std::convert::Into<crate::model::DeploymentState>>(
7511        mut self,
7512        v: T,
7513    ) -> Self {
7514        self.deployment_state = v.into();
7515        self
7516    }
7517
7518    /// Sets the value of [create_time][crate::model::CloudControlDeployment::create_time].
7519    ///
7520    /// # Example
7521    /// ```ignore,no_run
7522    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7523    /// use wkt::Timestamp;
7524    /// let x = CloudControlDeployment::new().set_create_time(Timestamp::default()/* use setters */);
7525    /// ```
7526    pub fn set_create_time<T>(mut self, v: T) -> Self
7527    where
7528        T: std::convert::Into<wkt::Timestamp>,
7529    {
7530        self.create_time = std::option::Option::Some(v.into());
7531        self
7532    }
7533
7534    /// Sets or clears the value of [create_time][crate::model::CloudControlDeployment::create_time].
7535    ///
7536    /// # Example
7537    /// ```ignore,no_run
7538    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7539    /// use wkt::Timestamp;
7540    /// let x = CloudControlDeployment::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
7541    /// let x = CloudControlDeployment::new().set_or_clear_create_time(None::<Timestamp>);
7542    /// ```
7543    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7544    where
7545        T: std::convert::Into<wkt::Timestamp>,
7546    {
7547        self.create_time = v.map(|x| x.into());
7548        self
7549    }
7550
7551    /// Sets the value of [update_time][crate::model::CloudControlDeployment::update_time].
7552    ///
7553    /// # Example
7554    /// ```ignore,no_run
7555    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7556    /// use wkt::Timestamp;
7557    /// let x = CloudControlDeployment::new().set_update_time(Timestamp::default()/* use setters */);
7558    /// ```
7559    pub fn set_update_time<T>(mut self, v: T) -> Self
7560    where
7561        T: std::convert::Into<wkt::Timestamp>,
7562    {
7563        self.update_time = std::option::Option::Some(v.into());
7564        self
7565    }
7566
7567    /// Sets or clears the value of [update_time][crate::model::CloudControlDeployment::update_time].
7568    ///
7569    /// # Example
7570    /// ```ignore,no_run
7571    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7572    /// use wkt::Timestamp;
7573    /// let x = CloudControlDeployment::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
7574    /// let x = CloudControlDeployment::new().set_or_clear_update_time(None::<Timestamp>);
7575    /// ```
7576    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
7577    where
7578        T: std::convert::Into<wkt::Timestamp>,
7579    {
7580        self.update_time = v.map(|x| x.into());
7581        self
7582    }
7583
7584    /// Sets the value of [etag][crate::model::CloudControlDeployment::etag].
7585    ///
7586    /// # Example
7587    /// ```ignore,no_run
7588    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7589    /// let x = CloudControlDeployment::new().set_etag("example");
7590    /// ```
7591    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7592        self.etag = v.into();
7593        self
7594    }
7595
7596    /// Sets the value of [parameter_substituted_cloud_control][crate::model::CloudControlDeployment::parameter_substituted_cloud_control].
7597    ///
7598    /// # Example
7599    /// ```ignore,no_run
7600    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7601    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
7602    /// let x = CloudControlDeployment::new().set_parameter_substituted_cloud_control(CloudControl::default()/* use setters */);
7603    /// ```
7604    pub fn set_parameter_substituted_cloud_control<T>(mut self, v: T) -> Self
7605    where
7606        T: std::convert::Into<crate::model::CloudControl>,
7607    {
7608        self.parameter_substituted_cloud_control = std::option::Option::Some(v.into());
7609        self
7610    }
7611
7612    /// Sets or clears the value of [parameter_substituted_cloud_control][crate::model::CloudControlDeployment::parameter_substituted_cloud_control].
7613    ///
7614    /// # Example
7615    /// ```ignore,no_run
7616    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7617    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
7618    /// let x = CloudControlDeployment::new().set_or_clear_parameter_substituted_cloud_control(Some(CloudControl::default()/* use setters */));
7619    /// let x = CloudControlDeployment::new().set_or_clear_parameter_substituted_cloud_control(None::<CloudControl>);
7620    /// ```
7621    pub fn set_or_clear_parameter_substituted_cloud_control<T>(
7622        mut self,
7623        v: std::option::Option<T>,
7624    ) -> Self
7625    where
7626        T: std::convert::Into<crate::model::CloudControl>,
7627    {
7628        self.parameter_substituted_cloud_control = v.map(|x| x.into());
7629        self
7630    }
7631
7632    /// Sets the value of [framework_deployment_references][crate::model::CloudControlDeployment::framework_deployment_references].
7633    ///
7634    /// # Example
7635    /// ```ignore,no_run
7636    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7637    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeploymentReference;
7638    /// let x = CloudControlDeployment::new()
7639    ///     .set_framework_deployment_references([
7640    ///         FrameworkDeploymentReference::default()/* use setters */,
7641    ///         FrameworkDeploymentReference::default()/* use (different) setters */,
7642    ///     ]);
7643    /// ```
7644    pub fn set_framework_deployment_references<T, V>(mut self, v: T) -> Self
7645    where
7646        T: std::iter::IntoIterator<Item = V>,
7647        V: std::convert::Into<crate::model::FrameworkDeploymentReference>,
7648    {
7649        use std::iter::Iterator;
7650        self.framework_deployment_references = v.into_iter().map(|i| i.into()).collect();
7651        self
7652    }
7653
7654    /// Sets the value of [target_resource_display_name][crate::model::CloudControlDeployment::target_resource_display_name].
7655    ///
7656    /// # Example
7657    /// ```ignore,no_run
7658    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7659    /// let x = CloudControlDeployment::new().set_target_resource_display_name("example");
7660    /// ```
7661    pub fn set_target_resource_display_name<T: std::convert::Into<std::string::String>>(
7662        mut self,
7663        v: T,
7664    ) -> Self {
7665        self.target_resource_display_name = v.into();
7666        self
7667    }
7668}
7669
7670impl wkt::message::Message for CloudControlDeployment {
7671    fn typename() -> &'static str {
7672        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment"
7673    }
7674}
7675
7676/// The name of the target resource or the configuration that's required to
7677/// create a new target resource.
7678#[derive(Clone, Default, PartialEq)]
7679#[non_exhaustive]
7680pub struct TargetResourceConfig {
7681    /// The resource configuration for the target resource.
7682    pub resource_config: std::option::Option<crate::model::target_resource_config::ResourceConfig>,
7683
7684    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7685}
7686
7687impl TargetResourceConfig {
7688    /// Creates a new default instance.
7689    pub fn new() -> Self {
7690        std::default::Default::default()
7691    }
7692
7693    /// Sets the value of [resource_config][crate::model::TargetResourceConfig::resource_config].
7694    ///
7695    /// Note that all the setters affecting `resource_config` are mutually
7696    /// exclusive.
7697    ///
7698    /// # Example
7699    /// ```ignore,no_run
7700    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
7701    /// use google_cloud_cloudsecuritycompliance_v1::model::target_resource_config::ResourceConfig;
7702    /// let x = TargetResourceConfig::new().set_resource_config(Some(ResourceConfig::ExistingTargetResource("example".to_string())));
7703    /// ```
7704    pub fn set_resource_config<
7705        T: std::convert::Into<
7706                std::option::Option<crate::model::target_resource_config::ResourceConfig>,
7707            >,
7708    >(
7709        mut self,
7710        v: T,
7711    ) -> Self {
7712        self.resource_config = v.into();
7713        self
7714    }
7715
7716    /// The value of [resource_config][crate::model::TargetResourceConfig::resource_config]
7717    /// if it holds a `ExistingTargetResource`, `None` if the field is not set or
7718    /// holds a different branch.
7719    pub fn existing_target_resource(&self) -> std::option::Option<&std::string::String> {
7720        #[allow(unreachable_patterns)]
7721        self.resource_config.as_ref().and_then(|v| match v {
7722            crate::model::target_resource_config::ResourceConfig::ExistingTargetResource(v) => {
7723                std::option::Option::Some(v)
7724            }
7725            _ => std::option::Option::None,
7726        })
7727    }
7728
7729    /// Sets the value of [resource_config][crate::model::TargetResourceConfig::resource_config]
7730    /// to hold a `ExistingTargetResource`.
7731    ///
7732    /// Note that all the setters affecting `resource_config` are
7733    /// mutually exclusive.
7734    ///
7735    /// # Example
7736    /// ```ignore,no_run
7737    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
7738    /// let x = TargetResourceConfig::new().set_existing_target_resource("example");
7739    /// assert!(x.existing_target_resource().is_some());
7740    /// assert!(x.target_resource_creation_config().is_none());
7741    /// ```
7742    pub fn set_existing_target_resource<T: std::convert::Into<std::string::String>>(
7743        mut self,
7744        v: T,
7745    ) -> Self {
7746        self.resource_config = std::option::Option::Some(
7747            crate::model::target_resource_config::ResourceConfig::ExistingTargetResource(v.into()),
7748        );
7749        self
7750    }
7751
7752    /// The value of [resource_config][crate::model::TargetResourceConfig::resource_config]
7753    /// if it holds a `TargetResourceCreationConfig`, `None` if the field is not set or
7754    /// holds a different branch.
7755    pub fn target_resource_creation_config(
7756        &self,
7757    ) -> std::option::Option<&std::boxed::Box<crate::model::TargetResourceCreationConfig>> {
7758        #[allow(unreachable_patterns)]
7759        self.resource_config.as_ref().and_then(|v| match v {
7760            crate::model::target_resource_config::ResourceConfig::TargetResourceCreationConfig(
7761                v,
7762            ) => std::option::Option::Some(v),
7763            _ => std::option::Option::None,
7764        })
7765    }
7766
7767    /// Sets the value of [resource_config][crate::model::TargetResourceConfig::resource_config]
7768    /// to hold a `TargetResourceCreationConfig`.
7769    ///
7770    /// Note that all the setters affecting `resource_config` are
7771    /// mutually exclusive.
7772    ///
7773    /// # Example
7774    /// ```ignore,no_run
7775    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
7776    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceCreationConfig;
7777    /// let x = TargetResourceConfig::new().set_target_resource_creation_config(TargetResourceCreationConfig::default()/* use setters */);
7778    /// assert!(x.target_resource_creation_config().is_some());
7779    /// assert!(x.existing_target_resource().is_none());
7780    /// ```
7781    pub fn set_target_resource_creation_config<
7782        T: std::convert::Into<std::boxed::Box<crate::model::TargetResourceCreationConfig>>,
7783    >(
7784        mut self,
7785        v: T,
7786    ) -> Self {
7787        self.resource_config = std::option::Option::Some(
7788            crate::model::target_resource_config::ResourceConfig::TargetResourceCreationConfig(
7789                v.into(),
7790            ),
7791        );
7792        self
7793    }
7794}
7795
7796impl wkt::message::Message for TargetResourceConfig {
7797    fn typename() -> &'static str {
7798        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig"
7799    }
7800}
7801
7802/// Defines additional types related to [TargetResourceConfig].
7803pub mod target_resource_config {
7804    #[allow(unused_imports)]
7805    use super::*;
7806
7807    /// The resource configuration for the target resource.
7808    #[derive(Clone, Debug, PartialEq)]
7809    #[non_exhaustive]
7810    pub enum ResourceConfig {
7811        /// Optional. The resource hierarchy node, in one of the following formats:
7812        ///
7813        /// - `organizations/{organizationID}`
7814        /// - `folders/{folderID}`
7815        /// - `projects/{projectID}`
7816        ExistingTargetResource(std::string::String),
7817        /// Optional. The details that are required to create a resource and use
7818        /// that resource as the target resource for deployment.
7819        TargetResourceCreationConfig(std::boxed::Box<crate::model::TargetResourceCreationConfig>),
7820    }
7821}
7822
7823/// The configuration that's required to create a target resource.
7824#[derive(Clone, Default, PartialEq)]
7825#[non_exhaustive]
7826pub struct TargetResourceCreationConfig {
7827    /// The configuration that's required to create the target resource.
7828    pub resource_creation_config:
7829        std::option::Option<crate::model::target_resource_creation_config::ResourceCreationConfig>,
7830
7831    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7832}
7833
7834impl TargetResourceCreationConfig {
7835    /// Creates a new default instance.
7836    pub fn new() -> Self {
7837        std::default::Default::default()
7838    }
7839
7840    /// Sets the value of [resource_creation_config][crate::model::TargetResourceCreationConfig::resource_creation_config].
7841    ///
7842    /// Note that all the setters affecting `resource_creation_config` are mutually
7843    /// exclusive.
7844    ///
7845    /// # Example
7846    /// ```ignore,no_run
7847    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceCreationConfig;
7848    /// use google_cloud_cloudsecuritycompliance_v1::model::FolderCreationConfig;
7849    /// let x = TargetResourceCreationConfig::new().set_resource_creation_config(Some(
7850    ///     google_cloud_cloudsecuritycompliance_v1::model::target_resource_creation_config::ResourceCreationConfig::FolderCreationConfig(FolderCreationConfig::default().into())));
7851    /// ```
7852    pub fn set_resource_creation_config<
7853        T: std::convert::Into<
7854                std::option::Option<
7855                    crate::model::target_resource_creation_config::ResourceCreationConfig,
7856                >,
7857            >,
7858    >(
7859        mut self,
7860        v: T,
7861    ) -> Self {
7862        self.resource_creation_config = v.into();
7863        self
7864    }
7865
7866    /// The value of [resource_creation_config][crate::model::TargetResourceCreationConfig::resource_creation_config]
7867    /// if it holds a `FolderCreationConfig`, `None` if the field is not set or
7868    /// holds a different branch.
7869    pub fn folder_creation_config(
7870        &self,
7871    ) -> std::option::Option<&std::boxed::Box<crate::model::FolderCreationConfig>> {
7872        #[allow(unreachable_patterns)]
7873        self.resource_creation_config.as_ref().and_then(|v| match v {
7874            crate::model::target_resource_creation_config::ResourceCreationConfig::FolderCreationConfig(v) => std::option::Option::Some(v),
7875            _ => std::option::Option::None,
7876        })
7877    }
7878
7879    /// Sets the value of [resource_creation_config][crate::model::TargetResourceCreationConfig::resource_creation_config]
7880    /// to hold a `FolderCreationConfig`.
7881    ///
7882    /// Note that all the setters affecting `resource_creation_config` are
7883    /// mutually exclusive.
7884    ///
7885    /// # Example
7886    /// ```ignore,no_run
7887    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceCreationConfig;
7888    /// use google_cloud_cloudsecuritycompliance_v1::model::FolderCreationConfig;
7889    /// let x = TargetResourceCreationConfig::new().set_folder_creation_config(FolderCreationConfig::default()/* use setters */);
7890    /// assert!(x.folder_creation_config().is_some());
7891    /// assert!(x.project_creation_config().is_none());
7892    /// ```
7893    pub fn set_folder_creation_config<
7894        T: std::convert::Into<std::boxed::Box<crate::model::FolderCreationConfig>>,
7895    >(
7896        mut self,
7897        v: T,
7898    ) -> Self {
7899        self.resource_creation_config = std::option::Option::Some(
7900            crate::model::target_resource_creation_config::ResourceCreationConfig::FolderCreationConfig(
7901                v.into()
7902            )
7903        );
7904        self
7905    }
7906
7907    /// The value of [resource_creation_config][crate::model::TargetResourceCreationConfig::resource_creation_config]
7908    /// if it holds a `ProjectCreationConfig`, `None` if the field is not set or
7909    /// holds a different branch.
7910    pub fn project_creation_config(
7911        &self,
7912    ) -> std::option::Option<&std::boxed::Box<crate::model::ProjectCreationConfig>> {
7913        #[allow(unreachable_patterns)]
7914        self.resource_creation_config.as_ref().and_then(|v| match v {
7915            crate::model::target_resource_creation_config::ResourceCreationConfig::ProjectCreationConfig(v) => std::option::Option::Some(v),
7916            _ => std::option::Option::None,
7917        })
7918    }
7919
7920    /// Sets the value of [resource_creation_config][crate::model::TargetResourceCreationConfig::resource_creation_config]
7921    /// to hold a `ProjectCreationConfig`.
7922    ///
7923    /// Note that all the setters affecting `resource_creation_config` are
7924    /// mutually exclusive.
7925    ///
7926    /// # Example
7927    /// ```ignore,no_run
7928    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceCreationConfig;
7929    /// use google_cloud_cloudsecuritycompliance_v1::model::ProjectCreationConfig;
7930    /// let x = TargetResourceCreationConfig::new().set_project_creation_config(ProjectCreationConfig::default()/* use setters */);
7931    /// assert!(x.project_creation_config().is_some());
7932    /// assert!(x.folder_creation_config().is_none());
7933    /// ```
7934    pub fn set_project_creation_config<
7935        T: std::convert::Into<std::boxed::Box<crate::model::ProjectCreationConfig>>,
7936    >(
7937        mut self,
7938        v: T,
7939    ) -> Self {
7940        self.resource_creation_config = std::option::Option::Some(
7941            crate::model::target_resource_creation_config::ResourceCreationConfig::ProjectCreationConfig(
7942                v.into()
7943            )
7944        );
7945        self
7946    }
7947}
7948
7949impl wkt::message::Message for TargetResourceCreationConfig {
7950    fn typename() -> &'static str {
7951        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig"
7952    }
7953}
7954
7955/// Defines additional types related to [TargetResourceCreationConfig].
7956pub mod target_resource_creation_config {
7957    #[allow(unused_imports)]
7958    use super::*;
7959
7960    /// The configuration that's required to create the target resource.
7961    #[derive(Clone, Debug, PartialEq)]
7962    #[non_exhaustive]
7963    pub enum ResourceCreationConfig {
7964        /// Optional. The configuration that's required to create a folder.
7965        FolderCreationConfig(std::boxed::Box<crate::model::FolderCreationConfig>),
7966        /// Optional. The configuration that's required to create a project.
7967        ProjectCreationConfig(std::boxed::Box<crate::model::ProjectCreationConfig>),
7968    }
7969}
7970
7971/// The configuration that's required to create a folder to be used
7972/// as the target resource for a deployment.
7973#[derive(Clone, Default, PartialEq)]
7974#[non_exhaustive]
7975pub struct FolderCreationConfig {
7976    /// Required. The parent of the folder, in the format
7977    /// `organizations/{organizationID}` or `folders/{folderID}`.
7978    pub parent: std::string::String,
7979
7980    /// Required. The display name of the folder.
7981    pub folder_display_name: std::string::String,
7982
7983    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7984}
7985
7986impl FolderCreationConfig {
7987    /// Creates a new default instance.
7988    pub fn new() -> Self {
7989        std::default::Default::default()
7990    }
7991
7992    /// Sets the value of [parent][crate::model::FolderCreationConfig::parent].
7993    ///
7994    /// # Example
7995    /// ```ignore,no_run
7996    /// # use google_cloud_cloudsecuritycompliance_v1::model::FolderCreationConfig;
7997    /// let x = FolderCreationConfig::new().set_parent("example");
7998    /// ```
7999    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8000        self.parent = v.into();
8001        self
8002    }
8003
8004    /// Sets the value of [folder_display_name][crate::model::FolderCreationConfig::folder_display_name].
8005    ///
8006    /// # Example
8007    /// ```ignore,no_run
8008    /// # use google_cloud_cloudsecuritycompliance_v1::model::FolderCreationConfig;
8009    /// let x = FolderCreationConfig::new().set_folder_display_name("example");
8010    /// ```
8011    pub fn set_folder_display_name<T: std::convert::Into<std::string::String>>(
8012        mut self,
8013        v: T,
8014    ) -> Self {
8015        self.folder_display_name = v.into();
8016        self
8017    }
8018}
8019
8020impl wkt::message::Message for FolderCreationConfig {
8021    fn typename() -> &'static str {
8022        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig"
8023    }
8024}
8025
8026/// The configuration that's required to create a project to be used
8027/// as the target resource of a deployment.
8028#[derive(Clone, Default, PartialEq)]
8029#[non_exhaustive]
8030pub struct ProjectCreationConfig {
8031    /// Required. The parent of the project, in the format
8032    /// `organizations/{organizationID}` or `folders/{folderID}`.
8033    pub parent: std::string::String,
8034
8035    /// Required. The display name of the project.
8036    pub project_display_name: std::string::String,
8037
8038    /// Required. The billing account ID for the project.
8039    pub billing_account_id: std::string::String,
8040
8041    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8042}
8043
8044impl ProjectCreationConfig {
8045    /// Creates a new default instance.
8046    pub fn new() -> Self {
8047        std::default::Default::default()
8048    }
8049
8050    /// Sets the value of [parent][crate::model::ProjectCreationConfig::parent].
8051    ///
8052    /// # Example
8053    /// ```ignore,no_run
8054    /// # use google_cloud_cloudsecuritycompliance_v1::model::ProjectCreationConfig;
8055    /// let x = ProjectCreationConfig::new().set_parent("example");
8056    /// ```
8057    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8058        self.parent = v.into();
8059        self
8060    }
8061
8062    /// Sets the value of [project_display_name][crate::model::ProjectCreationConfig::project_display_name].
8063    ///
8064    /// # Example
8065    /// ```ignore,no_run
8066    /// # use google_cloud_cloudsecuritycompliance_v1::model::ProjectCreationConfig;
8067    /// let x = ProjectCreationConfig::new().set_project_display_name("example");
8068    /// ```
8069    pub fn set_project_display_name<T: std::convert::Into<std::string::String>>(
8070        mut self,
8071        v: T,
8072    ) -> Self {
8073        self.project_display_name = v.into();
8074        self
8075    }
8076
8077    /// Sets the value of [billing_account_id][crate::model::ProjectCreationConfig::billing_account_id].
8078    ///
8079    /// # Example
8080    /// ```ignore,no_run
8081    /// # use google_cloud_cloudsecuritycompliance_v1::model::ProjectCreationConfig;
8082    /// let x = ProjectCreationConfig::new().set_billing_account_id("example");
8083    /// ```
8084    pub fn set_billing_account_id<T: std::convert::Into<std::string::String>>(
8085        mut self,
8086        v: T,
8087    ) -> Self {
8088        self.billing_account_id = v.into();
8089        self
8090    }
8091}
8092
8093impl wkt::message::Message for ProjectCreationConfig {
8094    fn typename() -> &'static str {
8095        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig"
8096    }
8097}
8098
8099/// The enforcement mode and parameters of a cloud
8100/// control deployment.
8101#[derive(Clone, Default, PartialEq)]
8102#[non_exhaustive]
8103pub struct CloudControlMetadata {
8104    /// Required. The cloud control name and parameters.
8105    pub cloud_control_details: std::option::Option<crate::model::CloudControlDetails>,
8106
8107    /// Required. The enforcement mode of the cloud control.
8108    pub enforcement_mode: crate::model::EnforcementMode,
8109
8110    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8111}
8112
8113impl CloudControlMetadata {
8114    /// Creates a new default instance.
8115    pub fn new() -> Self {
8116        std::default::Default::default()
8117    }
8118
8119    /// Sets the value of [cloud_control_details][crate::model::CloudControlMetadata::cloud_control_details].
8120    ///
8121    /// # Example
8122    /// ```ignore,no_run
8123    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlMetadata;
8124    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDetails;
8125    /// let x = CloudControlMetadata::new().set_cloud_control_details(CloudControlDetails::default()/* use setters */);
8126    /// ```
8127    pub fn set_cloud_control_details<T>(mut self, v: T) -> Self
8128    where
8129        T: std::convert::Into<crate::model::CloudControlDetails>,
8130    {
8131        self.cloud_control_details = std::option::Option::Some(v.into());
8132        self
8133    }
8134
8135    /// Sets or clears the value of [cloud_control_details][crate::model::CloudControlMetadata::cloud_control_details].
8136    ///
8137    /// # Example
8138    /// ```ignore,no_run
8139    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlMetadata;
8140    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDetails;
8141    /// let x = CloudControlMetadata::new().set_or_clear_cloud_control_details(Some(CloudControlDetails::default()/* use setters */));
8142    /// let x = CloudControlMetadata::new().set_or_clear_cloud_control_details(None::<CloudControlDetails>);
8143    /// ```
8144    pub fn set_or_clear_cloud_control_details<T>(mut self, v: std::option::Option<T>) -> Self
8145    where
8146        T: std::convert::Into<crate::model::CloudControlDetails>,
8147    {
8148        self.cloud_control_details = v.map(|x| x.into());
8149        self
8150    }
8151
8152    /// Sets the value of [enforcement_mode][crate::model::CloudControlMetadata::enforcement_mode].
8153    ///
8154    /// # Example
8155    /// ```ignore,no_run
8156    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlMetadata;
8157    /// use google_cloud_cloudsecuritycompliance_v1::model::EnforcementMode;
8158    /// let x0 = CloudControlMetadata::new().set_enforcement_mode(EnforcementMode::Preventive);
8159    /// let x1 = CloudControlMetadata::new().set_enforcement_mode(EnforcementMode::Detective);
8160    /// let x2 = CloudControlMetadata::new().set_enforcement_mode(EnforcementMode::Audit);
8161    /// ```
8162    pub fn set_enforcement_mode<T: std::convert::Into<crate::model::EnforcementMode>>(
8163        mut self,
8164        v: T,
8165    ) -> Self {
8166        self.enforcement_mode = v.into();
8167        self
8168    }
8169}
8170
8171impl wkt::message::Message for CloudControlMetadata {
8172    fn typename() -> &'static str {
8173        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata"
8174    }
8175}
8176
8177/// The request message for [CreateFrameworkDeployment][].
8178#[derive(Clone, Default, PartialEq)]
8179#[non_exhaustive]
8180pub struct CreateFrameworkDeploymentRequest {
8181    /// Required. The parent resource of the framework deployment in the format
8182    /// `organizations/{organization}/locations/{location}`
8183    /// or
8184    /// `projects/{project}/locations/{location}`.
8185    /// Only the global location is supported.
8186    pub parent: std::string::String,
8187
8188    /// Optional. An identifier for the framework deployment that's unique in scope
8189    /// of the parent. If you don't specify a value, then a random UUID is
8190    /// generated.
8191    pub framework_deployment_id: std::string::String,
8192
8193    /// Required. The framework deployment that you're creating.
8194    pub framework_deployment: std::option::Option<crate::model::FrameworkDeployment>,
8195
8196    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8197}
8198
8199impl CreateFrameworkDeploymentRequest {
8200    /// Creates a new default instance.
8201    pub fn new() -> Self {
8202        std::default::Default::default()
8203    }
8204
8205    /// Sets the value of [parent][crate::model::CreateFrameworkDeploymentRequest::parent].
8206    ///
8207    /// # Example
8208    /// ```ignore,no_run
8209    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkDeploymentRequest;
8210    /// # let organization_id = "organization_id";
8211    /// # let location_id = "location_id";
8212    /// let x = CreateFrameworkDeploymentRequest::new().set_parent(format!("organizations/{organization_id}/locations/{location_id}"));
8213    /// ```
8214    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8215        self.parent = v.into();
8216        self
8217    }
8218
8219    /// Sets the value of [framework_deployment_id][crate::model::CreateFrameworkDeploymentRequest::framework_deployment_id].
8220    ///
8221    /// # Example
8222    /// ```ignore,no_run
8223    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkDeploymentRequest;
8224    /// let x = CreateFrameworkDeploymentRequest::new().set_framework_deployment_id("example");
8225    /// ```
8226    pub fn set_framework_deployment_id<T: std::convert::Into<std::string::String>>(
8227        mut self,
8228        v: T,
8229    ) -> Self {
8230        self.framework_deployment_id = v.into();
8231        self
8232    }
8233
8234    /// Sets the value of [framework_deployment][crate::model::CreateFrameworkDeploymentRequest::framework_deployment].
8235    ///
8236    /// # Example
8237    /// ```ignore,no_run
8238    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkDeploymentRequest;
8239    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
8240    /// let x = CreateFrameworkDeploymentRequest::new().set_framework_deployment(FrameworkDeployment::default()/* use setters */);
8241    /// ```
8242    pub fn set_framework_deployment<T>(mut self, v: T) -> Self
8243    where
8244        T: std::convert::Into<crate::model::FrameworkDeployment>,
8245    {
8246        self.framework_deployment = std::option::Option::Some(v.into());
8247        self
8248    }
8249
8250    /// Sets or clears the value of [framework_deployment][crate::model::CreateFrameworkDeploymentRequest::framework_deployment].
8251    ///
8252    /// # Example
8253    /// ```ignore,no_run
8254    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkDeploymentRequest;
8255    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
8256    /// let x = CreateFrameworkDeploymentRequest::new().set_or_clear_framework_deployment(Some(FrameworkDeployment::default()/* use setters */));
8257    /// let x = CreateFrameworkDeploymentRequest::new().set_or_clear_framework_deployment(None::<FrameworkDeployment>);
8258    /// ```
8259    pub fn set_or_clear_framework_deployment<T>(mut self, v: std::option::Option<T>) -> Self
8260    where
8261        T: std::convert::Into<crate::model::FrameworkDeployment>,
8262    {
8263        self.framework_deployment = v.map(|x| x.into());
8264        self
8265    }
8266}
8267
8268impl wkt::message::Message for CreateFrameworkDeploymentRequest {
8269    fn typename() -> &'static str {
8270        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest"
8271    }
8272}
8273
8274/// The request message for [DeleteFrameworkDeployment][].
8275#[derive(Clone, Default, PartialEq)]
8276#[non_exhaustive]
8277pub struct DeleteFrameworkDeploymentRequest {
8278    /// Required. The name of the framework deployment that you want to delete,
8279    /// in the format
8280    /// `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}`
8281    /// or
8282    /// `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`.
8283    /// The only supported location is `global`.
8284    pub name: std::string::String,
8285
8286    /// Optional. An opaque identifier for the current version of the resource.
8287    ///
8288    /// If you provide this value, then it must match the existing value. If the
8289    /// values don't match, then the request fails with an
8290    /// [`ABORTED`][google.rpc.Code.ABORTED] error.
8291    ///
8292    /// If you omit this value, then the resource is deleted regardless of its
8293    /// current `etag` value.
8294    pub etag: std::string::String,
8295
8296    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8297}
8298
8299impl DeleteFrameworkDeploymentRequest {
8300    /// Creates a new default instance.
8301    pub fn new() -> Self {
8302        std::default::Default::default()
8303    }
8304
8305    /// Sets the value of [name][crate::model::DeleteFrameworkDeploymentRequest::name].
8306    ///
8307    /// # Example
8308    /// ```ignore,no_run
8309    /// # use google_cloud_cloudsecuritycompliance_v1::model::DeleteFrameworkDeploymentRequest;
8310    /// # let organization_id = "organization_id";
8311    /// # let location_id = "location_id";
8312    /// # let framework_deployment_id = "framework_deployment_id";
8313    /// let x = DeleteFrameworkDeploymentRequest::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/frameworkDeployments/{framework_deployment_id}"));
8314    /// ```
8315    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8316        self.name = v.into();
8317        self
8318    }
8319
8320    /// Sets the value of [etag][crate::model::DeleteFrameworkDeploymentRequest::etag].
8321    ///
8322    /// # Example
8323    /// ```ignore,no_run
8324    /// # use google_cloud_cloudsecuritycompliance_v1::model::DeleteFrameworkDeploymentRequest;
8325    /// let x = DeleteFrameworkDeploymentRequest::new().set_etag("example");
8326    /// ```
8327    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8328        self.etag = v.into();
8329        self
8330    }
8331}
8332
8333impl wkt::message::Message for DeleteFrameworkDeploymentRequest {
8334    fn typename() -> &'static str {
8335        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest"
8336    }
8337}
8338
8339/// The request message for [GetFrameworkDeployment][].
8340#[derive(Clone, Default, PartialEq)]
8341#[non_exhaustive]
8342pub struct GetFrameworkDeploymentRequest {
8343    /// Required. The name of the framework deployment, in the format
8344    /// `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}`
8345    /// or
8346    /// `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`.
8347    /// The only supported location is `global`.
8348    pub name: std::string::String,
8349
8350    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8351}
8352
8353impl GetFrameworkDeploymentRequest {
8354    /// Creates a new default instance.
8355    pub fn new() -> Self {
8356        std::default::Default::default()
8357    }
8358
8359    /// Sets the value of [name][crate::model::GetFrameworkDeploymentRequest::name].
8360    ///
8361    /// # Example
8362    /// ```ignore,no_run
8363    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetFrameworkDeploymentRequest;
8364    /// # let organization_id = "organization_id";
8365    /// # let location_id = "location_id";
8366    /// # let framework_deployment_id = "framework_deployment_id";
8367    /// let x = GetFrameworkDeploymentRequest::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/frameworkDeployments/{framework_deployment_id}"));
8368    /// ```
8369    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8370        self.name = v.into();
8371        self
8372    }
8373}
8374
8375impl wkt::message::Message for GetFrameworkDeploymentRequest {
8376    fn typename() -> &'static str {
8377        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest"
8378    }
8379}
8380
8381/// The request message for [ListFrameworkDeployments][].
8382#[derive(Clone, Default, PartialEq)]
8383#[non_exhaustive]
8384pub struct ListFrameworkDeploymentsRequest {
8385    /// Required. The parent resource of the framework deployment, in the format
8386    /// `organizations/{organization}/locations/{location}`
8387    /// or
8388    /// `projects/{project}/locations/{location}`.
8389    /// The only supported location is `global`.
8390    pub parent: std::string::String,
8391
8392    /// Optional. The requested page size. The server might return fewer items than
8393    /// requested.
8394    /// If unspecified, the server picks an appropriate default.
8395    pub page_size: i32,
8396
8397    /// Optional. A token that identifies a page of results the server should
8398    /// return.
8399    pub page_token: std::string::String,
8400
8401    /// Optional. The filter to be applied on the resource, as defined by
8402    /// [AIP-160: Filtering](https://google.aip.dev/160).
8403    pub filter: std::string::String,
8404
8405    /// Optional. The sort order for the results. The following values are
8406    /// supported:
8407    ///
8408    /// * `name`
8409    /// * `name desc`
8410    ///
8411    /// If you do not specify a value, then the results are not sorted.
8412    pub order_by: std::string::String,
8413
8414    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8415}
8416
8417impl ListFrameworkDeploymentsRequest {
8418    /// Creates a new default instance.
8419    pub fn new() -> Self {
8420        std::default::Default::default()
8421    }
8422
8423    /// Sets the value of [parent][crate::model::ListFrameworkDeploymentsRequest::parent].
8424    ///
8425    /// # Example
8426    /// ```ignore,no_run
8427    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsRequest;
8428    /// # let organization_id = "organization_id";
8429    /// # let location_id = "location_id";
8430    /// let x = ListFrameworkDeploymentsRequest::new().set_parent(format!("organizations/{organization_id}/locations/{location_id}"));
8431    /// ```
8432    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8433        self.parent = v.into();
8434        self
8435    }
8436
8437    /// Sets the value of [page_size][crate::model::ListFrameworkDeploymentsRequest::page_size].
8438    ///
8439    /// # Example
8440    /// ```ignore,no_run
8441    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsRequest;
8442    /// let x = ListFrameworkDeploymentsRequest::new().set_page_size(42);
8443    /// ```
8444    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8445        self.page_size = v.into();
8446        self
8447    }
8448
8449    /// Sets the value of [page_token][crate::model::ListFrameworkDeploymentsRequest::page_token].
8450    ///
8451    /// # Example
8452    /// ```ignore,no_run
8453    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsRequest;
8454    /// let x = ListFrameworkDeploymentsRequest::new().set_page_token("example");
8455    /// ```
8456    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8457        self.page_token = v.into();
8458        self
8459    }
8460
8461    /// Sets the value of [filter][crate::model::ListFrameworkDeploymentsRequest::filter].
8462    ///
8463    /// # Example
8464    /// ```ignore,no_run
8465    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsRequest;
8466    /// let x = ListFrameworkDeploymentsRequest::new().set_filter("example");
8467    /// ```
8468    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8469        self.filter = v.into();
8470        self
8471    }
8472
8473    /// Sets the value of [order_by][crate::model::ListFrameworkDeploymentsRequest::order_by].
8474    ///
8475    /// # Example
8476    /// ```ignore,no_run
8477    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsRequest;
8478    /// let x = ListFrameworkDeploymentsRequest::new().set_order_by("example");
8479    /// ```
8480    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8481        self.order_by = v.into();
8482        self
8483    }
8484}
8485
8486impl wkt::message::Message for ListFrameworkDeploymentsRequest {
8487    fn typename() -> &'static str {
8488        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest"
8489    }
8490}
8491
8492/// The response message for [ListFrameworkDeployments][].
8493#[derive(Clone, Default, PartialEq)]
8494#[non_exhaustive]
8495pub struct ListFrameworkDeploymentsResponse {
8496    /// The list of framework deployments.
8497    pub framework_deployments: std::vec::Vec<crate::model::FrameworkDeployment>,
8498
8499    /// A token that identifies the next page of results that the server
8500    /// should return.
8501    pub next_page_token: std::string::String,
8502
8503    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8504}
8505
8506impl ListFrameworkDeploymentsResponse {
8507    /// Creates a new default instance.
8508    pub fn new() -> Self {
8509        std::default::Default::default()
8510    }
8511
8512    /// Sets the value of [framework_deployments][crate::model::ListFrameworkDeploymentsResponse::framework_deployments].
8513    ///
8514    /// # Example
8515    /// ```ignore,no_run
8516    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsResponse;
8517    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
8518    /// let x = ListFrameworkDeploymentsResponse::new()
8519    ///     .set_framework_deployments([
8520    ///         FrameworkDeployment::default()/* use setters */,
8521    ///         FrameworkDeployment::default()/* use (different) setters */,
8522    ///     ]);
8523    /// ```
8524    pub fn set_framework_deployments<T, V>(mut self, v: T) -> Self
8525    where
8526        T: std::iter::IntoIterator<Item = V>,
8527        V: std::convert::Into<crate::model::FrameworkDeployment>,
8528    {
8529        use std::iter::Iterator;
8530        self.framework_deployments = v.into_iter().map(|i| i.into()).collect();
8531        self
8532    }
8533
8534    /// Sets the value of [next_page_token][crate::model::ListFrameworkDeploymentsResponse::next_page_token].
8535    ///
8536    /// # Example
8537    /// ```ignore,no_run
8538    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsResponse;
8539    /// let x = ListFrameworkDeploymentsResponse::new().set_next_page_token("example");
8540    /// ```
8541    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8542        self.next_page_token = v.into();
8543        self
8544    }
8545}
8546
8547impl wkt::message::Message for ListFrameworkDeploymentsResponse {
8548    fn typename() -> &'static str {
8549        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse"
8550    }
8551}
8552
8553#[doc(hidden)]
8554impl google_cloud_gax::paginator::internal::PageableResponse for ListFrameworkDeploymentsResponse {
8555    type PageItem = crate::model::FrameworkDeployment;
8556
8557    fn items(self) -> std::vec::Vec<Self::PageItem> {
8558        self.framework_deployments
8559    }
8560
8561    fn next_page_token(&self) -> std::string::String {
8562        use std::clone::Clone;
8563        self.next_page_token.clone()
8564    }
8565}
8566
8567/// The request message for [GetCloudControlDeployment][].
8568#[derive(Clone, Default, PartialEq)]
8569#[non_exhaustive]
8570pub struct GetCloudControlDeploymentRequest {
8571    /// Required. The name for the cloud control deployment, in the format
8572    /// `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`
8573    /// or
8574    /// `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`.
8575    /// The only supported location is `global`.
8576    pub name: std::string::String,
8577
8578    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8579}
8580
8581impl GetCloudControlDeploymentRequest {
8582    /// Creates a new default instance.
8583    pub fn new() -> Self {
8584        std::default::Default::default()
8585    }
8586
8587    /// Sets the value of [name][crate::model::GetCloudControlDeploymentRequest::name].
8588    ///
8589    /// # Example
8590    /// ```ignore,no_run
8591    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetCloudControlDeploymentRequest;
8592    /// # let organization_id = "organization_id";
8593    /// # let location_id = "location_id";
8594    /// # let cloud_control_deployment_id = "cloud_control_deployment_id";
8595    /// let x = GetCloudControlDeploymentRequest::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/cloudControlDeployments/{cloud_control_deployment_id}"));
8596    /// ```
8597    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8598        self.name = v.into();
8599        self
8600    }
8601}
8602
8603impl wkt::message::Message for GetCloudControlDeploymentRequest {
8604    fn typename() -> &'static str {
8605        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest"
8606    }
8607}
8608
8609/// The request message for [ListCloudControlDeployments][].
8610#[derive(Clone, Default, PartialEq)]
8611#[non_exhaustive]
8612pub struct ListCloudControlDeploymentsRequest {
8613    /// Required. The parent resource for the cloud control deployment, in the
8614    /// format `organizations/{organization}/locations/{location}` or
8615    /// `projects/{project}/locations/{location}`.
8616    /// The only supported location is `global`.
8617    pub parent: std::string::String,
8618
8619    /// Optional. The requested page size. The server might return fewer items than
8620    /// you requested.
8621    /// If unspecified, the server picks an appropriate default.
8622    pub page_size: i32,
8623
8624    /// Optional. A token that identifies the page of results that the server
8625    /// should return.
8626    pub page_token: std::string::String,
8627
8628    /// Optional. The filter to apply on the resource, as defined by
8629    /// [AIP-160: Filtering](https://google.aip.dev/160).
8630    pub filter: std::string::String,
8631
8632    /// Optional. The sort order for the results. The following values are
8633    /// supported:
8634    ///
8635    /// * `name`
8636    /// * `name desc`
8637    ///
8638    /// If you do not specify a value, then the results are not sorted.
8639    pub order_by: std::string::String,
8640
8641    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8642}
8643
8644impl ListCloudControlDeploymentsRequest {
8645    /// Creates a new default instance.
8646    pub fn new() -> Self {
8647        std::default::Default::default()
8648    }
8649
8650    /// Sets the value of [parent][crate::model::ListCloudControlDeploymentsRequest::parent].
8651    ///
8652    /// # Example
8653    /// ```ignore,no_run
8654    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsRequest;
8655    /// # let organization_id = "organization_id";
8656    /// # let location_id = "location_id";
8657    /// let x = ListCloudControlDeploymentsRequest::new().set_parent(format!("organizations/{organization_id}/locations/{location_id}"));
8658    /// ```
8659    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8660        self.parent = v.into();
8661        self
8662    }
8663
8664    /// Sets the value of [page_size][crate::model::ListCloudControlDeploymentsRequest::page_size].
8665    ///
8666    /// # Example
8667    /// ```ignore,no_run
8668    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsRequest;
8669    /// let x = ListCloudControlDeploymentsRequest::new().set_page_size(42);
8670    /// ```
8671    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8672        self.page_size = v.into();
8673        self
8674    }
8675
8676    /// Sets the value of [page_token][crate::model::ListCloudControlDeploymentsRequest::page_token].
8677    ///
8678    /// # Example
8679    /// ```ignore,no_run
8680    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsRequest;
8681    /// let x = ListCloudControlDeploymentsRequest::new().set_page_token("example");
8682    /// ```
8683    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8684        self.page_token = v.into();
8685        self
8686    }
8687
8688    /// Sets the value of [filter][crate::model::ListCloudControlDeploymentsRequest::filter].
8689    ///
8690    /// # Example
8691    /// ```ignore,no_run
8692    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsRequest;
8693    /// let x = ListCloudControlDeploymentsRequest::new().set_filter("example");
8694    /// ```
8695    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8696        self.filter = v.into();
8697        self
8698    }
8699
8700    /// Sets the value of [order_by][crate::model::ListCloudControlDeploymentsRequest::order_by].
8701    ///
8702    /// # Example
8703    /// ```ignore,no_run
8704    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsRequest;
8705    /// let x = ListCloudControlDeploymentsRequest::new().set_order_by("example");
8706    /// ```
8707    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8708        self.order_by = v.into();
8709        self
8710    }
8711}
8712
8713impl wkt::message::Message for ListCloudControlDeploymentsRequest {
8714    fn typename() -> &'static str {
8715        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest"
8716    }
8717}
8718
8719/// The response message for [ListCloudControlDeployments][].
8720#[derive(Clone, Default, PartialEq)]
8721#[non_exhaustive]
8722pub struct ListCloudControlDeploymentsResponse {
8723    /// The list of cloud control deployments.
8724    pub cloud_control_deployments: std::vec::Vec<crate::model::CloudControlDeployment>,
8725
8726    /// A token that identifies the next page of results that the server
8727    /// should return.
8728    pub next_page_token: std::string::String,
8729
8730    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8731}
8732
8733impl ListCloudControlDeploymentsResponse {
8734    /// Creates a new default instance.
8735    pub fn new() -> Self {
8736        std::default::Default::default()
8737    }
8738
8739    /// Sets the value of [cloud_control_deployments][crate::model::ListCloudControlDeploymentsResponse::cloud_control_deployments].
8740    ///
8741    /// # Example
8742    /// ```ignore,no_run
8743    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsResponse;
8744    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
8745    /// let x = ListCloudControlDeploymentsResponse::new()
8746    ///     .set_cloud_control_deployments([
8747    ///         CloudControlDeployment::default()/* use setters */,
8748    ///         CloudControlDeployment::default()/* use (different) setters */,
8749    ///     ]);
8750    /// ```
8751    pub fn set_cloud_control_deployments<T, V>(mut self, v: T) -> Self
8752    where
8753        T: std::iter::IntoIterator<Item = V>,
8754        V: std::convert::Into<crate::model::CloudControlDeployment>,
8755    {
8756        use std::iter::Iterator;
8757        self.cloud_control_deployments = v.into_iter().map(|i| i.into()).collect();
8758        self
8759    }
8760
8761    /// Sets the value of [next_page_token][crate::model::ListCloudControlDeploymentsResponse::next_page_token].
8762    ///
8763    /// # Example
8764    /// ```ignore,no_run
8765    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsResponse;
8766    /// let x = ListCloudControlDeploymentsResponse::new().set_next_page_token("example");
8767    /// ```
8768    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8769        self.next_page_token = v.into();
8770        self
8771    }
8772}
8773
8774impl wkt::message::Message for ListCloudControlDeploymentsResponse {
8775    fn typename() -> &'static str {
8776        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse"
8777    }
8778}
8779
8780#[doc(hidden)]
8781impl google_cloud_gax::paginator::internal::PageableResponse
8782    for ListCloudControlDeploymentsResponse
8783{
8784    type PageItem = crate::model::CloudControlDeployment;
8785
8786    fn items(self) -> std::vec::Vec<Self::PageItem> {
8787        self.cloud_control_deployments
8788    }
8789
8790    fn next_page_token(&self) -> std::string::String {
8791        use std::clone::Clone;
8792        self.next_page_token.clone()
8793    }
8794}
8795
8796/// The reference to a cloud control deployment.
8797#[derive(Clone, Default, PartialEq)]
8798#[non_exhaustive]
8799pub struct CloudControlDeploymentReference {
8800    /// Output only. The name of the CloudControlDeployment. The format is
8801    /// `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`
8802    /// or
8803    /// `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`.
8804    /// The only supported location is `global`.
8805    pub cloud_control_deployment: std::string::String,
8806
8807    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8808}
8809
8810impl CloudControlDeploymentReference {
8811    /// Creates a new default instance.
8812    pub fn new() -> Self {
8813        std::default::Default::default()
8814    }
8815
8816    /// Sets the value of [cloud_control_deployment][crate::model::CloudControlDeploymentReference::cloud_control_deployment].
8817    ///
8818    /// # Example
8819    /// ```ignore,no_run
8820    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeploymentReference;
8821    /// # let organization_id = "organization_id";
8822    /// # let location_id = "location_id";
8823    /// # let cloud_control_deployment_id = "cloud_control_deployment_id";
8824    /// let x = CloudControlDeploymentReference::new().set_cloud_control_deployment(format!("organizations/{organization_id}/locations/{location_id}/cloudControlDeployments/{cloud_control_deployment_id}"));
8825    /// ```
8826    pub fn set_cloud_control_deployment<T: std::convert::Into<std::string::String>>(
8827        mut self,
8828        v: T,
8829    ) -> Self {
8830        self.cloud_control_deployment = v.into();
8831        self
8832    }
8833}
8834
8835impl wkt::message::Message for CloudControlDeploymentReference {
8836    fn typename() -> &'static str {
8837        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference"
8838    }
8839}
8840
8841/// The reference to a framework deployment.
8842#[derive(Clone, Default, PartialEq)]
8843#[non_exhaustive]
8844pub struct FrameworkDeploymentReference {
8845    /// Output only. The name of the framework deployment, in the format
8846    /// `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}`
8847    /// or
8848    /// `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`.
8849    /// The only supported location is `global`.
8850    pub framework_deployment: std::string::String,
8851
8852    /// Optional. The reference to the framework that this deployment is for.
8853    /// For example:
8854    ///
8855    /// ```norust
8856    /// {
8857    ///   framework:
8858    ///   "organizations/{organization}/locations/{location}/frameworks/{framework}",
8859    ///   major_revision_id: 1
8860    /// }
8861    /// ```
8862    ///
8863    /// The only supported location is `global`.
8864    pub framework_reference: std::option::Option<crate::model::FrameworkReference>,
8865
8866    /// Optional. The display name of the framework that this framework deployment
8867    /// is for.
8868    pub framework_display_name: std::string::String,
8869
8870    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8871}
8872
8873impl FrameworkDeploymentReference {
8874    /// Creates a new default instance.
8875    pub fn new() -> Self {
8876        std::default::Default::default()
8877    }
8878
8879    /// Sets the value of [framework_deployment][crate::model::FrameworkDeploymentReference::framework_deployment].
8880    ///
8881    /// # Example
8882    /// ```ignore,no_run
8883    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeploymentReference;
8884    /// # let organization_id = "organization_id";
8885    /// # let location_id = "location_id";
8886    /// # let framework_deployment_id = "framework_deployment_id";
8887    /// let x = FrameworkDeploymentReference::new().set_framework_deployment(format!("organizations/{organization_id}/locations/{location_id}/frameworkDeployments/{framework_deployment_id}"));
8888    /// ```
8889    pub fn set_framework_deployment<T: std::convert::Into<std::string::String>>(
8890        mut self,
8891        v: T,
8892    ) -> Self {
8893        self.framework_deployment = v.into();
8894        self
8895    }
8896
8897    /// Sets the value of [framework_reference][crate::model::FrameworkDeploymentReference::framework_reference].
8898    ///
8899    /// # Example
8900    /// ```ignore,no_run
8901    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeploymentReference;
8902    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
8903    /// let x = FrameworkDeploymentReference::new().set_framework_reference(FrameworkReference::default()/* use setters */);
8904    /// ```
8905    pub fn set_framework_reference<T>(mut self, v: T) -> Self
8906    where
8907        T: std::convert::Into<crate::model::FrameworkReference>,
8908    {
8909        self.framework_reference = std::option::Option::Some(v.into());
8910        self
8911    }
8912
8913    /// Sets or clears the value of [framework_reference][crate::model::FrameworkDeploymentReference::framework_reference].
8914    ///
8915    /// # Example
8916    /// ```ignore,no_run
8917    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeploymentReference;
8918    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
8919    /// let x = FrameworkDeploymentReference::new().set_or_clear_framework_reference(Some(FrameworkReference::default()/* use setters */));
8920    /// let x = FrameworkDeploymentReference::new().set_or_clear_framework_reference(None::<FrameworkReference>);
8921    /// ```
8922    pub fn set_or_clear_framework_reference<T>(mut self, v: std::option::Option<T>) -> Self
8923    where
8924        T: std::convert::Into<crate::model::FrameworkReference>,
8925    {
8926        self.framework_reference = v.map(|x| x.into());
8927        self
8928    }
8929
8930    /// Sets the value of [framework_display_name][crate::model::FrameworkDeploymentReference::framework_display_name].
8931    ///
8932    /// # Example
8933    /// ```ignore,no_run
8934    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeploymentReference;
8935    /// let x = FrameworkDeploymentReference::new().set_framework_display_name("example");
8936    /// ```
8937    pub fn set_framework_display_name<T: std::convert::Into<std::string::String>>(
8938        mut self,
8939        v: T,
8940    ) -> Self {
8941        self.framework_display_name = v.into();
8942        self
8943    }
8944}
8945
8946impl wkt::message::Message for FrameworkDeploymentReference {
8947    fn typename() -> &'static str {
8948        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference"
8949    }
8950}
8951
8952/// The request message for
8953/// [ListFrameworkComplianceSummariesRequest][google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest].
8954///
8955/// [google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest]: crate::model::ListFrameworkComplianceSummariesRequest
8956#[derive(Clone, Default, PartialEq)]
8957#[non_exhaustive]
8958pub struct ListFrameworkComplianceSummariesRequest {
8959    /// Required. The parent scope for the framework compliance summary.
8960    pub parent: std::string::String,
8961
8962    /// Optional. The requested page size. The server might return fewer items than
8963    /// requested. If unspecified, the server picks an appropriate default.
8964    pub page_size: i32,
8965
8966    /// Optional. A token that identifies the page of results that the server
8967    /// should return.
8968    pub page_token: std::string::String,
8969
8970    /// Optional. The filtering results.
8971    pub filter: std::string::String,
8972
8973    /// Optional. Specifies the level of detail to return in the response.
8974    pub view: crate::model::FrameworkComplianceSummaryView,
8975
8976    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8977}
8978
8979impl ListFrameworkComplianceSummariesRequest {
8980    /// Creates a new default instance.
8981    pub fn new() -> Self {
8982        std::default::Default::default()
8983    }
8984
8985    /// Sets the value of [parent][crate::model::ListFrameworkComplianceSummariesRequest::parent].
8986    ///
8987    /// # Example
8988    /// ```ignore,no_run
8989    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesRequest;
8990    /// # let project_id = "project_id";
8991    /// # let location_id = "location_id";
8992    /// let x = ListFrameworkComplianceSummariesRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
8993    /// ```
8994    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8995        self.parent = v.into();
8996        self
8997    }
8998
8999    /// Sets the value of [page_size][crate::model::ListFrameworkComplianceSummariesRequest::page_size].
9000    ///
9001    /// # Example
9002    /// ```ignore,no_run
9003    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesRequest;
9004    /// let x = ListFrameworkComplianceSummariesRequest::new().set_page_size(42);
9005    /// ```
9006    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9007        self.page_size = v.into();
9008        self
9009    }
9010
9011    /// Sets the value of [page_token][crate::model::ListFrameworkComplianceSummariesRequest::page_token].
9012    ///
9013    /// # Example
9014    /// ```ignore,no_run
9015    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesRequest;
9016    /// let x = ListFrameworkComplianceSummariesRequest::new().set_page_token("example");
9017    /// ```
9018    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9019        self.page_token = v.into();
9020        self
9021    }
9022
9023    /// Sets the value of [filter][crate::model::ListFrameworkComplianceSummariesRequest::filter].
9024    ///
9025    /// # Example
9026    /// ```ignore,no_run
9027    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesRequest;
9028    /// let x = ListFrameworkComplianceSummariesRequest::new().set_filter("example");
9029    /// ```
9030    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9031        self.filter = v.into();
9032        self
9033    }
9034
9035    /// Sets the value of [view][crate::model::ListFrameworkComplianceSummariesRequest::view].
9036    ///
9037    /// # Example
9038    /// ```ignore,no_run
9039    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesRequest;
9040    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummaryView;
9041    /// let x0 = ListFrameworkComplianceSummariesRequest::new().set_view(FrameworkComplianceSummaryView::Basic);
9042    /// let x1 = ListFrameworkComplianceSummariesRequest::new().set_view(FrameworkComplianceSummaryView::Full);
9043    /// ```
9044    pub fn set_view<T: std::convert::Into<crate::model::FrameworkComplianceSummaryView>>(
9045        mut self,
9046        v: T,
9047    ) -> Self {
9048        self.view = v.into();
9049        self
9050    }
9051}
9052
9053impl wkt::message::Message for ListFrameworkComplianceSummariesRequest {
9054    fn typename() -> &'static str {
9055        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest"
9056    }
9057}
9058
9059/// The response message for
9060/// [ListFrameworkComplianceSummariesResponse][google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse].
9061///
9062/// [google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse]: crate::model::ListFrameworkComplianceSummariesResponse
9063#[derive(Clone, Default, PartialEq)]
9064#[non_exhaustive]
9065pub struct ListFrameworkComplianceSummariesResponse {
9066    /// The list of framework compliance summaries.
9067    pub framework_compliance_summaries: std::vec::Vec<crate::model::FrameworkComplianceSummary>,
9068
9069    /// Output only. The token to retrieve the next page of results.
9070    pub next_page_token: std::string::String,
9071
9072    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9073}
9074
9075impl ListFrameworkComplianceSummariesResponse {
9076    /// Creates a new default instance.
9077    pub fn new() -> Self {
9078        std::default::Default::default()
9079    }
9080
9081    /// Sets the value of [framework_compliance_summaries][crate::model::ListFrameworkComplianceSummariesResponse::framework_compliance_summaries].
9082    ///
9083    /// # Example
9084    /// ```ignore,no_run
9085    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesResponse;
9086    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
9087    /// let x = ListFrameworkComplianceSummariesResponse::new()
9088    ///     .set_framework_compliance_summaries([
9089    ///         FrameworkComplianceSummary::default()/* use setters */,
9090    ///         FrameworkComplianceSummary::default()/* use (different) setters */,
9091    ///     ]);
9092    /// ```
9093    pub fn set_framework_compliance_summaries<T, V>(mut self, v: T) -> Self
9094    where
9095        T: std::iter::IntoIterator<Item = V>,
9096        V: std::convert::Into<crate::model::FrameworkComplianceSummary>,
9097    {
9098        use std::iter::Iterator;
9099        self.framework_compliance_summaries = v.into_iter().map(|i| i.into()).collect();
9100        self
9101    }
9102
9103    /// Sets the value of [next_page_token][crate::model::ListFrameworkComplianceSummariesResponse::next_page_token].
9104    ///
9105    /// # Example
9106    /// ```ignore,no_run
9107    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesResponse;
9108    /// let x = ListFrameworkComplianceSummariesResponse::new().set_next_page_token("example");
9109    /// ```
9110    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9111        self.next_page_token = v.into();
9112        self
9113    }
9114}
9115
9116impl wkt::message::Message for ListFrameworkComplianceSummariesResponse {
9117    fn typename() -> &'static str {
9118        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse"
9119    }
9120}
9121
9122#[doc(hidden)]
9123impl google_cloud_gax::paginator::internal::PageableResponse
9124    for ListFrameworkComplianceSummariesResponse
9125{
9126    type PageItem = crate::model::FrameworkComplianceSummary;
9127
9128    fn items(self) -> std::vec::Vec<Self::PageItem> {
9129        self.framework_compliance_summaries
9130    }
9131
9132    fn next_page_token(&self) -> std::string::String {
9133        use std::clone::Clone;
9134        self.next_page_token.clone()
9135    }
9136}
9137
9138/// The response message for [GetFrameworkComplianceReport][].
9139#[derive(Clone, Default, PartialEq)]
9140#[non_exhaustive]
9141pub struct FrameworkComplianceReport {
9142    /// The name of the framework.
9143    pub framework: std::string::String,
9144
9145    /// The description of the framework.
9146    pub framework_description: std::string::String,
9147
9148    /// Output only. The last updated time of the report.
9149    pub update_time: std::option::Option<wkt::Timestamp>,
9150
9151    /// The control assessment details of the framework.
9152    pub control_assessment_details: std::option::Option<crate::model::ControlAssessmentDetails>,
9153
9154    /// The type of framework.
9155    pub framework_type: crate::model::framework::FrameworkType,
9156
9157    /// The list of cloud providers supported by the framework.
9158    pub supported_cloud_providers: std::vec::Vec<crate::model::CloudProvider>,
9159
9160    /// The list of framework categories supported.
9161    pub framework_categories: std::vec::Vec<crate::model::FrameworkCategory>,
9162
9163    /// Optional. The display name for the framework.
9164    pub framework_display_name: std::string::String,
9165
9166    /// Identifier. The name of the framework compliance report.
9167    pub name: std::string::String,
9168
9169    /// The latest major revision ID of the framework.
9170    pub major_revision_id: i64,
9171
9172    /// The latest minor revision ID of the latest major revision of the framework.
9173    pub minor_revision_id: i64,
9174
9175    /// The target resource details of the framework.
9176    pub target_resource_details: std::vec::Vec<crate::model::TargetResourceDetails>,
9177
9178    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9179}
9180
9181impl FrameworkComplianceReport {
9182    /// Creates a new default instance.
9183    pub fn new() -> Self {
9184        std::default::Default::default()
9185    }
9186
9187    /// Sets the value of [framework][crate::model::FrameworkComplianceReport::framework].
9188    ///
9189    /// # Example
9190    /// ```ignore,no_run
9191    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9192    /// let x = FrameworkComplianceReport::new().set_framework("example");
9193    /// ```
9194    pub fn set_framework<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9195        self.framework = v.into();
9196        self
9197    }
9198
9199    /// Sets the value of [framework_description][crate::model::FrameworkComplianceReport::framework_description].
9200    ///
9201    /// # Example
9202    /// ```ignore,no_run
9203    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9204    /// let x = FrameworkComplianceReport::new().set_framework_description("example");
9205    /// ```
9206    pub fn set_framework_description<T: std::convert::Into<std::string::String>>(
9207        mut self,
9208        v: T,
9209    ) -> Self {
9210        self.framework_description = v.into();
9211        self
9212    }
9213
9214    /// Sets the value of [update_time][crate::model::FrameworkComplianceReport::update_time].
9215    ///
9216    /// # Example
9217    /// ```ignore,no_run
9218    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9219    /// use wkt::Timestamp;
9220    /// let x = FrameworkComplianceReport::new().set_update_time(Timestamp::default()/* use setters */);
9221    /// ```
9222    pub fn set_update_time<T>(mut self, v: T) -> Self
9223    where
9224        T: std::convert::Into<wkt::Timestamp>,
9225    {
9226        self.update_time = std::option::Option::Some(v.into());
9227        self
9228    }
9229
9230    /// Sets or clears the value of [update_time][crate::model::FrameworkComplianceReport::update_time].
9231    ///
9232    /// # Example
9233    /// ```ignore,no_run
9234    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9235    /// use wkt::Timestamp;
9236    /// let x = FrameworkComplianceReport::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
9237    /// let x = FrameworkComplianceReport::new().set_or_clear_update_time(None::<Timestamp>);
9238    /// ```
9239    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
9240    where
9241        T: std::convert::Into<wkt::Timestamp>,
9242    {
9243        self.update_time = v.map(|x| x.into());
9244        self
9245    }
9246
9247    /// Sets the value of [control_assessment_details][crate::model::FrameworkComplianceReport::control_assessment_details].
9248    ///
9249    /// # Example
9250    /// ```ignore,no_run
9251    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9252    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
9253    /// let x = FrameworkComplianceReport::new().set_control_assessment_details(ControlAssessmentDetails::default()/* use setters */);
9254    /// ```
9255    pub fn set_control_assessment_details<T>(mut self, v: T) -> Self
9256    where
9257        T: std::convert::Into<crate::model::ControlAssessmentDetails>,
9258    {
9259        self.control_assessment_details = std::option::Option::Some(v.into());
9260        self
9261    }
9262
9263    /// Sets or clears the value of [control_assessment_details][crate::model::FrameworkComplianceReport::control_assessment_details].
9264    ///
9265    /// # Example
9266    /// ```ignore,no_run
9267    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9268    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
9269    /// let x = FrameworkComplianceReport::new().set_or_clear_control_assessment_details(Some(ControlAssessmentDetails::default()/* use setters */));
9270    /// let x = FrameworkComplianceReport::new().set_or_clear_control_assessment_details(None::<ControlAssessmentDetails>);
9271    /// ```
9272    pub fn set_or_clear_control_assessment_details<T>(mut self, v: std::option::Option<T>) -> Self
9273    where
9274        T: std::convert::Into<crate::model::ControlAssessmentDetails>,
9275    {
9276        self.control_assessment_details = v.map(|x| x.into());
9277        self
9278    }
9279
9280    /// Sets the value of [framework_type][crate::model::FrameworkComplianceReport::framework_type].
9281    ///
9282    /// # Example
9283    /// ```ignore,no_run
9284    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9285    /// use google_cloud_cloudsecuritycompliance_v1::model::framework::FrameworkType;
9286    /// let x0 = FrameworkComplianceReport::new().set_framework_type(FrameworkType::BuiltIn);
9287    /// let x1 = FrameworkComplianceReport::new().set_framework_type(FrameworkType::Custom);
9288    /// ```
9289    pub fn set_framework_type<T: std::convert::Into<crate::model::framework::FrameworkType>>(
9290        mut self,
9291        v: T,
9292    ) -> Self {
9293        self.framework_type = v.into();
9294        self
9295    }
9296
9297    /// Sets the value of [supported_cloud_providers][crate::model::FrameworkComplianceReport::supported_cloud_providers].
9298    ///
9299    /// # Example
9300    /// ```ignore,no_run
9301    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9302    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudProvider;
9303    /// let x = FrameworkComplianceReport::new().set_supported_cloud_providers([
9304    ///     CloudProvider::Aws,
9305    ///     CloudProvider::Azure,
9306    ///     CloudProvider::Gcp,
9307    /// ]);
9308    /// ```
9309    pub fn set_supported_cloud_providers<T, V>(mut self, v: T) -> Self
9310    where
9311        T: std::iter::IntoIterator<Item = V>,
9312        V: std::convert::Into<crate::model::CloudProvider>,
9313    {
9314        use std::iter::Iterator;
9315        self.supported_cloud_providers = v.into_iter().map(|i| i.into()).collect();
9316        self
9317    }
9318
9319    /// Sets the value of [framework_categories][crate::model::FrameworkComplianceReport::framework_categories].
9320    ///
9321    /// # Example
9322    /// ```ignore,no_run
9323    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9324    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkCategory;
9325    /// let x = FrameworkComplianceReport::new().set_framework_categories([
9326    ///     FrameworkCategory::IndustryDefinedStandard,
9327    ///     FrameworkCategory::AssuredWorkloads,
9328    ///     FrameworkCategory::DataSecurity,
9329    /// ]);
9330    /// ```
9331    pub fn set_framework_categories<T, V>(mut self, v: T) -> Self
9332    where
9333        T: std::iter::IntoIterator<Item = V>,
9334        V: std::convert::Into<crate::model::FrameworkCategory>,
9335    {
9336        use std::iter::Iterator;
9337        self.framework_categories = v.into_iter().map(|i| i.into()).collect();
9338        self
9339    }
9340
9341    /// Sets the value of [framework_display_name][crate::model::FrameworkComplianceReport::framework_display_name].
9342    ///
9343    /// # Example
9344    /// ```ignore,no_run
9345    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9346    /// let x = FrameworkComplianceReport::new().set_framework_display_name("example");
9347    /// ```
9348    pub fn set_framework_display_name<T: std::convert::Into<std::string::String>>(
9349        mut self,
9350        v: T,
9351    ) -> Self {
9352        self.framework_display_name = v.into();
9353        self
9354    }
9355
9356    /// Sets the value of [name][crate::model::FrameworkComplianceReport::name].
9357    ///
9358    /// # Example
9359    /// ```ignore,no_run
9360    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9361    /// # let project_id = "project_id";
9362    /// # let location_id = "location_id";
9363    /// # let framework_compliance_report_id = "framework_compliance_report_id";
9364    /// let x = FrameworkComplianceReport::new().set_name(format!("projects/{project_id}/locations/{location_id}/frameworkComplianceReports/{framework_compliance_report_id}"));
9365    /// ```
9366    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9367        self.name = v.into();
9368        self
9369    }
9370
9371    /// Sets the value of [major_revision_id][crate::model::FrameworkComplianceReport::major_revision_id].
9372    ///
9373    /// # Example
9374    /// ```ignore,no_run
9375    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9376    /// let x = FrameworkComplianceReport::new().set_major_revision_id(42);
9377    /// ```
9378    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9379        self.major_revision_id = v.into();
9380        self
9381    }
9382
9383    /// Sets the value of [minor_revision_id][crate::model::FrameworkComplianceReport::minor_revision_id].
9384    ///
9385    /// # Example
9386    /// ```ignore,no_run
9387    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9388    /// let x = FrameworkComplianceReport::new().set_minor_revision_id(42);
9389    /// ```
9390    pub fn set_minor_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9391        self.minor_revision_id = v.into();
9392        self
9393    }
9394
9395    /// Sets the value of [target_resource_details][crate::model::FrameworkComplianceReport::target_resource_details].
9396    ///
9397    /// # Example
9398    /// ```ignore,no_run
9399    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9400    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
9401    /// let x = FrameworkComplianceReport::new()
9402    ///     .set_target_resource_details([
9403    ///         TargetResourceDetails::default()/* use setters */,
9404    ///         TargetResourceDetails::default()/* use (different) setters */,
9405    ///     ]);
9406    /// ```
9407    pub fn set_target_resource_details<T, V>(mut self, v: T) -> Self
9408    where
9409        T: std::iter::IntoIterator<Item = V>,
9410        V: std::convert::Into<crate::model::TargetResourceDetails>,
9411    {
9412        use std::iter::Iterator;
9413        self.target_resource_details = v.into_iter().map(|i| i.into()).collect();
9414        self
9415    }
9416}
9417
9418impl wkt::message::Message for FrameworkComplianceReport {
9419    fn typename() -> &'static str {
9420        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport"
9421    }
9422}
9423
9424/// The request message for [FetchFrameworkComplianceReport][].
9425#[derive(Clone, Default, PartialEq)]
9426#[non_exhaustive]
9427pub struct FetchFrameworkComplianceReportRequest {
9428    /// Required. The name of the framework compliance report to retrieve.
9429    pub name: std::string::String,
9430
9431    /// Optional. The end time of the report.
9432    pub end_time: std::option::Option<wkt::Timestamp>,
9433
9434    /// Optional. The filtering results.
9435    pub filter: std::string::String,
9436
9437    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9438}
9439
9440impl FetchFrameworkComplianceReportRequest {
9441    /// Creates a new default instance.
9442    pub fn new() -> Self {
9443        std::default::Default::default()
9444    }
9445
9446    /// Sets the value of [name][crate::model::FetchFrameworkComplianceReportRequest::name].
9447    ///
9448    /// # Example
9449    /// ```ignore,no_run
9450    /// # use google_cloud_cloudsecuritycompliance_v1::model::FetchFrameworkComplianceReportRequest;
9451    /// # let project_id = "project_id";
9452    /// # let location_id = "location_id";
9453    /// # let framework_compliance_report_id = "framework_compliance_report_id";
9454    /// let x = FetchFrameworkComplianceReportRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/frameworkComplianceReports/{framework_compliance_report_id}"));
9455    /// ```
9456    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9457        self.name = v.into();
9458        self
9459    }
9460
9461    /// Sets the value of [end_time][crate::model::FetchFrameworkComplianceReportRequest::end_time].
9462    ///
9463    /// # Example
9464    /// ```ignore,no_run
9465    /// # use google_cloud_cloudsecuritycompliance_v1::model::FetchFrameworkComplianceReportRequest;
9466    /// use wkt::Timestamp;
9467    /// let x = FetchFrameworkComplianceReportRequest::new().set_end_time(Timestamp::default()/* use setters */);
9468    /// ```
9469    pub fn set_end_time<T>(mut self, v: T) -> Self
9470    where
9471        T: std::convert::Into<wkt::Timestamp>,
9472    {
9473        self.end_time = std::option::Option::Some(v.into());
9474        self
9475    }
9476
9477    /// Sets or clears the value of [end_time][crate::model::FetchFrameworkComplianceReportRequest::end_time].
9478    ///
9479    /// # Example
9480    /// ```ignore,no_run
9481    /// # use google_cloud_cloudsecuritycompliance_v1::model::FetchFrameworkComplianceReportRequest;
9482    /// use wkt::Timestamp;
9483    /// let x = FetchFrameworkComplianceReportRequest::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
9484    /// let x = FetchFrameworkComplianceReportRequest::new().set_or_clear_end_time(None::<Timestamp>);
9485    /// ```
9486    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
9487    where
9488        T: std::convert::Into<wkt::Timestamp>,
9489    {
9490        self.end_time = v.map(|x| x.into());
9491        self
9492    }
9493
9494    /// Sets the value of [filter][crate::model::FetchFrameworkComplianceReportRequest::filter].
9495    ///
9496    /// # Example
9497    /// ```ignore,no_run
9498    /// # use google_cloud_cloudsecuritycompliance_v1::model::FetchFrameworkComplianceReportRequest;
9499    /// let x = FetchFrameworkComplianceReportRequest::new().set_filter("example");
9500    /// ```
9501    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9502        self.filter = v.into();
9503        self
9504    }
9505}
9506
9507impl wkt::message::Message for FetchFrameworkComplianceReportRequest {
9508    fn typename() -> &'static str {
9509        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest"
9510    }
9511}
9512
9513/// The request message for [ListFindingSummaries][].
9514#[derive(Clone, Default, PartialEq)]
9515#[non_exhaustive]
9516pub struct ListFindingSummariesRequest {
9517    /// Required. The parent scope for the framework overview page.
9518    pub parent: std::string::String,
9519
9520    /// Optional. The requested page size. The server might return fewer items than
9521    /// requested. If unspecified, the server picks an appropriate default.
9522    pub page_size: i32,
9523
9524    /// Optional. A token that identifies the page of results that the server
9525    /// should return.
9526    pub page_token: std::string::String,
9527
9528    /// Optional. The filtering results.
9529    pub filter: std::string::String,
9530
9531    /// Optional. The end time of the finding summary.
9532    #[deprecated]
9533    pub end_time: std::option::Option<wkt::Timestamp>,
9534
9535    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9536}
9537
9538impl ListFindingSummariesRequest {
9539    /// Creates a new default instance.
9540    pub fn new() -> Self {
9541        std::default::Default::default()
9542    }
9543
9544    /// Sets the value of [parent][crate::model::ListFindingSummariesRequest::parent].
9545    ///
9546    /// # Example
9547    /// ```ignore,no_run
9548    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesRequest;
9549    /// # let project_id = "project_id";
9550    /// # let location_id = "location_id";
9551    /// let x = ListFindingSummariesRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
9552    /// ```
9553    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9554        self.parent = v.into();
9555        self
9556    }
9557
9558    /// Sets the value of [page_size][crate::model::ListFindingSummariesRequest::page_size].
9559    ///
9560    /// # Example
9561    /// ```ignore,no_run
9562    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesRequest;
9563    /// let x = ListFindingSummariesRequest::new().set_page_size(42);
9564    /// ```
9565    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9566        self.page_size = v.into();
9567        self
9568    }
9569
9570    /// Sets the value of [page_token][crate::model::ListFindingSummariesRequest::page_token].
9571    ///
9572    /// # Example
9573    /// ```ignore,no_run
9574    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesRequest;
9575    /// let x = ListFindingSummariesRequest::new().set_page_token("example");
9576    /// ```
9577    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9578        self.page_token = v.into();
9579        self
9580    }
9581
9582    /// Sets the value of [filter][crate::model::ListFindingSummariesRequest::filter].
9583    ///
9584    /// # Example
9585    /// ```ignore,no_run
9586    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesRequest;
9587    /// let x = ListFindingSummariesRequest::new().set_filter("example");
9588    /// ```
9589    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9590        self.filter = v.into();
9591        self
9592    }
9593
9594    /// Sets the value of [end_time][crate::model::ListFindingSummariesRequest::end_time].
9595    ///
9596    /// # Example
9597    /// ```ignore,no_run
9598    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesRequest;
9599    /// use wkt::Timestamp;
9600    /// let x = ListFindingSummariesRequest::new().set_end_time(Timestamp::default()/* use setters */);
9601    /// ```
9602    #[deprecated]
9603    pub fn set_end_time<T>(mut self, v: T) -> Self
9604    where
9605        T: std::convert::Into<wkt::Timestamp>,
9606    {
9607        self.end_time = std::option::Option::Some(v.into());
9608        self
9609    }
9610
9611    /// Sets or clears the value of [end_time][crate::model::ListFindingSummariesRequest::end_time].
9612    ///
9613    /// # Example
9614    /// ```ignore,no_run
9615    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesRequest;
9616    /// use wkt::Timestamp;
9617    /// let x = ListFindingSummariesRequest::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
9618    /// let x = ListFindingSummariesRequest::new().set_or_clear_end_time(None::<Timestamp>);
9619    /// ```
9620    #[deprecated]
9621    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
9622    where
9623        T: std::convert::Into<wkt::Timestamp>,
9624    {
9625        self.end_time = v.map(|x| x.into());
9626        self
9627    }
9628}
9629
9630impl wkt::message::Message for ListFindingSummariesRequest {
9631    fn typename() -> &'static str {
9632        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest"
9633    }
9634}
9635
9636/// The response message for [ListFindingSummaries][].
9637#[derive(Clone, Default, PartialEq)]
9638#[non_exhaustive]
9639pub struct ListFindingSummariesResponse {
9640    /// List of finding summary by category.
9641    pub finding_summaries: std::vec::Vec<crate::model::FindingSummary>,
9642
9643    /// Output only. The token to retrieve the next page of results.
9644    pub next_page_token: std::string::String,
9645
9646    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9647}
9648
9649impl ListFindingSummariesResponse {
9650    /// Creates a new default instance.
9651    pub fn new() -> Self {
9652        std::default::Default::default()
9653    }
9654
9655    /// Sets the value of [finding_summaries][crate::model::ListFindingSummariesResponse::finding_summaries].
9656    ///
9657    /// # Example
9658    /// ```ignore,no_run
9659    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesResponse;
9660    /// use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
9661    /// let x = ListFindingSummariesResponse::new()
9662    ///     .set_finding_summaries([
9663    ///         FindingSummary::default()/* use setters */,
9664    ///         FindingSummary::default()/* use (different) setters */,
9665    ///     ]);
9666    /// ```
9667    pub fn set_finding_summaries<T, V>(mut self, v: T) -> Self
9668    where
9669        T: std::iter::IntoIterator<Item = V>,
9670        V: std::convert::Into<crate::model::FindingSummary>,
9671    {
9672        use std::iter::Iterator;
9673        self.finding_summaries = v.into_iter().map(|i| i.into()).collect();
9674        self
9675    }
9676
9677    /// Sets the value of [next_page_token][crate::model::ListFindingSummariesResponse::next_page_token].
9678    ///
9679    /// # Example
9680    /// ```ignore,no_run
9681    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesResponse;
9682    /// let x = ListFindingSummariesResponse::new().set_next_page_token("example");
9683    /// ```
9684    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9685        self.next_page_token = v.into();
9686        self
9687    }
9688}
9689
9690impl wkt::message::Message for ListFindingSummariesResponse {
9691    fn typename() -> &'static str {
9692        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse"
9693    }
9694}
9695
9696#[doc(hidden)]
9697impl google_cloud_gax::paginator::internal::PageableResponse for ListFindingSummariesResponse {
9698    type PageItem = crate::model::FindingSummary;
9699
9700    fn items(self) -> std::vec::Vec<Self::PageItem> {
9701        self.finding_summaries
9702    }
9703
9704    fn next_page_token(&self) -> std::string::String {
9705        use std::clone::Clone;
9706        self.next_page_token.clone()
9707    }
9708}
9709
9710/// The request message for [ListControlComplianceSummaries][].
9711#[derive(Clone, Default, PartialEq)]
9712#[non_exhaustive]
9713pub struct ListControlComplianceSummariesRequest {
9714    /// Required. The parent scope for the framework overview page.
9715    pub parent: std::string::String,
9716
9717    /// Optional. The end time of the control compliance summary.
9718    #[deprecated]
9719    pub end_time: std::option::Option<wkt::Timestamp>,
9720
9721    /// Optional. The requested page size. The server might return fewer items than
9722    /// requested. If unspecified, the server picks an appropriate default.
9723    pub page_size: i32,
9724
9725    /// Optional. A token that identifies the page of results that the server
9726    /// should return.
9727    pub page_token: std::string::String,
9728
9729    /// Optional. The filtering results.
9730    pub filter: std::string::String,
9731
9732    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9733}
9734
9735impl ListControlComplianceSummariesRequest {
9736    /// Creates a new default instance.
9737    pub fn new() -> Self {
9738        std::default::Default::default()
9739    }
9740
9741    /// Sets the value of [parent][crate::model::ListControlComplianceSummariesRequest::parent].
9742    ///
9743    /// # Example
9744    /// ```ignore,no_run
9745    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesRequest;
9746    /// # let project_id = "project_id";
9747    /// # let location_id = "location_id";
9748    /// # let framework_compliance_report_id = "framework_compliance_report_id";
9749    /// let x = ListControlComplianceSummariesRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/frameworkComplianceReports/{framework_compliance_report_id}"));
9750    /// ```
9751    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9752        self.parent = v.into();
9753        self
9754    }
9755
9756    /// Sets the value of [end_time][crate::model::ListControlComplianceSummariesRequest::end_time].
9757    ///
9758    /// # Example
9759    /// ```ignore,no_run
9760    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesRequest;
9761    /// use wkt::Timestamp;
9762    /// let x = ListControlComplianceSummariesRequest::new().set_end_time(Timestamp::default()/* use setters */);
9763    /// ```
9764    #[deprecated]
9765    pub fn set_end_time<T>(mut self, v: T) -> Self
9766    where
9767        T: std::convert::Into<wkt::Timestamp>,
9768    {
9769        self.end_time = std::option::Option::Some(v.into());
9770        self
9771    }
9772
9773    /// Sets or clears the value of [end_time][crate::model::ListControlComplianceSummariesRequest::end_time].
9774    ///
9775    /// # Example
9776    /// ```ignore,no_run
9777    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesRequest;
9778    /// use wkt::Timestamp;
9779    /// let x = ListControlComplianceSummariesRequest::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
9780    /// let x = ListControlComplianceSummariesRequest::new().set_or_clear_end_time(None::<Timestamp>);
9781    /// ```
9782    #[deprecated]
9783    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
9784    where
9785        T: std::convert::Into<wkt::Timestamp>,
9786    {
9787        self.end_time = v.map(|x| x.into());
9788        self
9789    }
9790
9791    /// Sets the value of [page_size][crate::model::ListControlComplianceSummariesRequest::page_size].
9792    ///
9793    /// # Example
9794    /// ```ignore,no_run
9795    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesRequest;
9796    /// let x = ListControlComplianceSummariesRequest::new().set_page_size(42);
9797    /// ```
9798    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9799        self.page_size = v.into();
9800        self
9801    }
9802
9803    /// Sets the value of [page_token][crate::model::ListControlComplianceSummariesRequest::page_token].
9804    ///
9805    /// # Example
9806    /// ```ignore,no_run
9807    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesRequest;
9808    /// let x = ListControlComplianceSummariesRequest::new().set_page_token("example");
9809    /// ```
9810    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9811        self.page_token = v.into();
9812        self
9813    }
9814
9815    /// Sets the value of [filter][crate::model::ListControlComplianceSummariesRequest::filter].
9816    ///
9817    /// # Example
9818    /// ```ignore,no_run
9819    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesRequest;
9820    /// let x = ListControlComplianceSummariesRequest::new().set_filter("example");
9821    /// ```
9822    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9823        self.filter = v.into();
9824        self
9825    }
9826}
9827
9828impl wkt::message::Message for ListControlComplianceSummariesRequest {
9829    fn typename() -> &'static str {
9830        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest"
9831    }
9832}
9833
9834/// The response message for [ListControlComplianceSummaries][].
9835#[derive(Clone, Default, PartialEq)]
9836#[non_exhaustive]
9837pub struct ListControlComplianceSummariesResponse {
9838    /// The list of control compliance details.
9839    pub control_compliance_summaries: std::vec::Vec<crate::model::ControlComplianceSummary>,
9840
9841    /// Output only. The token to retrieve the next page of results.
9842    pub next_page_token: std::string::String,
9843
9844    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9845}
9846
9847impl ListControlComplianceSummariesResponse {
9848    /// Creates a new default instance.
9849    pub fn new() -> Self {
9850        std::default::Default::default()
9851    }
9852
9853    /// Sets the value of [control_compliance_summaries][crate::model::ListControlComplianceSummariesResponse::control_compliance_summaries].
9854    ///
9855    /// # Example
9856    /// ```ignore,no_run
9857    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesResponse;
9858    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
9859    /// let x = ListControlComplianceSummariesResponse::new()
9860    ///     .set_control_compliance_summaries([
9861    ///         ControlComplianceSummary::default()/* use setters */,
9862    ///         ControlComplianceSummary::default()/* use (different) setters */,
9863    ///     ]);
9864    /// ```
9865    pub fn set_control_compliance_summaries<T, V>(mut self, v: T) -> Self
9866    where
9867        T: std::iter::IntoIterator<Item = V>,
9868        V: std::convert::Into<crate::model::ControlComplianceSummary>,
9869    {
9870        use std::iter::Iterator;
9871        self.control_compliance_summaries = v.into_iter().map(|i| i.into()).collect();
9872        self
9873    }
9874
9875    /// Sets the value of [next_page_token][crate::model::ListControlComplianceSummariesResponse::next_page_token].
9876    ///
9877    /// # Example
9878    /// ```ignore,no_run
9879    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesResponse;
9880    /// let x = ListControlComplianceSummariesResponse::new().set_next_page_token("example");
9881    /// ```
9882    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9883        self.next_page_token = v.into();
9884        self
9885    }
9886}
9887
9888impl wkt::message::Message for ListControlComplianceSummariesResponse {
9889    fn typename() -> &'static str {
9890        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse"
9891    }
9892}
9893
9894#[doc(hidden)]
9895impl google_cloud_gax::paginator::internal::PageableResponse
9896    for ListControlComplianceSummariesResponse
9897{
9898    type PageItem = crate::model::ControlComplianceSummary;
9899
9900    fn items(self) -> std::vec::Vec<Self::PageItem> {
9901        self.control_compliance_summaries
9902    }
9903
9904    fn next_page_token(&self) -> std::string::String {
9905        use std::clone::Clone;
9906        self.next_page_token.clone()
9907    }
9908}
9909
9910/// The request message for [AggregateFrameworkComplianceReport][].
9911#[derive(Clone, Default, PartialEq)]
9912#[non_exhaustive]
9913pub struct AggregateFrameworkComplianceReportRequest {
9914    /// Required. The name of the aggregated compliance report over time to
9915    /// retrieve.
9916    ///
9917    /// The supported format is:
9918    /// `organizations/{organization_id}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}`
9919    pub name: std::string::String,
9920
9921    /// Optional. The start and end time range for the aggregated compliance
9922    /// report.
9923    pub interval: std::option::Option<google_cloud_type::model::Interval>,
9924
9925    /// Optional. The filtering results.
9926    pub filter: std::string::String,
9927
9928    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9929}
9930
9931impl AggregateFrameworkComplianceReportRequest {
9932    /// Creates a new default instance.
9933    pub fn new() -> Self {
9934        std::default::Default::default()
9935    }
9936
9937    /// Sets the value of [name][crate::model::AggregateFrameworkComplianceReportRequest::name].
9938    ///
9939    /// # Example
9940    /// ```ignore,no_run
9941    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregateFrameworkComplianceReportRequest;
9942    /// # let project_id = "project_id";
9943    /// # let location_id = "location_id";
9944    /// # let framework_compliance_report_id = "framework_compliance_report_id";
9945    /// let x = AggregateFrameworkComplianceReportRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/frameworkComplianceReports/{framework_compliance_report_id}"));
9946    /// ```
9947    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9948        self.name = v.into();
9949        self
9950    }
9951
9952    /// Sets the value of [interval][crate::model::AggregateFrameworkComplianceReportRequest::interval].
9953    ///
9954    /// # Example
9955    /// ```ignore,no_run
9956    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregateFrameworkComplianceReportRequest;
9957    /// use google_cloud_type::model::Interval;
9958    /// let x = AggregateFrameworkComplianceReportRequest::new().set_interval(Interval::default()/* use setters */);
9959    /// ```
9960    pub fn set_interval<T>(mut self, v: T) -> Self
9961    where
9962        T: std::convert::Into<google_cloud_type::model::Interval>,
9963    {
9964        self.interval = std::option::Option::Some(v.into());
9965        self
9966    }
9967
9968    /// Sets or clears the value of [interval][crate::model::AggregateFrameworkComplianceReportRequest::interval].
9969    ///
9970    /// # Example
9971    /// ```ignore,no_run
9972    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregateFrameworkComplianceReportRequest;
9973    /// use google_cloud_type::model::Interval;
9974    /// let x = AggregateFrameworkComplianceReportRequest::new().set_or_clear_interval(Some(Interval::default()/* use setters */));
9975    /// let x = AggregateFrameworkComplianceReportRequest::new().set_or_clear_interval(None::<Interval>);
9976    /// ```
9977    pub fn set_or_clear_interval<T>(mut self, v: std::option::Option<T>) -> Self
9978    where
9979        T: std::convert::Into<google_cloud_type::model::Interval>,
9980    {
9981        self.interval = v.map(|x| x.into());
9982        self
9983    }
9984
9985    /// Sets the value of [filter][crate::model::AggregateFrameworkComplianceReportRequest::filter].
9986    ///
9987    /// # Example
9988    /// ```ignore,no_run
9989    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregateFrameworkComplianceReportRequest;
9990    /// let x = AggregateFrameworkComplianceReportRequest::new().set_filter("example");
9991    /// ```
9992    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9993        self.filter = v.into();
9994        self
9995    }
9996}
9997
9998impl wkt::message::Message for AggregateFrameworkComplianceReportRequest {
9999    fn typename() -> &'static str {
10000        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest"
10001    }
10002}
10003
10004/// The response message for [AggregateFrameworkComplianceReport][].
10005#[derive(Clone, Default, PartialEq)]
10006#[non_exhaustive]
10007pub struct AggregateFrameworkComplianceReportResponse {
10008    /// The list of aggregated compliance reports.
10009    pub aggregated_compliance_reports: std::vec::Vec<crate::model::AggregatedComplianceReport>,
10010
10011    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10012}
10013
10014impl AggregateFrameworkComplianceReportResponse {
10015    /// Creates a new default instance.
10016    pub fn new() -> Self {
10017        std::default::Default::default()
10018    }
10019
10020    /// Sets the value of [aggregated_compliance_reports][crate::model::AggregateFrameworkComplianceReportResponse::aggregated_compliance_reports].
10021    ///
10022    /// # Example
10023    /// ```ignore,no_run
10024    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregateFrameworkComplianceReportResponse;
10025    /// use google_cloud_cloudsecuritycompliance_v1::model::AggregatedComplianceReport;
10026    /// let x = AggregateFrameworkComplianceReportResponse::new()
10027    ///     .set_aggregated_compliance_reports([
10028    ///         AggregatedComplianceReport::default()/* use setters */,
10029    ///         AggregatedComplianceReport::default()/* use (different) setters */,
10030    ///     ]);
10031    /// ```
10032    pub fn set_aggregated_compliance_reports<T, V>(mut self, v: T) -> Self
10033    where
10034        T: std::iter::IntoIterator<Item = V>,
10035        V: std::convert::Into<crate::model::AggregatedComplianceReport>,
10036    {
10037        use std::iter::Iterator;
10038        self.aggregated_compliance_reports = v.into_iter().map(|i| i.into()).collect();
10039        self
10040    }
10041}
10042
10043impl wkt::message::Message for AggregateFrameworkComplianceReportResponse {
10044    fn typename() -> &'static str {
10045        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse"
10046    }
10047}
10048
10049/// The details for a control assessment.
10050#[derive(Clone, Default, PartialEq)]
10051#[non_exhaustive]
10052pub struct ControlAssessmentDetails {
10053    /// The number of controls that are passing or not assessed.
10054    pub passing_controls: i32,
10055
10056    /// The number of controls that are failing.
10057    pub failing_controls: i32,
10058
10059    /// The number of controls that were assessed and are passing.
10060    pub assessed_passing_controls: i32,
10061
10062    /// The number of controls that aren't assessed because they require manual
10063    /// review.
10064    pub not_assessed_controls: i32,
10065
10066    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10067}
10068
10069impl ControlAssessmentDetails {
10070    /// Creates a new default instance.
10071    pub fn new() -> Self {
10072        std::default::Default::default()
10073    }
10074
10075    /// Sets the value of [passing_controls][crate::model::ControlAssessmentDetails::passing_controls].
10076    ///
10077    /// # Example
10078    /// ```ignore,no_run
10079    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
10080    /// let x = ControlAssessmentDetails::new().set_passing_controls(42);
10081    /// ```
10082    pub fn set_passing_controls<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10083        self.passing_controls = v.into();
10084        self
10085    }
10086
10087    /// Sets the value of [failing_controls][crate::model::ControlAssessmentDetails::failing_controls].
10088    ///
10089    /// # Example
10090    /// ```ignore,no_run
10091    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
10092    /// let x = ControlAssessmentDetails::new().set_failing_controls(42);
10093    /// ```
10094    pub fn set_failing_controls<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10095        self.failing_controls = v.into();
10096        self
10097    }
10098
10099    /// Sets the value of [assessed_passing_controls][crate::model::ControlAssessmentDetails::assessed_passing_controls].
10100    ///
10101    /// # Example
10102    /// ```ignore,no_run
10103    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
10104    /// let x = ControlAssessmentDetails::new().set_assessed_passing_controls(42);
10105    /// ```
10106    pub fn set_assessed_passing_controls<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10107        self.assessed_passing_controls = v.into();
10108        self
10109    }
10110
10111    /// Sets the value of [not_assessed_controls][crate::model::ControlAssessmentDetails::not_assessed_controls].
10112    ///
10113    /// # Example
10114    /// ```ignore,no_run
10115    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
10116    /// let x = ControlAssessmentDetails::new().set_not_assessed_controls(42);
10117    /// ```
10118    pub fn set_not_assessed_controls<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10119        self.not_assessed_controls = v.into();
10120        self
10121    }
10122}
10123
10124impl wkt::message::Message for ControlAssessmentDetails {
10125    fn typename() -> &'static str {
10126        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails"
10127    }
10128}
10129
10130/// The details for a framework compliance summary.
10131#[derive(Clone, Default, PartialEq)]
10132#[non_exhaustive]
10133pub struct FrameworkComplianceSummary {
10134    /// The name of the framework.
10135    pub framework: std::string::String,
10136
10137    /// The control assessment details of the framework.
10138    pub control_assessment_details: std::option::Option<crate::model::ControlAssessmentDetails>,
10139
10140    /// The type of framework.
10141    pub framework_type: crate::model::framework::FrameworkType,
10142
10143    /// The list of cloud providers supported by the framework.
10144    pub supported_cloud_providers: std::vec::Vec<crate::model::CloudProvider>,
10145
10146    /// The list of framework categories supported by the framework.
10147    pub framework_categories: std::vec::Vec<crate::model::FrameworkCategory>,
10148
10149    /// Optional. The display name for the framework.
10150    pub framework_display_name: std::string::String,
10151
10152    /// Identifier. The name of the framework compliance summary.
10153    pub name: std::string::String,
10154
10155    /// The major revision ID of the framework.
10156    pub major_revision_id: i64,
10157
10158    /// The minor revision ID of the framework.
10159    pub minor_revision_id: i64,
10160
10161    /// The target resource details for the framework.
10162    pub target_resource_details: std::vec::Vec<crate::model::TargetResourceDetails>,
10163
10164    /// Output only. The count of the findings generated against the framework.
10165    pub finding_count: i64,
10166
10167    /// Output only. The trend of controls that are passing for the given duration.
10168    pub controls_passing_trend: std::option::Option<crate::model::Trend>,
10169
10170    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10171}
10172
10173impl FrameworkComplianceSummary {
10174    /// Creates a new default instance.
10175    pub fn new() -> Self {
10176        std::default::Default::default()
10177    }
10178
10179    /// Sets the value of [framework][crate::model::FrameworkComplianceSummary::framework].
10180    ///
10181    /// # Example
10182    /// ```ignore,no_run
10183    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10184    /// let x = FrameworkComplianceSummary::new().set_framework("example");
10185    /// ```
10186    pub fn set_framework<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10187        self.framework = v.into();
10188        self
10189    }
10190
10191    /// Sets the value of [control_assessment_details][crate::model::FrameworkComplianceSummary::control_assessment_details].
10192    ///
10193    /// # Example
10194    /// ```ignore,no_run
10195    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10196    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
10197    /// let x = FrameworkComplianceSummary::new().set_control_assessment_details(ControlAssessmentDetails::default()/* use setters */);
10198    /// ```
10199    pub fn set_control_assessment_details<T>(mut self, v: T) -> Self
10200    where
10201        T: std::convert::Into<crate::model::ControlAssessmentDetails>,
10202    {
10203        self.control_assessment_details = std::option::Option::Some(v.into());
10204        self
10205    }
10206
10207    /// Sets or clears the value of [control_assessment_details][crate::model::FrameworkComplianceSummary::control_assessment_details].
10208    ///
10209    /// # Example
10210    /// ```ignore,no_run
10211    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10212    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
10213    /// let x = FrameworkComplianceSummary::new().set_or_clear_control_assessment_details(Some(ControlAssessmentDetails::default()/* use setters */));
10214    /// let x = FrameworkComplianceSummary::new().set_or_clear_control_assessment_details(None::<ControlAssessmentDetails>);
10215    /// ```
10216    pub fn set_or_clear_control_assessment_details<T>(mut self, v: std::option::Option<T>) -> Self
10217    where
10218        T: std::convert::Into<crate::model::ControlAssessmentDetails>,
10219    {
10220        self.control_assessment_details = v.map(|x| x.into());
10221        self
10222    }
10223
10224    /// Sets the value of [framework_type][crate::model::FrameworkComplianceSummary::framework_type].
10225    ///
10226    /// # Example
10227    /// ```ignore,no_run
10228    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10229    /// use google_cloud_cloudsecuritycompliance_v1::model::framework::FrameworkType;
10230    /// let x0 = FrameworkComplianceSummary::new().set_framework_type(FrameworkType::BuiltIn);
10231    /// let x1 = FrameworkComplianceSummary::new().set_framework_type(FrameworkType::Custom);
10232    /// ```
10233    pub fn set_framework_type<T: std::convert::Into<crate::model::framework::FrameworkType>>(
10234        mut self,
10235        v: T,
10236    ) -> Self {
10237        self.framework_type = v.into();
10238        self
10239    }
10240
10241    /// Sets the value of [supported_cloud_providers][crate::model::FrameworkComplianceSummary::supported_cloud_providers].
10242    ///
10243    /// # Example
10244    /// ```ignore,no_run
10245    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10246    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudProvider;
10247    /// let x = FrameworkComplianceSummary::new().set_supported_cloud_providers([
10248    ///     CloudProvider::Aws,
10249    ///     CloudProvider::Azure,
10250    ///     CloudProvider::Gcp,
10251    /// ]);
10252    /// ```
10253    pub fn set_supported_cloud_providers<T, V>(mut self, v: T) -> Self
10254    where
10255        T: std::iter::IntoIterator<Item = V>,
10256        V: std::convert::Into<crate::model::CloudProvider>,
10257    {
10258        use std::iter::Iterator;
10259        self.supported_cloud_providers = v.into_iter().map(|i| i.into()).collect();
10260        self
10261    }
10262
10263    /// Sets the value of [framework_categories][crate::model::FrameworkComplianceSummary::framework_categories].
10264    ///
10265    /// # Example
10266    /// ```ignore,no_run
10267    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10268    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkCategory;
10269    /// let x = FrameworkComplianceSummary::new().set_framework_categories([
10270    ///     FrameworkCategory::IndustryDefinedStandard,
10271    ///     FrameworkCategory::AssuredWorkloads,
10272    ///     FrameworkCategory::DataSecurity,
10273    /// ]);
10274    /// ```
10275    pub fn set_framework_categories<T, V>(mut self, v: T) -> Self
10276    where
10277        T: std::iter::IntoIterator<Item = V>,
10278        V: std::convert::Into<crate::model::FrameworkCategory>,
10279    {
10280        use std::iter::Iterator;
10281        self.framework_categories = v.into_iter().map(|i| i.into()).collect();
10282        self
10283    }
10284
10285    /// Sets the value of [framework_display_name][crate::model::FrameworkComplianceSummary::framework_display_name].
10286    ///
10287    /// # Example
10288    /// ```ignore,no_run
10289    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10290    /// let x = FrameworkComplianceSummary::new().set_framework_display_name("example");
10291    /// ```
10292    pub fn set_framework_display_name<T: std::convert::Into<std::string::String>>(
10293        mut self,
10294        v: T,
10295    ) -> Self {
10296        self.framework_display_name = v.into();
10297        self
10298    }
10299
10300    /// Sets the value of [name][crate::model::FrameworkComplianceSummary::name].
10301    ///
10302    /// # Example
10303    /// ```ignore,no_run
10304    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10305    /// # let project_id = "project_id";
10306    /// # let location_id = "location_id";
10307    /// # let framework_compliance_summary_id = "framework_compliance_summary_id";
10308    /// let x = FrameworkComplianceSummary::new().set_name(format!("projects/{project_id}/locations/{location_id}/frameworkComplianceSummaries/{framework_compliance_summary_id}"));
10309    /// ```
10310    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10311        self.name = v.into();
10312        self
10313    }
10314
10315    /// Sets the value of [major_revision_id][crate::model::FrameworkComplianceSummary::major_revision_id].
10316    ///
10317    /// # Example
10318    /// ```ignore,no_run
10319    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10320    /// let x = FrameworkComplianceSummary::new().set_major_revision_id(42);
10321    /// ```
10322    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10323        self.major_revision_id = v.into();
10324        self
10325    }
10326
10327    /// Sets the value of [minor_revision_id][crate::model::FrameworkComplianceSummary::minor_revision_id].
10328    ///
10329    /// # Example
10330    /// ```ignore,no_run
10331    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10332    /// let x = FrameworkComplianceSummary::new().set_minor_revision_id(42);
10333    /// ```
10334    pub fn set_minor_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10335        self.minor_revision_id = v.into();
10336        self
10337    }
10338
10339    /// Sets the value of [target_resource_details][crate::model::FrameworkComplianceSummary::target_resource_details].
10340    ///
10341    /// # Example
10342    /// ```ignore,no_run
10343    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10344    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
10345    /// let x = FrameworkComplianceSummary::new()
10346    ///     .set_target_resource_details([
10347    ///         TargetResourceDetails::default()/* use setters */,
10348    ///         TargetResourceDetails::default()/* use (different) setters */,
10349    ///     ]);
10350    /// ```
10351    pub fn set_target_resource_details<T, V>(mut self, v: T) -> Self
10352    where
10353        T: std::iter::IntoIterator<Item = V>,
10354        V: std::convert::Into<crate::model::TargetResourceDetails>,
10355    {
10356        use std::iter::Iterator;
10357        self.target_resource_details = v.into_iter().map(|i| i.into()).collect();
10358        self
10359    }
10360
10361    /// Sets the value of [finding_count][crate::model::FrameworkComplianceSummary::finding_count].
10362    ///
10363    /// # Example
10364    /// ```ignore,no_run
10365    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10366    /// let x = FrameworkComplianceSummary::new().set_finding_count(42);
10367    /// ```
10368    pub fn set_finding_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10369        self.finding_count = v.into();
10370        self
10371    }
10372
10373    /// Sets the value of [controls_passing_trend][crate::model::FrameworkComplianceSummary::controls_passing_trend].
10374    ///
10375    /// # Example
10376    /// ```ignore,no_run
10377    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10378    /// use google_cloud_cloudsecuritycompliance_v1::model::Trend;
10379    /// let x = FrameworkComplianceSummary::new().set_controls_passing_trend(Trend::default()/* use setters */);
10380    /// ```
10381    pub fn set_controls_passing_trend<T>(mut self, v: T) -> Self
10382    where
10383        T: std::convert::Into<crate::model::Trend>,
10384    {
10385        self.controls_passing_trend = std::option::Option::Some(v.into());
10386        self
10387    }
10388
10389    /// Sets or clears the value of [controls_passing_trend][crate::model::FrameworkComplianceSummary::controls_passing_trend].
10390    ///
10391    /// # Example
10392    /// ```ignore,no_run
10393    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10394    /// use google_cloud_cloudsecuritycompliance_v1::model::Trend;
10395    /// let x = FrameworkComplianceSummary::new().set_or_clear_controls_passing_trend(Some(Trend::default()/* use setters */));
10396    /// let x = FrameworkComplianceSummary::new().set_or_clear_controls_passing_trend(None::<Trend>);
10397    /// ```
10398    pub fn set_or_clear_controls_passing_trend<T>(mut self, v: std::option::Option<T>) -> Self
10399    where
10400        T: std::convert::Into<crate::model::Trend>,
10401    {
10402        self.controls_passing_trend = v.map(|x| x.into());
10403        self
10404    }
10405}
10406
10407impl wkt::message::Message for FrameworkComplianceSummary {
10408    fn typename() -> &'static str {
10409        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary"
10410    }
10411}
10412
10413/// The details for a finding.
10414#[derive(Clone, Default, PartialEq)]
10415#[non_exhaustive]
10416pub struct FindingSummary {
10417    /// The category of the finding.
10418    pub finding_category: std::string::String,
10419
10420    /// The class of the finding.
10421    pub finding_class: crate::model::FindingClass,
10422
10423    /// The severity of the finding.
10424    pub severity: crate::model::Severity,
10425
10426    /// The count of the finding.
10427    pub finding_count: i64,
10428
10429    /// Output only. The last updated time of the finding.
10430    pub update_time: std::option::Option<wkt::Timestamp>,
10431
10432    /// Optional. The list of compliance frameworks that the finding belongs to.
10433    pub related_frameworks: std::vec::Vec<std::string::String>,
10434
10435    /// Identifier. The name of the finding summary.
10436    pub name: std::string::String,
10437
10438    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10439}
10440
10441impl FindingSummary {
10442    /// Creates a new default instance.
10443    pub fn new() -> Self {
10444        std::default::Default::default()
10445    }
10446
10447    /// Sets the value of [finding_category][crate::model::FindingSummary::finding_category].
10448    ///
10449    /// # Example
10450    /// ```ignore,no_run
10451    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
10452    /// let x = FindingSummary::new().set_finding_category("example");
10453    /// ```
10454    pub fn set_finding_category<T: std::convert::Into<std::string::String>>(
10455        mut self,
10456        v: T,
10457    ) -> Self {
10458        self.finding_category = v.into();
10459        self
10460    }
10461
10462    /// Sets the value of [finding_class][crate::model::FindingSummary::finding_class].
10463    ///
10464    /// # Example
10465    /// ```ignore,no_run
10466    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
10467    /// use google_cloud_cloudsecuritycompliance_v1::model::FindingClass;
10468    /// let x0 = FindingSummary::new().set_finding_class(FindingClass::Threat);
10469    /// let x1 = FindingSummary::new().set_finding_class(FindingClass::Vulnerability);
10470    /// let x2 = FindingSummary::new().set_finding_class(FindingClass::Misconfiguration);
10471    /// ```
10472    pub fn set_finding_class<T: std::convert::Into<crate::model::FindingClass>>(
10473        mut self,
10474        v: T,
10475    ) -> Self {
10476        self.finding_class = v.into();
10477        self
10478    }
10479
10480    /// Sets the value of [severity][crate::model::FindingSummary::severity].
10481    ///
10482    /// # Example
10483    /// ```ignore,no_run
10484    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
10485    /// use google_cloud_cloudsecuritycompliance_v1::model::Severity;
10486    /// let x0 = FindingSummary::new().set_severity(Severity::Critical);
10487    /// let x1 = FindingSummary::new().set_severity(Severity::High);
10488    /// let x2 = FindingSummary::new().set_severity(Severity::Medium);
10489    /// ```
10490    pub fn set_severity<T: std::convert::Into<crate::model::Severity>>(mut self, v: T) -> Self {
10491        self.severity = v.into();
10492        self
10493    }
10494
10495    /// Sets the value of [finding_count][crate::model::FindingSummary::finding_count].
10496    ///
10497    /// # Example
10498    /// ```ignore,no_run
10499    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
10500    /// let x = FindingSummary::new().set_finding_count(42);
10501    /// ```
10502    pub fn set_finding_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10503        self.finding_count = v.into();
10504        self
10505    }
10506
10507    /// Sets the value of [update_time][crate::model::FindingSummary::update_time].
10508    ///
10509    /// # Example
10510    /// ```ignore,no_run
10511    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
10512    /// use wkt::Timestamp;
10513    /// let x = FindingSummary::new().set_update_time(Timestamp::default()/* use setters */);
10514    /// ```
10515    pub fn set_update_time<T>(mut self, v: T) -> Self
10516    where
10517        T: std::convert::Into<wkt::Timestamp>,
10518    {
10519        self.update_time = std::option::Option::Some(v.into());
10520        self
10521    }
10522
10523    /// Sets or clears the value of [update_time][crate::model::FindingSummary::update_time].
10524    ///
10525    /// # Example
10526    /// ```ignore,no_run
10527    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
10528    /// use wkt::Timestamp;
10529    /// let x = FindingSummary::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
10530    /// let x = FindingSummary::new().set_or_clear_update_time(None::<Timestamp>);
10531    /// ```
10532    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
10533    where
10534        T: std::convert::Into<wkt::Timestamp>,
10535    {
10536        self.update_time = v.map(|x| x.into());
10537        self
10538    }
10539
10540    /// Sets the value of [related_frameworks][crate::model::FindingSummary::related_frameworks].
10541    ///
10542    /// # Example
10543    /// ```ignore,no_run
10544    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
10545    /// let x = FindingSummary::new().set_related_frameworks(["a", "b", "c"]);
10546    /// ```
10547    pub fn set_related_frameworks<T, V>(mut self, v: T) -> Self
10548    where
10549        T: std::iter::IntoIterator<Item = V>,
10550        V: std::convert::Into<std::string::String>,
10551    {
10552        use std::iter::Iterator;
10553        self.related_frameworks = v.into_iter().map(|i| i.into()).collect();
10554        self
10555    }
10556
10557    /// Sets the value of [name][crate::model::FindingSummary::name].
10558    ///
10559    /// # Example
10560    /// ```ignore,no_run
10561    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
10562    /// # let project_id = "project_id";
10563    /// # let location_id = "location_id";
10564    /// # let finding_summary_id = "finding_summary_id";
10565    /// let x = FindingSummary::new().set_name(format!("projects/{project_id}/locations/{location_id}/findingSummaries/{finding_summary_id}"));
10566    /// ```
10567    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10568        self.name = v.into();
10569        self
10570    }
10571}
10572
10573impl wkt::message::Message for FindingSummary {
10574    fn typename() -> &'static str {
10575        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FindingSummary"
10576    }
10577}
10578
10579/// The details for control compliance.
10580#[derive(Clone, Default, PartialEq)]
10581#[non_exhaustive]
10582pub struct ControlComplianceSummary {
10583    /// The name of the control.
10584    pub control: std::string::String,
10585
10586    /// The display name of the control.
10587    pub display_name: std::string::String,
10588
10589    /// The description of the control.
10590    pub description: std::string::String,
10591
10592    /// Output only. The overall evaluation status of the control.
10593    pub overall_evaluation_state: crate::model::EvaluationState,
10594
10595    /// The total number of findings for the control.
10596    pub total_findings_count: i32,
10597
10598    /// The list of compliance frameworks that the control belongs to.
10599    pub compliance_frameworks: std::vec::Vec<std::string::String>,
10600
10601    /// The list of similar controls.
10602    pub similar_controls: std::vec::Vec<crate::model::SimilarControls>,
10603
10604    /// The list of cloud control reports.
10605    pub cloud_control_reports: std::vec::Vec<crate::model::CloudControlReport>,
10606
10607    /// The responsibility type for the control.
10608    pub control_responsibility_type: crate::model::RegulatoryControlResponsibilityType,
10609
10610    /// Whether the control is a fake control. Fake controls are created
10611    /// and mapped to cloud controls that don't belong to a control group.
10612    pub is_fake_control: bool,
10613
10614    /// Identifier. The name of the control compliance summary.
10615    pub name: std::string::String,
10616
10617    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10618}
10619
10620impl ControlComplianceSummary {
10621    /// Creates a new default instance.
10622    pub fn new() -> Self {
10623        std::default::Default::default()
10624    }
10625
10626    /// Sets the value of [control][crate::model::ControlComplianceSummary::control].
10627    ///
10628    /// # Example
10629    /// ```ignore,no_run
10630    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10631    /// let x = ControlComplianceSummary::new().set_control("example");
10632    /// ```
10633    pub fn set_control<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10634        self.control = v.into();
10635        self
10636    }
10637
10638    /// Sets the value of [display_name][crate::model::ControlComplianceSummary::display_name].
10639    ///
10640    /// # Example
10641    /// ```ignore,no_run
10642    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10643    /// let x = ControlComplianceSummary::new().set_display_name("example");
10644    /// ```
10645    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10646        self.display_name = v.into();
10647        self
10648    }
10649
10650    /// Sets the value of [description][crate::model::ControlComplianceSummary::description].
10651    ///
10652    /// # Example
10653    /// ```ignore,no_run
10654    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10655    /// let x = ControlComplianceSummary::new().set_description("example");
10656    /// ```
10657    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10658        self.description = v.into();
10659        self
10660    }
10661
10662    /// Sets the value of [overall_evaluation_state][crate::model::ControlComplianceSummary::overall_evaluation_state].
10663    ///
10664    /// # Example
10665    /// ```ignore,no_run
10666    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10667    /// use google_cloud_cloudsecuritycompliance_v1::model::EvaluationState;
10668    /// let x0 = ControlComplianceSummary::new().set_overall_evaluation_state(EvaluationState::Passed);
10669    /// let x1 = ControlComplianceSummary::new().set_overall_evaluation_state(EvaluationState::Failed);
10670    /// let x2 = ControlComplianceSummary::new().set_overall_evaluation_state(EvaluationState::NotAssessed);
10671    /// ```
10672    pub fn set_overall_evaluation_state<T: std::convert::Into<crate::model::EvaluationState>>(
10673        mut self,
10674        v: T,
10675    ) -> Self {
10676        self.overall_evaluation_state = v.into();
10677        self
10678    }
10679
10680    /// Sets the value of [total_findings_count][crate::model::ControlComplianceSummary::total_findings_count].
10681    ///
10682    /// # Example
10683    /// ```ignore,no_run
10684    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10685    /// let x = ControlComplianceSummary::new().set_total_findings_count(42);
10686    /// ```
10687    pub fn set_total_findings_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10688        self.total_findings_count = v.into();
10689        self
10690    }
10691
10692    /// Sets the value of [compliance_frameworks][crate::model::ControlComplianceSummary::compliance_frameworks].
10693    ///
10694    /// # Example
10695    /// ```ignore,no_run
10696    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10697    /// let x = ControlComplianceSummary::new().set_compliance_frameworks(["a", "b", "c"]);
10698    /// ```
10699    pub fn set_compliance_frameworks<T, V>(mut self, v: T) -> Self
10700    where
10701        T: std::iter::IntoIterator<Item = V>,
10702        V: std::convert::Into<std::string::String>,
10703    {
10704        use std::iter::Iterator;
10705        self.compliance_frameworks = v.into_iter().map(|i| i.into()).collect();
10706        self
10707    }
10708
10709    /// Sets the value of [similar_controls][crate::model::ControlComplianceSummary::similar_controls].
10710    ///
10711    /// # Example
10712    /// ```ignore,no_run
10713    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10714    /// use google_cloud_cloudsecuritycompliance_v1::model::SimilarControls;
10715    /// let x = ControlComplianceSummary::new()
10716    ///     .set_similar_controls([
10717    ///         SimilarControls::default()/* use setters */,
10718    ///         SimilarControls::default()/* use (different) setters */,
10719    ///     ]);
10720    /// ```
10721    pub fn set_similar_controls<T, V>(mut self, v: T) -> Self
10722    where
10723        T: std::iter::IntoIterator<Item = V>,
10724        V: std::convert::Into<crate::model::SimilarControls>,
10725    {
10726        use std::iter::Iterator;
10727        self.similar_controls = v.into_iter().map(|i| i.into()).collect();
10728        self
10729    }
10730
10731    /// Sets the value of [cloud_control_reports][crate::model::ControlComplianceSummary::cloud_control_reports].
10732    ///
10733    /// # Example
10734    /// ```ignore,no_run
10735    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10736    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10737    /// let x = ControlComplianceSummary::new()
10738    ///     .set_cloud_control_reports([
10739    ///         CloudControlReport::default()/* use setters */,
10740    ///         CloudControlReport::default()/* use (different) setters */,
10741    ///     ]);
10742    /// ```
10743    pub fn set_cloud_control_reports<T, V>(mut self, v: T) -> Self
10744    where
10745        T: std::iter::IntoIterator<Item = V>,
10746        V: std::convert::Into<crate::model::CloudControlReport>,
10747    {
10748        use std::iter::Iterator;
10749        self.cloud_control_reports = v.into_iter().map(|i| i.into()).collect();
10750        self
10751    }
10752
10753    /// Sets the value of [control_responsibility_type][crate::model::ControlComplianceSummary::control_responsibility_type].
10754    ///
10755    /// # Example
10756    /// ```ignore,no_run
10757    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10758    /// use google_cloud_cloudsecuritycompliance_v1::model::RegulatoryControlResponsibilityType;
10759    /// let x0 = ControlComplianceSummary::new().set_control_responsibility_type(RegulatoryControlResponsibilityType::Google);
10760    /// let x1 = ControlComplianceSummary::new().set_control_responsibility_type(RegulatoryControlResponsibilityType::Customer);
10761    /// let x2 = ControlComplianceSummary::new().set_control_responsibility_type(RegulatoryControlResponsibilityType::Shared);
10762    /// ```
10763    pub fn set_control_responsibility_type<
10764        T: std::convert::Into<crate::model::RegulatoryControlResponsibilityType>,
10765    >(
10766        mut self,
10767        v: T,
10768    ) -> Self {
10769        self.control_responsibility_type = v.into();
10770        self
10771    }
10772
10773    /// Sets the value of [is_fake_control][crate::model::ControlComplianceSummary::is_fake_control].
10774    ///
10775    /// # Example
10776    /// ```ignore,no_run
10777    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10778    /// let x = ControlComplianceSummary::new().set_is_fake_control(true);
10779    /// ```
10780    pub fn set_is_fake_control<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10781        self.is_fake_control = v.into();
10782        self
10783    }
10784
10785    /// Sets the value of [name][crate::model::ControlComplianceSummary::name].
10786    ///
10787    /// # Example
10788    /// ```ignore,no_run
10789    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10790    /// # let project_id = "project_id";
10791    /// # let location_id = "location_id";
10792    /// # let framework_compliance_report_id = "framework_compliance_report_id";
10793    /// # let control_compliance_summary_id = "control_compliance_summary_id";
10794    /// let x = ControlComplianceSummary::new().set_name(format!("projects/{project_id}/locations/{location_id}/frameworkComplianceReports/{framework_compliance_report_id}/controlComplianceSummaries/{control_compliance_summary_id}"));
10795    /// ```
10796    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10797        self.name = v.into();
10798        self
10799    }
10800}
10801
10802impl wkt::message::Message for ControlComplianceSummary {
10803    fn typename() -> &'static str {
10804        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary"
10805    }
10806}
10807
10808/// The cloud control report.
10809#[derive(Clone, Default, PartialEq)]
10810#[non_exhaustive]
10811pub struct CloudControlReport {
10812    /// The name of the cloud control.
10813    pub cloud_control: std::string::String,
10814
10815    /// The display name of the cloud control.
10816    pub display_name: std::string::String,
10817
10818    /// The description of the cloud control.
10819    pub description: std::string::String,
10820
10821    /// The list of categories for the cloud control.
10822    pub categories: std::vec::Vec<std::string::String>,
10823
10824    /// The list of similar controls.
10825    pub similar_controls: std::vec::Vec<crate::model::SimilarControls>,
10826
10827    /// The type of the cloud control.
10828    pub cloud_control_type: crate::model::cloud_control::Type,
10829
10830    /// The category of the finding.
10831    pub finding_category: std::string::String,
10832
10833    /// The list of rules that correspond to the cloud control.
10834    pub rules: std::vec::Vec<crate::model::Rule>,
10835
10836    /// The severity of the finding.
10837    pub finding_severity: crate::model::Severity,
10838
10839    /// The enforcement mode of the cloud control.
10840    pub enforcement_mode: crate::model::EnforcementMode,
10841
10842    /// The name of the cloud control deployment.
10843    pub cloud_control_deployment: std::string::String,
10844
10845    /// The major revision ID of the cloud control.
10846    pub major_revision_id: i64,
10847
10848    /// The minor revision ID of the cloud control.
10849    pub minor_revision_id: i64,
10850
10851    /// The major revision IDs of the frameworks that the cloud control belongs to.
10852    pub framework_major_revision_ids: std::vec::Vec<i64>,
10853
10854    /// The assessment details of the cloud control.
10855    pub assessment_details:
10856        std::option::Option<crate::model::cloud_control_report::AssessmentDetails>,
10857
10858    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10859}
10860
10861impl CloudControlReport {
10862    /// Creates a new default instance.
10863    pub fn new() -> Self {
10864        std::default::Default::default()
10865    }
10866
10867    /// Sets the value of [cloud_control][crate::model::CloudControlReport::cloud_control].
10868    ///
10869    /// # Example
10870    /// ```ignore,no_run
10871    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10872    /// let x = CloudControlReport::new().set_cloud_control("example");
10873    /// ```
10874    pub fn set_cloud_control<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10875        self.cloud_control = v.into();
10876        self
10877    }
10878
10879    /// Sets the value of [display_name][crate::model::CloudControlReport::display_name].
10880    ///
10881    /// # Example
10882    /// ```ignore,no_run
10883    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10884    /// let x = CloudControlReport::new().set_display_name("example");
10885    /// ```
10886    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10887        self.display_name = v.into();
10888        self
10889    }
10890
10891    /// Sets the value of [description][crate::model::CloudControlReport::description].
10892    ///
10893    /// # Example
10894    /// ```ignore,no_run
10895    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10896    /// let x = CloudControlReport::new().set_description("example");
10897    /// ```
10898    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10899        self.description = v.into();
10900        self
10901    }
10902
10903    /// Sets the value of [categories][crate::model::CloudControlReport::categories].
10904    ///
10905    /// # Example
10906    /// ```ignore,no_run
10907    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10908    /// let x = CloudControlReport::new().set_categories(["a", "b", "c"]);
10909    /// ```
10910    pub fn set_categories<T, V>(mut self, v: T) -> Self
10911    where
10912        T: std::iter::IntoIterator<Item = V>,
10913        V: std::convert::Into<std::string::String>,
10914    {
10915        use std::iter::Iterator;
10916        self.categories = v.into_iter().map(|i| i.into()).collect();
10917        self
10918    }
10919
10920    /// Sets the value of [similar_controls][crate::model::CloudControlReport::similar_controls].
10921    ///
10922    /// # Example
10923    /// ```ignore,no_run
10924    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10925    /// use google_cloud_cloudsecuritycompliance_v1::model::SimilarControls;
10926    /// let x = CloudControlReport::new()
10927    ///     .set_similar_controls([
10928    ///         SimilarControls::default()/* use setters */,
10929    ///         SimilarControls::default()/* use (different) setters */,
10930    ///     ]);
10931    /// ```
10932    pub fn set_similar_controls<T, V>(mut self, v: T) -> Self
10933    where
10934        T: std::iter::IntoIterator<Item = V>,
10935        V: std::convert::Into<crate::model::SimilarControls>,
10936    {
10937        use std::iter::Iterator;
10938        self.similar_controls = v.into_iter().map(|i| i.into()).collect();
10939        self
10940    }
10941
10942    /// Sets the value of [cloud_control_type][crate::model::CloudControlReport::cloud_control_type].
10943    ///
10944    /// # Example
10945    /// ```ignore,no_run
10946    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10947    /// use google_cloud_cloudsecuritycompliance_v1::model::cloud_control::Type;
10948    /// let x0 = CloudControlReport::new().set_cloud_control_type(Type::Custom);
10949    /// let x1 = CloudControlReport::new().set_cloud_control_type(Type::BuiltIn);
10950    /// ```
10951    pub fn set_cloud_control_type<T: std::convert::Into<crate::model::cloud_control::Type>>(
10952        mut self,
10953        v: T,
10954    ) -> Self {
10955        self.cloud_control_type = v.into();
10956        self
10957    }
10958
10959    /// Sets the value of [finding_category][crate::model::CloudControlReport::finding_category].
10960    ///
10961    /// # Example
10962    /// ```ignore,no_run
10963    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10964    /// let x = CloudControlReport::new().set_finding_category("example");
10965    /// ```
10966    pub fn set_finding_category<T: std::convert::Into<std::string::String>>(
10967        mut self,
10968        v: T,
10969    ) -> Self {
10970        self.finding_category = v.into();
10971        self
10972    }
10973
10974    /// Sets the value of [rules][crate::model::CloudControlReport::rules].
10975    ///
10976    /// # Example
10977    /// ```ignore,no_run
10978    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10979    /// use google_cloud_cloudsecuritycompliance_v1::model::Rule;
10980    /// let x = CloudControlReport::new()
10981    ///     .set_rules([
10982    ///         Rule::default()/* use setters */,
10983    ///         Rule::default()/* use (different) setters */,
10984    ///     ]);
10985    /// ```
10986    pub fn set_rules<T, V>(mut self, v: T) -> Self
10987    where
10988        T: std::iter::IntoIterator<Item = V>,
10989        V: std::convert::Into<crate::model::Rule>,
10990    {
10991        use std::iter::Iterator;
10992        self.rules = v.into_iter().map(|i| i.into()).collect();
10993        self
10994    }
10995
10996    /// Sets the value of [finding_severity][crate::model::CloudControlReport::finding_severity].
10997    ///
10998    /// # Example
10999    /// ```ignore,no_run
11000    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
11001    /// use google_cloud_cloudsecuritycompliance_v1::model::Severity;
11002    /// let x0 = CloudControlReport::new().set_finding_severity(Severity::Critical);
11003    /// let x1 = CloudControlReport::new().set_finding_severity(Severity::High);
11004    /// let x2 = CloudControlReport::new().set_finding_severity(Severity::Medium);
11005    /// ```
11006    pub fn set_finding_severity<T: std::convert::Into<crate::model::Severity>>(
11007        mut self,
11008        v: T,
11009    ) -> Self {
11010        self.finding_severity = v.into();
11011        self
11012    }
11013
11014    /// Sets the value of [enforcement_mode][crate::model::CloudControlReport::enforcement_mode].
11015    ///
11016    /// # Example
11017    /// ```ignore,no_run
11018    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
11019    /// use google_cloud_cloudsecuritycompliance_v1::model::EnforcementMode;
11020    /// let x0 = CloudControlReport::new().set_enforcement_mode(EnforcementMode::Preventive);
11021    /// let x1 = CloudControlReport::new().set_enforcement_mode(EnforcementMode::Detective);
11022    /// let x2 = CloudControlReport::new().set_enforcement_mode(EnforcementMode::Audit);
11023    /// ```
11024    pub fn set_enforcement_mode<T: std::convert::Into<crate::model::EnforcementMode>>(
11025        mut self,
11026        v: T,
11027    ) -> Self {
11028        self.enforcement_mode = v.into();
11029        self
11030    }
11031
11032    /// Sets the value of [cloud_control_deployment][crate::model::CloudControlReport::cloud_control_deployment].
11033    ///
11034    /// # Example
11035    /// ```ignore,no_run
11036    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
11037    /// let x = CloudControlReport::new().set_cloud_control_deployment("example");
11038    /// ```
11039    pub fn set_cloud_control_deployment<T: std::convert::Into<std::string::String>>(
11040        mut self,
11041        v: T,
11042    ) -> Self {
11043        self.cloud_control_deployment = v.into();
11044        self
11045    }
11046
11047    /// Sets the value of [major_revision_id][crate::model::CloudControlReport::major_revision_id].
11048    ///
11049    /// # Example
11050    /// ```ignore,no_run
11051    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
11052    /// let x = CloudControlReport::new().set_major_revision_id(42);
11053    /// ```
11054    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11055        self.major_revision_id = v.into();
11056        self
11057    }
11058
11059    /// Sets the value of [minor_revision_id][crate::model::CloudControlReport::minor_revision_id].
11060    ///
11061    /// # Example
11062    /// ```ignore,no_run
11063    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
11064    /// let x = CloudControlReport::new().set_minor_revision_id(42);
11065    /// ```
11066    pub fn set_minor_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11067        self.minor_revision_id = v.into();
11068        self
11069    }
11070
11071    /// Sets the value of [framework_major_revision_ids][crate::model::CloudControlReport::framework_major_revision_ids].
11072    ///
11073    /// # Example
11074    /// ```ignore,no_run
11075    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
11076    /// let x = CloudControlReport::new().set_framework_major_revision_ids([1, 2, 3]);
11077    /// ```
11078    pub fn set_framework_major_revision_ids<T, V>(mut self, v: T) -> Self
11079    where
11080        T: std::iter::IntoIterator<Item = V>,
11081        V: std::convert::Into<i64>,
11082    {
11083        use std::iter::Iterator;
11084        self.framework_major_revision_ids = v.into_iter().map(|i| i.into()).collect();
11085        self
11086    }
11087
11088    /// Sets the value of [assessment_details][crate::model::CloudControlReport::assessment_details].
11089    ///
11090    /// Note that all the setters affecting `assessment_details` are mutually
11091    /// exclusive.
11092    ///
11093    /// # Example
11094    /// ```ignore,no_run
11095    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
11096    /// use google_cloud_cloudsecuritycompliance_v1::model::ManualCloudControlAssessmentDetails;
11097    /// let x = CloudControlReport::new().set_assessment_details(Some(
11098    ///     google_cloud_cloudsecuritycompliance_v1::model::cloud_control_report::AssessmentDetails::ManualCloudControlAssessmentDetails(ManualCloudControlAssessmentDetails::default().into())));
11099    /// ```
11100    pub fn set_assessment_details<
11101        T: std::convert::Into<
11102                std::option::Option<crate::model::cloud_control_report::AssessmentDetails>,
11103            >,
11104    >(
11105        mut self,
11106        v: T,
11107    ) -> Self {
11108        self.assessment_details = v.into();
11109        self
11110    }
11111
11112    /// The value of [assessment_details][crate::model::CloudControlReport::assessment_details]
11113    /// if it holds a `ManualCloudControlAssessmentDetails`, `None` if the field is not set or
11114    /// holds a different branch.
11115    pub fn manual_cloud_control_assessment_details(
11116        &self,
11117    ) -> std::option::Option<&std::boxed::Box<crate::model::ManualCloudControlAssessmentDetails>>
11118    {
11119        #[allow(unreachable_patterns)]
11120        self.assessment_details.as_ref().and_then(|v| match v {
11121            crate::model::cloud_control_report::AssessmentDetails::ManualCloudControlAssessmentDetails(v) => std::option::Option::Some(v),
11122            _ => std::option::Option::None,
11123        })
11124    }
11125
11126    /// Sets the value of [assessment_details][crate::model::CloudControlReport::assessment_details]
11127    /// to hold a `ManualCloudControlAssessmentDetails`.
11128    ///
11129    /// Note that all the setters affecting `assessment_details` are
11130    /// mutually exclusive.
11131    ///
11132    /// # Example
11133    /// ```ignore,no_run
11134    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
11135    /// use google_cloud_cloudsecuritycompliance_v1::model::ManualCloudControlAssessmentDetails;
11136    /// let x = CloudControlReport::new().set_manual_cloud_control_assessment_details(ManualCloudControlAssessmentDetails::default()/* use setters */);
11137    /// assert!(x.manual_cloud_control_assessment_details().is_some());
11138    /// assert!(x.cloud_control_assessment_details().is_none());
11139    /// ```
11140    pub fn set_manual_cloud_control_assessment_details<
11141        T: std::convert::Into<std::boxed::Box<crate::model::ManualCloudControlAssessmentDetails>>,
11142    >(
11143        mut self,
11144        v: T,
11145    ) -> Self {
11146        self.assessment_details = std::option::Option::Some(
11147            crate::model::cloud_control_report::AssessmentDetails::ManualCloudControlAssessmentDetails(
11148                v.into()
11149            )
11150        );
11151        self
11152    }
11153
11154    /// The value of [assessment_details][crate::model::CloudControlReport::assessment_details]
11155    /// if it holds a `CloudControlAssessmentDetails`, `None` if the field is not set or
11156    /// holds a different branch.
11157    pub fn cloud_control_assessment_details(
11158        &self,
11159    ) -> std::option::Option<&std::boxed::Box<crate::model::CloudControlAssessmentDetails>> {
11160        #[allow(unreachable_patterns)]
11161        self.assessment_details.as_ref().and_then(|v| match v {
11162            crate::model::cloud_control_report::AssessmentDetails::CloudControlAssessmentDetails(v) => std::option::Option::Some(v),
11163            _ => std::option::Option::None,
11164        })
11165    }
11166
11167    /// Sets the value of [assessment_details][crate::model::CloudControlReport::assessment_details]
11168    /// to hold a `CloudControlAssessmentDetails`.
11169    ///
11170    /// Note that all the setters affecting `assessment_details` are
11171    /// mutually exclusive.
11172    ///
11173    /// # Example
11174    /// ```ignore,no_run
11175    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
11176    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAssessmentDetails;
11177    /// let x = CloudControlReport::new().set_cloud_control_assessment_details(CloudControlAssessmentDetails::default()/* use setters */);
11178    /// assert!(x.cloud_control_assessment_details().is_some());
11179    /// assert!(x.manual_cloud_control_assessment_details().is_none());
11180    /// ```
11181    pub fn set_cloud_control_assessment_details<
11182        T: std::convert::Into<std::boxed::Box<crate::model::CloudControlAssessmentDetails>>,
11183    >(
11184        mut self,
11185        v: T,
11186    ) -> Self {
11187        self.assessment_details = std::option::Option::Some(
11188            crate::model::cloud_control_report::AssessmentDetails::CloudControlAssessmentDetails(
11189                v.into(),
11190            ),
11191        );
11192        self
11193    }
11194}
11195
11196impl wkt::message::Message for CloudControlReport {
11197    fn typename() -> &'static str {
11198        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlReport"
11199    }
11200}
11201
11202/// Defines additional types related to [CloudControlReport].
11203pub mod cloud_control_report {
11204    #[allow(unused_imports)]
11205    use super::*;
11206
11207    /// The assessment details of the cloud control.
11208    #[derive(Clone, Debug, PartialEq)]
11209    #[non_exhaustive]
11210    pub enum AssessmentDetails {
11211        /// The details of a manual cloud control assessment.
11212        ManualCloudControlAssessmentDetails(
11213            std::boxed::Box<crate::model::ManualCloudControlAssessmentDetails>,
11214        ),
11215        /// The details of a cloud control assessment.
11216        CloudControlAssessmentDetails(std::boxed::Box<crate::model::CloudControlAssessmentDetails>),
11217    }
11218}
11219
11220/// The details for a manual cloud control assessment.
11221#[derive(Clone, Default, PartialEq)]
11222#[non_exhaustive]
11223pub struct ManualCloudControlAssessmentDetails {
11224    /// The guide for assessing a cloud control manually.
11225    pub manual_cloud_control_guide: std::vec::Vec<std::string::String>,
11226
11227    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11228}
11229
11230impl ManualCloudControlAssessmentDetails {
11231    /// Creates a new default instance.
11232    pub fn new() -> Self {
11233        std::default::Default::default()
11234    }
11235
11236    /// Sets the value of [manual_cloud_control_guide][crate::model::ManualCloudControlAssessmentDetails::manual_cloud_control_guide].
11237    ///
11238    /// # Example
11239    /// ```ignore,no_run
11240    /// # use google_cloud_cloudsecuritycompliance_v1::model::ManualCloudControlAssessmentDetails;
11241    /// let x = ManualCloudControlAssessmentDetails::new().set_manual_cloud_control_guide(["a", "b", "c"]);
11242    /// ```
11243    pub fn set_manual_cloud_control_guide<T, V>(mut self, v: T) -> Self
11244    where
11245        T: std::iter::IntoIterator<Item = V>,
11246        V: std::convert::Into<std::string::String>,
11247    {
11248        use std::iter::Iterator;
11249        self.manual_cloud_control_guide = v.into_iter().map(|i| i.into()).collect();
11250        self
11251    }
11252}
11253
11254impl wkt::message::Message for ManualCloudControlAssessmentDetails {
11255    fn typename() -> &'static str {
11256        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails"
11257    }
11258}
11259
11260/// The cloud control assessment details for non-manual cloud controls.
11261#[derive(Clone, Default, PartialEq)]
11262#[non_exhaustive]
11263pub struct CloudControlAssessmentDetails {
11264    /// The number of findings for the cloud control.
11265    pub findings_count: i32,
11266
11267    /// Output only. The evaluation status of the cloud control.
11268    pub evaluation_state: crate::model::EvaluationState,
11269
11270    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11271}
11272
11273impl CloudControlAssessmentDetails {
11274    /// Creates a new default instance.
11275    pub fn new() -> Self {
11276        std::default::Default::default()
11277    }
11278
11279    /// Sets the value of [findings_count][crate::model::CloudControlAssessmentDetails::findings_count].
11280    ///
11281    /// # Example
11282    /// ```ignore,no_run
11283    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAssessmentDetails;
11284    /// let x = CloudControlAssessmentDetails::new().set_findings_count(42);
11285    /// ```
11286    pub fn set_findings_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11287        self.findings_count = v.into();
11288        self
11289    }
11290
11291    /// Sets the value of [evaluation_state][crate::model::CloudControlAssessmentDetails::evaluation_state].
11292    ///
11293    /// # Example
11294    /// ```ignore,no_run
11295    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAssessmentDetails;
11296    /// use google_cloud_cloudsecuritycompliance_v1::model::EvaluationState;
11297    /// let x0 = CloudControlAssessmentDetails::new().set_evaluation_state(EvaluationState::Passed);
11298    /// let x1 = CloudControlAssessmentDetails::new().set_evaluation_state(EvaluationState::Failed);
11299    /// let x2 = CloudControlAssessmentDetails::new().set_evaluation_state(EvaluationState::NotAssessed);
11300    /// ```
11301    pub fn set_evaluation_state<T: std::convert::Into<crate::model::EvaluationState>>(
11302        mut self,
11303        v: T,
11304    ) -> Self {
11305        self.evaluation_state = v.into();
11306        self
11307    }
11308}
11309
11310impl wkt::message::Message for CloudControlAssessmentDetails {
11311    fn typename() -> &'static str {
11312        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails"
11313    }
11314}
11315
11316/// The similar controls.
11317#[derive(Clone, Default, PartialEq)]
11318#[non_exhaustive]
11319pub struct SimilarControls {
11320    /// The name of the framework.
11321    pub framework: std::string::String,
11322
11323    /// The ID of the control.
11324    pub control_id: std::string::String,
11325
11326    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11327}
11328
11329impl SimilarControls {
11330    /// Creates a new default instance.
11331    pub fn new() -> Self {
11332        std::default::Default::default()
11333    }
11334
11335    /// Sets the value of [framework][crate::model::SimilarControls::framework].
11336    ///
11337    /// # Example
11338    /// ```ignore,no_run
11339    /// # use google_cloud_cloudsecuritycompliance_v1::model::SimilarControls;
11340    /// let x = SimilarControls::new().set_framework("example");
11341    /// ```
11342    pub fn set_framework<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11343        self.framework = v.into();
11344        self
11345    }
11346
11347    /// Sets the value of [control_id][crate::model::SimilarControls::control_id].
11348    ///
11349    /// # Example
11350    /// ```ignore,no_run
11351    /// # use google_cloud_cloudsecuritycompliance_v1::model::SimilarControls;
11352    /// let x = SimilarControls::new().set_control_id("example");
11353    /// ```
11354    pub fn set_control_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11355        self.control_id = v.into();
11356        self
11357    }
11358}
11359
11360impl wkt::message::Message for SimilarControls {
11361    fn typename() -> &'static str {
11362        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.SimilarControls"
11363    }
11364}
11365
11366/// The aggregated compliance report.
11367#[derive(Clone, Default, PartialEq)]
11368#[non_exhaustive]
11369pub struct AggregatedComplianceReport {
11370    /// The control assessment details of the framework.
11371    pub control_assessment_details: std::option::Option<crate::model::ControlAssessmentDetails>,
11372
11373    /// The report time of the aggregated compliance report.
11374    pub report_time: std::option::Option<wkt::Timestamp>,
11375
11376    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11377}
11378
11379impl AggregatedComplianceReport {
11380    /// Creates a new default instance.
11381    pub fn new() -> Self {
11382        std::default::Default::default()
11383    }
11384
11385    /// Sets the value of [control_assessment_details][crate::model::AggregatedComplianceReport::control_assessment_details].
11386    ///
11387    /// # Example
11388    /// ```ignore,no_run
11389    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregatedComplianceReport;
11390    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
11391    /// let x = AggregatedComplianceReport::new().set_control_assessment_details(ControlAssessmentDetails::default()/* use setters */);
11392    /// ```
11393    pub fn set_control_assessment_details<T>(mut self, v: T) -> Self
11394    where
11395        T: std::convert::Into<crate::model::ControlAssessmentDetails>,
11396    {
11397        self.control_assessment_details = std::option::Option::Some(v.into());
11398        self
11399    }
11400
11401    /// Sets or clears the value of [control_assessment_details][crate::model::AggregatedComplianceReport::control_assessment_details].
11402    ///
11403    /// # Example
11404    /// ```ignore,no_run
11405    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregatedComplianceReport;
11406    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
11407    /// let x = AggregatedComplianceReport::new().set_or_clear_control_assessment_details(Some(ControlAssessmentDetails::default()/* use setters */));
11408    /// let x = AggregatedComplianceReport::new().set_or_clear_control_assessment_details(None::<ControlAssessmentDetails>);
11409    /// ```
11410    pub fn set_or_clear_control_assessment_details<T>(mut self, v: std::option::Option<T>) -> Self
11411    where
11412        T: std::convert::Into<crate::model::ControlAssessmentDetails>,
11413    {
11414        self.control_assessment_details = v.map(|x| x.into());
11415        self
11416    }
11417
11418    /// Sets the value of [report_time][crate::model::AggregatedComplianceReport::report_time].
11419    ///
11420    /// # Example
11421    /// ```ignore,no_run
11422    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregatedComplianceReport;
11423    /// use wkt::Timestamp;
11424    /// let x = AggregatedComplianceReport::new().set_report_time(Timestamp::default()/* use setters */);
11425    /// ```
11426    pub fn set_report_time<T>(mut self, v: T) -> Self
11427    where
11428        T: std::convert::Into<wkt::Timestamp>,
11429    {
11430        self.report_time = std::option::Option::Some(v.into());
11431        self
11432    }
11433
11434    /// Sets or clears the value of [report_time][crate::model::AggregatedComplianceReport::report_time].
11435    ///
11436    /// # Example
11437    /// ```ignore,no_run
11438    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregatedComplianceReport;
11439    /// use wkt::Timestamp;
11440    /// let x = AggregatedComplianceReport::new().set_or_clear_report_time(Some(Timestamp::default()/* use setters */));
11441    /// let x = AggregatedComplianceReport::new().set_or_clear_report_time(None::<Timestamp>);
11442    /// ```
11443    pub fn set_or_clear_report_time<T>(mut self, v: std::option::Option<T>) -> Self
11444    where
11445        T: std::convert::Into<wkt::Timestamp>,
11446    {
11447        self.report_time = v.map(|x| x.into());
11448        self
11449    }
11450}
11451
11452impl wkt::message::Message for AggregatedComplianceReport {
11453    fn typename() -> &'static str {
11454        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport"
11455    }
11456}
11457
11458/// The details for a target resource.
11459#[derive(Clone, Default, PartialEq)]
11460#[non_exhaustive]
11461pub struct TargetResourceDetails {
11462    /// The framework deployment name for the target resource.
11463    ///
11464    /// For example,
11465    /// `organizations/{organization_id}/locations/{location}/frameworkDeployments/{framework_deployment_id}`
11466    pub framework_deployment: std::string::String,
11467
11468    /// The display name of the target resource. For example, `google.com`,
11469    /// `staging-project`, or `development-folder`.
11470    pub target_resource_display_name: std::string::String,
11471
11472    /// The target resource. For example, `organizations/1234567890`,
11473    /// `projects/1234567890`, or `folders/1234567890`.
11474    pub target_resource: std::string::String,
11475
11476    /// The create time of the target resource.
11477    pub create_time: std::option::Option<wkt::Timestamp>,
11478
11479    /// The update time of the target resource.
11480    pub update_time: std::option::Option<wkt::Timestamp>,
11481
11482    /// The major revision ID of the framework for the target resource.
11483    pub major_revision_id: i64,
11484
11485    /// The minor revision ID of the framework for the target resource.
11486    pub minor_revision_id: i64,
11487
11488    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11489}
11490
11491impl TargetResourceDetails {
11492    /// Creates a new default instance.
11493    pub fn new() -> Self {
11494        std::default::Default::default()
11495    }
11496
11497    /// Sets the value of [framework_deployment][crate::model::TargetResourceDetails::framework_deployment].
11498    ///
11499    /// # Example
11500    /// ```ignore,no_run
11501    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
11502    /// let x = TargetResourceDetails::new().set_framework_deployment("example");
11503    /// ```
11504    pub fn set_framework_deployment<T: std::convert::Into<std::string::String>>(
11505        mut self,
11506        v: T,
11507    ) -> Self {
11508        self.framework_deployment = v.into();
11509        self
11510    }
11511
11512    /// Sets the value of [target_resource_display_name][crate::model::TargetResourceDetails::target_resource_display_name].
11513    ///
11514    /// # Example
11515    /// ```ignore,no_run
11516    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
11517    /// let x = TargetResourceDetails::new().set_target_resource_display_name("example");
11518    /// ```
11519    pub fn set_target_resource_display_name<T: std::convert::Into<std::string::String>>(
11520        mut self,
11521        v: T,
11522    ) -> Self {
11523        self.target_resource_display_name = v.into();
11524        self
11525    }
11526
11527    /// Sets the value of [target_resource][crate::model::TargetResourceDetails::target_resource].
11528    ///
11529    /// # Example
11530    /// ```ignore,no_run
11531    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
11532    /// let x = TargetResourceDetails::new().set_target_resource("example");
11533    /// ```
11534    pub fn set_target_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11535        self.target_resource = v.into();
11536        self
11537    }
11538
11539    /// Sets the value of [create_time][crate::model::TargetResourceDetails::create_time].
11540    ///
11541    /// # Example
11542    /// ```ignore,no_run
11543    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
11544    /// use wkt::Timestamp;
11545    /// let x = TargetResourceDetails::new().set_create_time(Timestamp::default()/* use setters */);
11546    /// ```
11547    pub fn set_create_time<T>(mut self, v: T) -> Self
11548    where
11549        T: std::convert::Into<wkt::Timestamp>,
11550    {
11551        self.create_time = std::option::Option::Some(v.into());
11552        self
11553    }
11554
11555    /// Sets or clears the value of [create_time][crate::model::TargetResourceDetails::create_time].
11556    ///
11557    /// # Example
11558    /// ```ignore,no_run
11559    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
11560    /// use wkt::Timestamp;
11561    /// let x = TargetResourceDetails::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
11562    /// let x = TargetResourceDetails::new().set_or_clear_create_time(None::<Timestamp>);
11563    /// ```
11564    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
11565    where
11566        T: std::convert::Into<wkt::Timestamp>,
11567    {
11568        self.create_time = v.map(|x| x.into());
11569        self
11570    }
11571
11572    /// Sets the value of [update_time][crate::model::TargetResourceDetails::update_time].
11573    ///
11574    /// # Example
11575    /// ```ignore,no_run
11576    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
11577    /// use wkt::Timestamp;
11578    /// let x = TargetResourceDetails::new().set_update_time(Timestamp::default()/* use setters */);
11579    /// ```
11580    pub fn set_update_time<T>(mut self, v: T) -> Self
11581    where
11582        T: std::convert::Into<wkt::Timestamp>,
11583    {
11584        self.update_time = std::option::Option::Some(v.into());
11585        self
11586    }
11587
11588    /// Sets or clears the value of [update_time][crate::model::TargetResourceDetails::update_time].
11589    ///
11590    /// # Example
11591    /// ```ignore,no_run
11592    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
11593    /// use wkt::Timestamp;
11594    /// let x = TargetResourceDetails::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
11595    /// let x = TargetResourceDetails::new().set_or_clear_update_time(None::<Timestamp>);
11596    /// ```
11597    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
11598    where
11599        T: std::convert::Into<wkt::Timestamp>,
11600    {
11601        self.update_time = v.map(|x| x.into());
11602        self
11603    }
11604
11605    /// Sets the value of [major_revision_id][crate::model::TargetResourceDetails::major_revision_id].
11606    ///
11607    /// # Example
11608    /// ```ignore,no_run
11609    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
11610    /// let x = TargetResourceDetails::new().set_major_revision_id(42);
11611    /// ```
11612    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11613        self.major_revision_id = v.into();
11614        self
11615    }
11616
11617    /// Sets the value of [minor_revision_id][crate::model::TargetResourceDetails::minor_revision_id].
11618    ///
11619    /// # Example
11620    /// ```ignore,no_run
11621    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
11622    /// let x = TargetResourceDetails::new().set_minor_revision_id(42);
11623    /// ```
11624    pub fn set_minor_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11625        self.minor_revision_id = v.into();
11626        self
11627    }
11628}
11629
11630impl wkt::message::Message for TargetResourceDetails {
11631    fn typename() -> &'static str {
11632        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails"
11633    }
11634}
11635
11636/// The trend of a compliance metric.
11637#[derive(Clone, Default, PartialEq)]
11638#[non_exhaustive]
11639pub struct Trend {
11640    /// Output only. The duration for the trend.
11641    pub duration: std::option::Option<wkt::Duration>,
11642
11643    /// Output only. The trend value as a percentage. The value can be positive or
11644    /// negative.
11645    pub value_percent: f64,
11646
11647    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11648}
11649
11650impl Trend {
11651    /// Creates a new default instance.
11652    pub fn new() -> Self {
11653        std::default::Default::default()
11654    }
11655
11656    /// Sets the value of [duration][crate::model::Trend::duration].
11657    ///
11658    /// # Example
11659    /// ```ignore,no_run
11660    /// # use google_cloud_cloudsecuritycompliance_v1::model::Trend;
11661    /// use wkt::Duration;
11662    /// let x = Trend::new().set_duration(Duration::default()/* use setters */);
11663    /// ```
11664    pub fn set_duration<T>(mut self, v: T) -> Self
11665    where
11666        T: std::convert::Into<wkt::Duration>,
11667    {
11668        self.duration = std::option::Option::Some(v.into());
11669        self
11670    }
11671
11672    /// Sets or clears the value of [duration][crate::model::Trend::duration].
11673    ///
11674    /// # Example
11675    /// ```ignore,no_run
11676    /// # use google_cloud_cloudsecuritycompliance_v1::model::Trend;
11677    /// use wkt::Duration;
11678    /// let x = Trend::new().set_or_clear_duration(Some(Duration::default()/* use setters */));
11679    /// let x = Trend::new().set_or_clear_duration(None::<Duration>);
11680    /// ```
11681    pub fn set_or_clear_duration<T>(mut self, v: std::option::Option<T>) -> Self
11682    where
11683        T: std::convert::Into<wkt::Duration>,
11684    {
11685        self.duration = v.map(|x| x.into());
11686        self
11687    }
11688
11689    /// Sets the value of [value_percent][crate::model::Trend::value_percent].
11690    ///
11691    /// # Example
11692    /// ```ignore,no_run
11693    /// # use google_cloud_cloudsecuritycompliance_v1::model::Trend;
11694    /// let x = Trend::new().set_value_percent(42.0);
11695    /// ```
11696    pub fn set_value_percent<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11697        self.value_percent = v.into();
11698        self
11699    }
11700}
11701
11702impl wkt::message::Message for Trend {
11703    fn typename() -> &'static str {
11704        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.Trend"
11705    }
11706}
11707
11708/// The state of compliance after evaluation is complete.
11709///
11710/// # Working with unknown values
11711///
11712/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11713/// additional enum variants at any time. Adding new variants is not considered
11714/// a breaking change. Applications should write their code in anticipation of:
11715///
11716/// - New values appearing in future releases of the client library, **and**
11717/// - New values received dynamically, without application changes.
11718///
11719/// Please consult the [Working with enums] section in the user guide for some
11720/// guidelines.
11721///
11722/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11723#[derive(Clone, Debug, PartialEq)]
11724#[non_exhaustive]
11725pub enum ComplianceState {
11726    /// Default value. This value is unused.
11727    Unspecified,
11728    /// The resource is compliant.
11729    Compliant,
11730    /// The resource has a violation.
11731    Violation,
11732    /// The resource requires manual review from you.
11733    ManualReviewNeeded,
11734    /// An error occurred while computing the resource status.
11735    Error,
11736    /// The resource can't be audited.
11737    AuditNotSupported,
11738    /// If set, the enum was initialized with an unknown value.
11739    ///
11740    /// Applications can examine the value using [ComplianceState::value] or
11741    /// [ComplianceState::name].
11742    UnknownValue(compliance_state::UnknownValue),
11743}
11744
11745#[doc(hidden)]
11746pub mod compliance_state {
11747    #[allow(unused_imports)]
11748    use super::*;
11749    #[derive(Clone, Debug, PartialEq)]
11750    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11751}
11752
11753impl ComplianceState {
11754    /// Gets the enum value.
11755    ///
11756    /// Returns `None` if the enum contains an unknown value deserialized from
11757    /// the string representation of enums.
11758    pub fn value(&self) -> std::option::Option<i32> {
11759        match self {
11760            Self::Unspecified => std::option::Option::Some(0),
11761            Self::Compliant => std::option::Option::Some(1),
11762            Self::Violation => std::option::Option::Some(2),
11763            Self::ManualReviewNeeded => std::option::Option::Some(3),
11764            Self::Error => std::option::Option::Some(4),
11765            Self::AuditNotSupported => std::option::Option::Some(5),
11766            Self::UnknownValue(u) => u.0.value(),
11767        }
11768    }
11769
11770    /// Gets the enum value as a string.
11771    ///
11772    /// Returns `None` if the enum contains an unknown value deserialized from
11773    /// the integer representation of enums.
11774    pub fn name(&self) -> std::option::Option<&str> {
11775        match self {
11776            Self::Unspecified => std::option::Option::Some("COMPLIANCE_STATE_UNSPECIFIED"),
11777            Self::Compliant => std::option::Option::Some("COMPLIANT"),
11778            Self::Violation => std::option::Option::Some("VIOLATION"),
11779            Self::ManualReviewNeeded => std::option::Option::Some("MANUAL_REVIEW_NEEDED"),
11780            Self::Error => std::option::Option::Some("ERROR"),
11781            Self::AuditNotSupported => std::option::Option::Some("AUDIT_NOT_SUPPORTED"),
11782            Self::UnknownValue(u) => u.0.name(),
11783        }
11784    }
11785}
11786
11787impl std::default::Default for ComplianceState {
11788    fn default() -> Self {
11789        use std::convert::From;
11790        Self::from(0)
11791    }
11792}
11793
11794impl std::fmt::Display for ComplianceState {
11795    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11796        wkt::internal::display_enum(f, self.name(), self.value())
11797    }
11798}
11799
11800impl std::convert::From<i32> for ComplianceState {
11801    fn from(value: i32) -> Self {
11802        match value {
11803            0 => Self::Unspecified,
11804            1 => Self::Compliant,
11805            2 => Self::Violation,
11806            3 => Self::ManualReviewNeeded,
11807            4 => Self::Error,
11808            5 => Self::AuditNotSupported,
11809            _ => Self::UnknownValue(compliance_state::UnknownValue(
11810                wkt::internal::UnknownEnumValue::Integer(value),
11811            )),
11812        }
11813    }
11814}
11815
11816impl std::convert::From<&str> for ComplianceState {
11817    fn from(value: &str) -> Self {
11818        use std::string::ToString;
11819        match value {
11820            "COMPLIANCE_STATE_UNSPECIFIED" => Self::Unspecified,
11821            "COMPLIANT" => Self::Compliant,
11822            "VIOLATION" => Self::Violation,
11823            "MANUAL_REVIEW_NEEDED" => Self::ManualReviewNeeded,
11824            "ERROR" => Self::Error,
11825            "AUDIT_NOT_SUPPORTED" => Self::AuditNotSupported,
11826            _ => Self::UnknownValue(compliance_state::UnknownValue(
11827                wkt::internal::UnknownEnumValue::String(value.to_string()),
11828            )),
11829        }
11830    }
11831}
11832
11833impl serde::ser::Serialize for ComplianceState {
11834    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11835    where
11836        S: serde::Serializer,
11837    {
11838        match self {
11839            Self::Unspecified => serializer.serialize_i32(0),
11840            Self::Compliant => serializer.serialize_i32(1),
11841            Self::Violation => serializer.serialize_i32(2),
11842            Self::ManualReviewNeeded => serializer.serialize_i32(3),
11843            Self::Error => serializer.serialize_i32(4),
11844            Self::AuditNotSupported => serializer.serialize_i32(5),
11845            Self::UnknownValue(u) => u.0.serialize(serializer),
11846        }
11847    }
11848}
11849
11850impl<'de> serde::de::Deserialize<'de> for ComplianceState {
11851    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11852    where
11853        D: serde::Deserializer<'de>,
11854    {
11855        deserializer.deserialize_any(wkt::internal::EnumVisitor::<ComplianceState>::new(
11856            ".google.cloud.cloudsecuritycompliance.v1.ComplianceState",
11857        ))
11858    }
11859}
11860
11861/// The responsibility type for the regulatory control.
11862///
11863/// # Working with unknown values
11864///
11865/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11866/// additional enum variants at any time. Adding new variants is not considered
11867/// a breaking change. Applications should write their code in anticipation of:
11868///
11869/// - New values appearing in future releases of the client library, **and**
11870/// - New values received dynamically, without application changes.
11871///
11872/// Please consult the [Working with enums] section in the user guide for some
11873/// guidelines.
11874///
11875/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11876#[derive(Clone, Debug, PartialEq)]
11877#[non_exhaustive]
11878pub enum RegulatoryControlResponsibilityType {
11879    /// Default value. This value is unused.
11880    Unspecified,
11881    /// Google's responsibility.
11882    Google,
11883    /// Your responsibility.
11884    Customer,
11885    /// Shared responsibility.
11886    Shared,
11887    /// If set, the enum was initialized with an unknown value.
11888    ///
11889    /// Applications can examine the value using [RegulatoryControlResponsibilityType::value] or
11890    /// [RegulatoryControlResponsibilityType::name].
11891    UnknownValue(regulatory_control_responsibility_type::UnknownValue),
11892}
11893
11894#[doc(hidden)]
11895pub mod regulatory_control_responsibility_type {
11896    #[allow(unused_imports)]
11897    use super::*;
11898    #[derive(Clone, Debug, PartialEq)]
11899    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11900}
11901
11902impl RegulatoryControlResponsibilityType {
11903    /// Gets the enum value.
11904    ///
11905    /// Returns `None` if the enum contains an unknown value deserialized from
11906    /// the string representation of enums.
11907    pub fn value(&self) -> std::option::Option<i32> {
11908        match self {
11909            Self::Unspecified => std::option::Option::Some(0),
11910            Self::Google => std::option::Option::Some(1),
11911            Self::Customer => std::option::Option::Some(2),
11912            Self::Shared => std::option::Option::Some(3),
11913            Self::UnknownValue(u) => u.0.value(),
11914        }
11915    }
11916
11917    /// Gets the enum value as a string.
11918    ///
11919    /// Returns `None` if the enum contains an unknown value deserialized from
11920    /// the integer representation of enums.
11921    pub fn name(&self) -> std::option::Option<&str> {
11922        match self {
11923            Self::Unspecified => {
11924                std::option::Option::Some("REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED")
11925            }
11926            Self::Google => std::option::Option::Some("GOOGLE"),
11927            Self::Customer => std::option::Option::Some("CUSTOMER"),
11928            Self::Shared => std::option::Option::Some("SHARED"),
11929            Self::UnknownValue(u) => u.0.name(),
11930        }
11931    }
11932}
11933
11934impl std::default::Default for RegulatoryControlResponsibilityType {
11935    fn default() -> Self {
11936        use std::convert::From;
11937        Self::from(0)
11938    }
11939}
11940
11941impl std::fmt::Display for RegulatoryControlResponsibilityType {
11942    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11943        wkt::internal::display_enum(f, self.name(), self.value())
11944    }
11945}
11946
11947impl std::convert::From<i32> for RegulatoryControlResponsibilityType {
11948    fn from(value: i32) -> Self {
11949        match value {
11950            0 => Self::Unspecified,
11951            1 => Self::Google,
11952            2 => Self::Customer,
11953            3 => Self::Shared,
11954            _ => Self::UnknownValue(regulatory_control_responsibility_type::UnknownValue(
11955                wkt::internal::UnknownEnumValue::Integer(value),
11956            )),
11957        }
11958    }
11959}
11960
11961impl std::convert::From<&str> for RegulatoryControlResponsibilityType {
11962    fn from(value: &str) -> Self {
11963        use std::string::ToString;
11964        match value {
11965            "REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED" => Self::Unspecified,
11966            "GOOGLE" => Self::Google,
11967            "CUSTOMER" => Self::Customer,
11968            "SHARED" => Self::Shared,
11969            _ => Self::UnknownValue(regulatory_control_responsibility_type::UnknownValue(
11970                wkt::internal::UnknownEnumValue::String(value.to_string()),
11971            )),
11972        }
11973    }
11974}
11975
11976impl serde::ser::Serialize for RegulatoryControlResponsibilityType {
11977    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11978    where
11979        S: serde::Serializer,
11980    {
11981        match self {
11982            Self::Unspecified => serializer.serialize_i32(0),
11983            Self::Google => serializer.serialize_i32(1),
11984            Self::Customer => serializer.serialize_i32(2),
11985            Self::Shared => serializer.serialize_i32(3),
11986            Self::UnknownValue(u) => u.0.serialize(serializer),
11987        }
11988    }
11989}
11990
11991impl<'de> serde::de::Deserialize<'de> for RegulatoryControlResponsibilityType {
11992    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11993    where
11994        D: serde::Deserializer<'de>,
11995    {
11996        deserializer.deserialize_any(wkt::internal::EnumVisitor::<
11997            RegulatoryControlResponsibilityType,
11998        >::new(
11999            ".google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType",
12000        ))
12001    }
12002}
12003
12004/// The enforcement mode for the cloud control.
12005///
12006/// # Working with unknown values
12007///
12008/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12009/// additional enum variants at any time. Adding new variants is not considered
12010/// a breaking change. Applications should write their code in anticipation of:
12011///
12012/// - New values appearing in future releases of the client library, **and**
12013/// - New values received dynamically, without application changes.
12014///
12015/// Please consult the [Working with enums] section in the user guide for some
12016/// guidelines.
12017///
12018/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12019#[derive(Clone, Debug, PartialEq)]
12020#[non_exhaustive]
12021pub enum EnforcementMode {
12022    /// Default value. This value is unused.
12023    Unspecified,
12024    /// The cloud control is enforced to prevent non-compliance.
12025    Preventive,
12026    /// The cloud control is enforced to detect non-compliance.
12027    Detective,
12028    /// The cloud control is enforced to audit for non-compliance.
12029    Audit,
12030    /// If set, the enum was initialized with an unknown value.
12031    ///
12032    /// Applications can examine the value using [EnforcementMode::value] or
12033    /// [EnforcementMode::name].
12034    UnknownValue(enforcement_mode::UnknownValue),
12035}
12036
12037#[doc(hidden)]
12038pub mod enforcement_mode {
12039    #[allow(unused_imports)]
12040    use super::*;
12041    #[derive(Clone, Debug, PartialEq)]
12042    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12043}
12044
12045impl EnforcementMode {
12046    /// Gets the enum value.
12047    ///
12048    /// Returns `None` if the enum contains an unknown value deserialized from
12049    /// the string representation of enums.
12050    pub fn value(&self) -> std::option::Option<i32> {
12051        match self {
12052            Self::Unspecified => std::option::Option::Some(0),
12053            Self::Preventive => std::option::Option::Some(1),
12054            Self::Detective => std::option::Option::Some(2),
12055            Self::Audit => std::option::Option::Some(3),
12056            Self::UnknownValue(u) => u.0.value(),
12057        }
12058    }
12059
12060    /// Gets the enum value as a string.
12061    ///
12062    /// Returns `None` if the enum contains an unknown value deserialized from
12063    /// the integer representation of enums.
12064    pub fn name(&self) -> std::option::Option<&str> {
12065        match self {
12066            Self::Unspecified => std::option::Option::Some("ENFORCEMENT_MODE_UNSPECIFIED"),
12067            Self::Preventive => std::option::Option::Some("PREVENTIVE"),
12068            Self::Detective => std::option::Option::Some("DETECTIVE"),
12069            Self::Audit => std::option::Option::Some("AUDIT"),
12070            Self::UnknownValue(u) => u.0.name(),
12071        }
12072    }
12073}
12074
12075impl std::default::Default for EnforcementMode {
12076    fn default() -> Self {
12077        use std::convert::From;
12078        Self::from(0)
12079    }
12080}
12081
12082impl std::fmt::Display for EnforcementMode {
12083    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12084        wkt::internal::display_enum(f, self.name(), self.value())
12085    }
12086}
12087
12088impl std::convert::From<i32> for EnforcementMode {
12089    fn from(value: i32) -> Self {
12090        match value {
12091            0 => Self::Unspecified,
12092            1 => Self::Preventive,
12093            2 => Self::Detective,
12094            3 => Self::Audit,
12095            _ => Self::UnknownValue(enforcement_mode::UnknownValue(
12096                wkt::internal::UnknownEnumValue::Integer(value),
12097            )),
12098        }
12099    }
12100}
12101
12102impl std::convert::From<&str> for EnforcementMode {
12103    fn from(value: &str) -> Self {
12104        use std::string::ToString;
12105        match value {
12106            "ENFORCEMENT_MODE_UNSPECIFIED" => Self::Unspecified,
12107            "PREVENTIVE" => Self::Preventive,
12108            "DETECTIVE" => Self::Detective,
12109            "AUDIT" => Self::Audit,
12110            _ => Self::UnknownValue(enforcement_mode::UnknownValue(
12111                wkt::internal::UnknownEnumValue::String(value.to_string()),
12112            )),
12113        }
12114    }
12115}
12116
12117impl serde::ser::Serialize for EnforcementMode {
12118    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12119    where
12120        S: serde::Serializer,
12121    {
12122        match self {
12123            Self::Unspecified => serializer.serialize_i32(0),
12124            Self::Preventive => serializer.serialize_i32(1),
12125            Self::Detective => serializer.serialize_i32(2),
12126            Self::Audit => serializer.serialize_i32(3),
12127            Self::UnknownValue(u) => u.0.serialize(serializer),
12128        }
12129    }
12130}
12131
12132impl<'de> serde::de::Deserialize<'de> for EnforcementMode {
12133    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12134    where
12135        D: serde::Deserializer<'de>,
12136    {
12137        deserializer.deserialize_any(wkt::internal::EnumVisitor::<EnforcementMode>::new(
12138            ".google.cloud.cloudsecuritycompliance.v1.EnforcementMode",
12139        ))
12140    }
12141}
12142
12143/// The category for the framework.
12144///
12145/// # Working with unknown values
12146///
12147/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12148/// additional enum variants at any time. Adding new variants is not considered
12149/// a breaking change. Applications should write their code in anticipation of:
12150///
12151/// - New values appearing in future releases of the client library, **and**
12152/// - New values received dynamically, without application changes.
12153///
12154/// Please consult the [Working with enums] section in the user guide for some
12155/// guidelines.
12156///
12157/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12158#[derive(Clone, Debug, PartialEq)]
12159#[non_exhaustive]
12160pub enum FrameworkCategory {
12161    /// Default value. This value is unused.
12162    Unspecified,
12163    /// An industry-defined framework.
12164    IndustryDefinedStandard,
12165    /// An Assured Workloads framework.
12166    AssuredWorkloads,
12167    /// A data security posture framework.
12168    DataSecurity,
12169    /// A Google's best practices framework.
12170    GoogleBestPractices,
12171    /// A user-created framework.
12172    CustomFramework,
12173    /// If set, the enum was initialized with an unknown value.
12174    ///
12175    /// Applications can examine the value using [FrameworkCategory::value] or
12176    /// [FrameworkCategory::name].
12177    UnknownValue(framework_category::UnknownValue),
12178}
12179
12180#[doc(hidden)]
12181pub mod framework_category {
12182    #[allow(unused_imports)]
12183    use super::*;
12184    #[derive(Clone, Debug, PartialEq)]
12185    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12186}
12187
12188impl FrameworkCategory {
12189    /// Gets the enum value.
12190    ///
12191    /// Returns `None` if the enum contains an unknown value deserialized from
12192    /// the string representation of enums.
12193    pub fn value(&self) -> std::option::Option<i32> {
12194        match self {
12195            Self::Unspecified => std::option::Option::Some(0),
12196            Self::IndustryDefinedStandard => std::option::Option::Some(1),
12197            Self::AssuredWorkloads => std::option::Option::Some(2),
12198            Self::DataSecurity => std::option::Option::Some(3),
12199            Self::GoogleBestPractices => std::option::Option::Some(4),
12200            Self::CustomFramework => std::option::Option::Some(5),
12201            Self::UnknownValue(u) => u.0.value(),
12202        }
12203    }
12204
12205    /// Gets the enum value as a string.
12206    ///
12207    /// Returns `None` if the enum contains an unknown value deserialized from
12208    /// the integer representation of enums.
12209    pub fn name(&self) -> std::option::Option<&str> {
12210        match self {
12211            Self::Unspecified => std::option::Option::Some("FRAMEWORK_CATEGORY_UNSPECIFIED"),
12212            Self::IndustryDefinedStandard => std::option::Option::Some("INDUSTRY_DEFINED_STANDARD"),
12213            Self::AssuredWorkloads => std::option::Option::Some("ASSURED_WORKLOADS"),
12214            Self::DataSecurity => std::option::Option::Some("DATA_SECURITY"),
12215            Self::GoogleBestPractices => std::option::Option::Some("GOOGLE_BEST_PRACTICES"),
12216            Self::CustomFramework => std::option::Option::Some("CUSTOM_FRAMEWORK"),
12217            Self::UnknownValue(u) => u.0.name(),
12218        }
12219    }
12220}
12221
12222impl std::default::Default for FrameworkCategory {
12223    fn default() -> Self {
12224        use std::convert::From;
12225        Self::from(0)
12226    }
12227}
12228
12229impl std::fmt::Display for FrameworkCategory {
12230    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12231        wkt::internal::display_enum(f, self.name(), self.value())
12232    }
12233}
12234
12235impl std::convert::From<i32> for FrameworkCategory {
12236    fn from(value: i32) -> Self {
12237        match value {
12238            0 => Self::Unspecified,
12239            1 => Self::IndustryDefinedStandard,
12240            2 => Self::AssuredWorkloads,
12241            3 => Self::DataSecurity,
12242            4 => Self::GoogleBestPractices,
12243            5 => Self::CustomFramework,
12244            _ => Self::UnknownValue(framework_category::UnknownValue(
12245                wkt::internal::UnknownEnumValue::Integer(value),
12246            )),
12247        }
12248    }
12249}
12250
12251impl std::convert::From<&str> for FrameworkCategory {
12252    fn from(value: &str) -> Self {
12253        use std::string::ToString;
12254        match value {
12255            "FRAMEWORK_CATEGORY_UNSPECIFIED" => Self::Unspecified,
12256            "INDUSTRY_DEFINED_STANDARD" => Self::IndustryDefinedStandard,
12257            "ASSURED_WORKLOADS" => Self::AssuredWorkloads,
12258            "DATA_SECURITY" => Self::DataSecurity,
12259            "GOOGLE_BEST_PRACTICES" => Self::GoogleBestPractices,
12260            "CUSTOM_FRAMEWORK" => Self::CustomFramework,
12261            _ => Self::UnknownValue(framework_category::UnknownValue(
12262                wkt::internal::UnknownEnumValue::String(value.to_string()),
12263            )),
12264        }
12265    }
12266}
12267
12268impl serde::ser::Serialize for FrameworkCategory {
12269    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12270    where
12271        S: serde::Serializer,
12272    {
12273        match self {
12274            Self::Unspecified => serializer.serialize_i32(0),
12275            Self::IndustryDefinedStandard => serializer.serialize_i32(1),
12276            Self::AssuredWorkloads => serializer.serialize_i32(2),
12277            Self::DataSecurity => serializer.serialize_i32(3),
12278            Self::GoogleBestPractices => serializer.serialize_i32(4),
12279            Self::CustomFramework => serializer.serialize_i32(5),
12280            Self::UnknownValue(u) => u.0.serialize(serializer),
12281        }
12282    }
12283}
12284
12285impl<'de> serde::de::Deserialize<'de> for FrameworkCategory {
12286    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12287    where
12288        D: serde::Deserializer<'de>,
12289    {
12290        deserializer.deserialize_any(wkt::internal::EnumVisitor::<FrameworkCategory>::new(
12291            ".google.cloud.cloudsecuritycompliance.v1.FrameworkCategory",
12292        ))
12293    }
12294}
12295
12296/// The category for the cloud control.
12297///
12298/// # Working with unknown values
12299///
12300/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12301/// additional enum variants at any time. Adding new variants is not considered
12302/// a breaking change. Applications should write their code in anticipation of:
12303///
12304/// - New values appearing in future releases of the client library, **and**
12305/// - New values received dynamically, without application changes.
12306///
12307/// Please consult the [Working with enums] section in the user guide for some
12308/// guidelines.
12309///
12310/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12311#[derive(Clone, Debug, PartialEq)]
12312#[non_exhaustive]
12313pub enum CloudControlCategory {
12314    /// Default value. This value is unused.
12315    Unspecified,
12316    /// The infrastructure security category.
12317    CcCategoryInfrastructure,
12318    /// The artificial intelligence category.
12319    CcCategoryArtificialIntelligence,
12320    /// The physical security category.
12321    CcCategoryPhysicalSecurity,
12322    /// The data security category.
12323    CcCategoryDataSecurity,
12324    /// The network security category.
12325    CcCategoryNetworkSecurity,
12326    /// The incident management category.
12327    CcCategoryIncidentManagement,
12328    /// The identity and access management category.
12329    CcCategoryIdentityAndAccessManagement,
12330    /// The encryption category.
12331    CcCategoryEncryption,
12332    /// The logs management and infrastructure category.
12333    CcCategoryLogsManagementAndInfrastructure,
12334    /// The HR, admin, and processes category.
12335    CcCategoryHrAdminAndProcesses,
12336    /// The third-party and sub-processor management category.
12337    CcCategoryThirdPartyAndSubProcessorManagement,
12338    /// The legal and disclosures category.
12339    CcCategoryLegalAndDisclosures,
12340    /// The vulnerability management category.
12341    CcCategoryVulnerabilityManagement,
12342    /// The privacy category.
12343    CcCategoryPrivacy,
12344    /// The business continuity and disaster recovery (BCDR) category.
12345    CcCategoryBcdr,
12346    /// The admin access category.
12347    CcCategoryAdminAccess,
12348    /// DRZ (Data Residency).
12349    CcCategoryDataResidency,
12350    /// RUR (Resource Usage Restriction).
12351    CcCategoryResourceUsageRestriction,
12352    /// SERVICE SPECIFIC
12353    CcCategoryServiceSpecific,
12354    /// If set, the enum was initialized with an unknown value.
12355    ///
12356    /// Applications can examine the value using [CloudControlCategory::value] or
12357    /// [CloudControlCategory::name].
12358    UnknownValue(cloud_control_category::UnknownValue),
12359}
12360
12361#[doc(hidden)]
12362pub mod cloud_control_category {
12363    #[allow(unused_imports)]
12364    use super::*;
12365    #[derive(Clone, Debug, PartialEq)]
12366    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12367}
12368
12369impl CloudControlCategory {
12370    /// Gets the enum value.
12371    ///
12372    /// Returns `None` if the enum contains an unknown value deserialized from
12373    /// the string representation of enums.
12374    pub fn value(&self) -> std::option::Option<i32> {
12375        match self {
12376            Self::Unspecified => std::option::Option::Some(0),
12377            Self::CcCategoryInfrastructure => std::option::Option::Some(1),
12378            Self::CcCategoryArtificialIntelligence => std::option::Option::Some(2),
12379            Self::CcCategoryPhysicalSecurity => std::option::Option::Some(3),
12380            Self::CcCategoryDataSecurity => std::option::Option::Some(4),
12381            Self::CcCategoryNetworkSecurity => std::option::Option::Some(5),
12382            Self::CcCategoryIncidentManagement => std::option::Option::Some(6),
12383            Self::CcCategoryIdentityAndAccessManagement => std::option::Option::Some(7),
12384            Self::CcCategoryEncryption => std::option::Option::Some(8),
12385            Self::CcCategoryLogsManagementAndInfrastructure => std::option::Option::Some(9),
12386            Self::CcCategoryHrAdminAndProcesses => std::option::Option::Some(10),
12387            Self::CcCategoryThirdPartyAndSubProcessorManagement => std::option::Option::Some(11),
12388            Self::CcCategoryLegalAndDisclosures => std::option::Option::Some(12),
12389            Self::CcCategoryVulnerabilityManagement => std::option::Option::Some(13),
12390            Self::CcCategoryPrivacy => std::option::Option::Some(14),
12391            Self::CcCategoryBcdr => std::option::Option::Some(15),
12392            Self::CcCategoryAdminAccess => std::option::Option::Some(16),
12393            Self::CcCategoryDataResidency => std::option::Option::Some(17),
12394            Self::CcCategoryResourceUsageRestriction => std::option::Option::Some(18),
12395            Self::CcCategoryServiceSpecific => std::option::Option::Some(19),
12396            Self::UnknownValue(u) => u.0.value(),
12397        }
12398    }
12399
12400    /// Gets the enum value as a string.
12401    ///
12402    /// Returns `None` if the enum contains an unknown value deserialized from
12403    /// the integer representation of enums.
12404    pub fn name(&self) -> std::option::Option<&str> {
12405        match self {
12406            Self::Unspecified => std::option::Option::Some("CLOUD_CONTROL_CATEGORY_UNSPECIFIED"),
12407            Self::CcCategoryInfrastructure => {
12408                std::option::Option::Some("CC_CATEGORY_INFRASTRUCTURE")
12409            }
12410            Self::CcCategoryArtificialIntelligence => {
12411                std::option::Option::Some("CC_CATEGORY_ARTIFICIAL_INTELLIGENCE")
12412            }
12413            Self::CcCategoryPhysicalSecurity => {
12414                std::option::Option::Some("CC_CATEGORY_PHYSICAL_SECURITY")
12415            }
12416            Self::CcCategoryDataSecurity => std::option::Option::Some("CC_CATEGORY_DATA_SECURITY"),
12417            Self::CcCategoryNetworkSecurity => {
12418                std::option::Option::Some("CC_CATEGORY_NETWORK_SECURITY")
12419            }
12420            Self::CcCategoryIncidentManagement => {
12421                std::option::Option::Some("CC_CATEGORY_INCIDENT_MANAGEMENT")
12422            }
12423            Self::CcCategoryIdentityAndAccessManagement => {
12424                std::option::Option::Some("CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT")
12425            }
12426            Self::CcCategoryEncryption => std::option::Option::Some("CC_CATEGORY_ENCRYPTION"),
12427            Self::CcCategoryLogsManagementAndInfrastructure => {
12428                std::option::Option::Some("CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE")
12429            }
12430            Self::CcCategoryHrAdminAndProcesses => {
12431                std::option::Option::Some("CC_CATEGORY_HR_ADMIN_AND_PROCESSES")
12432            }
12433            Self::CcCategoryThirdPartyAndSubProcessorManagement => {
12434                std::option::Option::Some("CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT")
12435            }
12436            Self::CcCategoryLegalAndDisclosures => {
12437                std::option::Option::Some("CC_CATEGORY_LEGAL_AND_DISCLOSURES")
12438            }
12439            Self::CcCategoryVulnerabilityManagement => {
12440                std::option::Option::Some("CC_CATEGORY_VULNERABILITY_MANAGEMENT")
12441            }
12442            Self::CcCategoryPrivacy => std::option::Option::Some("CC_CATEGORY_PRIVACY"),
12443            Self::CcCategoryBcdr => std::option::Option::Some("CC_CATEGORY_BCDR"),
12444            Self::CcCategoryAdminAccess => std::option::Option::Some("CC_CATEGORY_ADMIN_ACCESS"),
12445            Self::CcCategoryDataResidency => {
12446                std::option::Option::Some("CC_CATEGORY_DATA_RESIDENCY")
12447            }
12448            Self::CcCategoryResourceUsageRestriction => {
12449                std::option::Option::Some("CC_CATEGORY_RESOURCE_USAGE_RESTRICTION")
12450            }
12451            Self::CcCategoryServiceSpecific => {
12452                std::option::Option::Some("CC_CATEGORY_SERVICE_SPECIFIC")
12453            }
12454            Self::UnknownValue(u) => u.0.name(),
12455        }
12456    }
12457}
12458
12459impl std::default::Default for CloudControlCategory {
12460    fn default() -> Self {
12461        use std::convert::From;
12462        Self::from(0)
12463    }
12464}
12465
12466impl std::fmt::Display for CloudControlCategory {
12467    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12468        wkt::internal::display_enum(f, self.name(), self.value())
12469    }
12470}
12471
12472impl std::convert::From<i32> for CloudControlCategory {
12473    fn from(value: i32) -> Self {
12474        match value {
12475            0 => Self::Unspecified,
12476            1 => Self::CcCategoryInfrastructure,
12477            2 => Self::CcCategoryArtificialIntelligence,
12478            3 => Self::CcCategoryPhysicalSecurity,
12479            4 => Self::CcCategoryDataSecurity,
12480            5 => Self::CcCategoryNetworkSecurity,
12481            6 => Self::CcCategoryIncidentManagement,
12482            7 => Self::CcCategoryIdentityAndAccessManagement,
12483            8 => Self::CcCategoryEncryption,
12484            9 => Self::CcCategoryLogsManagementAndInfrastructure,
12485            10 => Self::CcCategoryHrAdminAndProcesses,
12486            11 => Self::CcCategoryThirdPartyAndSubProcessorManagement,
12487            12 => Self::CcCategoryLegalAndDisclosures,
12488            13 => Self::CcCategoryVulnerabilityManagement,
12489            14 => Self::CcCategoryPrivacy,
12490            15 => Self::CcCategoryBcdr,
12491            16 => Self::CcCategoryAdminAccess,
12492            17 => Self::CcCategoryDataResidency,
12493            18 => Self::CcCategoryResourceUsageRestriction,
12494            19 => Self::CcCategoryServiceSpecific,
12495            _ => Self::UnknownValue(cloud_control_category::UnknownValue(
12496                wkt::internal::UnknownEnumValue::Integer(value),
12497            )),
12498        }
12499    }
12500}
12501
12502impl std::convert::From<&str> for CloudControlCategory {
12503    fn from(value: &str) -> Self {
12504        use std::string::ToString;
12505        match value {
12506            "CLOUD_CONTROL_CATEGORY_UNSPECIFIED" => Self::Unspecified,
12507            "CC_CATEGORY_INFRASTRUCTURE" => Self::CcCategoryInfrastructure,
12508            "CC_CATEGORY_ARTIFICIAL_INTELLIGENCE" => Self::CcCategoryArtificialIntelligence,
12509            "CC_CATEGORY_PHYSICAL_SECURITY" => Self::CcCategoryPhysicalSecurity,
12510            "CC_CATEGORY_DATA_SECURITY" => Self::CcCategoryDataSecurity,
12511            "CC_CATEGORY_NETWORK_SECURITY" => Self::CcCategoryNetworkSecurity,
12512            "CC_CATEGORY_INCIDENT_MANAGEMENT" => Self::CcCategoryIncidentManagement,
12513            "CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT" => {
12514                Self::CcCategoryIdentityAndAccessManagement
12515            }
12516            "CC_CATEGORY_ENCRYPTION" => Self::CcCategoryEncryption,
12517            "CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE" => {
12518                Self::CcCategoryLogsManagementAndInfrastructure
12519            }
12520            "CC_CATEGORY_HR_ADMIN_AND_PROCESSES" => Self::CcCategoryHrAdminAndProcesses,
12521            "CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT" => {
12522                Self::CcCategoryThirdPartyAndSubProcessorManagement
12523            }
12524            "CC_CATEGORY_LEGAL_AND_DISCLOSURES" => Self::CcCategoryLegalAndDisclosures,
12525            "CC_CATEGORY_VULNERABILITY_MANAGEMENT" => Self::CcCategoryVulnerabilityManagement,
12526            "CC_CATEGORY_PRIVACY" => Self::CcCategoryPrivacy,
12527            "CC_CATEGORY_BCDR" => Self::CcCategoryBcdr,
12528            "CC_CATEGORY_ADMIN_ACCESS" => Self::CcCategoryAdminAccess,
12529            "CC_CATEGORY_DATA_RESIDENCY" => Self::CcCategoryDataResidency,
12530            "CC_CATEGORY_RESOURCE_USAGE_RESTRICTION" => Self::CcCategoryResourceUsageRestriction,
12531            "CC_CATEGORY_SERVICE_SPECIFIC" => Self::CcCategoryServiceSpecific,
12532            _ => Self::UnknownValue(cloud_control_category::UnknownValue(
12533                wkt::internal::UnknownEnumValue::String(value.to_string()),
12534            )),
12535        }
12536    }
12537}
12538
12539impl serde::ser::Serialize for CloudControlCategory {
12540    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12541    where
12542        S: serde::Serializer,
12543    {
12544        match self {
12545            Self::Unspecified => serializer.serialize_i32(0),
12546            Self::CcCategoryInfrastructure => serializer.serialize_i32(1),
12547            Self::CcCategoryArtificialIntelligence => serializer.serialize_i32(2),
12548            Self::CcCategoryPhysicalSecurity => serializer.serialize_i32(3),
12549            Self::CcCategoryDataSecurity => serializer.serialize_i32(4),
12550            Self::CcCategoryNetworkSecurity => serializer.serialize_i32(5),
12551            Self::CcCategoryIncidentManagement => serializer.serialize_i32(6),
12552            Self::CcCategoryIdentityAndAccessManagement => serializer.serialize_i32(7),
12553            Self::CcCategoryEncryption => serializer.serialize_i32(8),
12554            Self::CcCategoryLogsManagementAndInfrastructure => serializer.serialize_i32(9),
12555            Self::CcCategoryHrAdminAndProcesses => serializer.serialize_i32(10),
12556            Self::CcCategoryThirdPartyAndSubProcessorManagement => serializer.serialize_i32(11),
12557            Self::CcCategoryLegalAndDisclosures => serializer.serialize_i32(12),
12558            Self::CcCategoryVulnerabilityManagement => serializer.serialize_i32(13),
12559            Self::CcCategoryPrivacy => serializer.serialize_i32(14),
12560            Self::CcCategoryBcdr => serializer.serialize_i32(15),
12561            Self::CcCategoryAdminAccess => serializer.serialize_i32(16),
12562            Self::CcCategoryDataResidency => serializer.serialize_i32(17),
12563            Self::CcCategoryResourceUsageRestriction => serializer.serialize_i32(18),
12564            Self::CcCategoryServiceSpecific => serializer.serialize_i32(19),
12565            Self::UnknownValue(u) => u.0.serialize(serializer),
12566        }
12567    }
12568}
12569
12570impl<'de> serde::de::Deserialize<'de> for CloudControlCategory {
12571    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12572    where
12573        D: serde::Deserializer<'de>,
12574    {
12575        deserializer.deserialize_any(wkt::internal::EnumVisitor::<CloudControlCategory>::new(
12576            ".google.cloud.cloudsecuritycompliance.v1.CloudControlCategory",
12577        ))
12578    }
12579}
12580
12581/// The cloud provider that's associated with the cloud control.
12582///
12583/// # Working with unknown values
12584///
12585/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12586/// additional enum variants at any time. Adding new variants is not considered
12587/// a breaking change. Applications should write their code in anticipation of:
12588///
12589/// - New values appearing in future releases of the client library, **and**
12590/// - New values received dynamically, without application changes.
12591///
12592/// Please consult the [Working with enums] section in the user guide for some
12593/// guidelines.
12594///
12595/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12596#[derive(Clone, Debug, PartialEq)]
12597#[non_exhaustive]
12598pub enum CloudProvider {
12599    /// Default value. This value is unused.
12600    Unspecified,
12601    /// Amazon Web Services (AWS).
12602    Aws,
12603    /// Microsoft Azure.
12604    Azure,
12605    /// Google Cloud.
12606    Gcp,
12607    /// If set, the enum was initialized with an unknown value.
12608    ///
12609    /// Applications can examine the value using [CloudProvider::value] or
12610    /// [CloudProvider::name].
12611    UnknownValue(cloud_provider::UnknownValue),
12612}
12613
12614#[doc(hidden)]
12615pub mod cloud_provider {
12616    #[allow(unused_imports)]
12617    use super::*;
12618    #[derive(Clone, Debug, PartialEq)]
12619    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12620}
12621
12622impl CloudProvider {
12623    /// Gets the enum value.
12624    ///
12625    /// Returns `None` if the enum contains an unknown value deserialized from
12626    /// the string representation of enums.
12627    pub fn value(&self) -> std::option::Option<i32> {
12628        match self {
12629            Self::Unspecified => std::option::Option::Some(0),
12630            Self::Aws => std::option::Option::Some(1),
12631            Self::Azure => std::option::Option::Some(2),
12632            Self::Gcp => std::option::Option::Some(3),
12633            Self::UnknownValue(u) => u.0.value(),
12634        }
12635    }
12636
12637    /// Gets the enum value as a string.
12638    ///
12639    /// Returns `None` if the enum contains an unknown value deserialized from
12640    /// the integer representation of enums.
12641    pub fn name(&self) -> std::option::Option<&str> {
12642        match self {
12643            Self::Unspecified => std::option::Option::Some("CLOUD_PROVIDER_UNSPECIFIED"),
12644            Self::Aws => std::option::Option::Some("AWS"),
12645            Self::Azure => std::option::Option::Some("AZURE"),
12646            Self::Gcp => std::option::Option::Some("GCP"),
12647            Self::UnknownValue(u) => u.0.name(),
12648        }
12649    }
12650}
12651
12652impl std::default::Default for CloudProvider {
12653    fn default() -> Self {
12654        use std::convert::From;
12655        Self::from(0)
12656    }
12657}
12658
12659impl std::fmt::Display for CloudProvider {
12660    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12661        wkt::internal::display_enum(f, self.name(), self.value())
12662    }
12663}
12664
12665impl std::convert::From<i32> for CloudProvider {
12666    fn from(value: i32) -> Self {
12667        match value {
12668            0 => Self::Unspecified,
12669            1 => Self::Aws,
12670            2 => Self::Azure,
12671            3 => Self::Gcp,
12672            _ => Self::UnknownValue(cloud_provider::UnknownValue(
12673                wkt::internal::UnknownEnumValue::Integer(value),
12674            )),
12675        }
12676    }
12677}
12678
12679impl std::convert::From<&str> for CloudProvider {
12680    fn from(value: &str) -> Self {
12681        use std::string::ToString;
12682        match value {
12683            "CLOUD_PROVIDER_UNSPECIFIED" => Self::Unspecified,
12684            "AWS" => Self::Aws,
12685            "AZURE" => Self::Azure,
12686            "GCP" => Self::Gcp,
12687            _ => Self::UnknownValue(cloud_provider::UnknownValue(
12688                wkt::internal::UnknownEnumValue::String(value.to_string()),
12689            )),
12690        }
12691    }
12692}
12693
12694impl serde::ser::Serialize for CloudProvider {
12695    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12696    where
12697        S: serde::Serializer,
12698    {
12699        match self {
12700            Self::Unspecified => serializer.serialize_i32(0),
12701            Self::Aws => serializer.serialize_i32(1),
12702            Self::Azure => serializer.serialize_i32(2),
12703            Self::Gcp => serializer.serialize_i32(3),
12704            Self::UnknownValue(u) => u.0.serialize(serializer),
12705        }
12706    }
12707}
12708
12709impl<'de> serde::de::Deserialize<'de> for CloudProvider {
12710    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12711    where
12712        D: serde::Deserializer<'de>,
12713    {
12714        deserializer.deserialize_any(wkt::internal::EnumVisitor::<CloudProvider>::new(
12715            ".google.cloud.cloudsecuritycompliance.v1.CloudProvider",
12716        ))
12717    }
12718}
12719
12720/// The severity of the finding.
12721///
12722/// # Working with unknown values
12723///
12724/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12725/// additional enum variants at any time. Adding new variants is not considered
12726/// a breaking change. Applications should write their code in anticipation of:
12727///
12728/// - New values appearing in future releases of the client library, **and**
12729/// - New values received dynamically, without application changes.
12730///
12731/// Please consult the [Working with enums] section in the user guide for some
12732/// guidelines.
12733///
12734/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12735#[derive(Clone, Debug, PartialEq)]
12736#[non_exhaustive]
12737pub enum Severity {
12738    /// Default value. This value is unused.
12739    Unspecified,
12740    /// A critical vulnerability is easily discoverable by an external actor,
12741    /// exploitable, and results in the direct ability to execute arbitrary code,
12742    /// exfiltrate data, and otherwise gain additional access and privileges to
12743    /// cloud resources and workloads. Examples include publicly accessible
12744    /// unprotected user data and public SSH access with weak or no
12745    /// passwords.
12746    ///
12747    /// A critical threat is a threat that can access, modify, or delete data or
12748    /// execute unauthorized code within existing resources.
12749    Critical,
12750    /// A high-risk vulnerability can be easily discovered and exploited in
12751    /// combination with other vulnerabilities to gain direct access and
12752    /// the ability to execute arbitrary code, exfiltrate data, and otherwise
12753    /// gain additional access and privileges to cloud resources and workloads.
12754    /// An example is a database with weak or no passwords that is only
12755    /// accessible internally. This database could easily be compromised by an
12756    /// actor that had access to the internal network.
12757    ///
12758    /// A high-risk threat is a threat that can create new computational
12759    /// resources in an environment but can't access data or execute code in
12760    /// existing resources.
12761    High,
12762    /// A medium-risk vulnerability can be used by an actor to gain access to
12763    /// resources or privileges that enable them to eventually (through multiple
12764    /// steps or a complex exploit) gain access and the ability to execute
12765    /// arbitrary code or exfiltrate data. An example is a service account with
12766    /// access to more projects than it should have. If an actor gains access to
12767    /// the service account, they could potentially use that access to manipulate
12768    /// a project the service account was not intended to.
12769    ///
12770    /// A medium-risk threat can cause operational impact but might not
12771    /// access data or execute unauthorized code.
12772    Medium,
12773    /// A low-risk vulnerability hampers a security organization's ability to
12774    /// detect vulnerabilities or active threats in their deployment, or prevents
12775    /// the root cause investigation of security issues. An example is monitoring
12776    /// and logs being disabled for resource configurations and access.
12777    ///
12778    /// A low-risk threat is a threat that has obtained minimal access to an
12779    /// environment but can't access data, execute code, or create resources.
12780    Low,
12781    /// If set, the enum was initialized with an unknown value.
12782    ///
12783    /// Applications can examine the value using [Severity::value] or
12784    /// [Severity::name].
12785    UnknownValue(severity::UnknownValue),
12786}
12787
12788#[doc(hidden)]
12789pub mod severity {
12790    #[allow(unused_imports)]
12791    use super::*;
12792    #[derive(Clone, Debug, PartialEq)]
12793    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12794}
12795
12796impl Severity {
12797    /// Gets the enum value.
12798    ///
12799    /// Returns `None` if the enum contains an unknown value deserialized from
12800    /// the string representation of enums.
12801    pub fn value(&self) -> std::option::Option<i32> {
12802        match self {
12803            Self::Unspecified => std::option::Option::Some(0),
12804            Self::Critical => std::option::Option::Some(1),
12805            Self::High => std::option::Option::Some(2),
12806            Self::Medium => std::option::Option::Some(3),
12807            Self::Low => std::option::Option::Some(4),
12808            Self::UnknownValue(u) => u.0.value(),
12809        }
12810    }
12811
12812    /// Gets the enum value as a string.
12813    ///
12814    /// Returns `None` if the enum contains an unknown value deserialized from
12815    /// the integer representation of enums.
12816    pub fn name(&self) -> std::option::Option<&str> {
12817        match self {
12818            Self::Unspecified => std::option::Option::Some("SEVERITY_UNSPECIFIED"),
12819            Self::Critical => std::option::Option::Some("CRITICAL"),
12820            Self::High => std::option::Option::Some("HIGH"),
12821            Self::Medium => std::option::Option::Some("MEDIUM"),
12822            Self::Low => std::option::Option::Some("LOW"),
12823            Self::UnknownValue(u) => u.0.name(),
12824        }
12825    }
12826}
12827
12828impl std::default::Default for Severity {
12829    fn default() -> Self {
12830        use std::convert::From;
12831        Self::from(0)
12832    }
12833}
12834
12835impl std::fmt::Display for Severity {
12836    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12837        wkt::internal::display_enum(f, self.name(), self.value())
12838    }
12839}
12840
12841impl std::convert::From<i32> for Severity {
12842    fn from(value: i32) -> Self {
12843        match value {
12844            0 => Self::Unspecified,
12845            1 => Self::Critical,
12846            2 => Self::High,
12847            3 => Self::Medium,
12848            4 => Self::Low,
12849            _ => Self::UnknownValue(severity::UnknownValue(
12850                wkt::internal::UnknownEnumValue::Integer(value),
12851            )),
12852        }
12853    }
12854}
12855
12856impl std::convert::From<&str> for Severity {
12857    fn from(value: &str) -> Self {
12858        use std::string::ToString;
12859        match value {
12860            "SEVERITY_UNSPECIFIED" => Self::Unspecified,
12861            "CRITICAL" => Self::Critical,
12862            "HIGH" => Self::High,
12863            "MEDIUM" => Self::Medium,
12864            "LOW" => Self::Low,
12865            _ => Self::UnknownValue(severity::UnknownValue(
12866                wkt::internal::UnknownEnumValue::String(value.to_string()),
12867            )),
12868        }
12869    }
12870}
12871
12872impl serde::ser::Serialize for Severity {
12873    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12874    where
12875        S: serde::Serializer,
12876    {
12877        match self {
12878            Self::Unspecified => serializer.serialize_i32(0),
12879            Self::Critical => serializer.serialize_i32(1),
12880            Self::High => serializer.serialize_i32(2),
12881            Self::Medium => serializer.serialize_i32(3),
12882            Self::Low => serializer.serialize_i32(4),
12883            Self::UnknownValue(u) => u.0.serialize(serializer),
12884        }
12885    }
12886}
12887
12888impl<'de> serde::de::Deserialize<'de> for Severity {
12889    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12890    where
12891        D: serde::Deserializer<'de>,
12892    {
12893        deserializer.deserialize_any(wkt::internal::EnumVisitor::<Severity>::new(
12894            ".google.cloud.cloudsecuritycompliance.v1.Severity",
12895        ))
12896    }
12897}
12898
12899/// The action type of the rule.
12900///
12901/// # Working with unknown values
12902///
12903/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12904/// additional enum variants at any time. Adding new variants is not considered
12905/// a breaking change. Applications should write their code in anticipation of:
12906///
12907/// - New values appearing in future releases of the client library, **and**
12908/// - New values received dynamically, without application changes.
12909///
12910/// Please consult the [Working with enums] section in the user guide for some
12911/// guidelines.
12912///
12913/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12914#[derive(Clone, Debug, PartialEq)]
12915#[non_exhaustive]
12916pub enum RuleActionType {
12917    /// Default value. This value is unused.
12918    Unspecified,
12919    /// The rule is intended to prevent non-compliance.
12920    Preventive,
12921    /// The rule is intended to detect non-compliance.
12922    Detective,
12923    /// The rule is intended to audit non-compliance.
12924    Audit,
12925    /// If set, the enum was initialized with an unknown value.
12926    ///
12927    /// Applications can examine the value using [RuleActionType::value] or
12928    /// [RuleActionType::name].
12929    UnknownValue(rule_action_type::UnknownValue),
12930}
12931
12932#[doc(hidden)]
12933pub mod rule_action_type {
12934    #[allow(unused_imports)]
12935    use super::*;
12936    #[derive(Clone, Debug, PartialEq)]
12937    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12938}
12939
12940impl RuleActionType {
12941    /// Gets the enum value.
12942    ///
12943    /// Returns `None` if the enum contains an unknown value deserialized from
12944    /// the string representation of enums.
12945    pub fn value(&self) -> std::option::Option<i32> {
12946        match self {
12947            Self::Unspecified => std::option::Option::Some(0),
12948            Self::Preventive => std::option::Option::Some(1),
12949            Self::Detective => std::option::Option::Some(2),
12950            Self::Audit => std::option::Option::Some(3),
12951            Self::UnknownValue(u) => u.0.value(),
12952        }
12953    }
12954
12955    /// Gets the enum value as a string.
12956    ///
12957    /// Returns `None` if the enum contains an unknown value deserialized from
12958    /// the integer representation of enums.
12959    pub fn name(&self) -> std::option::Option<&str> {
12960        match self {
12961            Self::Unspecified => std::option::Option::Some("RULE_ACTION_TYPE_UNSPECIFIED"),
12962            Self::Preventive => std::option::Option::Some("RULE_ACTION_TYPE_PREVENTIVE"),
12963            Self::Detective => std::option::Option::Some("RULE_ACTION_TYPE_DETECTIVE"),
12964            Self::Audit => std::option::Option::Some("RULE_ACTION_TYPE_AUDIT"),
12965            Self::UnknownValue(u) => u.0.name(),
12966        }
12967    }
12968}
12969
12970impl std::default::Default for RuleActionType {
12971    fn default() -> Self {
12972        use std::convert::From;
12973        Self::from(0)
12974    }
12975}
12976
12977impl std::fmt::Display for RuleActionType {
12978    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12979        wkt::internal::display_enum(f, self.name(), self.value())
12980    }
12981}
12982
12983impl std::convert::From<i32> for RuleActionType {
12984    fn from(value: i32) -> Self {
12985        match value {
12986            0 => Self::Unspecified,
12987            1 => Self::Preventive,
12988            2 => Self::Detective,
12989            3 => Self::Audit,
12990            _ => Self::UnknownValue(rule_action_type::UnknownValue(
12991                wkt::internal::UnknownEnumValue::Integer(value),
12992            )),
12993        }
12994    }
12995}
12996
12997impl std::convert::From<&str> for RuleActionType {
12998    fn from(value: &str) -> Self {
12999        use std::string::ToString;
13000        match value {
13001            "RULE_ACTION_TYPE_UNSPECIFIED" => Self::Unspecified,
13002            "RULE_ACTION_TYPE_PREVENTIVE" => Self::Preventive,
13003            "RULE_ACTION_TYPE_DETECTIVE" => Self::Detective,
13004            "RULE_ACTION_TYPE_AUDIT" => Self::Audit,
13005            _ => Self::UnknownValue(rule_action_type::UnknownValue(
13006                wkt::internal::UnknownEnumValue::String(value.to_string()),
13007            )),
13008        }
13009    }
13010}
13011
13012impl serde::ser::Serialize for RuleActionType {
13013    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13014    where
13015        S: serde::Serializer,
13016    {
13017        match self {
13018            Self::Unspecified => serializer.serialize_i32(0),
13019            Self::Preventive => serializer.serialize_i32(1),
13020            Self::Detective => serializer.serialize_i32(2),
13021            Self::Audit => serializer.serialize_i32(3),
13022            Self::UnknownValue(u) => u.0.serialize(serializer),
13023        }
13024    }
13025}
13026
13027impl<'de> serde::de::Deserialize<'de> for RuleActionType {
13028    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13029    where
13030        D: serde::Deserializer<'de>,
13031    {
13032        deserializer.deserialize_any(wkt::internal::EnumVisitor::<RuleActionType>::new(
13033            ".google.cloud.cloudsecuritycompliance.v1.RuleActionType",
13034        ))
13035    }
13036}
13037
13038/// The type of resource that a control or framework can be applied to.
13039///
13040/// # Working with unknown values
13041///
13042/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13043/// additional enum variants at any time. Adding new variants is not considered
13044/// a breaking change. Applications should write their code in anticipation of:
13045///
13046/// - New values appearing in future releases of the client library, **and**
13047/// - New values received dynamically, without application changes.
13048///
13049/// Please consult the [Working with enums] section in the user guide for some
13050/// guidelines.
13051///
13052/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13053#[derive(Clone, Debug, PartialEq)]
13054#[non_exhaustive]
13055pub enum TargetResourceType {
13056    /// Default value. This value is unused.
13057    Unspecified,
13058    /// The target resource is a Google Cloud organization.
13059    TargetResourceCrmTypeOrg,
13060    /// The target resource is a folder.
13061    TargetResourceCrmTypeFolder,
13062    /// The target resource is a project.
13063    TargetResourceCrmTypeProject,
13064    /// The target resource is an application in App Hub.
13065    Application,
13066    /// If set, the enum was initialized with an unknown value.
13067    ///
13068    /// Applications can examine the value using [TargetResourceType::value] or
13069    /// [TargetResourceType::name].
13070    UnknownValue(target_resource_type::UnknownValue),
13071}
13072
13073#[doc(hidden)]
13074pub mod target_resource_type {
13075    #[allow(unused_imports)]
13076    use super::*;
13077    #[derive(Clone, Debug, PartialEq)]
13078    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13079}
13080
13081impl TargetResourceType {
13082    /// Gets the enum value.
13083    ///
13084    /// Returns `None` if the enum contains an unknown value deserialized from
13085    /// the string representation of enums.
13086    pub fn value(&self) -> std::option::Option<i32> {
13087        match self {
13088            Self::Unspecified => std::option::Option::Some(0),
13089            Self::TargetResourceCrmTypeOrg => std::option::Option::Some(1),
13090            Self::TargetResourceCrmTypeFolder => std::option::Option::Some(2),
13091            Self::TargetResourceCrmTypeProject => std::option::Option::Some(3),
13092            Self::Application => std::option::Option::Some(4),
13093            Self::UnknownValue(u) => u.0.value(),
13094        }
13095    }
13096
13097    /// Gets the enum value as a string.
13098    ///
13099    /// Returns `None` if the enum contains an unknown value deserialized from
13100    /// the integer representation of enums.
13101    pub fn name(&self) -> std::option::Option<&str> {
13102        match self {
13103            Self::Unspecified => std::option::Option::Some("TARGET_RESOURCE_TYPE_UNSPECIFIED"),
13104            Self::TargetResourceCrmTypeOrg => {
13105                std::option::Option::Some("TARGET_RESOURCE_CRM_TYPE_ORG")
13106            }
13107            Self::TargetResourceCrmTypeFolder => {
13108                std::option::Option::Some("TARGET_RESOURCE_CRM_TYPE_FOLDER")
13109            }
13110            Self::TargetResourceCrmTypeProject => {
13111                std::option::Option::Some("TARGET_RESOURCE_CRM_TYPE_PROJECT")
13112            }
13113            Self::Application => std::option::Option::Some("TARGET_RESOURCE_TYPE_APPLICATION"),
13114            Self::UnknownValue(u) => u.0.name(),
13115        }
13116    }
13117}
13118
13119impl std::default::Default for TargetResourceType {
13120    fn default() -> Self {
13121        use std::convert::From;
13122        Self::from(0)
13123    }
13124}
13125
13126impl std::fmt::Display for TargetResourceType {
13127    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13128        wkt::internal::display_enum(f, self.name(), self.value())
13129    }
13130}
13131
13132impl std::convert::From<i32> for TargetResourceType {
13133    fn from(value: i32) -> Self {
13134        match value {
13135            0 => Self::Unspecified,
13136            1 => Self::TargetResourceCrmTypeOrg,
13137            2 => Self::TargetResourceCrmTypeFolder,
13138            3 => Self::TargetResourceCrmTypeProject,
13139            4 => Self::Application,
13140            _ => Self::UnknownValue(target_resource_type::UnknownValue(
13141                wkt::internal::UnknownEnumValue::Integer(value),
13142            )),
13143        }
13144    }
13145}
13146
13147impl std::convert::From<&str> for TargetResourceType {
13148    fn from(value: &str) -> Self {
13149        use std::string::ToString;
13150        match value {
13151            "TARGET_RESOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
13152            "TARGET_RESOURCE_CRM_TYPE_ORG" => Self::TargetResourceCrmTypeOrg,
13153            "TARGET_RESOURCE_CRM_TYPE_FOLDER" => Self::TargetResourceCrmTypeFolder,
13154            "TARGET_RESOURCE_CRM_TYPE_PROJECT" => Self::TargetResourceCrmTypeProject,
13155            "TARGET_RESOURCE_TYPE_APPLICATION" => Self::Application,
13156            _ => Self::UnknownValue(target_resource_type::UnknownValue(
13157                wkt::internal::UnknownEnumValue::String(value.to_string()),
13158            )),
13159        }
13160    }
13161}
13162
13163impl serde::ser::Serialize for TargetResourceType {
13164    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13165    where
13166        S: serde::Serializer,
13167    {
13168        match self {
13169            Self::Unspecified => serializer.serialize_i32(0),
13170            Self::TargetResourceCrmTypeOrg => serializer.serialize_i32(1),
13171            Self::TargetResourceCrmTypeFolder => serializer.serialize_i32(2),
13172            Self::TargetResourceCrmTypeProject => serializer.serialize_i32(3),
13173            Self::Application => serializer.serialize_i32(4),
13174            Self::UnknownValue(u) => u.0.serialize(serializer),
13175        }
13176    }
13177}
13178
13179impl<'de> serde::de::Deserialize<'de> for TargetResourceType {
13180    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13181    where
13182        D: serde::Deserializer<'de>,
13183    {
13184        deserializer.deserialize_any(wkt::internal::EnumVisitor::<TargetResourceType>::new(
13185            ".google.cloud.cloudsecuritycompliance.v1.TargetResourceType",
13186        ))
13187    }
13188}
13189
13190/// The state of the deployment resource.
13191///
13192/// # Working with unknown values
13193///
13194/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13195/// additional enum variants at any time. Adding new variants is not considered
13196/// a breaking change. Applications should write their code in anticipation of:
13197///
13198/// - New values appearing in future releases of the client library, **and**
13199/// - New values received dynamically, without application changes.
13200///
13201/// Please consult the [Working with enums] section in the user guide for some
13202/// guidelines.
13203///
13204/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13205#[derive(Clone, Debug, PartialEq)]
13206#[non_exhaustive]
13207pub enum DeploymentState {
13208    /// Default value. This value is unused.
13209    Unspecified,
13210    /// Validating the deployment.
13211    Validating,
13212    /// Deployment is being created.
13213    Creating,
13214    /// Deployment is being deleted.
13215    Deleting,
13216    /// Deployment is being updated.
13217    Updating,
13218    /// Deployment has failed. All the changes made by the deployment were
13219    /// successfully rolled back. You can retry or delete a deployment that's
13220    /// in this state.
13221    Failed,
13222    /// Deployment is successful and ready to use.
13223    Ready,
13224    /// Deployment is partially deployed. All the cloud controls weren't deployed
13225    /// successfully. Retrying the operation resumes from the first failed
13226    /// step.
13227    PartiallyDeployed,
13228    /// Deployment is partially deleted. All the cloud control deployments weren't
13229    /// deleted successfully. Retrying the operation resumes from the first
13230    /// failed step.
13231    PartiallyDeleted,
13232    /// If set, the enum was initialized with an unknown value.
13233    ///
13234    /// Applications can examine the value using [DeploymentState::value] or
13235    /// [DeploymentState::name].
13236    UnknownValue(deployment_state::UnknownValue),
13237}
13238
13239#[doc(hidden)]
13240pub mod deployment_state {
13241    #[allow(unused_imports)]
13242    use super::*;
13243    #[derive(Clone, Debug, PartialEq)]
13244    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13245}
13246
13247impl DeploymentState {
13248    /// Gets the enum value.
13249    ///
13250    /// Returns `None` if the enum contains an unknown value deserialized from
13251    /// the string representation of enums.
13252    pub fn value(&self) -> std::option::Option<i32> {
13253        match self {
13254            Self::Unspecified => std::option::Option::Some(0),
13255            Self::Validating => std::option::Option::Some(1),
13256            Self::Creating => std::option::Option::Some(2),
13257            Self::Deleting => std::option::Option::Some(3),
13258            Self::Updating => std::option::Option::Some(8),
13259            Self::Failed => std::option::Option::Some(4),
13260            Self::Ready => std::option::Option::Some(5),
13261            Self::PartiallyDeployed => std::option::Option::Some(6),
13262            Self::PartiallyDeleted => std::option::Option::Some(7),
13263            Self::UnknownValue(u) => u.0.value(),
13264        }
13265    }
13266
13267    /// Gets the enum value as a string.
13268    ///
13269    /// Returns `None` if the enum contains an unknown value deserialized from
13270    /// the integer representation of enums.
13271    pub fn name(&self) -> std::option::Option<&str> {
13272        match self {
13273            Self::Unspecified => std::option::Option::Some("DEPLOYMENT_STATE_UNSPECIFIED"),
13274            Self::Validating => std::option::Option::Some("DEPLOYMENT_STATE_VALIDATING"),
13275            Self::Creating => std::option::Option::Some("DEPLOYMENT_STATE_CREATING"),
13276            Self::Deleting => std::option::Option::Some("DEPLOYMENT_STATE_DELETING"),
13277            Self::Updating => std::option::Option::Some("DEPLOYMENT_STATE_UPDATING"),
13278            Self::Failed => std::option::Option::Some("DEPLOYMENT_STATE_FAILED"),
13279            Self::Ready => std::option::Option::Some("DEPLOYMENT_STATE_READY"),
13280            Self::PartiallyDeployed => {
13281                std::option::Option::Some("DEPLOYMENT_STATE_PARTIALLY_DEPLOYED")
13282            }
13283            Self::PartiallyDeleted => {
13284                std::option::Option::Some("DEPLOYMENT_STATE_PARTIALLY_DELETED")
13285            }
13286            Self::UnknownValue(u) => u.0.name(),
13287        }
13288    }
13289}
13290
13291impl std::default::Default for DeploymentState {
13292    fn default() -> Self {
13293        use std::convert::From;
13294        Self::from(0)
13295    }
13296}
13297
13298impl std::fmt::Display for DeploymentState {
13299    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13300        wkt::internal::display_enum(f, self.name(), self.value())
13301    }
13302}
13303
13304impl std::convert::From<i32> for DeploymentState {
13305    fn from(value: i32) -> Self {
13306        match value {
13307            0 => Self::Unspecified,
13308            1 => Self::Validating,
13309            2 => Self::Creating,
13310            3 => Self::Deleting,
13311            4 => Self::Failed,
13312            5 => Self::Ready,
13313            6 => Self::PartiallyDeployed,
13314            7 => Self::PartiallyDeleted,
13315            8 => Self::Updating,
13316            _ => Self::UnknownValue(deployment_state::UnknownValue(
13317                wkt::internal::UnknownEnumValue::Integer(value),
13318            )),
13319        }
13320    }
13321}
13322
13323impl std::convert::From<&str> for DeploymentState {
13324    fn from(value: &str) -> Self {
13325        use std::string::ToString;
13326        match value {
13327            "DEPLOYMENT_STATE_UNSPECIFIED" => Self::Unspecified,
13328            "DEPLOYMENT_STATE_VALIDATING" => Self::Validating,
13329            "DEPLOYMENT_STATE_CREATING" => Self::Creating,
13330            "DEPLOYMENT_STATE_DELETING" => Self::Deleting,
13331            "DEPLOYMENT_STATE_UPDATING" => Self::Updating,
13332            "DEPLOYMENT_STATE_FAILED" => Self::Failed,
13333            "DEPLOYMENT_STATE_READY" => Self::Ready,
13334            "DEPLOYMENT_STATE_PARTIALLY_DEPLOYED" => Self::PartiallyDeployed,
13335            "DEPLOYMENT_STATE_PARTIALLY_DELETED" => Self::PartiallyDeleted,
13336            _ => Self::UnknownValue(deployment_state::UnknownValue(
13337                wkt::internal::UnknownEnumValue::String(value.to_string()),
13338            )),
13339        }
13340    }
13341}
13342
13343impl serde::ser::Serialize for DeploymentState {
13344    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13345    where
13346        S: serde::Serializer,
13347    {
13348        match self {
13349            Self::Unspecified => serializer.serialize_i32(0),
13350            Self::Validating => serializer.serialize_i32(1),
13351            Self::Creating => serializer.serialize_i32(2),
13352            Self::Deleting => serializer.serialize_i32(3),
13353            Self::Updating => serializer.serialize_i32(8),
13354            Self::Failed => serializer.serialize_i32(4),
13355            Self::Ready => serializer.serialize_i32(5),
13356            Self::PartiallyDeployed => serializer.serialize_i32(6),
13357            Self::PartiallyDeleted => serializer.serialize_i32(7),
13358            Self::UnknownValue(u) => u.0.serialize(serializer),
13359        }
13360    }
13361}
13362
13363impl<'de> serde::de::Deserialize<'de> for DeploymentState {
13364    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13365    where
13366        D: serde::Deserializer<'de>,
13367    {
13368        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DeploymentState>::new(
13369            ".google.cloud.cloudsecuritycompliance.v1.DeploymentState",
13370        ))
13371    }
13372}
13373
13374/// The evaluation state of the control.
13375///
13376/// # Working with unknown values
13377///
13378/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13379/// additional enum variants at any time. Adding new variants is not considered
13380/// a breaking change. Applications should write their code in anticipation of:
13381///
13382/// - New values appearing in future releases of the client library, **and**
13383/// - New values received dynamically, without application changes.
13384///
13385/// Please consult the [Working with enums] section in the user guide for some
13386/// guidelines.
13387///
13388/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13389#[derive(Clone, Debug, PartialEq)]
13390#[non_exhaustive]
13391pub enum EvaluationState {
13392    /// Default value. This value is unused.
13393    Unspecified,
13394    /// The control is passing.
13395    Passed,
13396    /// The control is failing.
13397    Failed,
13398    /// The control is not assessed.
13399    NotAssessed,
13400    /// If set, the enum was initialized with an unknown value.
13401    ///
13402    /// Applications can examine the value using [EvaluationState::value] or
13403    /// [EvaluationState::name].
13404    UnknownValue(evaluation_state::UnknownValue),
13405}
13406
13407#[doc(hidden)]
13408pub mod evaluation_state {
13409    #[allow(unused_imports)]
13410    use super::*;
13411    #[derive(Clone, Debug, PartialEq)]
13412    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13413}
13414
13415impl EvaluationState {
13416    /// Gets the enum value.
13417    ///
13418    /// Returns `None` if the enum contains an unknown value deserialized from
13419    /// the string representation of enums.
13420    pub fn value(&self) -> std::option::Option<i32> {
13421        match self {
13422            Self::Unspecified => std::option::Option::Some(0),
13423            Self::Passed => std::option::Option::Some(1),
13424            Self::Failed => std::option::Option::Some(2),
13425            Self::NotAssessed => std::option::Option::Some(3),
13426            Self::UnknownValue(u) => u.0.value(),
13427        }
13428    }
13429
13430    /// Gets the enum value as a string.
13431    ///
13432    /// Returns `None` if the enum contains an unknown value deserialized from
13433    /// the integer representation of enums.
13434    pub fn name(&self) -> std::option::Option<&str> {
13435        match self {
13436            Self::Unspecified => std::option::Option::Some("EVALUATION_STATE_UNSPECIFIED"),
13437            Self::Passed => std::option::Option::Some("EVALUATION_STATE_PASSED"),
13438            Self::Failed => std::option::Option::Some("EVALUATION_STATE_FAILED"),
13439            Self::NotAssessed => std::option::Option::Some("EVALUATION_STATE_NOT_ASSESSED"),
13440            Self::UnknownValue(u) => u.0.name(),
13441        }
13442    }
13443}
13444
13445impl std::default::Default for EvaluationState {
13446    fn default() -> Self {
13447        use std::convert::From;
13448        Self::from(0)
13449    }
13450}
13451
13452impl std::fmt::Display for EvaluationState {
13453    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13454        wkt::internal::display_enum(f, self.name(), self.value())
13455    }
13456}
13457
13458impl std::convert::From<i32> for EvaluationState {
13459    fn from(value: i32) -> Self {
13460        match value {
13461            0 => Self::Unspecified,
13462            1 => Self::Passed,
13463            2 => Self::Failed,
13464            3 => Self::NotAssessed,
13465            _ => Self::UnknownValue(evaluation_state::UnknownValue(
13466                wkt::internal::UnknownEnumValue::Integer(value),
13467            )),
13468        }
13469    }
13470}
13471
13472impl std::convert::From<&str> for EvaluationState {
13473    fn from(value: &str) -> Self {
13474        use std::string::ToString;
13475        match value {
13476            "EVALUATION_STATE_UNSPECIFIED" => Self::Unspecified,
13477            "EVALUATION_STATE_PASSED" => Self::Passed,
13478            "EVALUATION_STATE_FAILED" => Self::Failed,
13479            "EVALUATION_STATE_NOT_ASSESSED" => Self::NotAssessed,
13480            _ => Self::UnknownValue(evaluation_state::UnknownValue(
13481                wkt::internal::UnknownEnumValue::String(value.to_string()),
13482            )),
13483        }
13484    }
13485}
13486
13487impl serde::ser::Serialize for EvaluationState {
13488    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13489    where
13490        S: serde::Serializer,
13491    {
13492        match self {
13493            Self::Unspecified => serializer.serialize_i32(0),
13494            Self::Passed => serializer.serialize_i32(1),
13495            Self::Failed => serializer.serialize_i32(2),
13496            Self::NotAssessed => serializer.serialize_i32(3),
13497            Self::UnknownValue(u) => u.0.serialize(serializer),
13498        }
13499    }
13500}
13501
13502impl<'de> serde::de::Deserialize<'de> for EvaluationState {
13503    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13504    where
13505        D: serde::Deserializer<'de>,
13506    {
13507        deserializer.deserialize_any(wkt::internal::EnumVisitor::<EvaluationState>::new(
13508            ".google.cloud.cloudsecuritycompliance.v1.EvaluationState",
13509        ))
13510    }
13511}
13512
13513/// A finding is a record of assessment data like security, risk, health, or
13514/// privacy.
13515///
13516/// # Working with unknown values
13517///
13518/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13519/// additional enum variants at any time. Adding new variants is not considered
13520/// a breaking change. Applications should write their code in anticipation of:
13521///
13522/// - New values appearing in future releases of the client library, **and**
13523/// - New values received dynamically, without application changes.
13524///
13525/// Please consult the [Working with enums] section in the user guide for some
13526/// guidelines.
13527///
13528/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13529#[derive(Clone, Debug, PartialEq)]
13530#[non_exhaustive]
13531pub enum FindingClass {
13532    /// Default value. This value is unused.
13533    Unspecified,
13534    /// The activity is unwanted or malicious.
13535    Threat,
13536    /// A potential weakness in software that increases risk to
13537    /// confidentiality, integrity, and availability.
13538    Vulnerability,
13539    /// A potential weakness in a cloud resource or asset configuration that
13540    /// increases risk.
13541    Misconfiguration,
13542    /// A security observation that is for informational purposes.
13543    Observation,
13544    /// An error that prevents Security Command Center from functioning properly.
13545    SccError,
13546    /// A potential security risk that's due to a change in the security
13547    /// posture.
13548    PostureViolation,
13549    /// A combination of security issues that represent a more severe
13550    /// security problem when taken together.
13551    ToxicCombination,
13552    /// A potential security risk to data assets that contain sensitive
13553    /// data.
13554    SensitiveDataRisk,
13555    /// A resource or resource group where high risk attack paths
13556    /// converge, based on attack path simulations (APS).
13557    Chokepoint,
13558    /// If set, the enum was initialized with an unknown value.
13559    ///
13560    /// Applications can examine the value using [FindingClass::value] or
13561    /// [FindingClass::name].
13562    UnknownValue(finding_class::UnknownValue),
13563}
13564
13565#[doc(hidden)]
13566pub mod finding_class {
13567    #[allow(unused_imports)]
13568    use super::*;
13569    #[derive(Clone, Debug, PartialEq)]
13570    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13571}
13572
13573impl FindingClass {
13574    /// Gets the enum value.
13575    ///
13576    /// Returns `None` if the enum contains an unknown value deserialized from
13577    /// the string representation of enums.
13578    pub fn value(&self) -> std::option::Option<i32> {
13579        match self {
13580            Self::Unspecified => std::option::Option::Some(0),
13581            Self::Threat => std::option::Option::Some(1),
13582            Self::Vulnerability => std::option::Option::Some(2),
13583            Self::Misconfiguration => std::option::Option::Some(3),
13584            Self::Observation => std::option::Option::Some(4),
13585            Self::SccError => std::option::Option::Some(5),
13586            Self::PostureViolation => std::option::Option::Some(6),
13587            Self::ToxicCombination => std::option::Option::Some(7),
13588            Self::SensitiveDataRisk => std::option::Option::Some(8),
13589            Self::Chokepoint => std::option::Option::Some(9),
13590            Self::UnknownValue(u) => u.0.value(),
13591        }
13592    }
13593
13594    /// Gets the enum value as a string.
13595    ///
13596    /// Returns `None` if the enum contains an unknown value deserialized from
13597    /// the integer representation of enums.
13598    pub fn name(&self) -> std::option::Option<&str> {
13599        match self {
13600            Self::Unspecified => std::option::Option::Some("FINDING_CLASS_UNSPECIFIED"),
13601            Self::Threat => std::option::Option::Some("THREAT"),
13602            Self::Vulnerability => std::option::Option::Some("VULNERABILITY"),
13603            Self::Misconfiguration => std::option::Option::Some("MISCONFIGURATION"),
13604            Self::Observation => std::option::Option::Some("OBSERVATION"),
13605            Self::SccError => std::option::Option::Some("SCC_ERROR"),
13606            Self::PostureViolation => std::option::Option::Some("POSTURE_VIOLATION"),
13607            Self::ToxicCombination => std::option::Option::Some("TOXIC_COMBINATION"),
13608            Self::SensitiveDataRisk => std::option::Option::Some("SENSITIVE_DATA_RISK"),
13609            Self::Chokepoint => std::option::Option::Some("CHOKEPOINT"),
13610            Self::UnknownValue(u) => u.0.name(),
13611        }
13612    }
13613}
13614
13615impl std::default::Default for FindingClass {
13616    fn default() -> Self {
13617        use std::convert::From;
13618        Self::from(0)
13619    }
13620}
13621
13622impl std::fmt::Display for FindingClass {
13623    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13624        wkt::internal::display_enum(f, self.name(), self.value())
13625    }
13626}
13627
13628impl std::convert::From<i32> for FindingClass {
13629    fn from(value: i32) -> Self {
13630        match value {
13631            0 => Self::Unspecified,
13632            1 => Self::Threat,
13633            2 => Self::Vulnerability,
13634            3 => Self::Misconfiguration,
13635            4 => Self::Observation,
13636            5 => Self::SccError,
13637            6 => Self::PostureViolation,
13638            7 => Self::ToxicCombination,
13639            8 => Self::SensitiveDataRisk,
13640            9 => Self::Chokepoint,
13641            _ => Self::UnknownValue(finding_class::UnknownValue(
13642                wkt::internal::UnknownEnumValue::Integer(value),
13643            )),
13644        }
13645    }
13646}
13647
13648impl std::convert::From<&str> for FindingClass {
13649    fn from(value: &str) -> Self {
13650        use std::string::ToString;
13651        match value {
13652            "FINDING_CLASS_UNSPECIFIED" => Self::Unspecified,
13653            "THREAT" => Self::Threat,
13654            "VULNERABILITY" => Self::Vulnerability,
13655            "MISCONFIGURATION" => Self::Misconfiguration,
13656            "OBSERVATION" => Self::Observation,
13657            "SCC_ERROR" => Self::SccError,
13658            "POSTURE_VIOLATION" => Self::PostureViolation,
13659            "TOXIC_COMBINATION" => Self::ToxicCombination,
13660            "SENSITIVE_DATA_RISK" => Self::SensitiveDataRisk,
13661            "CHOKEPOINT" => Self::Chokepoint,
13662            _ => Self::UnknownValue(finding_class::UnknownValue(
13663                wkt::internal::UnknownEnumValue::String(value.to_string()),
13664            )),
13665        }
13666    }
13667}
13668
13669impl serde::ser::Serialize for FindingClass {
13670    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13671    where
13672        S: serde::Serializer,
13673    {
13674        match self {
13675            Self::Unspecified => serializer.serialize_i32(0),
13676            Self::Threat => serializer.serialize_i32(1),
13677            Self::Vulnerability => serializer.serialize_i32(2),
13678            Self::Misconfiguration => serializer.serialize_i32(3),
13679            Self::Observation => serializer.serialize_i32(4),
13680            Self::SccError => serializer.serialize_i32(5),
13681            Self::PostureViolation => serializer.serialize_i32(6),
13682            Self::ToxicCombination => serializer.serialize_i32(7),
13683            Self::SensitiveDataRisk => serializer.serialize_i32(8),
13684            Self::Chokepoint => serializer.serialize_i32(9),
13685            Self::UnknownValue(u) => u.0.serialize(serializer),
13686        }
13687    }
13688}
13689
13690impl<'de> serde::de::Deserialize<'de> for FindingClass {
13691    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13692    where
13693        D: serde::Deserializer<'de>,
13694    {
13695        deserializer.deserialize_any(wkt::internal::EnumVisitor::<FindingClass>::new(
13696            ".google.cloud.cloudsecuritycompliance.v1.FindingClass",
13697        ))
13698    }
13699}
13700
13701/// Specifies the view of the framework compliance summary to be returned.
13702/// New values may be added in the future.
13703///
13704/// # Working with unknown values
13705///
13706/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13707/// additional enum variants at any time. Adding new variants is not considered
13708/// a breaking change. Applications should write their code in anticipation of:
13709///
13710/// - New values appearing in future releases of the client library, **and**
13711/// - New values received dynamically, without application changes.
13712///
13713/// Please consult the [Working with enums] section in the user guide for some
13714/// guidelines.
13715///
13716/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13717#[derive(Clone, Debug, PartialEq)]
13718#[non_exhaustive]
13719pub enum FrameworkComplianceSummaryView {
13720    /// The default / unset value. The API will default to the BASIC view.
13721    Unspecified,
13722    /// Includes basic compliance metadata, but omits trend data.
13723    Basic,
13724    /// Includes all information, including
13725    /// [finding_count][google.cloud.cloudsecuritycompliance.v1main.FrameworkComplianceSummary.finding_count]
13726    /// and
13727    /// [controls_passing_trend][google.cloud.cloudsecuritycompliance.v1main.FrameworkComplianceSummary.controls_passing_trend].
13728    /// Trend data is provided for the last 30 days.
13729    Full,
13730    /// If set, the enum was initialized with an unknown value.
13731    ///
13732    /// Applications can examine the value using [FrameworkComplianceSummaryView::value] or
13733    /// [FrameworkComplianceSummaryView::name].
13734    UnknownValue(framework_compliance_summary_view::UnknownValue),
13735}
13736
13737#[doc(hidden)]
13738pub mod framework_compliance_summary_view {
13739    #[allow(unused_imports)]
13740    use super::*;
13741    #[derive(Clone, Debug, PartialEq)]
13742    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13743}
13744
13745impl FrameworkComplianceSummaryView {
13746    /// Gets the enum value.
13747    ///
13748    /// Returns `None` if the enum contains an unknown value deserialized from
13749    /// the string representation of enums.
13750    pub fn value(&self) -> std::option::Option<i32> {
13751        match self {
13752            Self::Unspecified => std::option::Option::Some(0),
13753            Self::Basic => std::option::Option::Some(1),
13754            Self::Full => std::option::Option::Some(2),
13755            Self::UnknownValue(u) => u.0.value(),
13756        }
13757    }
13758
13759    /// Gets the enum value as a string.
13760    ///
13761    /// Returns `None` if the enum contains an unknown value deserialized from
13762    /// the integer representation of enums.
13763    pub fn name(&self) -> std::option::Option<&str> {
13764        match self {
13765            Self::Unspecified => {
13766                std::option::Option::Some("FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED")
13767            }
13768            Self::Basic => std::option::Option::Some("FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC"),
13769            Self::Full => std::option::Option::Some("FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL"),
13770            Self::UnknownValue(u) => u.0.name(),
13771        }
13772    }
13773}
13774
13775impl std::default::Default for FrameworkComplianceSummaryView {
13776    fn default() -> Self {
13777        use std::convert::From;
13778        Self::from(0)
13779    }
13780}
13781
13782impl std::fmt::Display for FrameworkComplianceSummaryView {
13783    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13784        wkt::internal::display_enum(f, self.name(), self.value())
13785    }
13786}
13787
13788impl std::convert::From<i32> for FrameworkComplianceSummaryView {
13789    fn from(value: i32) -> Self {
13790        match value {
13791            0 => Self::Unspecified,
13792            1 => Self::Basic,
13793            2 => Self::Full,
13794            _ => Self::UnknownValue(framework_compliance_summary_view::UnknownValue(
13795                wkt::internal::UnknownEnumValue::Integer(value),
13796            )),
13797        }
13798    }
13799}
13800
13801impl std::convert::From<&str> for FrameworkComplianceSummaryView {
13802    fn from(value: &str) -> Self {
13803        use std::string::ToString;
13804        match value {
13805            "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED" => Self::Unspecified,
13806            "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC" => Self::Basic,
13807            "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL" => Self::Full,
13808            _ => Self::UnknownValue(framework_compliance_summary_view::UnknownValue(
13809                wkt::internal::UnknownEnumValue::String(value.to_string()),
13810            )),
13811        }
13812    }
13813}
13814
13815impl serde::ser::Serialize for FrameworkComplianceSummaryView {
13816    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13817    where
13818        S: serde::Serializer,
13819    {
13820        match self {
13821            Self::Unspecified => serializer.serialize_i32(0),
13822            Self::Basic => serializer.serialize_i32(1),
13823            Self::Full => serializer.serialize_i32(2),
13824            Self::UnknownValue(u) => u.0.serialize(serializer),
13825        }
13826    }
13827}
13828
13829impl<'de> serde::de::Deserialize<'de> for FrameworkComplianceSummaryView {
13830    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13831    where
13832        D: serde::Deserializer<'de>,
13833    {
13834        deserializer.deserialize_any(
13835            wkt::internal::EnumVisitor::<FrameworkComplianceSummaryView>::new(
13836                ".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView",
13837            ),
13838        )
13839    }
13840}