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::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gaxi;
23extern crate google_cloud_gax;
24extern crate google_cloud_location;
25extern crate google_cloud_longrunning;
26extern crate google_cloud_lro;
27extern crate google_cloud_type;
28extern crate serde;
29extern crate serde_json;
30extern crate serde_with;
31extern crate std;
32extern crate tracing;
33extern crate wkt;
34
35mod debug;
36mod deserialize;
37mod serialize;
38
39/// The request message for [GenerateFrameworkAuditScopeReport][].
40#[derive(Clone, Default, PartialEq)]
41#[non_exhaustive]
42pub struct GenerateFrameworkAuditScopeReportRequest {
43    /// Required. The organization, folder or project for the audit report.
44    ///
45    /// Supported formats are the following:
46    ///
47    /// * `projects/{project_id}/locations/{location}`
48    /// * `folders/{folder_id}/locations/{location}`
49    /// * `organizations/{organization_id}/locations/{location}`
50    pub scope: std::string::String,
51
52    /// Required. The format that the scope report bytes is returned in.
53    pub report_format: crate::model::generate_framework_audit_scope_report_request::Format,
54
55    /// Required. The compliance framework that the scope report is generated for.
56    pub compliance_framework: std::string::String,
57
58    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
59}
60
61impl GenerateFrameworkAuditScopeReportRequest {
62    pub fn new() -> Self {
63        std::default::Default::default()
64    }
65
66    /// Sets the value of [scope][crate::model::GenerateFrameworkAuditScopeReportRequest::scope].
67    ///
68    /// # Example
69    /// ```ignore,no_run
70    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportRequest;
71    /// let x = GenerateFrameworkAuditScopeReportRequest::new().set_scope("example");
72    /// ```
73    pub fn set_scope<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
74        self.scope = v.into();
75        self
76    }
77
78    /// Sets the value of [report_format][crate::model::GenerateFrameworkAuditScopeReportRequest::report_format].
79    ///
80    /// # Example
81    /// ```ignore,no_run
82    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportRequest;
83    /// use google_cloud_cloudsecuritycompliance_v1::model::generate_framework_audit_scope_report_request::Format;
84    /// let x0 = GenerateFrameworkAuditScopeReportRequest::new().set_report_format(Format::Odf);
85    /// ```
86    pub fn set_report_format<
87        T: std::convert::Into<crate::model::generate_framework_audit_scope_report_request::Format>,
88    >(
89        mut self,
90        v: T,
91    ) -> Self {
92        self.report_format = v.into();
93        self
94    }
95
96    /// Sets the value of [compliance_framework][crate::model::GenerateFrameworkAuditScopeReportRequest::compliance_framework].
97    ///
98    /// # Example
99    /// ```ignore,no_run
100    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportRequest;
101    /// let x = GenerateFrameworkAuditScopeReportRequest::new().set_compliance_framework("example");
102    /// ```
103    pub fn set_compliance_framework<T: std::convert::Into<std::string::String>>(
104        mut self,
105        v: T,
106    ) -> Self {
107        self.compliance_framework = v.into();
108        self
109    }
110}
111
112impl wkt::message::Message for GenerateFrameworkAuditScopeReportRequest {
113    fn typename() -> &'static str {
114        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest"
115    }
116}
117
118/// Defines additional types related to [GenerateFrameworkAuditScopeReportRequest].
119pub mod generate_framework_audit_scope_report_request {
120    #[allow(unused_imports)]
121    use super::*;
122
123    /// The set of options for the audit scope report format.
124    ///
125    /// # Working with unknown values
126    ///
127    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
128    /// additional enum variants at any time. Adding new variants is not considered
129    /// a breaking change. Applications should write their code in anticipation of:
130    ///
131    /// - New values appearing in future releases of the client library, **and**
132    /// - New values received dynamically, without application changes.
133    ///
134    /// Please consult the [Working with enums] section in the user guide for some
135    /// guidelines.
136    ///
137    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
138    #[derive(Clone, Debug, PartialEq)]
139    #[non_exhaustive]
140    pub enum Format {
141        /// Default value. This value is unused.
142        Unspecified,
143        /// The report format is the Open Document Format (ODF).
144        Odf,
145        /// If set, the enum was initialized with an unknown value.
146        ///
147        /// Applications can examine the value using [Format::value] or
148        /// [Format::name].
149        UnknownValue(format::UnknownValue),
150    }
151
152    #[doc(hidden)]
153    pub mod format {
154        #[allow(unused_imports)]
155        use super::*;
156        #[derive(Clone, Debug, PartialEq)]
157        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
158    }
159
160    impl Format {
161        /// Gets the enum value.
162        ///
163        /// Returns `None` if the enum contains an unknown value deserialized from
164        /// the string representation of enums.
165        pub fn value(&self) -> std::option::Option<i32> {
166            match self {
167                Self::Unspecified => std::option::Option::Some(0),
168                Self::Odf => std::option::Option::Some(1),
169                Self::UnknownValue(u) => u.0.value(),
170            }
171        }
172
173        /// Gets the enum value as a string.
174        ///
175        /// Returns `None` if the enum contains an unknown value deserialized from
176        /// the integer representation of enums.
177        pub fn name(&self) -> std::option::Option<&str> {
178            match self {
179                Self::Unspecified => std::option::Option::Some("FORMAT_UNSPECIFIED"),
180                Self::Odf => std::option::Option::Some("ODF"),
181                Self::UnknownValue(u) => u.0.name(),
182            }
183        }
184    }
185
186    impl std::default::Default for Format {
187        fn default() -> Self {
188            use std::convert::From;
189            Self::from(0)
190        }
191    }
192
193    impl std::fmt::Display for Format {
194        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
195            wkt::internal::display_enum(f, self.name(), self.value())
196        }
197    }
198
199    impl std::convert::From<i32> for Format {
200        fn from(value: i32) -> Self {
201            match value {
202                0 => Self::Unspecified,
203                1 => Self::Odf,
204                _ => Self::UnknownValue(format::UnknownValue(
205                    wkt::internal::UnknownEnumValue::Integer(value),
206                )),
207            }
208        }
209    }
210
211    impl std::convert::From<&str> for Format {
212        fn from(value: &str) -> Self {
213            use std::string::ToString;
214            match value {
215                "FORMAT_UNSPECIFIED" => Self::Unspecified,
216                "ODF" => Self::Odf,
217                _ => Self::UnknownValue(format::UnknownValue(
218                    wkt::internal::UnknownEnumValue::String(value.to_string()),
219                )),
220            }
221        }
222    }
223
224    impl serde::ser::Serialize for Format {
225        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
226        where
227            S: serde::Serializer,
228        {
229            match self {
230                Self::Unspecified => serializer.serialize_i32(0),
231                Self::Odf => serializer.serialize_i32(1),
232                Self::UnknownValue(u) => u.0.serialize(serializer),
233            }
234        }
235    }
236
237    impl<'de> serde::de::Deserialize<'de> for Format {
238        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
239        where
240            D: serde::Deserializer<'de>,
241        {
242            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Format>::new(
243                ".google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format"))
244        }
245    }
246}
247
248/// The response message for [GenerateFrameworkAuditScopeReport][].
249#[derive(Clone, Default, PartialEq)]
250#[non_exhaustive]
251pub struct GenerateFrameworkAuditScopeReportResponse {
252    /// Identifier. The name of the audit report, in the format that was
253    /// given in the request.
254    pub name: std::string::String,
255
256    /// Required. The compliance framework that the audit scope report is generated
257    /// for.
258    pub compliance_framework: std::string::String,
259
260    /// The set of options that the audit scope report is exported in.
261    pub audit_report: std::option::Option<
262        crate::model::generate_framework_audit_scope_report_response::AuditReport,
263    >,
264
265    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
266}
267
268impl GenerateFrameworkAuditScopeReportResponse {
269    pub fn new() -> Self {
270        std::default::Default::default()
271    }
272
273    /// Sets the value of [name][crate::model::GenerateFrameworkAuditScopeReportResponse::name].
274    ///
275    /// # Example
276    /// ```ignore,no_run
277    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportResponse;
278    /// let x = GenerateFrameworkAuditScopeReportResponse::new().set_name("example");
279    /// ```
280    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
281        self.name = v.into();
282        self
283    }
284
285    /// Sets the value of [compliance_framework][crate::model::GenerateFrameworkAuditScopeReportResponse::compliance_framework].
286    ///
287    /// # Example
288    /// ```ignore,no_run
289    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportResponse;
290    /// let x = GenerateFrameworkAuditScopeReportResponse::new().set_compliance_framework("example");
291    /// ```
292    pub fn set_compliance_framework<T: std::convert::Into<std::string::String>>(
293        mut self,
294        v: T,
295    ) -> Self {
296        self.compliance_framework = v.into();
297        self
298    }
299
300    /// Sets the value of [audit_report][crate::model::GenerateFrameworkAuditScopeReportResponse::audit_report].
301    ///
302    /// Note that all the setters affecting `audit_report` are mutually
303    /// exclusive.
304    ///
305    /// # Example
306    /// ```ignore,no_run
307    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportResponse;
308    /// use google_cloud_cloudsecuritycompliance_v1::model::generate_framework_audit_scope_report_response::AuditReport;
309    /// let x = GenerateFrameworkAuditScopeReportResponse::new().set_audit_report(Some(AuditReport::ScopeReportContents(bytes::Bytes::from_static(b"example"))));
310    /// ```
311    pub fn set_audit_report<
312        T: std::convert::Into<
313                std::option::Option<
314                    crate::model::generate_framework_audit_scope_report_response::AuditReport,
315                >,
316            >,
317    >(
318        mut self,
319        v: T,
320    ) -> Self {
321        self.audit_report = v.into();
322        self
323    }
324
325    /// The value of [audit_report][crate::model::GenerateFrameworkAuditScopeReportResponse::audit_report]
326    /// if it holds a `ScopeReportContents`, `None` if the field is not set or
327    /// holds a different branch.
328    pub fn scope_report_contents(&self) -> std::option::Option<&::bytes::Bytes> {
329        #[allow(unreachable_patterns)]
330        self.audit_report.as_ref().and_then(|v| match v {
331            crate::model::generate_framework_audit_scope_report_response::AuditReport::ScopeReportContents(v) => std::option::Option::Some(v),
332            _ => std::option::Option::None,
333        })
334    }
335
336    /// Sets the value of [audit_report][crate::model::GenerateFrameworkAuditScopeReportResponse::audit_report]
337    /// to hold a `ScopeReportContents`.
338    ///
339    /// Note that all the setters affecting `audit_report` are
340    /// mutually exclusive.
341    ///
342    /// # Example
343    /// ```ignore,no_run
344    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportResponse;
345    /// let x = GenerateFrameworkAuditScopeReportResponse::new().set_scope_report_contents(bytes::Bytes::from_static(b"example"));
346    /// assert!(x.scope_report_contents().is_some());
347    /// ```
348    pub fn set_scope_report_contents<T: std::convert::Into<::bytes::Bytes>>(
349        mut self,
350        v: T,
351    ) -> Self {
352        self.audit_report = std::option::Option::Some(
353            crate::model::generate_framework_audit_scope_report_response::AuditReport::ScopeReportContents(
354                v.into()
355            )
356        );
357        self
358    }
359}
360
361impl wkt::message::Message for GenerateFrameworkAuditScopeReportResponse {
362    fn typename() -> &'static str {
363        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse"
364    }
365}
366
367/// Defines additional types related to [GenerateFrameworkAuditScopeReportResponse].
368pub mod generate_framework_audit_scope_report_response {
369    #[allow(unused_imports)]
370    use super::*;
371
372    /// The set of options that the audit scope report is exported in.
373    #[derive(Clone, Debug, PartialEq)]
374    #[non_exhaustive]
375    pub enum AuditReport {
376        /// The audit scope report content in byte format.
377        ScopeReportContents(::bytes::Bytes),
378    }
379}
380
381/// Additional information for an audit operation.
382#[derive(Clone, Default, PartialEq)]
383#[non_exhaustive]
384pub struct ReportSummary {
385    /// Output only. The total number of checks.
386    pub total_count: i32,
387
388    /// Output only. The number of compliant checks.
389    pub compliant_count: i32,
390
391    /// Output only. The number of checks with violations.
392    pub violation_count: i32,
393
394    /// Output only. The number of checks with "manual review needed" status.
395    pub manual_review_needed_count: i32,
396
397    /// Output only. The number of checks that can't be performed due to errors.
398    pub error_count: i32,
399
400    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
401}
402
403impl ReportSummary {
404    pub fn new() -> Self {
405        std::default::Default::default()
406    }
407
408    /// Sets the value of [total_count][crate::model::ReportSummary::total_count].
409    ///
410    /// # Example
411    /// ```ignore,no_run
412    /// # use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
413    /// let x = ReportSummary::new().set_total_count(42);
414    /// ```
415    pub fn set_total_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
416        self.total_count = v.into();
417        self
418    }
419
420    /// Sets the value of [compliant_count][crate::model::ReportSummary::compliant_count].
421    ///
422    /// # Example
423    /// ```ignore,no_run
424    /// # use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
425    /// let x = ReportSummary::new().set_compliant_count(42);
426    /// ```
427    pub fn set_compliant_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
428        self.compliant_count = v.into();
429        self
430    }
431
432    /// Sets the value of [violation_count][crate::model::ReportSummary::violation_count].
433    ///
434    /// # Example
435    /// ```ignore,no_run
436    /// # use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
437    /// let x = ReportSummary::new().set_violation_count(42);
438    /// ```
439    pub fn set_violation_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
440        self.violation_count = v.into();
441        self
442    }
443
444    /// Sets the value of [manual_review_needed_count][crate::model::ReportSummary::manual_review_needed_count].
445    ///
446    /// # Example
447    /// ```ignore,no_run
448    /// # use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
449    /// let x = ReportSummary::new().set_manual_review_needed_count(42);
450    /// ```
451    pub fn set_manual_review_needed_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
452        self.manual_review_needed_count = v.into();
453        self
454    }
455
456    /// Sets the value of [error_count][crate::model::ReportSummary::error_count].
457    ///
458    /// # Example
459    /// ```ignore,no_run
460    /// # use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
461    /// let x = ReportSummary::new().set_error_count(42);
462    /// ```
463    pub fn set_error_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
464        self.error_count = v.into();
465        self
466    }
467}
468
469impl wkt::message::Message for ReportSummary {
470    fn typename() -> &'static str {
471        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ReportSummary"
472    }
473}
474
475/// The request message for [CreateFrameworkAudit][].
476#[derive(Clone, Default, PartialEq)]
477#[non_exhaustive]
478pub struct CreateFrameworkAuditRequest {
479    /// Required. The parent resource where this framework audit is created.
480    ///
481    /// Supported formats are the following:
482    ///
483    /// * `organizations/{organization_id}/locations/{location}`
484    /// * `folders/{folder_id}/locations/{location}`
485    /// * `projects/{project_id}/locations/{location}`
486    pub parent: std::string::String,
487
488    /// Optional. The ID to use for the framework audit. The ID becomes the final
489    /// component of the framework audit's full resource name.
490    ///
491    /// The ID must be between 4-63 characters, and valid characters
492    /// are `\[a-z][0-9]-\`.
493    pub framework_audit_id: std::string::String,
494
495    /// Required. The framework audit to create.
496    pub framework_audit: std::option::Option<crate::model::FrameworkAudit>,
497
498    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
499}
500
501impl CreateFrameworkAuditRequest {
502    pub fn new() -> Self {
503        std::default::Default::default()
504    }
505
506    /// Sets the value of [parent][crate::model::CreateFrameworkAuditRequest::parent].
507    ///
508    /// # Example
509    /// ```ignore,no_run
510    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkAuditRequest;
511    /// let x = CreateFrameworkAuditRequest::new().set_parent("example");
512    /// ```
513    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
514        self.parent = v.into();
515        self
516    }
517
518    /// Sets the value of [framework_audit_id][crate::model::CreateFrameworkAuditRequest::framework_audit_id].
519    ///
520    /// # Example
521    /// ```ignore,no_run
522    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkAuditRequest;
523    /// let x = CreateFrameworkAuditRequest::new().set_framework_audit_id("example");
524    /// ```
525    pub fn set_framework_audit_id<T: std::convert::Into<std::string::String>>(
526        mut self,
527        v: T,
528    ) -> Self {
529        self.framework_audit_id = v.into();
530        self
531    }
532
533    /// Sets the value of [framework_audit][crate::model::CreateFrameworkAuditRequest::framework_audit].
534    ///
535    /// # Example
536    /// ```ignore,no_run
537    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkAuditRequest;
538    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
539    /// let x = CreateFrameworkAuditRequest::new().set_framework_audit(FrameworkAudit::default()/* use setters */);
540    /// ```
541    pub fn set_framework_audit<T>(mut self, v: T) -> Self
542    where
543        T: std::convert::Into<crate::model::FrameworkAudit>,
544    {
545        self.framework_audit = std::option::Option::Some(v.into());
546        self
547    }
548
549    /// Sets or clears the value of [framework_audit][crate::model::CreateFrameworkAuditRequest::framework_audit].
550    ///
551    /// # Example
552    /// ```ignore,no_run
553    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkAuditRequest;
554    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
555    /// let x = CreateFrameworkAuditRequest::new().set_or_clear_framework_audit(Some(FrameworkAudit::default()/* use setters */));
556    /// let x = CreateFrameworkAuditRequest::new().set_or_clear_framework_audit(None::<FrameworkAudit>);
557    /// ```
558    pub fn set_or_clear_framework_audit<T>(mut self, v: std::option::Option<T>) -> Self
559    where
560        T: std::convert::Into<crate::model::FrameworkAudit>,
561    {
562        self.framework_audit = v.map(|x| x.into());
563        self
564    }
565}
566
567impl wkt::message::Message for CreateFrameworkAuditRequest {
568    fn typename() -> &'static str {
569        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest"
570    }
571}
572
573/// A destination for the framework audit.
574#[derive(Clone, Default, PartialEq)]
575#[non_exhaustive]
576pub struct FrameworkAuditDestination {
577    /// The type of destination.
578    pub destination_type:
579        std::option::Option<crate::model::framework_audit_destination::DestinationType>,
580
581    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
582}
583
584impl FrameworkAuditDestination {
585    pub fn new() -> Self {
586        std::default::Default::default()
587    }
588
589    /// Sets the value of [destination_type][crate::model::FrameworkAuditDestination::destination_type].
590    ///
591    /// Note that all the setters affecting `destination_type` are mutually
592    /// exclusive.
593    ///
594    /// # Example
595    /// ```ignore,no_run
596    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAuditDestination;
597    /// use google_cloud_cloudsecuritycompliance_v1::model::BucketDestination;
598    /// let x = FrameworkAuditDestination::new().set_destination_type(Some(
599    ///     google_cloud_cloudsecuritycompliance_v1::model::framework_audit_destination::DestinationType::Bucket(BucketDestination::default().into())));
600    /// ```
601    pub fn set_destination_type<
602        T: std::convert::Into<
603                std::option::Option<crate::model::framework_audit_destination::DestinationType>,
604            >,
605    >(
606        mut self,
607        v: T,
608    ) -> Self {
609        self.destination_type = v.into();
610        self
611    }
612
613    /// The value of [destination_type][crate::model::FrameworkAuditDestination::destination_type]
614    /// if it holds a `Bucket`, `None` if the field is not set or
615    /// holds a different branch.
616    pub fn bucket(&self) -> std::option::Option<&std::boxed::Box<crate::model::BucketDestination>> {
617        #[allow(unreachable_patterns)]
618        self.destination_type.as_ref().and_then(|v| match v {
619            crate::model::framework_audit_destination::DestinationType::Bucket(v) => {
620                std::option::Option::Some(v)
621            }
622            _ => std::option::Option::None,
623        })
624    }
625
626    /// Sets the value of [destination_type][crate::model::FrameworkAuditDestination::destination_type]
627    /// to hold a `Bucket`.
628    ///
629    /// Note that all the setters affecting `destination_type` are
630    /// mutually exclusive.
631    ///
632    /// # Example
633    /// ```ignore,no_run
634    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAuditDestination;
635    /// use google_cloud_cloudsecuritycompliance_v1::model::BucketDestination;
636    /// let x = FrameworkAuditDestination::new().set_bucket(BucketDestination::default()/* use setters */);
637    /// assert!(x.bucket().is_some());
638    /// ```
639    pub fn set_bucket<T: std::convert::Into<std::boxed::Box<crate::model::BucketDestination>>>(
640        mut self,
641        v: T,
642    ) -> Self {
643        self.destination_type = std::option::Option::Some(
644            crate::model::framework_audit_destination::DestinationType::Bucket(v.into()),
645        );
646        self
647    }
648}
649
650impl wkt::message::Message for FrameworkAuditDestination {
651    fn typename() -> &'static str {
652        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination"
653    }
654}
655
656/// Defines additional types related to [FrameworkAuditDestination].
657pub mod framework_audit_destination {
658    #[allow(unused_imports)]
659    use super::*;
660
661    /// The type of destination.
662    #[derive(Clone, Debug, PartialEq)]
663    #[non_exhaustive]
664    pub enum DestinationType {
665        /// The Cloud Storage bucket destination.
666        Bucket(std::boxed::Box<crate::model::BucketDestination>),
667    }
668}
669
670/// A Cloud Storage bucket destination.
671#[derive(Clone, Default, PartialEq)]
672#[non_exhaustive]
673pub struct BucketDestination {
674    /// Required. The URI of the Cloud Storage bucket.
675    pub bucket_uri: std::string::String,
676
677    /// Optional. The format of the framework audit.
678    pub framework_audit_format: crate::model::bucket_destination::Format,
679
680    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
681}
682
683impl BucketDestination {
684    pub fn new() -> Self {
685        std::default::Default::default()
686    }
687
688    /// Sets the value of [bucket_uri][crate::model::BucketDestination::bucket_uri].
689    ///
690    /// # Example
691    /// ```ignore,no_run
692    /// # use google_cloud_cloudsecuritycompliance_v1::model::BucketDestination;
693    /// let x = BucketDestination::new().set_bucket_uri("example");
694    /// ```
695    pub fn set_bucket_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
696        self.bucket_uri = v.into();
697        self
698    }
699
700    /// Sets the value of [framework_audit_format][crate::model::BucketDestination::framework_audit_format].
701    ///
702    /// # Example
703    /// ```ignore,no_run
704    /// # use google_cloud_cloudsecuritycompliance_v1::model::BucketDestination;
705    /// use google_cloud_cloudsecuritycompliance_v1::model::bucket_destination::Format;
706    /// let x0 = BucketDestination::new().set_framework_audit_format(Format::Odf);
707    /// ```
708    pub fn set_framework_audit_format<
709        T: std::convert::Into<crate::model::bucket_destination::Format>,
710    >(
711        mut self,
712        v: T,
713    ) -> Self {
714        self.framework_audit_format = v.into();
715        self
716    }
717}
718
719impl wkt::message::Message for BucketDestination {
720    fn typename() -> &'static str {
721        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.BucketDestination"
722    }
723}
724
725/// Defines additional types related to [BucketDestination].
726pub mod bucket_destination {
727    #[allow(unused_imports)]
728    use super::*;
729
730    /// The set of options for the framework audit format.
731    ///
732    /// # Working with unknown values
733    ///
734    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
735    /// additional enum variants at any time. Adding new variants is not considered
736    /// a breaking change. Applications should write their code in anticipation of:
737    ///
738    /// - New values appearing in future releases of the client library, **and**
739    /// - New values received dynamically, without application changes.
740    ///
741    /// Please consult the [Working with enums] section in the user guide for some
742    /// guidelines.
743    ///
744    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
745    #[derive(Clone, Debug, PartialEq)]
746    #[non_exhaustive]
747    pub enum Format {
748        /// Default value. This value is unused.
749        Unspecified,
750        /// The format for the framework audit report is Open Document.
751        Odf,
752        /// If set, the enum was initialized with an unknown value.
753        ///
754        /// Applications can examine the value using [Format::value] or
755        /// [Format::name].
756        UnknownValue(format::UnknownValue),
757    }
758
759    #[doc(hidden)]
760    pub mod format {
761        #[allow(unused_imports)]
762        use super::*;
763        #[derive(Clone, Debug, PartialEq)]
764        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
765    }
766
767    impl Format {
768        /// Gets the enum value.
769        ///
770        /// Returns `None` if the enum contains an unknown value deserialized from
771        /// the string representation of enums.
772        pub fn value(&self) -> std::option::Option<i32> {
773            match self {
774                Self::Unspecified => std::option::Option::Some(0),
775                Self::Odf => std::option::Option::Some(1),
776                Self::UnknownValue(u) => u.0.value(),
777            }
778        }
779
780        /// Gets the enum value as a string.
781        ///
782        /// Returns `None` if the enum contains an unknown value deserialized from
783        /// the integer representation of enums.
784        pub fn name(&self) -> std::option::Option<&str> {
785            match self {
786                Self::Unspecified => std::option::Option::Some("FORMAT_UNSPECIFIED"),
787                Self::Odf => std::option::Option::Some("ODF"),
788                Self::UnknownValue(u) => u.0.name(),
789            }
790        }
791    }
792
793    impl std::default::Default for Format {
794        fn default() -> Self {
795            use std::convert::From;
796            Self::from(0)
797        }
798    }
799
800    impl std::fmt::Display for Format {
801        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
802            wkt::internal::display_enum(f, self.name(), self.value())
803        }
804    }
805
806    impl std::convert::From<i32> for Format {
807        fn from(value: i32) -> Self {
808            match value {
809                0 => Self::Unspecified,
810                1 => Self::Odf,
811                _ => Self::UnknownValue(format::UnknownValue(
812                    wkt::internal::UnknownEnumValue::Integer(value),
813                )),
814            }
815        }
816    }
817
818    impl std::convert::From<&str> for Format {
819        fn from(value: &str) -> Self {
820            use std::string::ToString;
821            match value {
822                "FORMAT_UNSPECIFIED" => Self::Unspecified,
823                "ODF" => Self::Odf,
824                _ => Self::UnknownValue(format::UnknownValue(
825                    wkt::internal::UnknownEnumValue::String(value.to_string()),
826                )),
827            }
828        }
829    }
830
831    impl serde::ser::Serialize for Format {
832        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
833        where
834            S: serde::Serializer,
835        {
836            match self {
837                Self::Unspecified => serializer.serialize_i32(0),
838                Self::Odf => serializer.serialize_i32(1),
839                Self::UnknownValue(u) => u.0.serialize(serializer),
840            }
841        }
842    }
843
844    impl<'de> serde::de::Deserialize<'de> for Format {
845        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
846        where
847            D: serde::Deserializer<'de>,
848        {
849            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Format>::new(
850                ".google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format",
851            ))
852        }
853    }
854}
855
856/// A framework audit.
857#[derive(Clone, Default, PartialEq)]
858#[non_exhaustive]
859pub struct FrameworkAudit {
860    /// Output only. Identifier. The name of the framework audit.
861    pub name: std::string::String,
862
863    /// Output only. The ID of the framework audit.
864    pub framework_audit_id: std::string::String,
865
866    /// Output only. The compliance framework used for the audit.
867    pub compliance_framework: std::string::String,
868
869    /// Output only. The scope of the audit.
870    pub scope: std::string::String,
871
872    /// Required. The destination for the audit reports.
873    pub framework_audit_destination: std::option::Option<crate::model::FrameworkAuditDestination>,
874
875    /// Output only. The time that the audit started.
876    pub start_time: std::option::Option<wkt::Timestamp>,
877
878    /// Output only. The time that the audit finished.
879    pub finish_time: std::option::Option<wkt::Timestamp>,
880
881    /// Output only. The overall compliance state of the audit.
882    pub compliance_state: crate::model::ComplianceState,
883
884    /// Output only. The summary of the report.
885    pub report_summary: std::option::Option<crate::model::ReportSummary>,
886
887    /// Optional. The details for the cloud control groups within this audit.
888    pub cloud_control_group_audit_details:
889        std::vec::Vec<crate::model::CloudControlGroupAuditDetails>,
890
891    /// Optional. The details for the cloud controls within this audit.
892    pub cloud_control_audit_details: std::vec::Vec<crate::model::CloudControlAuditDetails>,
893
894    /// Output only. The ID of the long-running operation.
895    pub operation_id: std::string::String,
896
897    /// Output only. The framework audit state of the audit.
898    pub state: crate::model::framework_audit::State,
899
900    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
901}
902
903impl FrameworkAudit {
904    pub fn new() -> Self {
905        std::default::Default::default()
906    }
907
908    /// Sets the value of [name][crate::model::FrameworkAudit::name].
909    ///
910    /// # Example
911    /// ```ignore,no_run
912    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
913    /// let x = FrameworkAudit::new().set_name("example");
914    /// ```
915    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
916        self.name = v.into();
917        self
918    }
919
920    /// Sets the value of [framework_audit_id][crate::model::FrameworkAudit::framework_audit_id].
921    ///
922    /// # Example
923    /// ```ignore,no_run
924    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
925    /// let x = FrameworkAudit::new().set_framework_audit_id("example");
926    /// ```
927    pub fn set_framework_audit_id<T: std::convert::Into<std::string::String>>(
928        mut self,
929        v: T,
930    ) -> Self {
931        self.framework_audit_id = v.into();
932        self
933    }
934
935    /// Sets the value of [compliance_framework][crate::model::FrameworkAudit::compliance_framework].
936    ///
937    /// # Example
938    /// ```ignore,no_run
939    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
940    /// let x = FrameworkAudit::new().set_compliance_framework("example");
941    /// ```
942    pub fn set_compliance_framework<T: std::convert::Into<std::string::String>>(
943        mut self,
944        v: T,
945    ) -> Self {
946        self.compliance_framework = v.into();
947        self
948    }
949
950    /// Sets the value of [scope][crate::model::FrameworkAudit::scope].
951    ///
952    /// # Example
953    /// ```ignore,no_run
954    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
955    /// let x = FrameworkAudit::new().set_scope("example");
956    /// ```
957    pub fn set_scope<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
958        self.scope = v.into();
959        self
960    }
961
962    /// Sets the value of [framework_audit_destination][crate::model::FrameworkAudit::framework_audit_destination].
963    ///
964    /// # Example
965    /// ```ignore,no_run
966    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
967    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAuditDestination;
968    /// let x = FrameworkAudit::new().set_framework_audit_destination(FrameworkAuditDestination::default()/* use setters */);
969    /// ```
970    pub fn set_framework_audit_destination<T>(mut self, v: T) -> Self
971    where
972        T: std::convert::Into<crate::model::FrameworkAuditDestination>,
973    {
974        self.framework_audit_destination = std::option::Option::Some(v.into());
975        self
976    }
977
978    /// Sets or clears the value of [framework_audit_destination][crate::model::FrameworkAudit::framework_audit_destination].
979    ///
980    /// # Example
981    /// ```ignore,no_run
982    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
983    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAuditDestination;
984    /// let x = FrameworkAudit::new().set_or_clear_framework_audit_destination(Some(FrameworkAuditDestination::default()/* use setters */));
985    /// let x = FrameworkAudit::new().set_or_clear_framework_audit_destination(None::<FrameworkAuditDestination>);
986    /// ```
987    pub fn set_or_clear_framework_audit_destination<T>(mut self, v: std::option::Option<T>) -> Self
988    where
989        T: std::convert::Into<crate::model::FrameworkAuditDestination>,
990    {
991        self.framework_audit_destination = v.map(|x| x.into());
992        self
993    }
994
995    /// Sets the value of [start_time][crate::model::FrameworkAudit::start_time].
996    ///
997    /// # Example
998    /// ```ignore,no_run
999    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1000    /// use wkt::Timestamp;
1001    /// let x = FrameworkAudit::new().set_start_time(Timestamp::default()/* use setters */);
1002    /// ```
1003    pub fn set_start_time<T>(mut self, v: T) -> Self
1004    where
1005        T: std::convert::Into<wkt::Timestamp>,
1006    {
1007        self.start_time = std::option::Option::Some(v.into());
1008        self
1009    }
1010
1011    /// Sets or clears the value of [start_time][crate::model::FrameworkAudit::start_time].
1012    ///
1013    /// # Example
1014    /// ```ignore,no_run
1015    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1016    /// use wkt::Timestamp;
1017    /// let x = FrameworkAudit::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
1018    /// let x = FrameworkAudit::new().set_or_clear_start_time(None::<Timestamp>);
1019    /// ```
1020    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
1021    where
1022        T: std::convert::Into<wkt::Timestamp>,
1023    {
1024        self.start_time = v.map(|x| x.into());
1025        self
1026    }
1027
1028    /// Sets the value of [finish_time][crate::model::FrameworkAudit::finish_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_finish_time(Timestamp::default()/* use setters */);
1035    /// ```
1036    pub fn set_finish_time<T>(mut self, v: T) -> Self
1037    where
1038        T: std::convert::Into<wkt::Timestamp>,
1039    {
1040        self.finish_time = std::option::Option::Some(v.into());
1041        self
1042    }
1043
1044    /// Sets or clears the value of [finish_time][crate::model::FrameworkAudit::finish_time].
1045    ///
1046    /// # Example
1047    /// ```ignore,no_run
1048    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1049    /// use wkt::Timestamp;
1050    /// let x = FrameworkAudit::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1051    /// let x = FrameworkAudit::new().set_or_clear_finish_time(None::<Timestamp>);
1052    /// ```
1053    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1054    where
1055        T: std::convert::Into<wkt::Timestamp>,
1056    {
1057        self.finish_time = v.map(|x| x.into());
1058        self
1059    }
1060
1061    /// Sets the value of [compliance_state][crate::model::FrameworkAudit::compliance_state].
1062    ///
1063    /// # Example
1064    /// ```ignore,no_run
1065    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1066    /// use google_cloud_cloudsecuritycompliance_v1::model::ComplianceState;
1067    /// let x0 = FrameworkAudit::new().set_compliance_state(ComplianceState::Compliant);
1068    /// let x1 = FrameworkAudit::new().set_compliance_state(ComplianceState::Violation);
1069    /// let x2 = FrameworkAudit::new().set_compliance_state(ComplianceState::ManualReviewNeeded);
1070    /// ```
1071    pub fn set_compliance_state<T: std::convert::Into<crate::model::ComplianceState>>(
1072        mut self,
1073        v: T,
1074    ) -> Self {
1075        self.compliance_state = v.into();
1076        self
1077    }
1078
1079    /// Sets the value of [report_summary][crate::model::FrameworkAudit::report_summary].
1080    ///
1081    /// # Example
1082    /// ```ignore,no_run
1083    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1084    /// use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
1085    /// let x = FrameworkAudit::new().set_report_summary(ReportSummary::default()/* use setters */);
1086    /// ```
1087    pub fn set_report_summary<T>(mut self, v: T) -> Self
1088    where
1089        T: std::convert::Into<crate::model::ReportSummary>,
1090    {
1091        self.report_summary = std::option::Option::Some(v.into());
1092        self
1093    }
1094
1095    /// Sets or clears the value of [report_summary][crate::model::FrameworkAudit::report_summary].
1096    ///
1097    /// # Example
1098    /// ```ignore,no_run
1099    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1100    /// use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
1101    /// let x = FrameworkAudit::new().set_or_clear_report_summary(Some(ReportSummary::default()/* use setters */));
1102    /// let x = FrameworkAudit::new().set_or_clear_report_summary(None::<ReportSummary>);
1103    /// ```
1104    pub fn set_or_clear_report_summary<T>(mut self, v: std::option::Option<T>) -> Self
1105    where
1106        T: std::convert::Into<crate::model::ReportSummary>,
1107    {
1108        self.report_summary = v.map(|x| x.into());
1109        self
1110    }
1111
1112    /// Sets the value of [cloud_control_group_audit_details][crate::model::FrameworkAudit::cloud_control_group_audit_details].
1113    ///
1114    /// # Example
1115    /// ```ignore,no_run
1116    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1117    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1118    /// let x = FrameworkAudit::new()
1119    ///     .set_cloud_control_group_audit_details([
1120    ///         CloudControlGroupAuditDetails::default()/* use setters */,
1121    ///         CloudControlGroupAuditDetails::default()/* use (different) setters */,
1122    ///     ]);
1123    /// ```
1124    pub fn set_cloud_control_group_audit_details<T, V>(mut self, v: T) -> Self
1125    where
1126        T: std::iter::IntoIterator<Item = V>,
1127        V: std::convert::Into<crate::model::CloudControlGroupAuditDetails>,
1128    {
1129        use std::iter::Iterator;
1130        self.cloud_control_group_audit_details = v.into_iter().map(|i| i.into()).collect();
1131        self
1132    }
1133
1134    /// Sets the value of [cloud_control_audit_details][crate::model::FrameworkAudit::cloud_control_audit_details].
1135    ///
1136    /// # Example
1137    /// ```ignore,no_run
1138    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1139    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
1140    /// let x = FrameworkAudit::new()
1141    ///     .set_cloud_control_audit_details([
1142    ///         CloudControlAuditDetails::default()/* use setters */,
1143    ///         CloudControlAuditDetails::default()/* use (different) setters */,
1144    ///     ]);
1145    /// ```
1146    pub fn set_cloud_control_audit_details<T, V>(mut self, v: T) -> Self
1147    where
1148        T: std::iter::IntoIterator<Item = V>,
1149        V: std::convert::Into<crate::model::CloudControlAuditDetails>,
1150    {
1151        use std::iter::Iterator;
1152        self.cloud_control_audit_details = v.into_iter().map(|i| i.into()).collect();
1153        self
1154    }
1155
1156    /// Sets the value of [operation_id][crate::model::FrameworkAudit::operation_id].
1157    ///
1158    /// # Example
1159    /// ```ignore,no_run
1160    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1161    /// let x = FrameworkAudit::new().set_operation_id("example");
1162    /// ```
1163    pub fn set_operation_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1164        self.operation_id = v.into();
1165        self
1166    }
1167
1168    /// Sets the value of [state][crate::model::FrameworkAudit::state].
1169    ///
1170    /// # Example
1171    /// ```ignore,no_run
1172    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1173    /// use google_cloud_cloudsecuritycompliance_v1::model::framework_audit::State;
1174    /// let x0 = FrameworkAudit::new().set_state(State::Scheduled);
1175    /// let x1 = FrameworkAudit::new().set_state(State::Running);
1176    /// let x2 = FrameworkAudit::new().set_state(State::Uploading);
1177    /// ```
1178    pub fn set_state<T: std::convert::Into<crate::model::framework_audit::State>>(
1179        mut self,
1180        v: T,
1181    ) -> Self {
1182        self.state = v.into();
1183        self
1184    }
1185}
1186
1187impl wkt::message::Message for FrameworkAudit {
1188    fn typename() -> &'static str {
1189        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkAudit"
1190    }
1191}
1192
1193/// Defines additional types related to [FrameworkAudit].
1194pub mod framework_audit {
1195    #[allow(unused_imports)]
1196    use super::*;
1197
1198    /// The state of the framework audit.
1199    ///
1200    /// # Working with unknown values
1201    ///
1202    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1203    /// additional enum variants at any time. Adding new variants is not considered
1204    /// a breaking change. Applications should write their code in anticipation of:
1205    ///
1206    /// - New values appearing in future releases of the client library, **and**
1207    /// - New values received dynamically, without application changes.
1208    ///
1209    /// Please consult the [Working with enums] section in the user guide for some
1210    /// guidelines.
1211    ///
1212    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1213    #[derive(Clone, Debug, PartialEq)]
1214    #[non_exhaustive]
1215    pub enum State {
1216        /// Default value. This value is unused.
1217        Unspecified,
1218        /// The audit is scheduled.
1219        Scheduled,
1220        /// The audit is running.
1221        Running,
1222        /// The audit results are being uploaded.
1223        Uploading,
1224        /// The audit failed.
1225        Failed,
1226        /// The audit completed successfully.
1227        Succeeded,
1228        /// If set, the enum was initialized with an unknown value.
1229        ///
1230        /// Applications can examine the value using [State::value] or
1231        /// [State::name].
1232        UnknownValue(state::UnknownValue),
1233    }
1234
1235    #[doc(hidden)]
1236    pub mod state {
1237        #[allow(unused_imports)]
1238        use super::*;
1239        #[derive(Clone, Debug, PartialEq)]
1240        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1241    }
1242
1243    impl State {
1244        /// Gets the enum value.
1245        ///
1246        /// Returns `None` if the enum contains an unknown value deserialized from
1247        /// the string representation of enums.
1248        pub fn value(&self) -> std::option::Option<i32> {
1249            match self {
1250                Self::Unspecified => std::option::Option::Some(0),
1251                Self::Scheduled => std::option::Option::Some(1),
1252                Self::Running => std::option::Option::Some(2),
1253                Self::Uploading => std::option::Option::Some(3),
1254                Self::Failed => std::option::Option::Some(4),
1255                Self::Succeeded => std::option::Option::Some(5),
1256                Self::UnknownValue(u) => u.0.value(),
1257            }
1258        }
1259
1260        /// Gets the enum value as a string.
1261        ///
1262        /// Returns `None` if the enum contains an unknown value deserialized from
1263        /// the integer representation of enums.
1264        pub fn name(&self) -> std::option::Option<&str> {
1265            match self {
1266                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
1267                Self::Scheduled => std::option::Option::Some("SCHEDULED"),
1268                Self::Running => std::option::Option::Some("RUNNING"),
1269                Self::Uploading => std::option::Option::Some("UPLOADING"),
1270                Self::Failed => std::option::Option::Some("FAILED"),
1271                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
1272                Self::UnknownValue(u) => u.0.name(),
1273            }
1274        }
1275    }
1276
1277    impl std::default::Default for State {
1278        fn default() -> Self {
1279            use std::convert::From;
1280            Self::from(0)
1281        }
1282    }
1283
1284    impl std::fmt::Display for State {
1285        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1286            wkt::internal::display_enum(f, self.name(), self.value())
1287        }
1288    }
1289
1290    impl std::convert::From<i32> for State {
1291        fn from(value: i32) -> Self {
1292            match value {
1293                0 => Self::Unspecified,
1294                1 => Self::Scheduled,
1295                2 => Self::Running,
1296                3 => Self::Uploading,
1297                4 => Self::Failed,
1298                5 => Self::Succeeded,
1299                _ => Self::UnknownValue(state::UnknownValue(
1300                    wkt::internal::UnknownEnumValue::Integer(value),
1301                )),
1302            }
1303        }
1304    }
1305
1306    impl std::convert::From<&str> for State {
1307        fn from(value: &str) -> Self {
1308            use std::string::ToString;
1309            match value {
1310                "STATE_UNSPECIFIED" => Self::Unspecified,
1311                "SCHEDULED" => Self::Scheduled,
1312                "RUNNING" => Self::Running,
1313                "UPLOADING" => Self::Uploading,
1314                "FAILED" => Self::Failed,
1315                "SUCCEEDED" => Self::Succeeded,
1316                _ => Self::UnknownValue(state::UnknownValue(
1317                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1318                )),
1319            }
1320        }
1321    }
1322
1323    impl serde::ser::Serialize for State {
1324        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1325        where
1326            S: serde::Serializer,
1327        {
1328            match self {
1329                Self::Unspecified => serializer.serialize_i32(0),
1330                Self::Scheduled => serializer.serialize_i32(1),
1331                Self::Running => serializer.serialize_i32(2),
1332                Self::Uploading => serializer.serialize_i32(3),
1333                Self::Failed => serializer.serialize_i32(4),
1334                Self::Succeeded => serializer.serialize_i32(5),
1335                Self::UnknownValue(u) => u.0.serialize(serializer),
1336            }
1337        }
1338    }
1339
1340    impl<'de> serde::de::Deserialize<'de> for State {
1341        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1342        where
1343            D: serde::Deserializer<'de>,
1344        {
1345            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
1346                ".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State",
1347            ))
1348        }
1349    }
1350}
1351
1352/// The request message for [ListFrameworkAudits][].
1353#[derive(Clone, Default, PartialEq)]
1354#[non_exhaustive]
1355pub struct ListFrameworkAuditsRequest {
1356    /// Required. The parent resource where the framework audits are listed.
1357    ///
1358    /// Supported formats are the following:
1359    ///
1360    /// * `organizations/{organization_id}/locations/{location}`
1361    /// * `folders/{folder_id}/locations/{location}`
1362    /// * `projects/{project_id}/locations/{location}`
1363    pub parent: std::string::String,
1364
1365    /// Optional. The maximum number of framework audits to return. The service
1366    /// might return fewer audits than this value. If unspecified, a maximum of 10
1367    /// framework audits are returned. The maximum value is 50; values above 50 are
1368    /// limited to 50.
1369    pub page_size: i32,
1370
1371    /// Optional. The `next_page_token` value that's returned from a previous list
1372    /// request, if any.
1373    pub page_token: std::string::String,
1374
1375    /// Optional. The filters to apply to the framework audits.
1376    /// Supported filters are `compliance_framework`, `compliance_state`,
1377    /// `create_time,` and `framework_audit_name`. If the filter is invalid, an
1378    /// invalid argument error is returned.
1379    /// For syntax details, see [AIP-160][<https://google.aip.dev/160>].
1380    pub filter: std::string::String,
1381
1382    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1383}
1384
1385impl ListFrameworkAuditsRequest {
1386    pub fn new() -> Self {
1387        std::default::Default::default()
1388    }
1389
1390    /// Sets the value of [parent][crate::model::ListFrameworkAuditsRequest::parent].
1391    ///
1392    /// # Example
1393    /// ```ignore,no_run
1394    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkAuditsRequest;
1395    /// let x = ListFrameworkAuditsRequest::new().set_parent("example");
1396    /// ```
1397    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1398        self.parent = v.into();
1399        self
1400    }
1401
1402    /// Sets the value of [page_size][crate::model::ListFrameworkAuditsRequest::page_size].
1403    ///
1404    /// # Example
1405    /// ```ignore,no_run
1406    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkAuditsRequest;
1407    /// let x = ListFrameworkAuditsRequest::new().set_page_size(42);
1408    /// ```
1409    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1410        self.page_size = v.into();
1411        self
1412    }
1413
1414    /// Sets the value of [page_token][crate::model::ListFrameworkAuditsRequest::page_token].
1415    ///
1416    /// # Example
1417    /// ```ignore,no_run
1418    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkAuditsRequest;
1419    /// let x = ListFrameworkAuditsRequest::new().set_page_token("example");
1420    /// ```
1421    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1422        self.page_token = v.into();
1423        self
1424    }
1425
1426    /// Sets the value of [filter][crate::model::ListFrameworkAuditsRequest::filter].
1427    ///
1428    /// # Example
1429    /// ```ignore,no_run
1430    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkAuditsRequest;
1431    /// let x = ListFrameworkAuditsRequest::new().set_filter("example");
1432    /// ```
1433    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1434        self.filter = v.into();
1435        self
1436    }
1437}
1438
1439impl wkt::message::Message for ListFrameworkAuditsRequest {
1440    fn typename() -> &'static str {
1441        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest"
1442    }
1443}
1444
1445/// The response message for [ListFrameworkAudits][].
1446#[derive(Clone, Default, PartialEq)]
1447#[non_exhaustive]
1448pub struct ListFrameworkAuditsResponse {
1449    /// The framework audits.
1450    pub framework_audits: std::vec::Vec<crate::model::FrameworkAudit>,
1451
1452    /// A token, which you can send as the `page_token` to retrieve the next page.
1453    /// If this field is omitted, there are no subsequent pages.
1454    pub next_page_token: std::string::String,
1455
1456    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1457}
1458
1459impl ListFrameworkAuditsResponse {
1460    pub fn new() -> Self {
1461        std::default::Default::default()
1462    }
1463
1464    /// Sets the value of [framework_audits][crate::model::ListFrameworkAuditsResponse::framework_audits].
1465    ///
1466    /// # Example
1467    /// ```ignore,no_run
1468    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkAuditsResponse;
1469    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1470    /// let x = ListFrameworkAuditsResponse::new()
1471    ///     .set_framework_audits([
1472    ///         FrameworkAudit::default()/* use setters */,
1473    ///         FrameworkAudit::default()/* use (different) setters */,
1474    ///     ]);
1475    /// ```
1476    pub fn set_framework_audits<T, V>(mut self, v: T) -> Self
1477    where
1478        T: std::iter::IntoIterator<Item = V>,
1479        V: std::convert::Into<crate::model::FrameworkAudit>,
1480    {
1481        use std::iter::Iterator;
1482        self.framework_audits = v.into_iter().map(|i| i.into()).collect();
1483        self
1484    }
1485
1486    /// Sets the value of [next_page_token][crate::model::ListFrameworkAuditsResponse::next_page_token].
1487    ///
1488    /// # Example
1489    /// ```ignore,no_run
1490    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkAuditsResponse;
1491    /// let x = ListFrameworkAuditsResponse::new().set_next_page_token("example");
1492    /// ```
1493    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1494        self.next_page_token = v.into();
1495        self
1496    }
1497}
1498
1499impl wkt::message::Message for ListFrameworkAuditsResponse {
1500    fn typename() -> &'static str {
1501        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse"
1502    }
1503}
1504
1505#[doc(hidden)]
1506impl google_cloud_gax::paginator::internal::PageableResponse for ListFrameworkAuditsResponse {
1507    type PageItem = crate::model::FrameworkAudit;
1508
1509    fn items(self) -> std::vec::Vec<Self::PageItem> {
1510        self.framework_audits
1511    }
1512
1513    fn next_page_token(&self) -> std::string::String {
1514        use std::clone::Clone;
1515        self.next_page_token.clone()
1516    }
1517}
1518
1519/// The request message for [GetFrameworkAudit][].
1520#[derive(Clone, Default, PartialEq)]
1521#[non_exhaustive]
1522pub struct GetFrameworkAuditRequest {
1523    /// Required. The name of the framework audit to retrieve.
1524    ///
1525    /// Supported formats are the following:
1526    ///
1527    /// * `organizations/{organization_id}/locations/{location}/frameworkAudits/{frameworkAuditName}`
1528    /// * `folders/{folder_id}/locations/{location}/frameworkAudits/{frameworkAuditName}`
1529    /// * `projects/{project_id}/locations/{location}/frameworkAudits/{frameworkAuditName}`
1530    pub name: std::string::String,
1531
1532    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1533}
1534
1535impl GetFrameworkAuditRequest {
1536    pub fn new() -> Self {
1537        std::default::Default::default()
1538    }
1539
1540    /// Sets the value of [name][crate::model::GetFrameworkAuditRequest::name].
1541    ///
1542    /// # Example
1543    /// ```ignore,no_run
1544    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetFrameworkAuditRequest;
1545    /// let x = GetFrameworkAuditRequest::new().set_name("example");
1546    /// ```
1547    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1548        self.name = v.into();
1549        self
1550    }
1551}
1552
1553impl wkt::message::Message for GetFrameworkAuditRequest {
1554    fn typename() -> &'static str {
1555        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest"
1556    }
1557}
1558
1559/// The details for a cloud control group.
1560#[derive(Clone, Default, PartialEq)]
1561#[non_exhaustive]
1562pub struct CloudControlGroupAuditDetails {
1563    /// Output only. The ID of the cloud control group.
1564    pub cloud_control_group_id: std::string::String,
1565
1566    /// Output only. The display name of the cloud control group.
1567    pub display_name: std::string::String,
1568
1569    /// Output only. The description of the cloud control group.
1570    pub description: std::string::String,
1571
1572    /// Output only. The responsibility type.
1573    pub responsibility_type: std::string::String,
1574
1575    /// Output only. The description of Google's responsibility.
1576    pub google_responsibility_description: std::string::String,
1577
1578    /// Output only. The implementation of Google's responsibility.
1579    pub google_responsibility_implementation: std::string::String,
1580
1581    /// Output only. The description of your responsibility.
1582    pub customer_responsibility_description: std::string::String,
1583
1584    /// Output only. The implementation of your responsibility.
1585    pub customer_responsibility_implementation: std::string::String,
1586
1587    /// Output only. The compliance state of the control group.
1588    pub compliance_state: crate::model::ComplianceState,
1589
1590    /// Output only. The ID of the regulatory control.
1591    pub control_id: std::string::String,
1592
1593    /// Output only. The control family.
1594    pub control_family: std::option::Option<crate::model::ControlFamily>,
1595
1596    /// Output only. The details for the cloud controls within this group.
1597    pub cloud_control_details: std::vec::Vec<crate::model::CloudControlAuditDetails>,
1598
1599    /// Output only. The summary of the report.
1600    pub report_summary: std::option::Option<crate::model::ReportSummary>,
1601
1602    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1603}
1604
1605impl CloudControlGroupAuditDetails {
1606    pub fn new() -> Self {
1607        std::default::Default::default()
1608    }
1609
1610    /// Sets the value of [cloud_control_group_id][crate::model::CloudControlGroupAuditDetails::cloud_control_group_id].
1611    ///
1612    /// # Example
1613    /// ```ignore,no_run
1614    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1615    /// let x = CloudControlGroupAuditDetails::new().set_cloud_control_group_id("example");
1616    /// ```
1617    pub fn set_cloud_control_group_id<T: std::convert::Into<std::string::String>>(
1618        mut self,
1619        v: T,
1620    ) -> Self {
1621        self.cloud_control_group_id = v.into();
1622        self
1623    }
1624
1625    /// Sets the value of [display_name][crate::model::CloudControlGroupAuditDetails::display_name].
1626    ///
1627    /// # Example
1628    /// ```ignore,no_run
1629    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1630    /// let x = CloudControlGroupAuditDetails::new().set_display_name("example");
1631    /// ```
1632    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1633        self.display_name = v.into();
1634        self
1635    }
1636
1637    /// Sets the value of [description][crate::model::CloudControlGroupAuditDetails::description].
1638    ///
1639    /// # Example
1640    /// ```ignore,no_run
1641    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1642    /// let x = CloudControlGroupAuditDetails::new().set_description("example");
1643    /// ```
1644    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1645        self.description = v.into();
1646        self
1647    }
1648
1649    /// Sets the value of [responsibility_type][crate::model::CloudControlGroupAuditDetails::responsibility_type].
1650    ///
1651    /// # Example
1652    /// ```ignore,no_run
1653    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1654    /// let x = CloudControlGroupAuditDetails::new().set_responsibility_type("example");
1655    /// ```
1656    pub fn set_responsibility_type<T: std::convert::Into<std::string::String>>(
1657        mut self,
1658        v: T,
1659    ) -> Self {
1660        self.responsibility_type = v.into();
1661        self
1662    }
1663
1664    /// Sets the value of [google_responsibility_description][crate::model::CloudControlGroupAuditDetails::google_responsibility_description].
1665    ///
1666    /// # Example
1667    /// ```ignore,no_run
1668    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1669    /// let x = CloudControlGroupAuditDetails::new().set_google_responsibility_description("example");
1670    /// ```
1671    pub fn set_google_responsibility_description<T: std::convert::Into<std::string::String>>(
1672        mut self,
1673        v: T,
1674    ) -> Self {
1675        self.google_responsibility_description = v.into();
1676        self
1677    }
1678
1679    /// Sets the value of [google_responsibility_implementation][crate::model::CloudControlGroupAuditDetails::google_responsibility_implementation].
1680    ///
1681    /// # Example
1682    /// ```ignore,no_run
1683    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1684    /// let x = CloudControlGroupAuditDetails::new().set_google_responsibility_implementation("example");
1685    /// ```
1686    pub fn set_google_responsibility_implementation<T: std::convert::Into<std::string::String>>(
1687        mut self,
1688        v: T,
1689    ) -> Self {
1690        self.google_responsibility_implementation = v.into();
1691        self
1692    }
1693
1694    /// Sets the value of [customer_responsibility_description][crate::model::CloudControlGroupAuditDetails::customer_responsibility_description].
1695    ///
1696    /// # Example
1697    /// ```ignore,no_run
1698    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1699    /// let x = CloudControlGroupAuditDetails::new().set_customer_responsibility_description("example");
1700    /// ```
1701    pub fn set_customer_responsibility_description<T: std::convert::Into<std::string::String>>(
1702        mut self,
1703        v: T,
1704    ) -> Self {
1705        self.customer_responsibility_description = v.into();
1706        self
1707    }
1708
1709    /// Sets the value of [customer_responsibility_implementation][crate::model::CloudControlGroupAuditDetails::customer_responsibility_implementation].
1710    ///
1711    /// # Example
1712    /// ```ignore,no_run
1713    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1714    /// let x = CloudControlGroupAuditDetails::new().set_customer_responsibility_implementation("example");
1715    /// ```
1716    pub fn set_customer_responsibility_implementation<
1717        T: std::convert::Into<std::string::String>,
1718    >(
1719        mut self,
1720        v: T,
1721    ) -> Self {
1722        self.customer_responsibility_implementation = v.into();
1723        self
1724    }
1725
1726    /// Sets the value of [compliance_state][crate::model::CloudControlGroupAuditDetails::compliance_state].
1727    ///
1728    /// # Example
1729    /// ```ignore,no_run
1730    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1731    /// use google_cloud_cloudsecuritycompliance_v1::model::ComplianceState;
1732    /// let x0 = CloudControlGroupAuditDetails::new().set_compliance_state(ComplianceState::Compliant);
1733    /// let x1 = CloudControlGroupAuditDetails::new().set_compliance_state(ComplianceState::Violation);
1734    /// let x2 = CloudControlGroupAuditDetails::new().set_compliance_state(ComplianceState::ManualReviewNeeded);
1735    /// ```
1736    pub fn set_compliance_state<T: std::convert::Into<crate::model::ComplianceState>>(
1737        mut self,
1738        v: T,
1739    ) -> Self {
1740        self.compliance_state = v.into();
1741        self
1742    }
1743
1744    /// Sets the value of [control_id][crate::model::CloudControlGroupAuditDetails::control_id].
1745    ///
1746    /// # Example
1747    /// ```ignore,no_run
1748    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1749    /// let x = CloudControlGroupAuditDetails::new().set_control_id("example");
1750    /// ```
1751    pub fn set_control_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1752        self.control_id = v.into();
1753        self
1754    }
1755
1756    /// Sets the value of [control_family][crate::model::CloudControlGroupAuditDetails::control_family].
1757    ///
1758    /// # Example
1759    /// ```ignore,no_run
1760    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1761    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlFamily;
1762    /// let x = CloudControlGroupAuditDetails::new().set_control_family(ControlFamily::default()/* use setters */);
1763    /// ```
1764    pub fn set_control_family<T>(mut self, v: T) -> Self
1765    where
1766        T: std::convert::Into<crate::model::ControlFamily>,
1767    {
1768        self.control_family = std::option::Option::Some(v.into());
1769        self
1770    }
1771
1772    /// Sets or clears the value of [control_family][crate::model::CloudControlGroupAuditDetails::control_family].
1773    ///
1774    /// # Example
1775    /// ```ignore,no_run
1776    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1777    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlFamily;
1778    /// let x = CloudControlGroupAuditDetails::new().set_or_clear_control_family(Some(ControlFamily::default()/* use setters */));
1779    /// let x = CloudControlGroupAuditDetails::new().set_or_clear_control_family(None::<ControlFamily>);
1780    /// ```
1781    pub fn set_or_clear_control_family<T>(mut self, v: std::option::Option<T>) -> Self
1782    where
1783        T: std::convert::Into<crate::model::ControlFamily>,
1784    {
1785        self.control_family = v.map(|x| x.into());
1786        self
1787    }
1788
1789    /// Sets the value of [cloud_control_details][crate::model::CloudControlGroupAuditDetails::cloud_control_details].
1790    ///
1791    /// # Example
1792    /// ```ignore,no_run
1793    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1794    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
1795    /// let x = CloudControlGroupAuditDetails::new()
1796    ///     .set_cloud_control_details([
1797    ///         CloudControlAuditDetails::default()/* use setters */,
1798    ///         CloudControlAuditDetails::default()/* use (different) setters */,
1799    ///     ]);
1800    /// ```
1801    pub fn set_cloud_control_details<T, V>(mut self, v: T) -> Self
1802    where
1803        T: std::iter::IntoIterator<Item = V>,
1804        V: std::convert::Into<crate::model::CloudControlAuditDetails>,
1805    {
1806        use std::iter::Iterator;
1807        self.cloud_control_details = v.into_iter().map(|i| i.into()).collect();
1808        self
1809    }
1810
1811    /// Sets the value of [report_summary][crate::model::CloudControlGroupAuditDetails::report_summary].
1812    ///
1813    /// # Example
1814    /// ```ignore,no_run
1815    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1816    /// use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
1817    /// let x = CloudControlGroupAuditDetails::new().set_report_summary(ReportSummary::default()/* use setters */);
1818    /// ```
1819    pub fn set_report_summary<T>(mut self, v: T) -> Self
1820    where
1821        T: std::convert::Into<crate::model::ReportSummary>,
1822    {
1823        self.report_summary = std::option::Option::Some(v.into());
1824        self
1825    }
1826
1827    /// Sets or clears the value of [report_summary][crate::model::CloudControlGroupAuditDetails::report_summary].
1828    ///
1829    /// # Example
1830    /// ```ignore,no_run
1831    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1832    /// use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
1833    /// let x = CloudControlGroupAuditDetails::new().set_or_clear_report_summary(Some(ReportSummary::default()/* use setters */));
1834    /// let x = CloudControlGroupAuditDetails::new().set_or_clear_report_summary(None::<ReportSummary>);
1835    /// ```
1836    pub fn set_or_clear_report_summary<T>(mut self, v: std::option::Option<T>) -> Self
1837    where
1838        T: std::convert::Into<crate::model::ReportSummary>,
1839    {
1840        self.report_summary = v.map(|x| x.into());
1841        self
1842    }
1843}
1844
1845impl wkt::message::Message for CloudControlGroupAuditDetails {
1846    fn typename() -> &'static str {
1847        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails"
1848    }
1849}
1850
1851/// The details for a finding.
1852#[derive(Clone, Default, PartialEq)]
1853#[non_exhaustive]
1854pub struct FindingDetails {
1855    /// Output only. The name of the finding.
1856    pub name: std::string::String,
1857
1858    /// Output only. The compliance state of the finding.
1859    pub compliance_state: crate::model::ComplianceState,
1860
1861    /// Output only. The observation details for the finding.
1862    pub observation: std::option::Option<crate::model::ObservationDetails>,
1863
1864    /// Output only. The evidence details for the finding.
1865    pub evidence: std::option::Option<crate::model::EvidenceDetails>,
1866
1867    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1868}
1869
1870impl FindingDetails {
1871    pub fn new() -> Self {
1872        std::default::Default::default()
1873    }
1874
1875    /// Sets the value of [name][crate::model::FindingDetails::name].
1876    ///
1877    /// # Example
1878    /// ```ignore,no_run
1879    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
1880    /// let x = FindingDetails::new().set_name("example");
1881    /// ```
1882    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1883        self.name = v.into();
1884        self
1885    }
1886
1887    /// Sets the value of [compliance_state][crate::model::FindingDetails::compliance_state].
1888    ///
1889    /// # Example
1890    /// ```ignore,no_run
1891    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
1892    /// use google_cloud_cloudsecuritycompliance_v1::model::ComplianceState;
1893    /// let x0 = FindingDetails::new().set_compliance_state(ComplianceState::Compliant);
1894    /// let x1 = FindingDetails::new().set_compliance_state(ComplianceState::Violation);
1895    /// let x2 = FindingDetails::new().set_compliance_state(ComplianceState::ManualReviewNeeded);
1896    /// ```
1897    pub fn set_compliance_state<T: std::convert::Into<crate::model::ComplianceState>>(
1898        mut self,
1899        v: T,
1900    ) -> Self {
1901        self.compliance_state = v.into();
1902        self
1903    }
1904
1905    /// Sets the value of [observation][crate::model::FindingDetails::observation].
1906    ///
1907    /// # Example
1908    /// ```ignore,no_run
1909    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
1910    /// use google_cloud_cloudsecuritycompliance_v1::model::ObservationDetails;
1911    /// let x = FindingDetails::new().set_observation(ObservationDetails::default()/* use setters */);
1912    /// ```
1913    pub fn set_observation<T>(mut self, v: T) -> Self
1914    where
1915        T: std::convert::Into<crate::model::ObservationDetails>,
1916    {
1917        self.observation = std::option::Option::Some(v.into());
1918        self
1919    }
1920
1921    /// Sets or clears the value of [observation][crate::model::FindingDetails::observation].
1922    ///
1923    /// # Example
1924    /// ```ignore,no_run
1925    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
1926    /// use google_cloud_cloudsecuritycompliance_v1::model::ObservationDetails;
1927    /// let x = FindingDetails::new().set_or_clear_observation(Some(ObservationDetails::default()/* use setters */));
1928    /// let x = FindingDetails::new().set_or_clear_observation(None::<ObservationDetails>);
1929    /// ```
1930    pub fn set_or_clear_observation<T>(mut self, v: std::option::Option<T>) -> Self
1931    where
1932        T: std::convert::Into<crate::model::ObservationDetails>,
1933    {
1934        self.observation = v.map(|x| x.into());
1935        self
1936    }
1937
1938    /// Sets the value of [evidence][crate::model::FindingDetails::evidence].
1939    ///
1940    /// # Example
1941    /// ```ignore,no_run
1942    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
1943    /// use google_cloud_cloudsecuritycompliance_v1::model::EvidenceDetails;
1944    /// let x = FindingDetails::new().set_evidence(EvidenceDetails::default()/* use setters */);
1945    /// ```
1946    pub fn set_evidence<T>(mut self, v: T) -> Self
1947    where
1948        T: std::convert::Into<crate::model::EvidenceDetails>,
1949    {
1950        self.evidence = std::option::Option::Some(v.into());
1951        self
1952    }
1953
1954    /// Sets or clears the value of [evidence][crate::model::FindingDetails::evidence].
1955    ///
1956    /// # Example
1957    /// ```ignore,no_run
1958    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
1959    /// use google_cloud_cloudsecuritycompliance_v1::model::EvidenceDetails;
1960    /// let x = FindingDetails::new().set_or_clear_evidence(Some(EvidenceDetails::default()/* use setters */));
1961    /// let x = FindingDetails::new().set_or_clear_evidence(None::<EvidenceDetails>);
1962    /// ```
1963    pub fn set_or_clear_evidence<T>(mut self, v: std::option::Option<T>) -> Self
1964    where
1965        T: std::convert::Into<crate::model::EvidenceDetails>,
1966    {
1967        self.evidence = v.map(|x| x.into());
1968        self
1969    }
1970}
1971
1972impl wkt::message::Message for FindingDetails {
1973    fn typename() -> &'static str {
1974        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FindingDetails"
1975    }
1976}
1977
1978/// The observation details for a finding.
1979#[derive(Clone, Default, PartialEq)]
1980#[non_exhaustive]
1981pub struct ObservationDetails {
1982    /// Output only. The current value.
1983    pub current_value: std::string::String,
1984
1985    /// Optional. The expected value.
1986    pub expected_value: std::string::String,
1987
1988    /// Output only. Any guidance for the observation.
1989    pub guidance: std::string::String,
1990
1991    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1992}
1993
1994impl ObservationDetails {
1995    pub fn new() -> Self {
1996        std::default::Default::default()
1997    }
1998
1999    /// Sets the value of [current_value][crate::model::ObservationDetails::current_value].
2000    ///
2001    /// # Example
2002    /// ```ignore,no_run
2003    /// # use google_cloud_cloudsecuritycompliance_v1::model::ObservationDetails;
2004    /// let x = ObservationDetails::new().set_current_value("example");
2005    /// ```
2006    pub fn set_current_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2007        self.current_value = v.into();
2008        self
2009    }
2010
2011    /// Sets the value of [expected_value][crate::model::ObservationDetails::expected_value].
2012    ///
2013    /// # Example
2014    /// ```ignore,no_run
2015    /// # use google_cloud_cloudsecuritycompliance_v1::model::ObservationDetails;
2016    /// let x = ObservationDetails::new().set_expected_value("example");
2017    /// ```
2018    pub fn set_expected_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2019        self.expected_value = v.into();
2020        self
2021    }
2022
2023    /// Sets the value of [guidance][crate::model::ObservationDetails::guidance].
2024    ///
2025    /// # Example
2026    /// ```ignore,no_run
2027    /// # use google_cloud_cloudsecuritycompliance_v1::model::ObservationDetails;
2028    /// let x = ObservationDetails::new().set_guidance("example");
2029    /// ```
2030    pub fn set_guidance<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2031        self.guidance = v.into();
2032        self
2033    }
2034}
2035
2036impl wkt::message::Message for ObservationDetails {
2037    fn typename() -> &'static str {
2038        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ObservationDetails"
2039    }
2040}
2041
2042/// The evidence details for a finding.
2043#[derive(Clone, Default, PartialEq)]
2044#[non_exhaustive]
2045pub struct EvidenceDetails {
2046    /// Output only. The resource identifier.
2047    pub resource: std::string::String,
2048
2049    /// Output only. The service identifier.
2050    pub service: std::string::String,
2051
2052    /// Output only. The path to the evidence.
2053    pub evidence_path: std::string::String,
2054
2055    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2056}
2057
2058impl EvidenceDetails {
2059    pub fn new() -> Self {
2060        std::default::Default::default()
2061    }
2062
2063    /// Sets the value of [resource][crate::model::EvidenceDetails::resource].
2064    ///
2065    /// # Example
2066    /// ```ignore,no_run
2067    /// # use google_cloud_cloudsecuritycompliance_v1::model::EvidenceDetails;
2068    /// let x = EvidenceDetails::new().set_resource("example");
2069    /// ```
2070    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2071        self.resource = v.into();
2072        self
2073    }
2074
2075    /// Sets the value of [service][crate::model::EvidenceDetails::service].
2076    ///
2077    /// # Example
2078    /// ```ignore,no_run
2079    /// # use google_cloud_cloudsecuritycompliance_v1::model::EvidenceDetails;
2080    /// let x = EvidenceDetails::new().set_service("example");
2081    /// ```
2082    pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2083        self.service = v.into();
2084        self
2085    }
2086
2087    /// Sets the value of [evidence_path][crate::model::EvidenceDetails::evidence_path].
2088    ///
2089    /// # Example
2090    /// ```ignore,no_run
2091    /// # use google_cloud_cloudsecuritycompliance_v1::model::EvidenceDetails;
2092    /// let x = EvidenceDetails::new().set_evidence_path("example");
2093    /// ```
2094    pub fn set_evidence_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2095        self.evidence_path = v.into();
2096        self
2097    }
2098}
2099
2100impl wkt::message::Message for EvidenceDetails {
2101    fn typename() -> &'static str {
2102        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.EvidenceDetails"
2103    }
2104}
2105
2106/// The details for a cloud control audit.
2107#[derive(Clone, Default, PartialEq)]
2108#[non_exhaustive]
2109pub struct CloudControlAuditDetails {
2110    /// Output only. The name of the cloud control.
2111    pub cloud_control: std::string::String,
2112
2113    /// Output only. The ID of the cloud control.
2114    pub cloud_control_id: std::string::String,
2115
2116    /// Output only. The description of the cloud control.
2117    pub cloud_control_description: std::string::String,
2118
2119    /// Output only. The overall status of the findings for the control.
2120    pub compliance_state: crate::model::ComplianceState,
2121
2122    /// Output only. The summary of the report.
2123    pub report_summary: std::option::Option<crate::model::ReportSummary>,
2124
2125    /// Output only. The findings for the control.
2126    pub findings: std::vec::Vec<crate::model::FindingDetails>,
2127
2128    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2129}
2130
2131impl CloudControlAuditDetails {
2132    pub fn new() -> Self {
2133        std::default::Default::default()
2134    }
2135
2136    /// Sets the value of [cloud_control][crate::model::CloudControlAuditDetails::cloud_control].
2137    ///
2138    /// # Example
2139    /// ```ignore,no_run
2140    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2141    /// let x = CloudControlAuditDetails::new().set_cloud_control("example");
2142    /// ```
2143    pub fn set_cloud_control<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2144        self.cloud_control = v.into();
2145        self
2146    }
2147
2148    /// Sets the value of [cloud_control_id][crate::model::CloudControlAuditDetails::cloud_control_id].
2149    ///
2150    /// # Example
2151    /// ```ignore,no_run
2152    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2153    /// let x = CloudControlAuditDetails::new().set_cloud_control_id("example");
2154    /// ```
2155    pub fn set_cloud_control_id<T: std::convert::Into<std::string::String>>(
2156        mut self,
2157        v: T,
2158    ) -> Self {
2159        self.cloud_control_id = v.into();
2160        self
2161    }
2162
2163    /// Sets the value of [cloud_control_description][crate::model::CloudControlAuditDetails::cloud_control_description].
2164    ///
2165    /// # Example
2166    /// ```ignore,no_run
2167    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2168    /// let x = CloudControlAuditDetails::new().set_cloud_control_description("example");
2169    /// ```
2170    pub fn set_cloud_control_description<T: std::convert::Into<std::string::String>>(
2171        mut self,
2172        v: T,
2173    ) -> Self {
2174        self.cloud_control_description = v.into();
2175        self
2176    }
2177
2178    /// Sets the value of [compliance_state][crate::model::CloudControlAuditDetails::compliance_state].
2179    ///
2180    /// # Example
2181    /// ```ignore,no_run
2182    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2183    /// use google_cloud_cloudsecuritycompliance_v1::model::ComplianceState;
2184    /// let x0 = CloudControlAuditDetails::new().set_compliance_state(ComplianceState::Compliant);
2185    /// let x1 = CloudControlAuditDetails::new().set_compliance_state(ComplianceState::Violation);
2186    /// let x2 = CloudControlAuditDetails::new().set_compliance_state(ComplianceState::ManualReviewNeeded);
2187    /// ```
2188    pub fn set_compliance_state<T: std::convert::Into<crate::model::ComplianceState>>(
2189        mut self,
2190        v: T,
2191    ) -> Self {
2192        self.compliance_state = v.into();
2193        self
2194    }
2195
2196    /// Sets the value of [report_summary][crate::model::CloudControlAuditDetails::report_summary].
2197    ///
2198    /// # Example
2199    /// ```ignore,no_run
2200    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2201    /// use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
2202    /// let x = CloudControlAuditDetails::new().set_report_summary(ReportSummary::default()/* use setters */);
2203    /// ```
2204    pub fn set_report_summary<T>(mut self, v: T) -> Self
2205    where
2206        T: std::convert::Into<crate::model::ReportSummary>,
2207    {
2208        self.report_summary = std::option::Option::Some(v.into());
2209        self
2210    }
2211
2212    /// Sets or clears the value of [report_summary][crate::model::CloudControlAuditDetails::report_summary].
2213    ///
2214    /// # Example
2215    /// ```ignore,no_run
2216    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2217    /// use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
2218    /// let x = CloudControlAuditDetails::new().set_or_clear_report_summary(Some(ReportSummary::default()/* use setters */));
2219    /// let x = CloudControlAuditDetails::new().set_or_clear_report_summary(None::<ReportSummary>);
2220    /// ```
2221    pub fn set_or_clear_report_summary<T>(mut self, v: std::option::Option<T>) -> Self
2222    where
2223        T: std::convert::Into<crate::model::ReportSummary>,
2224    {
2225        self.report_summary = v.map(|x| x.into());
2226        self
2227    }
2228
2229    /// Sets the value of [findings][crate::model::CloudControlAuditDetails::findings].
2230    ///
2231    /// # Example
2232    /// ```ignore,no_run
2233    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2234    /// use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
2235    /// let x = CloudControlAuditDetails::new()
2236    ///     .set_findings([
2237    ///         FindingDetails::default()/* use setters */,
2238    ///         FindingDetails::default()/* use (different) setters */,
2239    ///     ]);
2240    /// ```
2241    pub fn set_findings<T, V>(mut self, v: T) -> Self
2242    where
2243        T: std::iter::IntoIterator<Item = V>,
2244        V: std::convert::Into<crate::model::FindingDetails>,
2245    {
2246        use std::iter::Iterator;
2247        self.findings = v.into_iter().map(|i| i.into()).collect();
2248        self
2249    }
2250}
2251
2252impl wkt::message::Message for CloudControlAuditDetails {
2253    fn typename() -> &'static str {
2254        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails"
2255    }
2256}
2257
2258/// The request message for [UpdateCmEnrollment][].
2259#[derive(Clone, Default, PartialEq)]
2260#[non_exhaustive]
2261pub struct UpdateCmEnrollmentRequest {
2262    /// Required. The Compliance Manager enrollment to update.
2263    /// The `name` field is used to identify the settings that you want to update.
2264    pub cm_enrollment: std::option::Option<crate::model::CmEnrollment>,
2265
2266    /// Optional. The list of fields that you want to update.
2267    pub update_mask: std::option::Option<wkt::FieldMask>,
2268
2269    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2270}
2271
2272impl UpdateCmEnrollmentRequest {
2273    pub fn new() -> Self {
2274        std::default::Default::default()
2275    }
2276
2277    /// Sets the value of [cm_enrollment][crate::model::UpdateCmEnrollmentRequest::cm_enrollment].
2278    ///
2279    /// # Example
2280    /// ```ignore,no_run
2281    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCmEnrollmentRequest;
2282    /// use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2283    /// let x = UpdateCmEnrollmentRequest::new().set_cm_enrollment(CmEnrollment::default()/* use setters */);
2284    /// ```
2285    pub fn set_cm_enrollment<T>(mut self, v: T) -> Self
2286    where
2287        T: std::convert::Into<crate::model::CmEnrollment>,
2288    {
2289        self.cm_enrollment = std::option::Option::Some(v.into());
2290        self
2291    }
2292
2293    /// Sets or clears the value of [cm_enrollment][crate::model::UpdateCmEnrollmentRequest::cm_enrollment].
2294    ///
2295    /// # Example
2296    /// ```ignore,no_run
2297    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCmEnrollmentRequest;
2298    /// use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2299    /// let x = UpdateCmEnrollmentRequest::new().set_or_clear_cm_enrollment(Some(CmEnrollment::default()/* use setters */));
2300    /// let x = UpdateCmEnrollmentRequest::new().set_or_clear_cm_enrollment(None::<CmEnrollment>);
2301    /// ```
2302    pub fn set_or_clear_cm_enrollment<T>(mut self, v: std::option::Option<T>) -> Self
2303    where
2304        T: std::convert::Into<crate::model::CmEnrollment>,
2305    {
2306        self.cm_enrollment = v.map(|x| x.into());
2307        self
2308    }
2309
2310    /// Sets the value of [update_mask][crate::model::UpdateCmEnrollmentRequest::update_mask].
2311    ///
2312    /// # Example
2313    /// ```ignore,no_run
2314    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCmEnrollmentRequest;
2315    /// use wkt::FieldMask;
2316    /// let x = UpdateCmEnrollmentRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2317    /// ```
2318    pub fn set_update_mask<T>(mut self, v: T) -> Self
2319    where
2320        T: std::convert::Into<wkt::FieldMask>,
2321    {
2322        self.update_mask = std::option::Option::Some(v.into());
2323        self
2324    }
2325
2326    /// Sets or clears the value of [update_mask][crate::model::UpdateCmEnrollmentRequest::update_mask].
2327    ///
2328    /// # Example
2329    /// ```ignore,no_run
2330    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCmEnrollmentRequest;
2331    /// use wkt::FieldMask;
2332    /// let x = UpdateCmEnrollmentRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2333    /// let x = UpdateCmEnrollmentRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2334    /// ```
2335    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2336    where
2337        T: std::convert::Into<wkt::FieldMask>,
2338    {
2339        self.update_mask = v.map(|x| x.into());
2340        self
2341    }
2342}
2343
2344impl wkt::message::Message for UpdateCmEnrollmentRequest {
2345    fn typename() -> &'static str {
2346        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest"
2347    }
2348}
2349
2350/// The request message for [CalculateEffectiveCmEnrollment][].
2351#[derive(Clone, Default, PartialEq)]
2352#[non_exhaustive]
2353pub struct CalculateEffectiveCmEnrollmentRequest {
2354    /// Required. The name of the Compliance Manager enrollment to calculate.
2355    ///
2356    /// Supported formats are the following:
2357    ///
2358    /// * `organizations/{organization_id}/locations/{location}/cmEnrollment`
2359    /// * `folders/{folder_id}/locations/{location}/cmEnrollment`
2360    /// * `projects/{project_id}/locations/{location}/cmEnrollment`
2361    pub name: std::string::String,
2362
2363    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2364}
2365
2366impl CalculateEffectiveCmEnrollmentRequest {
2367    pub fn new() -> Self {
2368        std::default::Default::default()
2369    }
2370
2371    /// Sets the value of [name][crate::model::CalculateEffectiveCmEnrollmentRequest::name].
2372    ///
2373    /// # Example
2374    /// ```ignore,no_run
2375    /// # use google_cloud_cloudsecuritycompliance_v1::model::CalculateEffectiveCmEnrollmentRequest;
2376    /// let x = CalculateEffectiveCmEnrollmentRequest::new().set_name("example");
2377    /// ```
2378    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2379        self.name = v.into();
2380        self
2381    }
2382}
2383
2384impl wkt::message::Message for CalculateEffectiveCmEnrollmentRequest {
2385    fn typename() -> &'static str {
2386        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest"
2387    }
2388}
2389
2390/// The settings for Compliance Manager at a specific resource scope.=
2391#[derive(Clone, Default, PartialEq)]
2392#[non_exhaustive]
2393pub struct CmEnrollment {
2394    /// Identifier. The name of the Compliance Manager enrollment.
2395    ///
2396    /// Supported formats are the following:
2397    ///
2398    /// * `organizations/{organization_id}/locations/{location}/cmEnrollment`
2399    /// * `folders/{folder_id}/locations/{location}/cmEnrollment`
2400    /// * `projects/{project_id}/locations/{location}/cmEnrollment`
2401    pub name: std::string::String,
2402
2403    /// Optional. Whether the resource is enrolled in Compliance Manager.
2404    /// This setting is inherited by all descendants.
2405    pub enrolled: bool,
2406
2407    /// Optional. The audit configuration for Compliance Manager.
2408    /// If set at a scope, this configuration overrides any inherited audit
2409    /// configuration.
2410    pub audit_config: std::option::Option<crate::model::AuditConfig>,
2411
2412    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2413}
2414
2415impl CmEnrollment {
2416    pub fn new() -> Self {
2417        std::default::Default::default()
2418    }
2419
2420    /// Sets the value of [name][crate::model::CmEnrollment::name].
2421    ///
2422    /// # Example
2423    /// ```ignore,no_run
2424    /// # use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2425    /// let x = CmEnrollment::new().set_name("example");
2426    /// ```
2427    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2428        self.name = v.into();
2429        self
2430    }
2431
2432    /// Sets the value of [enrolled][crate::model::CmEnrollment::enrolled].
2433    ///
2434    /// # Example
2435    /// ```ignore,no_run
2436    /// # use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2437    /// let x = CmEnrollment::new().set_enrolled(true);
2438    /// ```
2439    pub fn set_enrolled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2440        self.enrolled = v.into();
2441        self
2442    }
2443
2444    /// Sets the value of [audit_config][crate::model::CmEnrollment::audit_config].
2445    ///
2446    /// # Example
2447    /// ```ignore,no_run
2448    /// # use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2449    /// use google_cloud_cloudsecuritycompliance_v1::model::AuditConfig;
2450    /// let x = CmEnrollment::new().set_audit_config(AuditConfig::default()/* use setters */);
2451    /// ```
2452    pub fn set_audit_config<T>(mut self, v: T) -> Self
2453    where
2454        T: std::convert::Into<crate::model::AuditConfig>,
2455    {
2456        self.audit_config = std::option::Option::Some(v.into());
2457        self
2458    }
2459
2460    /// Sets or clears the value of [audit_config][crate::model::CmEnrollment::audit_config].
2461    ///
2462    /// # Example
2463    /// ```ignore,no_run
2464    /// # use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2465    /// use google_cloud_cloudsecuritycompliance_v1::model::AuditConfig;
2466    /// let x = CmEnrollment::new().set_or_clear_audit_config(Some(AuditConfig::default()/* use setters */));
2467    /// let x = CmEnrollment::new().set_or_clear_audit_config(None::<AuditConfig>);
2468    /// ```
2469    pub fn set_or_clear_audit_config<T>(mut self, v: std::option::Option<T>) -> Self
2470    where
2471        T: std::convert::Into<crate::model::AuditConfig>,
2472    {
2473        self.audit_config = v.map(|x| x.into());
2474        self
2475    }
2476}
2477
2478impl wkt::message::Message for CmEnrollment {
2479    fn typename() -> &'static str {
2480        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CmEnrollment"
2481    }
2482}
2483
2484/// The response message for [CalculateEffectiveCmEnrollment][].
2485#[derive(Clone, Default, PartialEq)]
2486#[non_exhaustive]
2487pub struct CalculateEffectiveCmEnrollmentResponse {
2488    /// The effective Compliance Manager enrollment for the resource.
2489    pub cm_enrollment: std::option::Option<crate::model::CmEnrollment>,
2490
2491    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2492}
2493
2494impl CalculateEffectiveCmEnrollmentResponse {
2495    pub fn new() -> Self {
2496        std::default::Default::default()
2497    }
2498
2499    /// Sets the value of [cm_enrollment][crate::model::CalculateEffectiveCmEnrollmentResponse::cm_enrollment].
2500    ///
2501    /// # Example
2502    /// ```ignore,no_run
2503    /// # use google_cloud_cloudsecuritycompliance_v1::model::CalculateEffectiveCmEnrollmentResponse;
2504    /// use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2505    /// let x = CalculateEffectiveCmEnrollmentResponse::new().set_cm_enrollment(CmEnrollment::default()/* use setters */);
2506    /// ```
2507    pub fn set_cm_enrollment<T>(mut self, v: T) -> Self
2508    where
2509        T: std::convert::Into<crate::model::CmEnrollment>,
2510    {
2511        self.cm_enrollment = std::option::Option::Some(v.into());
2512        self
2513    }
2514
2515    /// Sets or clears the value of [cm_enrollment][crate::model::CalculateEffectiveCmEnrollmentResponse::cm_enrollment].
2516    ///
2517    /// # Example
2518    /// ```ignore,no_run
2519    /// # use google_cloud_cloudsecuritycompliance_v1::model::CalculateEffectiveCmEnrollmentResponse;
2520    /// use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2521    /// let x = CalculateEffectiveCmEnrollmentResponse::new().set_or_clear_cm_enrollment(Some(CmEnrollment::default()/* use setters */));
2522    /// let x = CalculateEffectiveCmEnrollmentResponse::new().set_or_clear_cm_enrollment(None::<CmEnrollment>);
2523    /// ```
2524    pub fn set_or_clear_cm_enrollment<T>(mut self, v: std::option::Option<T>) -> Self
2525    where
2526        T: std::convert::Into<crate::model::CmEnrollment>,
2527    {
2528        self.cm_enrollment = v.map(|x| x.into());
2529        self
2530    }
2531}
2532
2533impl wkt::message::Message for CalculateEffectiveCmEnrollmentResponse {
2534    fn typename() -> &'static str {
2535        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse"
2536    }
2537}
2538
2539/// The audit configuration for Compliance Manager.
2540#[derive(Clone, Default, PartialEq)]
2541#[non_exhaustive]
2542pub struct AuditConfig {
2543    /// Required. The list of destinations that can be selected for uploading audit
2544    /// reports to.
2545    pub destinations: std::vec::Vec<crate::model::audit_config::CmEligibleDestination>,
2546
2547    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2548}
2549
2550impl AuditConfig {
2551    pub fn new() -> Self {
2552        std::default::Default::default()
2553    }
2554
2555    /// Sets the value of [destinations][crate::model::AuditConfig::destinations].
2556    ///
2557    /// # Example
2558    /// ```ignore,no_run
2559    /// # use google_cloud_cloudsecuritycompliance_v1::model::AuditConfig;
2560    /// use google_cloud_cloudsecuritycompliance_v1::model::audit_config::CmEligibleDestination;
2561    /// let x = AuditConfig::new()
2562    ///     .set_destinations([
2563    ///         CmEligibleDestination::default()/* use setters */,
2564    ///         CmEligibleDestination::default()/* use (different) setters */,
2565    ///     ]);
2566    /// ```
2567    pub fn set_destinations<T, V>(mut self, v: T) -> Self
2568    where
2569        T: std::iter::IntoIterator<Item = V>,
2570        V: std::convert::Into<crate::model::audit_config::CmEligibleDestination>,
2571    {
2572        use std::iter::Iterator;
2573        self.destinations = v.into_iter().map(|i| i.into()).collect();
2574        self
2575    }
2576}
2577
2578impl wkt::message::Message for AuditConfig {
2579    fn typename() -> &'static str {
2580        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AuditConfig"
2581    }
2582}
2583
2584/// Defines additional types related to [AuditConfig].
2585pub mod audit_config {
2586    #[allow(unused_imports)]
2587    use super::*;
2588
2589    /// The destination details where audit reports are
2590    /// uploaded.
2591    #[derive(Clone, Default, PartialEq)]
2592    #[non_exhaustive]
2593    pub struct CmEligibleDestination {
2594        /// Set of options for the report destination location.
2595        pub cm_eligible_destinations: std::option::Option<
2596            crate::model::audit_config::cm_eligible_destination::CmEligibleDestinations,
2597        >,
2598
2599        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2600    }
2601
2602    impl CmEligibleDestination {
2603        pub fn new() -> Self {
2604            std::default::Default::default()
2605        }
2606
2607        /// Sets the value of [cm_eligible_destinations][crate::model::audit_config::CmEligibleDestination::cm_eligible_destinations].
2608        ///
2609        /// Note that all the setters affecting `cm_eligible_destinations` are mutually
2610        /// exclusive.
2611        ///
2612        /// # Example
2613        /// ```ignore,no_run
2614        /// # use google_cloud_cloudsecuritycompliance_v1::model::audit_config::CmEligibleDestination;
2615        /// use google_cloud_cloudsecuritycompliance_v1::model::audit_config::cm_eligible_destination::CmEligibleDestinations;
2616        /// let x = CmEligibleDestination::new().set_cm_eligible_destinations(Some(CmEligibleDestinations::GcsBucket("example".to_string())));
2617        /// ```
2618        pub fn set_cm_eligible_destinations<
2619            T: std::convert::Into<
2620                    std::option::Option<
2621                        crate::model::audit_config::cm_eligible_destination::CmEligibleDestinations,
2622                    >,
2623                >,
2624        >(
2625            mut self,
2626            v: T,
2627        ) -> Self {
2628            self.cm_eligible_destinations = v.into();
2629            self
2630        }
2631
2632        /// The value of [cm_eligible_destinations][crate::model::audit_config::CmEligibleDestination::cm_eligible_destinations]
2633        /// if it holds a `GcsBucket`, `None` if the field is not set or
2634        /// holds a different branch.
2635        pub fn gcs_bucket(&self) -> std::option::Option<&std::string::String> {
2636            #[allow(unreachable_patterns)]
2637            self.cm_eligible_destinations.as_ref().and_then(|v| match v {
2638                crate::model::audit_config::cm_eligible_destination::CmEligibleDestinations::GcsBucket(v) => std::option::Option::Some(v),
2639                _ => std::option::Option::None,
2640            })
2641        }
2642
2643        /// Sets the value of [cm_eligible_destinations][crate::model::audit_config::CmEligibleDestination::cm_eligible_destinations]
2644        /// to hold a `GcsBucket`.
2645        ///
2646        /// Note that all the setters affecting `cm_eligible_destinations` are
2647        /// mutually exclusive.
2648        ///
2649        /// # Example
2650        /// ```ignore,no_run
2651        /// # use google_cloud_cloudsecuritycompliance_v1::model::audit_config::CmEligibleDestination;
2652        /// let x = CmEligibleDestination::new().set_gcs_bucket("example");
2653        /// assert!(x.gcs_bucket().is_some());
2654        /// ```
2655        pub fn set_gcs_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2656            self.cm_eligible_destinations = std::option::Option::Some(
2657                crate::model::audit_config::cm_eligible_destination::CmEligibleDestinations::GcsBucket(
2658                    v.into()
2659                )
2660            );
2661            self
2662        }
2663    }
2664
2665    impl wkt::message::Message for CmEligibleDestination {
2666        fn typename() -> &'static str {
2667            "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination"
2668        }
2669    }
2670
2671    /// Defines additional types related to [CmEligibleDestination].
2672    pub mod cm_eligible_destination {
2673        #[allow(unused_imports)]
2674        use super::*;
2675
2676        /// Set of options for the report destination location.
2677        #[derive(Clone, Debug, PartialEq)]
2678        #[non_exhaustive]
2679        pub enum CmEligibleDestinations {
2680            /// The Cloud Storage bucket where audit reports and evidences can be
2681            /// uploaded. The format is `gs://{bucket_name}`.
2682            GcsBucket(std::string::String),
2683        }
2684    }
2685}
2686
2687/// A framework is a collection of cloud controls and regulatory controls
2688/// that represent security best practices or industry-defined standards such as
2689/// FedRAMP or NIST.
2690#[derive(Clone, Default, PartialEq)]
2691#[non_exhaustive]
2692pub struct Framework {
2693    /// Required. Identifier. The name of the framework, in the format
2694    /// `organizations/{organization}/locations/{location}/frameworks/{framework_id}`.
2695    /// The only supported location is `global`.
2696    pub name: std::string::String,
2697
2698    /// Output only. The major version of the framework, which is incremented in
2699    /// ascending order.
2700    pub major_revision_id: i64,
2701
2702    /// Optional. The friendly name of the framework. The maximum length is 200
2703    /// characters.
2704    pub display_name: std::string::String,
2705
2706    /// Optional. The description of the framework. The maximum length is 2000
2707    /// characters.
2708    pub description: std::string::String,
2709
2710    /// Output only. The type of framework.
2711    pub r#type: crate::model::framework::FrameworkType,
2712
2713    /// Optional. The cloud control details that are directly added without any
2714    /// grouping in the framework.
2715    pub cloud_control_details: std::vec::Vec<crate::model::CloudControlDetails>,
2716
2717    /// Optional. The category of the framework.
2718    pub category: std::vec::Vec<crate::model::FrameworkCategory>,
2719
2720    /// Output only. The cloud providers that are supported by the framework.
2721    pub supported_cloud_providers: std::vec::Vec<crate::model::CloudProvider>,
2722
2723    /// Output only. The target resource types that are supported by the framework.
2724    pub supported_target_resource_types: std::vec::Vec<crate::model::TargetResourceType>,
2725
2726    /// Output only. The supported enforcement modes of the framework.
2727    pub supported_enforcement_modes: std::vec::Vec<crate::model::EnforcementMode>,
2728
2729    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2730}
2731
2732impl Framework {
2733    pub fn new() -> Self {
2734        std::default::Default::default()
2735    }
2736
2737    /// Sets the value of [name][crate::model::Framework::name].
2738    ///
2739    /// # Example
2740    /// ```ignore,no_run
2741    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2742    /// let x = Framework::new().set_name("example");
2743    /// ```
2744    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2745        self.name = v.into();
2746        self
2747    }
2748
2749    /// Sets the value of [major_revision_id][crate::model::Framework::major_revision_id].
2750    ///
2751    /// # Example
2752    /// ```ignore,no_run
2753    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2754    /// let x = Framework::new().set_major_revision_id(42);
2755    /// ```
2756    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2757        self.major_revision_id = v.into();
2758        self
2759    }
2760
2761    /// Sets the value of [display_name][crate::model::Framework::display_name].
2762    ///
2763    /// # Example
2764    /// ```ignore,no_run
2765    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2766    /// let x = Framework::new().set_display_name("example");
2767    /// ```
2768    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2769        self.display_name = v.into();
2770        self
2771    }
2772
2773    /// Sets the value of [description][crate::model::Framework::description].
2774    ///
2775    /// # Example
2776    /// ```ignore,no_run
2777    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2778    /// let x = Framework::new().set_description("example");
2779    /// ```
2780    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2781        self.description = v.into();
2782        self
2783    }
2784
2785    /// Sets the value of [r#type][crate::model::Framework::type].
2786    ///
2787    /// # Example
2788    /// ```ignore,no_run
2789    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2790    /// use google_cloud_cloudsecuritycompliance_v1::model::framework::FrameworkType;
2791    /// let x0 = Framework::new().set_type(FrameworkType::BuiltIn);
2792    /// let x1 = Framework::new().set_type(FrameworkType::Custom);
2793    /// ```
2794    pub fn set_type<T: std::convert::Into<crate::model::framework::FrameworkType>>(
2795        mut self,
2796        v: T,
2797    ) -> Self {
2798        self.r#type = v.into();
2799        self
2800    }
2801
2802    /// Sets the value of [cloud_control_details][crate::model::Framework::cloud_control_details].
2803    ///
2804    /// # Example
2805    /// ```ignore,no_run
2806    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2807    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDetails;
2808    /// let x = Framework::new()
2809    ///     .set_cloud_control_details([
2810    ///         CloudControlDetails::default()/* use setters */,
2811    ///         CloudControlDetails::default()/* use (different) setters */,
2812    ///     ]);
2813    /// ```
2814    pub fn set_cloud_control_details<T, V>(mut self, v: T) -> Self
2815    where
2816        T: std::iter::IntoIterator<Item = V>,
2817        V: std::convert::Into<crate::model::CloudControlDetails>,
2818    {
2819        use std::iter::Iterator;
2820        self.cloud_control_details = v.into_iter().map(|i| i.into()).collect();
2821        self
2822    }
2823
2824    /// Sets the value of [category][crate::model::Framework::category].
2825    ///
2826    /// # Example
2827    /// ```ignore,no_run
2828    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2829    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkCategory;
2830    /// let x = Framework::new().set_category([
2831    ///     FrameworkCategory::IndustryDefinedStandard,
2832    ///     FrameworkCategory::AssuredWorkloads,
2833    ///     FrameworkCategory::DataSecurity,
2834    /// ]);
2835    /// ```
2836    pub fn set_category<T, V>(mut self, v: T) -> Self
2837    where
2838        T: std::iter::IntoIterator<Item = V>,
2839        V: std::convert::Into<crate::model::FrameworkCategory>,
2840    {
2841        use std::iter::Iterator;
2842        self.category = v.into_iter().map(|i| i.into()).collect();
2843        self
2844    }
2845
2846    /// Sets the value of [supported_cloud_providers][crate::model::Framework::supported_cloud_providers].
2847    ///
2848    /// # Example
2849    /// ```ignore,no_run
2850    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2851    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudProvider;
2852    /// let x = Framework::new().set_supported_cloud_providers([
2853    ///     CloudProvider::Aws,
2854    ///     CloudProvider::Azure,
2855    ///     CloudProvider::Gcp,
2856    /// ]);
2857    /// ```
2858    pub fn set_supported_cloud_providers<T, V>(mut self, v: T) -> Self
2859    where
2860        T: std::iter::IntoIterator<Item = V>,
2861        V: std::convert::Into<crate::model::CloudProvider>,
2862    {
2863        use std::iter::Iterator;
2864        self.supported_cloud_providers = v.into_iter().map(|i| i.into()).collect();
2865        self
2866    }
2867
2868    /// Sets the value of [supported_target_resource_types][crate::model::Framework::supported_target_resource_types].
2869    ///
2870    /// # Example
2871    /// ```ignore,no_run
2872    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2873    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceType;
2874    /// let x = Framework::new().set_supported_target_resource_types([
2875    ///     TargetResourceType::TargetResourceCrmTypeOrg,
2876    ///     TargetResourceType::TargetResourceCrmTypeFolder,
2877    ///     TargetResourceType::TargetResourceCrmTypeProject,
2878    /// ]);
2879    /// ```
2880    pub fn set_supported_target_resource_types<T, V>(mut self, v: T) -> Self
2881    where
2882        T: std::iter::IntoIterator<Item = V>,
2883        V: std::convert::Into<crate::model::TargetResourceType>,
2884    {
2885        use std::iter::Iterator;
2886        self.supported_target_resource_types = v.into_iter().map(|i| i.into()).collect();
2887        self
2888    }
2889
2890    /// Sets the value of [supported_enforcement_modes][crate::model::Framework::supported_enforcement_modes].
2891    ///
2892    /// # Example
2893    /// ```ignore,no_run
2894    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2895    /// use google_cloud_cloudsecuritycompliance_v1::model::EnforcementMode;
2896    /// let x = Framework::new().set_supported_enforcement_modes([
2897    ///     EnforcementMode::Preventive,
2898    ///     EnforcementMode::Detective,
2899    ///     EnforcementMode::Audit,
2900    /// ]);
2901    /// ```
2902    pub fn set_supported_enforcement_modes<T, V>(mut self, v: T) -> Self
2903    where
2904        T: std::iter::IntoIterator<Item = V>,
2905        V: std::convert::Into<crate::model::EnforcementMode>,
2906    {
2907        use std::iter::Iterator;
2908        self.supported_enforcement_modes = v.into_iter().map(|i| i.into()).collect();
2909        self
2910    }
2911}
2912
2913impl wkt::message::Message for Framework {
2914    fn typename() -> &'static str {
2915        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.Framework"
2916    }
2917}
2918
2919/// Defines additional types related to [Framework].
2920pub mod framework {
2921    #[allow(unused_imports)]
2922    use super::*;
2923
2924    /// The type of framework.
2925    ///
2926    /// # Working with unknown values
2927    ///
2928    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2929    /// additional enum variants at any time. Adding new variants is not considered
2930    /// a breaking change. Applications should write their code in anticipation of:
2931    ///
2932    /// - New values appearing in future releases of the client library, **and**
2933    /// - New values received dynamically, without application changes.
2934    ///
2935    /// Please consult the [Working with enums] section in the user guide for some
2936    /// guidelines.
2937    ///
2938    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
2939    #[derive(Clone, Debug, PartialEq)]
2940    #[non_exhaustive]
2941    pub enum FrameworkType {
2942        /// Default value. This value is unused.
2943        Unspecified,
2944        /// A framework that's provided and managed by Google.
2945        BuiltIn,
2946        /// A framework that's created and managed by you.
2947        Custom,
2948        /// If set, the enum was initialized with an unknown value.
2949        ///
2950        /// Applications can examine the value using [FrameworkType::value] or
2951        /// [FrameworkType::name].
2952        UnknownValue(framework_type::UnknownValue),
2953    }
2954
2955    #[doc(hidden)]
2956    pub mod framework_type {
2957        #[allow(unused_imports)]
2958        use super::*;
2959        #[derive(Clone, Debug, PartialEq)]
2960        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2961    }
2962
2963    impl FrameworkType {
2964        /// Gets the enum value.
2965        ///
2966        /// Returns `None` if the enum contains an unknown value deserialized from
2967        /// the string representation of enums.
2968        pub fn value(&self) -> std::option::Option<i32> {
2969            match self {
2970                Self::Unspecified => std::option::Option::Some(0),
2971                Self::BuiltIn => std::option::Option::Some(1),
2972                Self::Custom => std::option::Option::Some(2),
2973                Self::UnknownValue(u) => u.0.value(),
2974            }
2975        }
2976
2977        /// Gets the enum value as a string.
2978        ///
2979        /// Returns `None` if the enum contains an unknown value deserialized from
2980        /// the integer representation of enums.
2981        pub fn name(&self) -> std::option::Option<&str> {
2982            match self {
2983                Self::Unspecified => std::option::Option::Some("FRAMEWORK_TYPE_UNSPECIFIED"),
2984                Self::BuiltIn => std::option::Option::Some("BUILT_IN"),
2985                Self::Custom => std::option::Option::Some("CUSTOM"),
2986                Self::UnknownValue(u) => u.0.name(),
2987            }
2988        }
2989    }
2990
2991    impl std::default::Default for FrameworkType {
2992        fn default() -> Self {
2993            use std::convert::From;
2994            Self::from(0)
2995        }
2996    }
2997
2998    impl std::fmt::Display for FrameworkType {
2999        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3000            wkt::internal::display_enum(f, self.name(), self.value())
3001        }
3002    }
3003
3004    impl std::convert::From<i32> for FrameworkType {
3005        fn from(value: i32) -> Self {
3006            match value {
3007                0 => Self::Unspecified,
3008                1 => Self::BuiltIn,
3009                2 => Self::Custom,
3010                _ => Self::UnknownValue(framework_type::UnknownValue(
3011                    wkt::internal::UnknownEnumValue::Integer(value),
3012                )),
3013            }
3014        }
3015    }
3016
3017    impl std::convert::From<&str> for FrameworkType {
3018        fn from(value: &str) -> Self {
3019            use std::string::ToString;
3020            match value {
3021                "FRAMEWORK_TYPE_UNSPECIFIED" => Self::Unspecified,
3022                "BUILT_IN" => Self::BuiltIn,
3023                "CUSTOM" => Self::Custom,
3024                _ => Self::UnknownValue(framework_type::UnknownValue(
3025                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3026                )),
3027            }
3028        }
3029    }
3030
3031    impl serde::ser::Serialize for FrameworkType {
3032        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3033        where
3034            S: serde::Serializer,
3035        {
3036            match self {
3037                Self::Unspecified => serializer.serialize_i32(0),
3038                Self::BuiltIn => serializer.serialize_i32(1),
3039                Self::Custom => serializer.serialize_i32(2),
3040                Self::UnknownValue(u) => u.0.serialize(serializer),
3041            }
3042        }
3043    }
3044
3045    impl<'de> serde::de::Deserialize<'de> for FrameworkType {
3046        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3047        where
3048            D: serde::Deserializer<'de>,
3049        {
3050            deserializer.deserialize_any(wkt::internal::EnumVisitor::<FrameworkType>::new(
3051                ".google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType",
3052            ))
3053        }
3054    }
3055}
3056
3057/// The details of a cloud control.
3058#[derive(Clone, Default, PartialEq)]
3059#[non_exhaustive]
3060pub struct CloudControlDetails {
3061    /// Required. The name of the cloud control, in the format
3062    /// `organizations/{organization}/locations/{location}/cloudControls/{cloud-control}`.
3063    /// The only supported location is `global`.
3064    pub name: std::string::String,
3065
3066    /// Required. The major version of the cloud control.
3067    pub major_revision_id: i64,
3068
3069    /// Optional. Parameters are key-value pairs that let you provide your custom
3070    /// location requirements, environment requirements, or other settings that are
3071    /// relevant to the cloud control. An example parameter is
3072    /// `{"name": "location","value": "us-west-1"}`.
3073    pub parameters: std::vec::Vec<crate::model::Parameter>,
3074
3075    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3076}
3077
3078impl CloudControlDetails {
3079    pub fn new() -> Self {
3080        std::default::Default::default()
3081    }
3082
3083    /// Sets the value of [name][crate::model::CloudControlDetails::name].
3084    ///
3085    /// # Example
3086    /// ```ignore,no_run
3087    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDetails;
3088    /// let x = CloudControlDetails::new().set_name("example");
3089    /// ```
3090    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3091        self.name = v.into();
3092        self
3093    }
3094
3095    /// Sets the value of [major_revision_id][crate::model::CloudControlDetails::major_revision_id].
3096    ///
3097    /// # Example
3098    /// ```ignore,no_run
3099    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDetails;
3100    /// let x = CloudControlDetails::new().set_major_revision_id(42);
3101    /// ```
3102    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3103        self.major_revision_id = v.into();
3104        self
3105    }
3106
3107    /// Sets the value of [parameters][crate::model::CloudControlDetails::parameters].
3108    ///
3109    /// # Example
3110    /// ```ignore,no_run
3111    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDetails;
3112    /// use google_cloud_cloudsecuritycompliance_v1::model::Parameter;
3113    /// let x = CloudControlDetails::new()
3114    ///     .set_parameters([
3115    ///         Parameter::default()/* use setters */,
3116    ///         Parameter::default()/* use (different) setters */,
3117    ///     ]);
3118    /// ```
3119    pub fn set_parameters<T, V>(mut self, v: T) -> Self
3120    where
3121        T: std::iter::IntoIterator<Item = V>,
3122        V: std::convert::Into<crate::model::Parameter>,
3123    {
3124        use std::iter::Iterator;
3125        self.parameters = v.into_iter().map(|i| i.into()).collect();
3126        self
3127    }
3128}
3129
3130impl wkt::message::Message for CloudControlDetails {
3131    fn typename() -> &'static str {
3132        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlDetails"
3133    }
3134}
3135
3136/// The reference of a framework, in the format
3137/// `organizations/{organization}/locations/{location}/frameworks/{framework}`.
3138/// The only supported location is `global`.
3139#[derive(Clone, Default, PartialEq)]
3140#[non_exhaustive]
3141pub struct FrameworkReference {
3142    /// Required. The major version of the framework. If not specified, the version
3143    /// corresponds to the latest version of the framework.
3144    pub framework: std::string::String,
3145
3146    /// Optional. The major version of the framework. If not specified, the version
3147    /// corresponds to the latest version of the framework.
3148    pub major_revision_id: std::option::Option<i64>,
3149
3150    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3151}
3152
3153impl FrameworkReference {
3154    pub fn new() -> Self {
3155        std::default::Default::default()
3156    }
3157
3158    /// Sets the value of [framework][crate::model::FrameworkReference::framework].
3159    ///
3160    /// # Example
3161    /// ```ignore,no_run
3162    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
3163    /// let x = FrameworkReference::new().set_framework("example");
3164    /// ```
3165    pub fn set_framework<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3166        self.framework = v.into();
3167        self
3168    }
3169
3170    /// Sets the value of [major_revision_id][crate::model::FrameworkReference::major_revision_id].
3171    ///
3172    /// # Example
3173    /// ```ignore,no_run
3174    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
3175    /// let x = FrameworkReference::new().set_major_revision_id(42);
3176    /// ```
3177    pub fn set_major_revision_id<T>(mut self, v: T) -> Self
3178    where
3179        T: std::convert::Into<i64>,
3180    {
3181        self.major_revision_id = std::option::Option::Some(v.into());
3182        self
3183    }
3184
3185    /// Sets or clears the value of [major_revision_id][crate::model::FrameworkReference::major_revision_id].
3186    ///
3187    /// # Example
3188    /// ```ignore,no_run
3189    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
3190    /// let x = FrameworkReference::new().set_or_clear_major_revision_id(Some(42));
3191    /// let x = FrameworkReference::new().set_or_clear_major_revision_id(None::<i32>);
3192    /// ```
3193    pub fn set_or_clear_major_revision_id<T>(mut self, v: std::option::Option<T>) -> Self
3194    where
3195        T: std::convert::Into<i64>,
3196    {
3197        self.major_revision_id = v.map(|x| x.into());
3198        self
3199    }
3200}
3201
3202impl wkt::message::Message for FrameworkReference {
3203    fn typename() -> &'static str {
3204        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkReference"
3205    }
3206}
3207
3208/// Parameters are key-value pairs that let you provide your custom location
3209/// requirements, environment requirements, or other settings that are
3210/// relevant to the cloud control.
3211#[derive(Clone, Default, PartialEq)]
3212#[non_exhaustive]
3213pub struct Parameter {
3214    /// Required. The name or key of the parameter.
3215    pub name: std::string::String,
3216
3217    /// Required. The value of the parameter.
3218    pub parameter_value: std::option::Option<std::boxed::Box<crate::model::ParamValue>>,
3219
3220    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3221}
3222
3223impl Parameter {
3224    pub fn new() -> Self {
3225        std::default::Default::default()
3226    }
3227
3228    /// Sets the value of [name][crate::model::Parameter::name].
3229    ///
3230    /// # Example
3231    /// ```ignore,no_run
3232    /// # use google_cloud_cloudsecuritycompliance_v1::model::Parameter;
3233    /// let x = Parameter::new().set_name("example");
3234    /// ```
3235    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3236        self.name = v.into();
3237        self
3238    }
3239
3240    /// Sets the value of [parameter_value][crate::model::Parameter::parameter_value].
3241    ///
3242    /// # Example
3243    /// ```ignore,no_run
3244    /// # use google_cloud_cloudsecuritycompliance_v1::model::Parameter;
3245    /// use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
3246    /// let x = Parameter::new().set_parameter_value(ParamValue::default()/* use setters */);
3247    /// ```
3248    pub fn set_parameter_value<T>(mut self, v: T) -> Self
3249    where
3250        T: std::convert::Into<crate::model::ParamValue>,
3251    {
3252        self.parameter_value = std::option::Option::Some(std::boxed::Box::new(v.into()));
3253        self
3254    }
3255
3256    /// Sets or clears the value of [parameter_value][crate::model::Parameter::parameter_value].
3257    ///
3258    /// # Example
3259    /// ```ignore,no_run
3260    /// # use google_cloud_cloudsecuritycompliance_v1::model::Parameter;
3261    /// use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
3262    /// let x = Parameter::new().set_or_clear_parameter_value(Some(ParamValue::default()/* use setters */));
3263    /// let x = Parameter::new().set_or_clear_parameter_value(None::<ParamValue>);
3264    /// ```
3265    pub fn set_or_clear_parameter_value<T>(mut self, v: std::option::Option<T>) -> Self
3266    where
3267        T: std::convert::Into<crate::model::ParamValue>,
3268    {
3269        self.parameter_value = v.map(|x| std::boxed::Box::new(x.into()));
3270        self
3271    }
3272}
3273
3274impl wkt::message::Message for Parameter {
3275    fn typename() -> &'static str {
3276        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.Parameter"
3277    }
3278}
3279
3280/// A cloud control is a set of rules and associated metadata that you can
3281/// use to define your organization's security or compliance intent.
3282#[derive(Clone, Default, PartialEq)]
3283#[non_exhaustive]
3284pub struct CloudControl {
3285    /// Required. Identifier. The name of the cloud control, in the format
3286    /// `organizations/{organization}/locations/{location}/cloudControls/{cloud_control_id}`.
3287    /// The only supported location is `global`.
3288    pub name: std::string::String,
3289
3290    /// Output only. The major version of the cloud control, which is incremented
3291    /// in ascending order.
3292    pub major_revision_id: i64,
3293
3294    /// Optional. A description of the cloud control. The maximum length is 2000
3295    /// characters.
3296    pub description: std::string::String,
3297
3298    /// Optional. The friendly name of the cloud control. The maximum length is 200
3299    /// characters.
3300    pub display_name: std::string::String,
3301
3302    /// Output only. The supported enforcement modes for the cloud control.
3303    pub supported_enforcement_modes: std::vec::Vec<crate::model::EnforcementMode>,
3304
3305    /// Optional. The parameter specifications for the cloud control.
3306    pub parameter_spec: std::vec::Vec<crate::model::ParameterSpec>,
3307
3308    /// Optional. The rules that you can enforce to meet your security or
3309    /// compliance intent.
3310    pub rules: std::vec::Vec<crate::model::Rule>,
3311
3312    /// Optional. The severity of the findings that are generated by the cloud
3313    /// control.
3314    pub severity: crate::model::Severity,
3315
3316    /// Optional. The finding category for the cloud control findings. The maximum
3317    /// length is 255 characters.
3318    pub finding_category: std::string::String,
3319
3320    /// Optional. The supported cloud providers.
3321    pub supported_cloud_providers: std::vec::Vec<crate::model::CloudProvider>,
3322
3323    /// Output only. The frameworks that include this cloud control.
3324    pub related_frameworks: std::vec::Vec<std::string::String>,
3325
3326    /// Optional. The remediation steps for the cloud control findings. The
3327    /// maximum length is 400 characters.
3328    pub remediation_steps: std::string::String,
3329
3330    /// Optional. The categories for the cloud control.
3331    pub categories: std::vec::Vec<crate::model::CloudControlCategory>,
3332
3333    /// Output only. The time that the cloud control was last updated.
3334    /// `create_time` is used because a new cloud control is created
3335    /// whenever an existing cloud control is updated.
3336    pub create_time: std::option::Option<wkt::Timestamp>,
3337
3338    /// Optional. The target resource types that are supported by the cloud
3339    /// control.
3340    pub supported_target_resource_types: std::vec::Vec<crate::model::TargetResourceType>,
3341
3342    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3343}
3344
3345impl CloudControl {
3346    pub fn new() -> Self {
3347        std::default::Default::default()
3348    }
3349
3350    /// Sets the value of [name][crate::model::CloudControl::name].
3351    ///
3352    /// # Example
3353    /// ```ignore,no_run
3354    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3355    /// let x = CloudControl::new().set_name("example");
3356    /// ```
3357    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3358        self.name = v.into();
3359        self
3360    }
3361
3362    /// Sets the value of [major_revision_id][crate::model::CloudControl::major_revision_id].
3363    ///
3364    /// # Example
3365    /// ```ignore,no_run
3366    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3367    /// let x = CloudControl::new().set_major_revision_id(42);
3368    /// ```
3369    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3370        self.major_revision_id = v.into();
3371        self
3372    }
3373
3374    /// Sets the value of [description][crate::model::CloudControl::description].
3375    ///
3376    /// # Example
3377    /// ```ignore,no_run
3378    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3379    /// let x = CloudControl::new().set_description("example");
3380    /// ```
3381    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3382        self.description = v.into();
3383        self
3384    }
3385
3386    /// Sets the value of [display_name][crate::model::CloudControl::display_name].
3387    ///
3388    /// # Example
3389    /// ```ignore,no_run
3390    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3391    /// let x = CloudControl::new().set_display_name("example");
3392    /// ```
3393    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3394        self.display_name = v.into();
3395        self
3396    }
3397
3398    /// Sets the value of [supported_enforcement_modes][crate::model::CloudControl::supported_enforcement_modes].
3399    ///
3400    /// # Example
3401    /// ```ignore,no_run
3402    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3403    /// use google_cloud_cloudsecuritycompliance_v1::model::EnforcementMode;
3404    /// let x = CloudControl::new().set_supported_enforcement_modes([
3405    ///     EnforcementMode::Preventive,
3406    ///     EnforcementMode::Detective,
3407    ///     EnforcementMode::Audit,
3408    /// ]);
3409    /// ```
3410    pub fn set_supported_enforcement_modes<T, V>(mut self, v: T) -> Self
3411    where
3412        T: std::iter::IntoIterator<Item = V>,
3413        V: std::convert::Into<crate::model::EnforcementMode>,
3414    {
3415        use std::iter::Iterator;
3416        self.supported_enforcement_modes = v.into_iter().map(|i| i.into()).collect();
3417        self
3418    }
3419
3420    /// Sets the value of [parameter_spec][crate::model::CloudControl::parameter_spec].
3421    ///
3422    /// # Example
3423    /// ```ignore,no_run
3424    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3425    /// use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3426    /// let x = CloudControl::new()
3427    ///     .set_parameter_spec([
3428    ///         ParameterSpec::default()/* use setters */,
3429    ///         ParameterSpec::default()/* use (different) setters */,
3430    ///     ]);
3431    /// ```
3432    pub fn set_parameter_spec<T, V>(mut self, v: T) -> Self
3433    where
3434        T: std::iter::IntoIterator<Item = V>,
3435        V: std::convert::Into<crate::model::ParameterSpec>,
3436    {
3437        use std::iter::Iterator;
3438        self.parameter_spec = v.into_iter().map(|i| i.into()).collect();
3439        self
3440    }
3441
3442    /// Sets the value of [rules][crate::model::CloudControl::rules].
3443    ///
3444    /// # Example
3445    /// ```ignore,no_run
3446    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3447    /// use google_cloud_cloudsecuritycompliance_v1::model::Rule;
3448    /// let x = CloudControl::new()
3449    ///     .set_rules([
3450    ///         Rule::default()/* use setters */,
3451    ///         Rule::default()/* use (different) setters */,
3452    ///     ]);
3453    /// ```
3454    pub fn set_rules<T, V>(mut self, v: T) -> Self
3455    where
3456        T: std::iter::IntoIterator<Item = V>,
3457        V: std::convert::Into<crate::model::Rule>,
3458    {
3459        use std::iter::Iterator;
3460        self.rules = v.into_iter().map(|i| i.into()).collect();
3461        self
3462    }
3463
3464    /// Sets the value of [severity][crate::model::CloudControl::severity].
3465    ///
3466    /// # Example
3467    /// ```ignore,no_run
3468    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3469    /// use google_cloud_cloudsecuritycompliance_v1::model::Severity;
3470    /// let x0 = CloudControl::new().set_severity(Severity::Critical);
3471    /// let x1 = CloudControl::new().set_severity(Severity::High);
3472    /// let x2 = CloudControl::new().set_severity(Severity::Medium);
3473    /// ```
3474    pub fn set_severity<T: std::convert::Into<crate::model::Severity>>(mut self, v: T) -> Self {
3475        self.severity = v.into();
3476        self
3477    }
3478
3479    /// Sets the value of [finding_category][crate::model::CloudControl::finding_category].
3480    ///
3481    /// # Example
3482    /// ```ignore,no_run
3483    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3484    /// let x = CloudControl::new().set_finding_category("example");
3485    /// ```
3486    pub fn set_finding_category<T: std::convert::Into<std::string::String>>(
3487        mut self,
3488        v: T,
3489    ) -> Self {
3490        self.finding_category = v.into();
3491        self
3492    }
3493
3494    /// Sets the value of [supported_cloud_providers][crate::model::CloudControl::supported_cloud_providers].
3495    ///
3496    /// # Example
3497    /// ```ignore,no_run
3498    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3499    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudProvider;
3500    /// let x = CloudControl::new().set_supported_cloud_providers([
3501    ///     CloudProvider::Aws,
3502    ///     CloudProvider::Azure,
3503    ///     CloudProvider::Gcp,
3504    /// ]);
3505    /// ```
3506    pub fn set_supported_cloud_providers<T, V>(mut self, v: T) -> Self
3507    where
3508        T: std::iter::IntoIterator<Item = V>,
3509        V: std::convert::Into<crate::model::CloudProvider>,
3510    {
3511        use std::iter::Iterator;
3512        self.supported_cloud_providers = v.into_iter().map(|i| i.into()).collect();
3513        self
3514    }
3515
3516    /// Sets the value of [related_frameworks][crate::model::CloudControl::related_frameworks].
3517    ///
3518    /// # Example
3519    /// ```ignore,no_run
3520    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3521    /// let x = CloudControl::new().set_related_frameworks(["a", "b", "c"]);
3522    /// ```
3523    pub fn set_related_frameworks<T, V>(mut self, v: T) -> Self
3524    where
3525        T: std::iter::IntoIterator<Item = V>,
3526        V: std::convert::Into<std::string::String>,
3527    {
3528        use std::iter::Iterator;
3529        self.related_frameworks = v.into_iter().map(|i| i.into()).collect();
3530        self
3531    }
3532
3533    /// Sets the value of [remediation_steps][crate::model::CloudControl::remediation_steps].
3534    ///
3535    /// # Example
3536    /// ```ignore,no_run
3537    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3538    /// let x = CloudControl::new().set_remediation_steps("example");
3539    /// ```
3540    pub fn set_remediation_steps<T: std::convert::Into<std::string::String>>(
3541        mut self,
3542        v: T,
3543    ) -> Self {
3544        self.remediation_steps = v.into();
3545        self
3546    }
3547
3548    /// Sets the value of [categories][crate::model::CloudControl::categories].
3549    ///
3550    /// # Example
3551    /// ```ignore,no_run
3552    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3553    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlCategory;
3554    /// let x = CloudControl::new().set_categories([
3555    ///     CloudControlCategory::CcCategoryInfrastructure,
3556    ///     CloudControlCategory::CcCategoryArtificialIntelligence,
3557    ///     CloudControlCategory::CcCategoryPhysicalSecurity,
3558    /// ]);
3559    /// ```
3560    pub fn set_categories<T, V>(mut self, v: T) -> Self
3561    where
3562        T: std::iter::IntoIterator<Item = V>,
3563        V: std::convert::Into<crate::model::CloudControlCategory>,
3564    {
3565        use std::iter::Iterator;
3566        self.categories = v.into_iter().map(|i| i.into()).collect();
3567        self
3568    }
3569
3570    /// Sets the value of [create_time][crate::model::CloudControl::create_time].
3571    ///
3572    /// # Example
3573    /// ```ignore,no_run
3574    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3575    /// use wkt::Timestamp;
3576    /// let x = CloudControl::new().set_create_time(Timestamp::default()/* use setters */);
3577    /// ```
3578    pub fn set_create_time<T>(mut self, v: T) -> Self
3579    where
3580        T: std::convert::Into<wkt::Timestamp>,
3581    {
3582        self.create_time = std::option::Option::Some(v.into());
3583        self
3584    }
3585
3586    /// Sets or clears the value of [create_time][crate::model::CloudControl::create_time].
3587    ///
3588    /// # Example
3589    /// ```ignore,no_run
3590    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3591    /// use wkt::Timestamp;
3592    /// let x = CloudControl::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
3593    /// let x = CloudControl::new().set_or_clear_create_time(None::<Timestamp>);
3594    /// ```
3595    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3596    where
3597        T: std::convert::Into<wkt::Timestamp>,
3598    {
3599        self.create_time = v.map(|x| x.into());
3600        self
3601    }
3602
3603    /// Sets the value of [supported_target_resource_types][crate::model::CloudControl::supported_target_resource_types].
3604    ///
3605    /// # Example
3606    /// ```ignore,no_run
3607    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3608    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceType;
3609    /// let x = CloudControl::new().set_supported_target_resource_types([
3610    ///     TargetResourceType::TargetResourceCrmTypeOrg,
3611    ///     TargetResourceType::TargetResourceCrmTypeFolder,
3612    ///     TargetResourceType::TargetResourceCrmTypeProject,
3613    /// ]);
3614    /// ```
3615    pub fn set_supported_target_resource_types<T, V>(mut self, v: T) -> Self
3616    where
3617        T: std::iter::IntoIterator<Item = V>,
3618        V: std::convert::Into<crate::model::TargetResourceType>,
3619    {
3620        use std::iter::Iterator;
3621        self.supported_target_resource_types = v.into_iter().map(|i| i.into()).collect();
3622        self
3623    }
3624}
3625
3626impl wkt::message::Message for CloudControl {
3627    fn typename() -> &'static str {
3628        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControl"
3629    }
3630}
3631
3632/// Defines additional types related to [CloudControl].
3633pub mod cloud_control {
3634    #[allow(unused_imports)]
3635    use super::*;
3636
3637    /// The type of cloud control.
3638    ///
3639    /// # Working with unknown values
3640    ///
3641    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3642    /// additional enum variants at any time. Adding new variants is not considered
3643    /// a breaking change. Applications should write their code in anticipation of:
3644    ///
3645    /// - New values appearing in future releases of the client library, **and**
3646    /// - New values received dynamically, without application changes.
3647    ///
3648    /// Please consult the [Working with enums] section in the user guide for some
3649    /// guidelines.
3650    ///
3651    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
3652    #[derive(Clone, Debug, PartialEq)]
3653    #[non_exhaustive]
3654    pub enum Type {
3655        /// Default value. This value is unused.
3656        Unspecified,
3657        /// A cloud control that's created and managed by you.
3658        Custom,
3659        /// A cloud control that's provided and managed by Google.
3660        BuiltIn,
3661        /// If set, the enum was initialized with an unknown value.
3662        ///
3663        /// Applications can examine the value using [Type::value] or
3664        /// [Type::name].
3665        UnknownValue(r#type::UnknownValue),
3666    }
3667
3668    #[doc(hidden)]
3669    pub mod r#type {
3670        #[allow(unused_imports)]
3671        use super::*;
3672        #[derive(Clone, Debug, PartialEq)]
3673        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3674    }
3675
3676    impl Type {
3677        /// Gets the enum value.
3678        ///
3679        /// Returns `None` if the enum contains an unknown value deserialized from
3680        /// the string representation of enums.
3681        pub fn value(&self) -> std::option::Option<i32> {
3682            match self {
3683                Self::Unspecified => std::option::Option::Some(0),
3684                Self::Custom => std::option::Option::Some(1),
3685                Self::BuiltIn => std::option::Option::Some(2),
3686                Self::UnknownValue(u) => u.0.value(),
3687            }
3688        }
3689
3690        /// Gets the enum value as a string.
3691        ///
3692        /// Returns `None` if the enum contains an unknown value deserialized from
3693        /// the integer representation of enums.
3694        pub fn name(&self) -> std::option::Option<&str> {
3695            match self {
3696                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
3697                Self::Custom => std::option::Option::Some("CUSTOM"),
3698                Self::BuiltIn => std::option::Option::Some("BUILT_IN"),
3699                Self::UnknownValue(u) => u.0.name(),
3700            }
3701        }
3702    }
3703
3704    impl std::default::Default for Type {
3705        fn default() -> Self {
3706            use std::convert::From;
3707            Self::from(0)
3708        }
3709    }
3710
3711    impl std::fmt::Display for Type {
3712        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3713            wkt::internal::display_enum(f, self.name(), self.value())
3714        }
3715    }
3716
3717    impl std::convert::From<i32> for Type {
3718        fn from(value: i32) -> Self {
3719            match value {
3720                0 => Self::Unspecified,
3721                1 => Self::Custom,
3722                2 => Self::BuiltIn,
3723                _ => Self::UnknownValue(r#type::UnknownValue(
3724                    wkt::internal::UnknownEnumValue::Integer(value),
3725                )),
3726            }
3727        }
3728    }
3729
3730    impl std::convert::From<&str> for Type {
3731        fn from(value: &str) -> Self {
3732            use std::string::ToString;
3733            match value {
3734                "TYPE_UNSPECIFIED" => Self::Unspecified,
3735                "CUSTOM" => Self::Custom,
3736                "BUILT_IN" => Self::BuiltIn,
3737                _ => Self::UnknownValue(r#type::UnknownValue(
3738                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3739                )),
3740            }
3741        }
3742    }
3743
3744    impl serde::ser::Serialize for Type {
3745        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3746        where
3747            S: serde::Serializer,
3748        {
3749            match self {
3750                Self::Unspecified => serializer.serialize_i32(0),
3751                Self::Custom => serializer.serialize_i32(1),
3752                Self::BuiltIn => serializer.serialize_i32(2),
3753                Self::UnknownValue(u) => u.0.serialize(serializer),
3754            }
3755        }
3756    }
3757
3758    impl<'de> serde::de::Deserialize<'de> for Type {
3759        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3760        where
3761            D: serde::Deserializer<'de>,
3762        {
3763            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
3764                ".google.cloud.cloudsecuritycompliance.v1.CloudControl.Type",
3765            ))
3766        }
3767    }
3768}
3769
3770/// The parameter specification for the cloud control.
3771#[derive(Clone, Default, PartialEq)]
3772#[non_exhaustive]
3773pub struct ParameterSpec {
3774    /// Required. The name of the parameter.
3775    pub name: std::string::String,
3776
3777    /// Optional. The friendly name of the parameter. The maximum length is 200
3778    /// characters.
3779    pub display_name: std::string::String,
3780
3781    /// Optional. The description of the parameter. The maximum length is 2000
3782    /// characters.
3783    pub description: std::string::String,
3784
3785    /// Required. Whether the parameter is required.
3786    pub is_required: bool,
3787
3788    /// Required. The parameter value type.
3789    pub value_type: crate::model::parameter_spec::ValueType,
3790
3791    /// Optional. The default value of the parameter.
3792    pub default_value: std::option::Option<crate::model::ParamValue>,
3793
3794    /// Optional. The list of parameter substitutions.
3795    pub substitution_rules: std::vec::Vec<crate::model::ParameterSubstitutionRule>,
3796
3797    /// Optional. The parameter specification for `oneOf` attributes.
3798    pub sub_parameters: std::vec::Vec<crate::model::ParameterSpec>,
3799
3800    /// Optional. The permitted set of values for the parameter.
3801    pub validation: std::option::Option<crate::model::Validation>,
3802
3803    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3804}
3805
3806impl ParameterSpec {
3807    pub fn new() -> Self {
3808        std::default::Default::default()
3809    }
3810
3811    /// Sets the value of [name][crate::model::ParameterSpec::name].
3812    ///
3813    /// # Example
3814    /// ```ignore,no_run
3815    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3816    /// let x = ParameterSpec::new().set_name("example");
3817    /// ```
3818    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3819        self.name = v.into();
3820        self
3821    }
3822
3823    /// Sets the value of [display_name][crate::model::ParameterSpec::display_name].
3824    ///
3825    /// # Example
3826    /// ```ignore,no_run
3827    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3828    /// let x = ParameterSpec::new().set_display_name("example");
3829    /// ```
3830    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3831        self.display_name = v.into();
3832        self
3833    }
3834
3835    /// Sets the value of [description][crate::model::ParameterSpec::description].
3836    ///
3837    /// # Example
3838    /// ```ignore,no_run
3839    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3840    /// let x = ParameterSpec::new().set_description("example");
3841    /// ```
3842    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3843        self.description = v.into();
3844        self
3845    }
3846
3847    /// Sets the value of [is_required][crate::model::ParameterSpec::is_required].
3848    ///
3849    /// # Example
3850    /// ```ignore,no_run
3851    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3852    /// let x = ParameterSpec::new().set_is_required(true);
3853    /// ```
3854    pub fn set_is_required<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3855        self.is_required = v.into();
3856        self
3857    }
3858
3859    /// Sets the value of [value_type][crate::model::ParameterSpec::value_type].
3860    ///
3861    /// # Example
3862    /// ```ignore,no_run
3863    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3864    /// use google_cloud_cloudsecuritycompliance_v1::model::parameter_spec::ValueType;
3865    /// let x0 = ParameterSpec::new().set_value_type(ValueType::String);
3866    /// let x1 = ParameterSpec::new().set_value_type(ValueType::Boolean);
3867    /// let x2 = ParameterSpec::new().set_value_type(ValueType::Stringlist);
3868    /// ```
3869    pub fn set_value_type<T: std::convert::Into<crate::model::parameter_spec::ValueType>>(
3870        mut self,
3871        v: T,
3872    ) -> Self {
3873        self.value_type = v.into();
3874        self
3875    }
3876
3877    /// Sets the value of [default_value][crate::model::ParameterSpec::default_value].
3878    ///
3879    /// # Example
3880    /// ```ignore,no_run
3881    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3882    /// use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
3883    /// let x = ParameterSpec::new().set_default_value(ParamValue::default()/* use setters */);
3884    /// ```
3885    pub fn set_default_value<T>(mut self, v: T) -> Self
3886    where
3887        T: std::convert::Into<crate::model::ParamValue>,
3888    {
3889        self.default_value = std::option::Option::Some(v.into());
3890        self
3891    }
3892
3893    /// Sets or clears the value of [default_value][crate::model::ParameterSpec::default_value].
3894    ///
3895    /// # Example
3896    /// ```ignore,no_run
3897    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3898    /// use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
3899    /// let x = ParameterSpec::new().set_or_clear_default_value(Some(ParamValue::default()/* use setters */));
3900    /// let x = ParameterSpec::new().set_or_clear_default_value(None::<ParamValue>);
3901    /// ```
3902    pub fn set_or_clear_default_value<T>(mut self, v: std::option::Option<T>) -> Self
3903    where
3904        T: std::convert::Into<crate::model::ParamValue>,
3905    {
3906        self.default_value = v.map(|x| x.into());
3907        self
3908    }
3909
3910    /// Sets the value of [substitution_rules][crate::model::ParameterSpec::substitution_rules].
3911    ///
3912    /// # Example
3913    /// ```ignore,no_run
3914    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3915    /// use google_cloud_cloudsecuritycompliance_v1::model::ParameterSubstitutionRule;
3916    /// let x = ParameterSpec::new()
3917    ///     .set_substitution_rules([
3918    ///         ParameterSubstitutionRule::default()/* use setters */,
3919    ///         ParameterSubstitutionRule::default()/* use (different) setters */,
3920    ///     ]);
3921    /// ```
3922    pub fn set_substitution_rules<T, V>(mut self, v: T) -> Self
3923    where
3924        T: std::iter::IntoIterator<Item = V>,
3925        V: std::convert::Into<crate::model::ParameterSubstitutionRule>,
3926    {
3927        use std::iter::Iterator;
3928        self.substitution_rules = v.into_iter().map(|i| i.into()).collect();
3929        self
3930    }
3931
3932    /// Sets the value of [sub_parameters][crate::model::ParameterSpec::sub_parameters].
3933    ///
3934    /// # Example
3935    /// ```ignore,no_run
3936    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3937    /// let x = ParameterSpec::new()
3938    ///     .set_sub_parameters([
3939    ///         ParameterSpec::default()/* use setters */,
3940    ///         ParameterSpec::default()/* use (different) setters */,
3941    ///     ]);
3942    /// ```
3943    pub fn set_sub_parameters<T, V>(mut self, v: T) -> Self
3944    where
3945        T: std::iter::IntoIterator<Item = V>,
3946        V: std::convert::Into<crate::model::ParameterSpec>,
3947    {
3948        use std::iter::Iterator;
3949        self.sub_parameters = v.into_iter().map(|i| i.into()).collect();
3950        self
3951    }
3952
3953    /// Sets the value of [validation][crate::model::ParameterSpec::validation].
3954    ///
3955    /// # Example
3956    /// ```ignore,no_run
3957    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3958    /// use google_cloud_cloudsecuritycompliance_v1::model::Validation;
3959    /// let x = ParameterSpec::new().set_validation(Validation::default()/* use setters */);
3960    /// ```
3961    pub fn set_validation<T>(mut self, v: T) -> Self
3962    where
3963        T: std::convert::Into<crate::model::Validation>,
3964    {
3965        self.validation = std::option::Option::Some(v.into());
3966        self
3967    }
3968
3969    /// Sets or clears the value of [validation][crate::model::ParameterSpec::validation].
3970    ///
3971    /// # Example
3972    /// ```ignore,no_run
3973    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3974    /// use google_cloud_cloudsecuritycompliance_v1::model::Validation;
3975    /// let x = ParameterSpec::new().set_or_clear_validation(Some(Validation::default()/* use setters */));
3976    /// let x = ParameterSpec::new().set_or_clear_validation(None::<Validation>);
3977    /// ```
3978    pub fn set_or_clear_validation<T>(mut self, v: std::option::Option<T>) -> Self
3979    where
3980        T: std::convert::Into<crate::model::Validation>,
3981    {
3982        self.validation = v.map(|x| x.into());
3983        self
3984    }
3985}
3986
3987impl wkt::message::Message for ParameterSpec {
3988    fn typename() -> &'static str {
3989        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ParameterSpec"
3990    }
3991}
3992
3993/// Defines additional types related to [ParameterSpec].
3994pub mod parameter_spec {
3995    #[allow(unused_imports)]
3996    use super::*;
3997
3998    /// The type of parameter value.
3999    ///
4000    /// # Working with unknown values
4001    ///
4002    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4003    /// additional enum variants at any time. Adding new variants is not considered
4004    /// a breaking change. Applications should write their code in anticipation of:
4005    ///
4006    /// - New values appearing in future releases of the client library, **and**
4007    /// - New values received dynamically, without application changes.
4008    ///
4009    /// Please consult the [Working with enums] section in the user guide for some
4010    /// guidelines.
4011    ///
4012    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
4013    #[derive(Clone, Debug, PartialEq)]
4014    #[non_exhaustive]
4015    pub enum ValueType {
4016        /// Default value. This value is unused.
4017        Unspecified,
4018        /// A string value.
4019        String,
4020        /// A boolean value.
4021        Boolean,
4022        /// A string list value.
4023        Stringlist,
4024        /// A numeric value.
4025        Number,
4026        /// A oneOf value.
4027        Oneof,
4028        /// If set, the enum was initialized with an unknown value.
4029        ///
4030        /// Applications can examine the value using [ValueType::value] or
4031        /// [ValueType::name].
4032        UnknownValue(value_type::UnknownValue),
4033    }
4034
4035    #[doc(hidden)]
4036    pub mod value_type {
4037        #[allow(unused_imports)]
4038        use super::*;
4039        #[derive(Clone, Debug, PartialEq)]
4040        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4041    }
4042
4043    impl ValueType {
4044        /// Gets the enum value.
4045        ///
4046        /// Returns `None` if the enum contains an unknown value deserialized from
4047        /// the string representation of enums.
4048        pub fn value(&self) -> std::option::Option<i32> {
4049            match self {
4050                Self::Unspecified => std::option::Option::Some(0),
4051                Self::String => std::option::Option::Some(3),
4052                Self::Boolean => std::option::Option::Some(4),
4053                Self::Stringlist => std::option::Option::Some(5),
4054                Self::Number => std::option::Option::Some(6),
4055                Self::Oneof => std::option::Option::Some(7),
4056                Self::UnknownValue(u) => u.0.value(),
4057            }
4058        }
4059
4060        /// Gets the enum value as a string.
4061        ///
4062        /// Returns `None` if the enum contains an unknown value deserialized from
4063        /// the integer representation of enums.
4064        pub fn name(&self) -> std::option::Option<&str> {
4065            match self {
4066                Self::Unspecified => std::option::Option::Some("VALUE_TYPE_UNSPECIFIED"),
4067                Self::String => std::option::Option::Some("STRING"),
4068                Self::Boolean => std::option::Option::Some("BOOLEAN"),
4069                Self::Stringlist => std::option::Option::Some("STRINGLIST"),
4070                Self::Number => std::option::Option::Some("NUMBER"),
4071                Self::Oneof => std::option::Option::Some("ONEOF"),
4072                Self::UnknownValue(u) => u.0.name(),
4073            }
4074        }
4075    }
4076
4077    impl std::default::Default for ValueType {
4078        fn default() -> Self {
4079            use std::convert::From;
4080            Self::from(0)
4081        }
4082    }
4083
4084    impl std::fmt::Display for ValueType {
4085        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4086            wkt::internal::display_enum(f, self.name(), self.value())
4087        }
4088    }
4089
4090    impl std::convert::From<i32> for ValueType {
4091        fn from(value: i32) -> Self {
4092            match value {
4093                0 => Self::Unspecified,
4094                3 => Self::String,
4095                4 => Self::Boolean,
4096                5 => Self::Stringlist,
4097                6 => Self::Number,
4098                7 => Self::Oneof,
4099                _ => Self::UnknownValue(value_type::UnknownValue(
4100                    wkt::internal::UnknownEnumValue::Integer(value),
4101                )),
4102            }
4103        }
4104    }
4105
4106    impl std::convert::From<&str> for ValueType {
4107        fn from(value: &str) -> Self {
4108            use std::string::ToString;
4109            match value {
4110                "VALUE_TYPE_UNSPECIFIED" => Self::Unspecified,
4111                "STRING" => Self::String,
4112                "BOOLEAN" => Self::Boolean,
4113                "STRINGLIST" => Self::Stringlist,
4114                "NUMBER" => Self::Number,
4115                "ONEOF" => Self::Oneof,
4116                _ => Self::UnknownValue(value_type::UnknownValue(
4117                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4118                )),
4119            }
4120        }
4121    }
4122
4123    impl serde::ser::Serialize for ValueType {
4124        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4125        where
4126            S: serde::Serializer,
4127        {
4128            match self {
4129                Self::Unspecified => serializer.serialize_i32(0),
4130                Self::String => serializer.serialize_i32(3),
4131                Self::Boolean => serializer.serialize_i32(4),
4132                Self::Stringlist => serializer.serialize_i32(5),
4133                Self::Number => serializer.serialize_i32(6),
4134                Self::Oneof => serializer.serialize_i32(7),
4135                Self::UnknownValue(u) => u.0.serialize(serializer),
4136            }
4137        }
4138    }
4139
4140    impl<'de> serde::de::Deserialize<'de> for ValueType {
4141        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4142        where
4143            D: serde::Deserializer<'de>,
4144        {
4145            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ValueType>::new(
4146                ".google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType",
4147            ))
4148        }
4149    }
4150}
4151
4152/// The validation of the parameter.
4153#[derive(Clone, Default, PartialEq)]
4154#[non_exhaustive]
4155pub struct Validation {
4156    /// Defines validators for parameter values.
4157    pub constraint: std::option::Option<crate::model::validation::Constraint>,
4158
4159    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4160}
4161
4162impl Validation {
4163    pub fn new() -> Self {
4164        std::default::Default::default()
4165    }
4166
4167    /// Sets the value of [constraint][crate::model::Validation::constraint].
4168    ///
4169    /// Note that all the setters affecting `constraint` are mutually
4170    /// exclusive.
4171    ///
4172    /// # Example
4173    /// ```ignore,no_run
4174    /// # use google_cloud_cloudsecuritycompliance_v1::model::Validation;
4175    /// use google_cloud_cloudsecuritycompliance_v1::model::AllowedValues;
4176    /// let x = Validation::new().set_constraint(Some(
4177    ///     google_cloud_cloudsecuritycompliance_v1::model::validation::Constraint::AllowedValues(AllowedValues::default().into())));
4178    /// ```
4179    pub fn set_constraint<
4180        T: std::convert::Into<std::option::Option<crate::model::validation::Constraint>>,
4181    >(
4182        mut self,
4183        v: T,
4184    ) -> Self {
4185        self.constraint = v.into();
4186        self
4187    }
4188
4189    /// The value of [constraint][crate::model::Validation::constraint]
4190    /// if it holds a `AllowedValues`, `None` if the field is not set or
4191    /// holds a different branch.
4192    pub fn allowed_values(
4193        &self,
4194    ) -> std::option::Option<&std::boxed::Box<crate::model::AllowedValues>> {
4195        #[allow(unreachable_patterns)]
4196        self.constraint.as_ref().and_then(|v| match v {
4197            crate::model::validation::Constraint::AllowedValues(v) => std::option::Option::Some(v),
4198            _ => std::option::Option::None,
4199        })
4200    }
4201
4202    /// Sets the value of [constraint][crate::model::Validation::constraint]
4203    /// to hold a `AllowedValues`.
4204    ///
4205    /// Note that all the setters affecting `constraint` are
4206    /// mutually exclusive.
4207    ///
4208    /// # Example
4209    /// ```ignore,no_run
4210    /// # use google_cloud_cloudsecuritycompliance_v1::model::Validation;
4211    /// use google_cloud_cloudsecuritycompliance_v1::model::AllowedValues;
4212    /// let x = Validation::new().set_allowed_values(AllowedValues::default()/* use setters */);
4213    /// assert!(x.allowed_values().is_some());
4214    /// assert!(x.int_range().is_none());
4215    /// assert!(x.regexp_pattern().is_none());
4216    /// ```
4217    pub fn set_allowed_values<
4218        T: std::convert::Into<std::boxed::Box<crate::model::AllowedValues>>,
4219    >(
4220        mut self,
4221        v: T,
4222    ) -> Self {
4223        self.constraint = std::option::Option::Some(
4224            crate::model::validation::Constraint::AllowedValues(v.into()),
4225        );
4226        self
4227    }
4228
4229    /// The value of [constraint][crate::model::Validation::constraint]
4230    /// if it holds a `IntRange`, `None` if the field is not set or
4231    /// holds a different branch.
4232    pub fn int_range(&self) -> std::option::Option<&std::boxed::Box<crate::model::IntRange>> {
4233        #[allow(unreachable_patterns)]
4234        self.constraint.as_ref().and_then(|v| match v {
4235            crate::model::validation::Constraint::IntRange(v) => std::option::Option::Some(v),
4236            _ => std::option::Option::None,
4237        })
4238    }
4239
4240    /// Sets the value of [constraint][crate::model::Validation::constraint]
4241    /// to hold a `IntRange`.
4242    ///
4243    /// Note that all the setters affecting `constraint` are
4244    /// mutually exclusive.
4245    ///
4246    /// # Example
4247    /// ```ignore,no_run
4248    /// # use google_cloud_cloudsecuritycompliance_v1::model::Validation;
4249    /// use google_cloud_cloudsecuritycompliance_v1::model::IntRange;
4250    /// let x = Validation::new().set_int_range(IntRange::default()/* use setters */);
4251    /// assert!(x.int_range().is_some());
4252    /// assert!(x.allowed_values().is_none());
4253    /// assert!(x.regexp_pattern().is_none());
4254    /// ```
4255    pub fn set_int_range<T: std::convert::Into<std::boxed::Box<crate::model::IntRange>>>(
4256        mut self,
4257        v: T,
4258    ) -> Self {
4259        self.constraint =
4260            std::option::Option::Some(crate::model::validation::Constraint::IntRange(v.into()));
4261        self
4262    }
4263
4264    /// The value of [constraint][crate::model::Validation::constraint]
4265    /// if it holds a `RegexpPattern`, `None` if the field is not set or
4266    /// holds a different branch.
4267    pub fn regexp_pattern(
4268        &self,
4269    ) -> std::option::Option<&std::boxed::Box<crate::model::RegexpPattern>> {
4270        #[allow(unreachable_patterns)]
4271        self.constraint.as_ref().and_then(|v| match v {
4272            crate::model::validation::Constraint::RegexpPattern(v) => std::option::Option::Some(v),
4273            _ => std::option::Option::None,
4274        })
4275    }
4276
4277    /// Sets the value of [constraint][crate::model::Validation::constraint]
4278    /// to hold a `RegexpPattern`.
4279    ///
4280    /// Note that all the setters affecting `constraint` are
4281    /// mutually exclusive.
4282    ///
4283    /// # Example
4284    /// ```ignore,no_run
4285    /// # use google_cloud_cloudsecuritycompliance_v1::model::Validation;
4286    /// use google_cloud_cloudsecuritycompliance_v1::model::RegexpPattern;
4287    /// let x = Validation::new().set_regexp_pattern(RegexpPattern::default()/* use setters */);
4288    /// assert!(x.regexp_pattern().is_some());
4289    /// assert!(x.allowed_values().is_none());
4290    /// assert!(x.int_range().is_none());
4291    /// ```
4292    pub fn set_regexp_pattern<
4293        T: std::convert::Into<std::boxed::Box<crate::model::RegexpPattern>>,
4294    >(
4295        mut self,
4296        v: T,
4297    ) -> Self {
4298        self.constraint = std::option::Option::Some(
4299            crate::model::validation::Constraint::RegexpPattern(v.into()),
4300        );
4301        self
4302    }
4303}
4304
4305impl wkt::message::Message for Validation {
4306    fn typename() -> &'static str {
4307        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.Validation"
4308    }
4309}
4310
4311/// Defines additional types related to [Validation].
4312pub mod validation {
4313    #[allow(unused_imports)]
4314    use super::*;
4315
4316    /// Defines validators for parameter values.
4317    #[derive(Clone, Debug, PartialEq)]
4318    #[non_exhaustive]
4319    pub enum Constraint {
4320        /// The permitted set of values for the parameter.
4321        AllowedValues(std::boxed::Box<crate::model::AllowedValues>),
4322        /// The permitted range for numeric parameters.
4323        IntRange(std::boxed::Box<crate::model::IntRange>),
4324        /// The regular expression for string parameters.
4325        RegexpPattern(std::boxed::Box<crate::model::RegexpPattern>),
4326    }
4327}
4328
4329/// The allowed set of values for the parameter.
4330#[derive(Clone, Default, PartialEq)]
4331#[non_exhaustive]
4332pub struct AllowedValues {
4333    /// Required. The list of allowed values for the parameter.
4334    pub values: std::vec::Vec<crate::model::ParamValue>,
4335
4336    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4337}
4338
4339impl AllowedValues {
4340    pub fn new() -> Self {
4341        std::default::Default::default()
4342    }
4343
4344    /// Sets the value of [values][crate::model::AllowedValues::values].
4345    ///
4346    /// # Example
4347    /// ```ignore,no_run
4348    /// # use google_cloud_cloudsecuritycompliance_v1::model::AllowedValues;
4349    /// use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4350    /// let x = AllowedValues::new()
4351    ///     .set_values([
4352    ///         ParamValue::default()/* use setters */,
4353    ///         ParamValue::default()/* use (different) setters */,
4354    ///     ]);
4355    /// ```
4356    pub fn set_values<T, V>(mut self, v: T) -> Self
4357    where
4358        T: std::iter::IntoIterator<Item = V>,
4359        V: std::convert::Into<crate::model::ParamValue>,
4360    {
4361        use std::iter::Iterator;
4362        self.values = v.into_iter().map(|i| i.into()).collect();
4363        self
4364    }
4365}
4366
4367impl wkt::message::Message for AllowedValues {
4368    fn typename() -> &'static str {
4369        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AllowedValues"
4370    }
4371}
4372
4373/// The regular expression (regex) validator for parameter values.
4374#[derive(Clone, Default, PartialEq)]
4375#[non_exhaustive]
4376pub struct RegexpPattern {
4377    /// Required. The regex pattern to match the values of the parameter with.
4378    pub pattern: std::string::String,
4379
4380    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4381}
4382
4383impl RegexpPattern {
4384    pub fn new() -> Self {
4385        std::default::Default::default()
4386    }
4387
4388    /// Sets the value of [pattern][crate::model::RegexpPattern::pattern].
4389    ///
4390    /// # Example
4391    /// ```ignore,no_run
4392    /// # use google_cloud_cloudsecuritycompliance_v1::model::RegexpPattern;
4393    /// let x = RegexpPattern::new().set_pattern("example");
4394    /// ```
4395    pub fn set_pattern<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4396        self.pattern = v.into();
4397        self
4398    }
4399}
4400
4401impl wkt::message::Message for RegexpPattern {
4402    fn typename() -> &'static str {
4403        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.RegexpPattern"
4404    }
4405}
4406
4407/// The number range for number parameters.
4408#[derive(Clone, Default, PartialEq)]
4409#[non_exhaustive]
4410pub struct IntRange {
4411    /// Required. The minimum permitted value for the numeric parameter
4412    /// (inclusive).
4413    pub min: i64,
4414
4415    /// Required. The maximum permitted value for the numeric parameter
4416    /// (inclusive).
4417    pub max: i64,
4418
4419    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4420}
4421
4422impl IntRange {
4423    pub fn new() -> Self {
4424        std::default::Default::default()
4425    }
4426
4427    /// Sets the value of [min][crate::model::IntRange::min].
4428    ///
4429    /// # Example
4430    /// ```ignore,no_run
4431    /// # use google_cloud_cloudsecuritycompliance_v1::model::IntRange;
4432    /// let x = IntRange::new().set_min(42);
4433    /// ```
4434    pub fn set_min<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
4435        self.min = v.into();
4436        self
4437    }
4438
4439    /// Sets the value of [max][crate::model::IntRange::max].
4440    ///
4441    /// # Example
4442    /// ```ignore,no_run
4443    /// # use google_cloud_cloudsecuritycompliance_v1::model::IntRange;
4444    /// let x = IntRange::new().set_max(42);
4445    /// ```
4446    pub fn set_max<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
4447        self.max = v.into();
4448        self
4449    }
4450}
4451
4452impl wkt::message::Message for IntRange {
4453    fn typename() -> &'static str {
4454        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.IntRange"
4455    }
4456}
4457
4458/// A list of strings for the parameter value.
4459#[derive(Clone, Default, PartialEq)]
4460#[non_exhaustive]
4461pub struct StringList {
4462    /// Required. The strings in the list.
4463    pub values: std::vec::Vec<std::string::String>,
4464
4465    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4466}
4467
4468impl StringList {
4469    pub fn new() -> Self {
4470        std::default::Default::default()
4471    }
4472
4473    /// Sets the value of [values][crate::model::StringList::values].
4474    ///
4475    /// # Example
4476    /// ```ignore,no_run
4477    /// # use google_cloud_cloudsecuritycompliance_v1::model::StringList;
4478    /// let x = StringList::new().set_values(["a", "b", "c"]);
4479    /// ```
4480    pub fn set_values<T, V>(mut self, v: T) -> Self
4481    where
4482        T: std::iter::IntoIterator<Item = V>,
4483        V: std::convert::Into<std::string::String>,
4484    {
4485        use std::iter::Iterator;
4486        self.values = v.into_iter().map(|i| i.into()).collect();
4487        self
4488    }
4489}
4490
4491impl wkt::message::Message for StringList {
4492    fn typename() -> &'static str {
4493        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.StringList"
4494    }
4495}
4496
4497/// The possible parameter value types.
4498#[derive(Clone, Default, PartialEq)]
4499#[non_exhaustive]
4500pub struct ParamValue {
4501    /// The list of possible parameter value types.
4502    pub kind: std::option::Option<crate::model::param_value::Kind>,
4503
4504    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4505}
4506
4507impl ParamValue {
4508    pub fn new() -> Self {
4509        std::default::Default::default()
4510    }
4511
4512    /// Sets the value of [kind][crate::model::ParamValue::kind].
4513    ///
4514    /// Note that all the setters affecting `kind` are mutually
4515    /// exclusive.
4516    ///
4517    /// # Example
4518    /// ```ignore,no_run
4519    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4520    /// use google_cloud_cloudsecuritycompliance_v1::model::param_value::Kind;
4521    /// let x = ParamValue::new().set_kind(Some(Kind::StringValue("example".to_string())));
4522    /// ```
4523    pub fn set_kind<T: std::convert::Into<std::option::Option<crate::model::param_value::Kind>>>(
4524        mut self,
4525        v: T,
4526    ) -> Self {
4527        self.kind = v.into();
4528        self
4529    }
4530
4531    /// The value of [kind][crate::model::ParamValue::kind]
4532    /// if it holds a `StringValue`, `None` if the field is not set or
4533    /// holds a different branch.
4534    pub fn string_value(&self) -> std::option::Option<&std::string::String> {
4535        #[allow(unreachable_patterns)]
4536        self.kind.as_ref().and_then(|v| match v {
4537            crate::model::param_value::Kind::StringValue(v) => std::option::Option::Some(v),
4538            _ => std::option::Option::None,
4539        })
4540    }
4541
4542    /// Sets the value of [kind][crate::model::ParamValue::kind]
4543    /// to hold a `StringValue`.
4544    ///
4545    /// Note that all the setters affecting `kind` are
4546    /// mutually exclusive.
4547    ///
4548    /// # Example
4549    /// ```ignore,no_run
4550    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4551    /// let x = ParamValue::new().set_string_value("example");
4552    /// assert!(x.string_value().is_some());
4553    /// assert!(x.bool_value().is_none());
4554    /// assert!(x.string_list_value().is_none());
4555    /// assert!(x.number_value().is_none());
4556    /// assert!(x.oneof_value().is_none());
4557    /// ```
4558    pub fn set_string_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4559        self.kind =
4560            std::option::Option::Some(crate::model::param_value::Kind::StringValue(v.into()));
4561        self
4562    }
4563
4564    /// The value of [kind][crate::model::ParamValue::kind]
4565    /// if it holds a `BoolValue`, `None` if the field is not set or
4566    /// holds a different branch.
4567    pub fn bool_value(&self) -> std::option::Option<&bool> {
4568        #[allow(unreachable_patterns)]
4569        self.kind.as_ref().and_then(|v| match v {
4570            crate::model::param_value::Kind::BoolValue(v) => std::option::Option::Some(v),
4571            _ => std::option::Option::None,
4572        })
4573    }
4574
4575    /// Sets the value of [kind][crate::model::ParamValue::kind]
4576    /// to hold a `BoolValue`.
4577    ///
4578    /// Note that all the setters affecting `kind` are
4579    /// mutually exclusive.
4580    ///
4581    /// # Example
4582    /// ```ignore,no_run
4583    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4584    /// let x = ParamValue::new().set_bool_value(true);
4585    /// assert!(x.bool_value().is_some());
4586    /// assert!(x.string_value().is_none());
4587    /// assert!(x.string_list_value().is_none());
4588    /// assert!(x.number_value().is_none());
4589    /// assert!(x.oneof_value().is_none());
4590    /// ```
4591    pub fn set_bool_value<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4592        self.kind = std::option::Option::Some(crate::model::param_value::Kind::BoolValue(v.into()));
4593        self
4594    }
4595
4596    /// The value of [kind][crate::model::ParamValue::kind]
4597    /// if it holds a `StringListValue`, `None` if the field is not set or
4598    /// holds a different branch.
4599    pub fn string_list_value(
4600        &self,
4601    ) -> std::option::Option<&std::boxed::Box<crate::model::StringList>> {
4602        #[allow(unreachable_patterns)]
4603        self.kind.as_ref().and_then(|v| match v {
4604            crate::model::param_value::Kind::StringListValue(v) => std::option::Option::Some(v),
4605            _ => std::option::Option::None,
4606        })
4607    }
4608
4609    /// Sets the value of [kind][crate::model::ParamValue::kind]
4610    /// to hold a `StringListValue`.
4611    ///
4612    /// Note that all the setters affecting `kind` are
4613    /// mutually exclusive.
4614    ///
4615    /// # Example
4616    /// ```ignore,no_run
4617    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4618    /// use google_cloud_cloudsecuritycompliance_v1::model::StringList;
4619    /// let x = ParamValue::new().set_string_list_value(StringList::default()/* use setters */);
4620    /// assert!(x.string_list_value().is_some());
4621    /// assert!(x.string_value().is_none());
4622    /// assert!(x.bool_value().is_none());
4623    /// assert!(x.number_value().is_none());
4624    /// assert!(x.oneof_value().is_none());
4625    /// ```
4626    pub fn set_string_list_value<
4627        T: std::convert::Into<std::boxed::Box<crate::model::StringList>>,
4628    >(
4629        mut self,
4630        v: T,
4631    ) -> Self {
4632        self.kind =
4633            std::option::Option::Some(crate::model::param_value::Kind::StringListValue(v.into()));
4634        self
4635    }
4636
4637    /// The value of [kind][crate::model::ParamValue::kind]
4638    /// if it holds a `NumberValue`, `None` if the field is not set or
4639    /// holds a different branch.
4640    pub fn number_value(&self) -> std::option::Option<&f64> {
4641        #[allow(unreachable_patterns)]
4642        self.kind.as_ref().and_then(|v| match v {
4643            crate::model::param_value::Kind::NumberValue(v) => std::option::Option::Some(v),
4644            _ => std::option::Option::None,
4645        })
4646    }
4647
4648    /// Sets the value of [kind][crate::model::ParamValue::kind]
4649    /// to hold a `NumberValue`.
4650    ///
4651    /// Note that all the setters affecting `kind` are
4652    /// mutually exclusive.
4653    ///
4654    /// # Example
4655    /// ```ignore,no_run
4656    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4657    /// let x = ParamValue::new().set_number_value(42.0);
4658    /// assert!(x.number_value().is_some());
4659    /// assert!(x.string_value().is_none());
4660    /// assert!(x.bool_value().is_none());
4661    /// assert!(x.string_list_value().is_none());
4662    /// assert!(x.oneof_value().is_none());
4663    /// ```
4664    pub fn set_number_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
4665        self.kind =
4666            std::option::Option::Some(crate::model::param_value::Kind::NumberValue(v.into()));
4667        self
4668    }
4669
4670    /// The value of [kind][crate::model::ParamValue::kind]
4671    /// if it holds a `OneofValue`, `None` if the field is not set or
4672    /// holds a different branch.
4673    pub fn oneof_value(&self) -> std::option::Option<&std::boxed::Box<crate::model::Parameter>> {
4674        #[allow(unreachable_patterns)]
4675        self.kind.as_ref().and_then(|v| match v {
4676            crate::model::param_value::Kind::OneofValue(v) => std::option::Option::Some(v),
4677            _ => std::option::Option::None,
4678        })
4679    }
4680
4681    /// Sets the value of [kind][crate::model::ParamValue::kind]
4682    /// to hold a `OneofValue`.
4683    ///
4684    /// Note that all the setters affecting `kind` are
4685    /// mutually exclusive.
4686    ///
4687    /// # Example
4688    /// ```ignore,no_run
4689    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4690    /// use google_cloud_cloudsecuritycompliance_v1::model::Parameter;
4691    /// let x = ParamValue::new().set_oneof_value(Parameter::default()/* use setters */);
4692    /// assert!(x.oneof_value().is_some());
4693    /// assert!(x.string_value().is_none());
4694    /// assert!(x.bool_value().is_none());
4695    /// assert!(x.string_list_value().is_none());
4696    /// assert!(x.number_value().is_none());
4697    /// ```
4698    pub fn set_oneof_value<T: std::convert::Into<std::boxed::Box<crate::model::Parameter>>>(
4699        mut self,
4700        v: T,
4701    ) -> Self {
4702        self.kind =
4703            std::option::Option::Some(crate::model::param_value::Kind::OneofValue(v.into()));
4704        self
4705    }
4706}
4707
4708impl wkt::message::Message for ParamValue {
4709    fn typename() -> &'static str {
4710        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ParamValue"
4711    }
4712}
4713
4714/// Defines additional types related to [ParamValue].
4715pub mod param_value {
4716    #[allow(unused_imports)]
4717    use super::*;
4718
4719    /// The list of possible parameter value types.
4720    #[derive(Clone, Debug, PartialEq)]
4721    #[non_exhaustive]
4722    pub enum Kind {
4723        /// A string value.
4724        StringValue(std::string::String),
4725        /// A boolean value.
4726        BoolValue(bool),
4727        /// A repeated string.
4728        StringListValue(std::boxed::Box<crate::model::StringList>),
4729        /// A double value.
4730        NumberValue(f64),
4731        /// Sub-parameter values.
4732        OneofValue(std::boxed::Box<crate::model::Parameter>),
4733    }
4734}
4735
4736/// The parameter substitution rules.
4737#[derive(Clone, Default, PartialEq)]
4738#[non_exhaustive]
4739pub struct ParameterSubstitutionRule {
4740    /// The type of substitution.
4741    pub substitution_type:
4742        std::option::Option<crate::model::parameter_substitution_rule::SubstitutionType>,
4743
4744    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4745}
4746
4747impl ParameterSubstitutionRule {
4748    pub fn new() -> Self {
4749        std::default::Default::default()
4750    }
4751
4752    /// Sets the value of [substitution_type][crate::model::ParameterSubstitutionRule::substitution_type].
4753    ///
4754    /// Note that all the setters affecting `substitution_type` are mutually
4755    /// exclusive.
4756    ///
4757    /// # Example
4758    /// ```ignore,no_run
4759    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSubstitutionRule;
4760    /// use google_cloud_cloudsecuritycompliance_v1::model::PlaceholderSubstitutionRule;
4761    /// let x = ParameterSubstitutionRule::new().set_substitution_type(Some(
4762    ///     google_cloud_cloudsecuritycompliance_v1::model::parameter_substitution_rule::SubstitutionType::PlaceholderSubstitutionRule(PlaceholderSubstitutionRule::default().into())));
4763    /// ```
4764    pub fn set_substitution_type<
4765        T: std::convert::Into<
4766                std::option::Option<crate::model::parameter_substitution_rule::SubstitutionType>,
4767            >,
4768    >(
4769        mut self,
4770        v: T,
4771    ) -> Self {
4772        self.substitution_type = v.into();
4773        self
4774    }
4775
4776    /// The value of [substitution_type][crate::model::ParameterSubstitutionRule::substitution_type]
4777    /// if it holds a `PlaceholderSubstitutionRule`, `None` if the field is not set or
4778    /// holds a different branch.
4779    pub fn placeholder_substitution_rule(
4780        &self,
4781    ) -> std::option::Option<&std::boxed::Box<crate::model::PlaceholderSubstitutionRule>> {
4782        #[allow(unreachable_patterns)]
4783        self.substitution_type.as_ref().and_then(|v| match v {
4784            crate::model::parameter_substitution_rule::SubstitutionType::PlaceholderSubstitutionRule(v) => std::option::Option::Some(v),
4785            _ => std::option::Option::None,
4786        })
4787    }
4788
4789    /// Sets the value of [substitution_type][crate::model::ParameterSubstitutionRule::substitution_type]
4790    /// to hold a `PlaceholderSubstitutionRule`.
4791    ///
4792    /// Note that all the setters affecting `substitution_type` are
4793    /// mutually exclusive.
4794    ///
4795    /// # Example
4796    /// ```ignore,no_run
4797    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSubstitutionRule;
4798    /// use google_cloud_cloudsecuritycompliance_v1::model::PlaceholderSubstitutionRule;
4799    /// let x = ParameterSubstitutionRule::new().set_placeholder_substitution_rule(PlaceholderSubstitutionRule::default()/* use setters */);
4800    /// assert!(x.placeholder_substitution_rule().is_some());
4801    /// assert!(x.attribute_substitution_rule().is_none());
4802    /// ```
4803    pub fn set_placeholder_substitution_rule<
4804        T: std::convert::Into<std::boxed::Box<crate::model::PlaceholderSubstitutionRule>>,
4805    >(
4806        mut self,
4807        v: T,
4808    ) -> Self {
4809        self.substitution_type = std::option::Option::Some(
4810            crate::model::parameter_substitution_rule::SubstitutionType::PlaceholderSubstitutionRule(
4811                v.into()
4812            )
4813        );
4814        self
4815    }
4816
4817    /// The value of [substitution_type][crate::model::ParameterSubstitutionRule::substitution_type]
4818    /// if it holds a `AttributeSubstitutionRule`, `None` if the field is not set or
4819    /// holds a different branch.
4820    pub fn attribute_substitution_rule(
4821        &self,
4822    ) -> std::option::Option<&std::boxed::Box<crate::model::AttributeSubstitutionRule>> {
4823        #[allow(unreachable_patterns)]
4824        self.substitution_type.as_ref().and_then(|v| match v {
4825            crate::model::parameter_substitution_rule::SubstitutionType::AttributeSubstitutionRule(v) => std::option::Option::Some(v),
4826            _ => std::option::Option::None,
4827        })
4828    }
4829
4830    /// Sets the value of [substitution_type][crate::model::ParameterSubstitutionRule::substitution_type]
4831    /// to hold a `AttributeSubstitutionRule`.
4832    ///
4833    /// Note that all the setters affecting `substitution_type` are
4834    /// mutually exclusive.
4835    ///
4836    /// # Example
4837    /// ```ignore,no_run
4838    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSubstitutionRule;
4839    /// use google_cloud_cloudsecuritycompliance_v1::model::AttributeSubstitutionRule;
4840    /// let x = ParameterSubstitutionRule::new().set_attribute_substitution_rule(AttributeSubstitutionRule::default()/* use setters */);
4841    /// assert!(x.attribute_substitution_rule().is_some());
4842    /// assert!(x.placeholder_substitution_rule().is_none());
4843    /// ```
4844    pub fn set_attribute_substitution_rule<
4845        T: std::convert::Into<std::boxed::Box<crate::model::AttributeSubstitutionRule>>,
4846    >(
4847        mut self,
4848        v: T,
4849    ) -> Self {
4850        self.substitution_type = std::option::Option::Some(
4851            crate::model::parameter_substitution_rule::SubstitutionType::AttributeSubstitutionRule(
4852                v.into(),
4853            ),
4854        );
4855        self
4856    }
4857}
4858
4859impl wkt::message::Message for ParameterSubstitutionRule {
4860    fn typename() -> &'static str {
4861        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule"
4862    }
4863}
4864
4865/// Defines additional types related to [ParameterSubstitutionRule].
4866pub mod parameter_substitution_rule {
4867    #[allow(unused_imports)]
4868    use super::*;
4869
4870    /// The type of substitution.
4871    #[derive(Clone, Debug, PartialEq)]
4872    #[non_exhaustive]
4873    pub enum SubstitutionType {
4874        /// The placeholder substitution rule.
4875        PlaceholderSubstitutionRule(std::boxed::Box<crate::model::PlaceholderSubstitutionRule>),
4876        /// The attribute substitution rule.
4877        AttributeSubstitutionRule(std::boxed::Box<crate::model::AttributeSubstitutionRule>),
4878    }
4879}
4880
4881/// The attribute at the given path that's substituted entirely.
4882#[derive(Clone, Default, PartialEq)]
4883#[non_exhaustive]
4884pub struct AttributeSubstitutionRule {
4885    /// The fully qualified proto attribute path, in dot notation.
4886    /// For example: `rules[0].cel_expression.resource_types_values`
4887    pub attribute: std::string::String,
4888
4889    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4890}
4891
4892impl AttributeSubstitutionRule {
4893    pub fn new() -> Self {
4894        std::default::Default::default()
4895    }
4896
4897    /// Sets the value of [attribute][crate::model::AttributeSubstitutionRule::attribute].
4898    ///
4899    /// # Example
4900    /// ```ignore,no_run
4901    /// # use google_cloud_cloudsecuritycompliance_v1::model::AttributeSubstitutionRule;
4902    /// let x = AttributeSubstitutionRule::new().set_attribute("example");
4903    /// ```
4904    pub fn set_attribute<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4905        self.attribute = v.into();
4906        self
4907    }
4908}
4909
4910impl wkt::message::Message for AttributeSubstitutionRule {
4911    fn typename() -> &'static str {
4912        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule"
4913    }
4914}
4915
4916/// The placeholder that's substituted in the rendered string.
4917#[derive(Clone, Default, PartialEq)]
4918#[non_exhaustive]
4919pub struct PlaceholderSubstitutionRule {
4920    /// The fully qualified proto attribute path, in dot notation.
4921    pub attribute: std::string::String,
4922
4923    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4924}
4925
4926impl PlaceholderSubstitutionRule {
4927    pub fn new() -> Self {
4928        std::default::Default::default()
4929    }
4930
4931    /// Sets the value of [attribute][crate::model::PlaceholderSubstitutionRule::attribute].
4932    ///
4933    /// # Example
4934    /// ```ignore,no_run
4935    /// # use google_cloud_cloudsecuritycompliance_v1::model::PlaceholderSubstitutionRule;
4936    /// let x = PlaceholderSubstitutionRule::new().set_attribute("example");
4937    /// ```
4938    pub fn set_attribute<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4939        self.attribute = v.into();
4940        self
4941    }
4942}
4943
4944impl wkt::message::Message for PlaceholderSubstitutionRule {
4945    fn typename() -> &'static str {
4946        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule"
4947    }
4948}
4949
4950/// A rule in the cloud control.
4951#[derive(Clone, Default, PartialEq)]
4952#[non_exhaustive]
4953pub struct Rule {
4954    /// Optional. The rule description. The maximum length is 2000 characters.
4955    pub description: std::string::String,
4956
4957    /// Required. The functionality that's enabled by the rule.
4958    pub rule_action_types: std::vec::Vec<crate::model::RuleActionType>,
4959
4960    /// The rule implementation.
4961    pub implementation: std::option::Option<crate::model::rule::Implementation>,
4962
4963    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4964}
4965
4966impl Rule {
4967    pub fn new() -> Self {
4968        std::default::Default::default()
4969    }
4970
4971    /// Sets the value of [description][crate::model::Rule::description].
4972    ///
4973    /// # Example
4974    /// ```ignore,no_run
4975    /// # use google_cloud_cloudsecuritycompliance_v1::model::Rule;
4976    /// let x = Rule::new().set_description("example");
4977    /// ```
4978    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4979        self.description = v.into();
4980        self
4981    }
4982
4983    /// Sets the value of [rule_action_types][crate::model::Rule::rule_action_types].
4984    ///
4985    /// # Example
4986    /// ```ignore,no_run
4987    /// # use google_cloud_cloudsecuritycompliance_v1::model::Rule;
4988    /// use google_cloud_cloudsecuritycompliance_v1::model::RuleActionType;
4989    /// let x = Rule::new().set_rule_action_types([
4990    ///     RuleActionType::Preventive,
4991    ///     RuleActionType::Detective,
4992    ///     RuleActionType::Audit,
4993    /// ]);
4994    /// ```
4995    pub fn set_rule_action_types<T, V>(mut self, v: T) -> Self
4996    where
4997        T: std::iter::IntoIterator<Item = V>,
4998        V: std::convert::Into<crate::model::RuleActionType>,
4999    {
5000        use std::iter::Iterator;
5001        self.rule_action_types = v.into_iter().map(|i| i.into()).collect();
5002        self
5003    }
5004
5005    /// Sets the value of [implementation][crate::model::Rule::implementation].
5006    ///
5007    /// Note that all the setters affecting `implementation` are mutually
5008    /// exclusive.
5009    ///
5010    /// # Example
5011    /// ```ignore,no_run
5012    /// # use google_cloud_cloudsecuritycompliance_v1::model::Rule;
5013    /// use google_cloud_cloudsecuritycompliance_v1::model::CELExpression;
5014    /// let x = Rule::new().set_implementation(Some(
5015    ///     google_cloud_cloudsecuritycompliance_v1::model::rule::Implementation::CelExpression(CELExpression::default().into())));
5016    /// ```
5017    pub fn set_implementation<
5018        T: std::convert::Into<std::option::Option<crate::model::rule::Implementation>>,
5019    >(
5020        mut self,
5021        v: T,
5022    ) -> Self {
5023        self.implementation = v.into();
5024        self
5025    }
5026
5027    /// The value of [implementation][crate::model::Rule::implementation]
5028    /// if it holds a `CelExpression`, `None` if the field is not set or
5029    /// holds a different branch.
5030    pub fn cel_expression(
5031        &self,
5032    ) -> std::option::Option<&std::boxed::Box<crate::model::CELExpression>> {
5033        #[allow(unreachable_patterns)]
5034        self.implementation.as_ref().and_then(|v| match v {
5035            crate::model::rule::Implementation::CelExpression(v) => std::option::Option::Some(v),
5036            _ => std::option::Option::None,
5037        })
5038    }
5039
5040    /// Sets the value of [implementation][crate::model::Rule::implementation]
5041    /// to hold a `CelExpression`.
5042    ///
5043    /// Note that all the setters affecting `implementation` are
5044    /// mutually exclusive.
5045    ///
5046    /// # Example
5047    /// ```ignore,no_run
5048    /// # use google_cloud_cloudsecuritycompliance_v1::model::Rule;
5049    /// use google_cloud_cloudsecuritycompliance_v1::model::CELExpression;
5050    /// let x = Rule::new().set_cel_expression(CELExpression::default()/* use setters */);
5051    /// assert!(x.cel_expression().is_some());
5052    /// ```
5053    pub fn set_cel_expression<
5054        T: std::convert::Into<std::boxed::Box<crate::model::CELExpression>>,
5055    >(
5056        mut self,
5057        v: T,
5058    ) -> Self {
5059        self.implementation =
5060            std::option::Option::Some(crate::model::rule::Implementation::CelExpression(v.into()));
5061        self
5062    }
5063}
5064
5065impl wkt::message::Message for Rule {
5066    fn typename() -> &'static str {
5067        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.Rule"
5068    }
5069}
5070
5071/// Defines additional types related to [Rule].
5072pub mod rule {
5073    #[allow(unused_imports)]
5074    use super::*;
5075
5076    /// The rule implementation.
5077    #[derive(Clone, Debug, PartialEq)]
5078    #[non_exhaustive]
5079    pub enum Implementation {
5080        /// The rule's logic expression in Common Expression Language (CEL).
5081        CelExpression(std::boxed::Box<crate::model::CELExpression>),
5082    }
5083}
5084
5085/// A Common Expression Language (CEL) expression that's used to create a rule.
5086#[derive(Clone, Default, PartialEq)]
5087#[non_exhaustive]
5088pub struct CELExpression {
5089    /// Required. The logical expression in CEL. The maximum length of the
5090    /// condition is 1000 characters. For more information, see [CEL
5091    /// expression](https://cloud.google.com/security-command-center/docs/compliance-manager-write-cel-expressions).
5092    pub expression: std::string::String,
5093
5094    /// The criteria of the CEL expression.
5095    pub criteria: std::option::Option<crate::model::cel_expression::Criteria>,
5096
5097    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5098}
5099
5100impl CELExpression {
5101    pub fn new() -> Self {
5102        std::default::Default::default()
5103    }
5104
5105    /// Sets the value of [expression][crate::model::CELExpression::expression].
5106    ///
5107    /// # Example
5108    /// ```ignore,no_run
5109    /// # use google_cloud_cloudsecuritycompliance_v1::model::CELExpression;
5110    /// let x = CELExpression::new().set_expression("example");
5111    /// ```
5112    pub fn set_expression<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5113        self.expression = v.into();
5114        self
5115    }
5116
5117    /// Sets the value of [criteria][crate::model::CELExpression::criteria].
5118    ///
5119    /// Note that all the setters affecting `criteria` are mutually
5120    /// exclusive.
5121    ///
5122    /// # Example
5123    /// ```ignore,no_run
5124    /// # use google_cloud_cloudsecuritycompliance_v1::model::CELExpression;
5125    /// use google_cloud_cloudsecuritycompliance_v1::model::StringList;
5126    /// let x = CELExpression::new().set_criteria(Some(
5127    ///     google_cloud_cloudsecuritycompliance_v1::model::cel_expression::Criteria::ResourceTypesValues(StringList::default().into())));
5128    /// ```
5129    pub fn set_criteria<
5130        T: std::convert::Into<std::option::Option<crate::model::cel_expression::Criteria>>,
5131    >(
5132        mut self,
5133        v: T,
5134    ) -> Self {
5135        self.criteria = v.into();
5136        self
5137    }
5138
5139    /// The value of [criteria][crate::model::CELExpression::criteria]
5140    /// if it holds a `ResourceTypesValues`, `None` if the field is not set or
5141    /// holds a different branch.
5142    pub fn resource_types_values(
5143        &self,
5144    ) -> std::option::Option<&std::boxed::Box<crate::model::StringList>> {
5145        #[allow(unreachable_patterns)]
5146        self.criteria.as_ref().and_then(|v| match v {
5147            crate::model::cel_expression::Criteria::ResourceTypesValues(v) => {
5148                std::option::Option::Some(v)
5149            }
5150            _ => std::option::Option::None,
5151        })
5152    }
5153
5154    /// Sets the value of [criteria][crate::model::CELExpression::criteria]
5155    /// to hold a `ResourceTypesValues`.
5156    ///
5157    /// Note that all the setters affecting `criteria` are
5158    /// mutually exclusive.
5159    ///
5160    /// # Example
5161    /// ```ignore,no_run
5162    /// # use google_cloud_cloudsecuritycompliance_v1::model::CELExpression;
5163    /// use google_cloud_cloudsecuritycompliance_v1::model::StringList;
5164    /// let x = CELExpression::new().set_resource_types_values(StringList::default()/* use setters */);
5165    /// assert!(x.resource_types_values().is_some());
5166    /// ```
5167    pub fn set_resource_types_values<
5168        T: std::convert::Into<std::boxed::Box<crate::model::StringList>>,
5169    >(
5170        mut self,
5171        v: T,
5172    ) -> Self {
5173        self.criteria = std::option::Option::Some(
5174            crate::model::cel_expression::Criteria::ResourceTypesValues(v.into()),
5175        );
5176        self
5177    }
5178}
5179
5180impl wkt::message::Message for CELExpression {
5181    fn typename() -> &'static str {
5182        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CELExpression"
5183    }
5184}
5185
5186/// Defines additional types related to [CELExpression].
5187pub mod cel_expression {
5188    #[allow(unused_imports)]
5189    use super::*;
5190
5191    /// The criteria of the CEL expression.
5192    #[derive(Clone, Debug, PartialEq)]
5193    #[non_exhaustive]
5194    pub enum Criteria {
5195        /// The resource instance types on which this expression is defined.
5196        /// The format is `<SERVICE_NAME>/<type>`.
5197        /// For example: `compute.googleapis.com/Instance`
5198        ResourceTypesValues(std::boxed::Box<crate::model::StringList>),
5199    }
5200}
5201
5202/// The metadata for the long-running operation.
5203#[derive(Clone, Default, PartialEq)]
5204#[non_exhaustive]
5205pub struct OperationMetadata {
5206    /// Output only. The time the operation was created.
5207    pub create_time: std::option::Option<wkt::Timestamp>,
5208
5209    /// Output only. The time the operation finished running.
5210    pub end_time: std::option::Option<wkt::Timestamp>,
5211
5212    /// Output only. The server-defined resource path for the target of the
5213    /// operation.
5214    pub target: std::string::String,
5215
5216    /// Output only. The name of the verb that was executed by the operation.
5217    pub verb: std::string::String,
5218
5219    /// Output only. The human-readable status of the operation, if any.
5220    pub status_message: std::string::String,
5221
5222    /// Output only. Identifies whether the user has requested that the operation
5223    /// be cancelled. If an operation was cancelled successfully, then the field
5224    /// [google.longrunning.Operation.error][google.longrunning.Operation.error]
5225    /// contains the value [google.rpc.Code.CANCELLED][google.rpc.Code.CANCELLED].
5226    ///
5227    /// [google.longrunning.Operation.error]: google_cloud_longrunning::model::Operation::result
5228    pub requested_cancellation: bool,
5229
5230    /// Output only. The API version that was used to start the operation.
5231    pub api_version: std::string::String,
5232
5233    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5234}
5235
5236impl OperationMetadata {
5237    pub fn new() -> Self {
5238        std::default::Default::default()
5239    }
5240
5241    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
5242    ///
5243    /// # Example
5244    /// ```ignore,no_run
5245    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5246    /// use wkt::Timestamp;
5247    /// let x = OperationMetadata::new().set_create_time(Timestamp::default()/* use setters */);
5248    /// ```
5249    pub fn set_create_time<T>(mut self, v: T) -> Self
5250    where
5251        T: std::convert::Into<wkt::Timestamp>,
5252    {
5253        self.create_time = std::option::Option::Some(v.into());
5254        self
5255    }
5256
5257    /// Sets or clears the value of [create_time][crate::model::OperationMetadata::create_time].
5258    ///
5259    /// # Example
5260    /// ```ignore,no_run
5261    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5262    /// use wkt::Timestamp;
5263    /// let x = OperationMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
5264    /// let x = OperationMetadata::new().set_or_clear_create_time(None::<Timestamp>);
5265    /// ```
5266    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5267    where
5268        T: std::convert::Into<wkt::Timestamp>,
5269    {
5270        self.create_time = v.map(|x| x.into());
5271        self
5272    }
5273
5274    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
5275    ///
5276    /// # Example
5277    /// ```ignore,no_run
5278    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5279    /// use wkt::Timestamp;
5280    /// let x = OperationMetadata::new().set_end_time(Timestamp::default()/* use setters */);
5281    /// ```
5282    pub fn set_end_time<T>(mut self, v: T) -> Self
5283    where
5284        T: std::convert::Into<wkt::Timestamp>,
5285    {
5286        self.end_time = std::option::Option::Some(v.into());
5287        self
5288    }
5289
5290    /// Sets or clears the value of [end_time][crate::model::OperationMetadata::end_time].
5291    ///
5292    /// # Example
5293    /// ```ignore,no_run
5294    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5295    /// use wkt::Timestamp;
5296    /// let x = OperationMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
5297    /// let x = OperationMetadata::new().set_or_clear_end_time(None::<Timestamp>);
5298    /// ```
5299    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
5300    where
5301        T: std::convert::Into<wkt::Timestamp>,
5302    {
5303        self.end_time = v.map(|x| x.into());
5304        self
5305    }
5306
5307    /// Sets the value of [target][crate::model::OperationMetadata::target].
5308    ///
5309    /// # Example
5310    /// ```ignore,no_run
5311    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5312    /// let x = OperationMetadata::new().set_target("example");
5313    /// ```
5314    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5315        self.target = v.into();
5316        self
5317    }
5318
5319    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
5320    ///
5321    /// # Example
5322    /// ```ignore,no_run
5323    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5324    /// let x = OperationMetadata::new().set_verb("example");
5325    /// ```
5326    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5327        self.verb = v.into();
5328        self
5329    }
5330
5331    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
5332    ///
5333    /// # Example
5334    /// ```ignore,no_run
5335    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5336    /// let x = OperationMetadata::new().set_status_message("example");
5337    /// ```
5338    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5339        self.status_message = v.into();
5340        self
5341    }
5342
5343    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
5344    ///
5345    /// # Example
5346    /// ```ignore,no_run
5347    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5348    /// let x = OperationMetadata::new().set_requested_cancellation(true);
5349    /// ```
5350    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5351        self.requested_cancellation = v.into();
5352        self
5353    }
5354
5355    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
5356    ///
5357    /// # Example
5358    /// ```ignore,no_run
5359    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5360    /// let x = OperationMetadata::new().set_api_version("example");
5361    /// ```
5362    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5363        self.api_version = v.into();
5364        self
5365    }
5366}
5367
5368impl wkt::message::Message for OperationMetadata {
5369    fn typename() -> &'static str {
5370        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.OperationMetadata"
5371    }
5372}
5373
5374/// The regulatory family of the control.
5375#[derive(Clone, Default, PartialEq)]
5376#[non_exhaustive]
5377pub struct ControlFamily {
5378    /// The identifier for the regulatory control family.
5379    pub family_id: std::string::String,
5380
5381    /// The friendly name for the regulatory control family.
5382    pub display_name: std::string::String,
5383
5384    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5385}
5386
5387impl ControlFamily {
5388    pub fn new() -> Self {
5389        std::default::Default::default()
5390    }
5391
5392    /// Sets the value of [family_id][crate::model::ControlFamily::family_id].
5393    ///
5394    /// # Example
5395    /// ```ignore,no_run
5396    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlFamily;
5397    /// let x = ControlFamily::new().set_family_id("example");
5398    /// ```
5399    pub fn set_family_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5400        self.family_id = v.into();
5401        self
5402    }
5403
5404    /// Sets the value of [display_name][crate::model::ControlFamily::display_name].
5405    ///
5406    /// # Example
5407    /// ```ignore,no_run
5408    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlFamily;
5409    /// let x = ControlFamily::new().set_display_name("example");
5410    /// ```
5411    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5412        self.display_name = v.into();
5413        self
5414    }
5415}
5416
5417impl wkt::message::Message for ControlFamily {
5418    fn typename() -> &'static str {
5419        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ControlFamily"
5420    }
5421}
5422
5423/// Request message for [ListFrameworks][].
5424#[derive(Clone, Default, PartialEq)]
5425#[non_exhaustive]
5426pub struct ListFrameworksRequest {
5427    /// Required. The parent resource name, in the format
5428    /// `organizations/{organization}/locations/{location}`.
5429    /// The only supported location is `global`.
5430    pub parent: std::string::String,
5431
5432    /// Optional. The maximum number of frameworks to return. The default value is
5433    /// `500`.
5434    ///
5435    /// If you exceed the maximum value of `1000`, then the service uses the
5436    /// maximum value.
5437    pub page_size: i32,
5438
5439    /// Optional. A pagination token returned from a previous request to list
5440    /// frameworks. Provide this token to retrieve the next page of results.
5441    pub page_token: std::string::String,
5442
5443    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5444}
5445
5446impl ListFrameworksRequest {
5447    pub fn new() -> Self {
5448        std::default::Default::default()
5449    }
5450
5451    /// Sets the value of [parent][crate::model::ListFrameworksRequest::parent].
5452    ///
5453    /// # Example
5454    /// ```ignore,no_run
5455    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworksRequest;
5456    /// let x = ListFrameworksRequest::new().set_parent("example");
5457    /// ```
5458    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5459        self.parent = v.into();
5460        self
5461    }
5462
5463    /// Sets the value of [page_size][crate::model::ListFrameworksRequest::page_size].
5464    ///
5465    /// # Example
5466    /// ```ignore,no_run
5467    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworksRequest;
5468    /// let x = ListFrameworksRequest::new().set_page_size(42);
5469    /// ```
5470    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5471        self.page_size = v.into();
5472        self
5473    }
5474
5475    /// Sets the value of [page_token][crate::model::ListFrameworksRequest::page_token].
5476    ///
5477    /// # Example
5478    /// ```ignore,no_run
5479    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworksRequest;
5480    /// let x = ListFrameworksRequest::new().set_page_token("example");
5481    /// ```
5482    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5483        self.page_token = v.into();
5484        self
5485    }
5486}
5487
5488impl wkt::message::Message for ListFrameworksRequest {
5489    fn typename() -> &'static str {
5490        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest"
5491    }
5492}
5493
5494/// The response message for [ListFrameworks][].
5495/// Returns a paginated list of Framework resources.
5496#[derive(Clone, Default, PartialEq)]
5497#[non_exhaustive]
5498pub struct ListFrameworksResponse {
5499    /// The list of framework resources.
5500    pub frameworks: std::vec::Vec<crate::model::Framework>,
5501
5502    /// A pagination token. To retrieve the next page of results, call the method
5503    /// again with this token.
5504    pub next_page_token: std::string::String,
5505
5506    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5507}
5508
5509impl ListFrameworksResponse {
5510    pub fn new() -> Self {
5511        std::default::Default::default()
5512    }
5513
5514    /// Sets the value of [frameworks][crate::model::ListFrameworksResponse::frameworks].
5515    ///
5516    /// # Example
5517    /// ```ignore,no_run
5518    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworksResponse;
5519    /// use google_cloud_cloudsecuritycompliance_v1::model::Framework;
5520    /// let x = ListFrameworksResponse::new()
5521    ///     .set_frameworks([
5522    ///         Framework::default()/* use setters */,
5523    ///         Framework::default()/* use (different) setters */,
5524    ///     ]);
5525    /// ```
5526    pub fn set_frameworks<T, V>(mut self, v: T) -> Self
5527    where
5528        T: std::iter::IntoIterator<Item = V>,
5529        V: std::convert::Into<crate::model::Framework>,
5530    {
5531        use std::iter::Iterator;
5532        self.frameworks = v.into_iter().map(|i| i.into()).collect();
5533        self
5534    }
5535
5536    /// Sets the value of [next_page_token][crate::model::ListFrameworksResponse::next_page_token].
5537    ///
5538    /// # Example
5539    /// ```ignore,no_run
5540    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworksResponse;
5541    /// let x = ListFrameworksResponse::new().set_next_page_token("example");
5542    /// ```
5543    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5544        self.next_page_token = v.into();
5545        self
5546    }
5547}
5548
5549impl wkt::message::Message for ListFrameworksResponse {
5550    fn typename() -> &'static str {
5551        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse"
5552    }
5553}
5554
5555#[doc(hidden)]
5556impl google_cloud_gax::paginator::internal::PageableResponse for ListFrameworksResponse {
5557    type PageItem = crate::model::Framework;
5558
5559    fn items(self) -> std::vec::Vec<Self::PageItem> {
5560        self.frameworks
5561    }
5562
5563    fn next_page_token(&self) -> std::string::String {
5564        use std::clone::Clone;
5565        self.next_page_token.clone()
5566    }
5567}
5568
5569/// The request message for [GetFramework][].
5570#[derive(Clone, Default, PartialEq)]
5571#[non_exhaustive]
5572pub struct GetFrameworkRequest {
5573    /// Required. The name of the framework to retrieve, in the format
5574    /// `organizations/{organization}/locations/{location}/frameworks/{framework_id}`
5575    /// The only supported location is `global`.
5576    pub name: std::string::String,
5577
5578    /// Optional. The framework major version to retrieve. If not specified, the
5579    /// most recently updated `revision_id` is retrieved.
5580    pub major_revision_id: i64,
5581
5582    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5583}
5584
5585impl GetFrameworkRequest {
5586    pub fn new() -> Self {
5587        std::default::Default::default()
5588    }
5589
5590    /// Sets the value of [name][crate::model::GetFrameworkRequest::name].
5591    ///
5592    /// # Example
5593    /// ```ignore,no_run
5594    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetFrameworkRequest;
5595    /// let x = GetFrameworkRequest::new().set_name("example");
5596    /// ```
5597    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5598        self.name = v.into();
5599        self
5600    }
5601
5602    /// Sets the value of [major_revision_id][crate::model::GetFrameworkRequest::major_revision_id].
5603    ///
5604    /// # Example
5605    /// ```ignore,no_run
5606    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetFrameworkRequest;
5607    /// let x = GetFrameworkRequest::new().set_major_revision_id(42);
5608    /// ```
5609    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5610        self.major_revision_id = v.into();
5611        self
5612    }
5613}
5614
5615impl wkt::message::Message for GetFrameworkRequest {
5616    fn typename() -> &'static str {
5617        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest"
5618    }
5619}
5620
5621/// The request message for [CreateFramework][].
5622#[derive(Clone, Default, PartialEq)]
5623#[non_exhaustive]
5624pub struct CreateFrameworkRequest {
5625    /// Required. The parent resource name, in the format
5626    /// `organizations/{organization}/locations/{location}`.
5627    /// The only supported location is `global`.
5628    pub parent: std::string::String,
5629
5630    /// Required. The identifier (ID) of the framework. The ID is not the full name
5631    /// of the framework; it's the last part of the full name of the framework.
5632    pub framework_id: std::string::String,
5633
5634    /// Required. The resource being created.
5635    pub framework: std::option::Option<crate::model::Framework>,
5636
5637    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5638}
5639
5640impl CreateFrameworkRequest {
5641    pub fn new() -> Self {
5642        std::default::Default::default()
5643    }
5644
5645    /// Sets the value of [parent][crate::model::CreateFrameworkRequest::parent].
5646    ///
5647    /// # Example
5648    /// ```ignore,no_run
5649    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkRequest;
5650    /// let x = CreateFrameworkRequest::new().set_parent("example");
5651    /// ```
5652    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5653        self.parent = v.into();
5654        self
5655    }
5656
5657    /// Sets the value of [framework_id][crate::model::CreateFrameworkRequest::framework_id].
5658    ///
5659    /// # Example
5660    /// ```ignore,no_run
5661    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkRequest;
5662    /// let x = CreateFrameworkRequest::new().set_framework_id("example");
5663    /// ```
5664    pub fn set_framework_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5665        self.framework_id = v.into();
5666        self
5667    }
5668
5669    /// Sets the value of [framework][crate::model::CreateFrameworkRequest::framework].
5670    ///
5671    /// # Example
5672    /// ```ignore,no_run
5673    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkRequest;
5674    /// use google_cloud_cloudsecuritycompliance_v1::model::Framework;
5675    /// let x = CreateFrameworkRequest::new().set_framework(Framework::default()/* use setters */);
5676    /// ```
5677    pub fn set_framework<T>(mut self, v: T) -> Self
5678    where
5679        T: std::convert::Into<crate::model::Framework>,
5680    {
5681        self.framework = std::option::Option::Some(v.into());
5682        self
5683    }
5684
5685    /// Sets or clears the value of [framework][crate::model::CreateFrameworkRequest::framework].
5686    ///
5687    /// # Example
5688    /// ```ignore,no_run
5689    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkRequest;
5690    /// use google_cloud_cloudsecuritycompliance_v1::model::Framework;
5691    /// let x = CreateFrameworkRequest::new().set_or_clear_framework(Some(Framework::default()/* use setters */));
5692    /// let x = CreateFrameworkRequest::new().set_or_clear_framework(None::<Framework>);
5693    /// ```
5694    pub fn set_or_clear_framework<T>(mut self, v: std::option::Option<T>) -> Self
5695    where
5696        T: std::convert::Into<crate::model::Framework>,
5697    {
5698        self.framework = v.map(|x| x.into());
5699        self
5700    }
5701}
5702
5703impl wkt::message::Message for CreateFrameworkRequest {
5704    fn typename() -> &'static str {
5705        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest"
5706    }
5707}
5708
5709/// The request message for [UpdateFramework][].
5710#[derive(Clone, Default, PartialEq)]
5711#[non_exhaustive]
5712pub struct UpdateFrameworkRequest {
5713    /// Optional. A field mask is used to specify the fields to be overwritten in
5714    /// the framework resource by the update. The fields specified in the
5715    /// `update_mask` are relative to the resource, not the full request. A field
5716    /// is overwritten if it is in the mask. If you don't provide a mask then all
5717    /// fields present in the request will be overwritten.
5718    pub update_mask: std::option::Option<wkt::FieldMask>,
5719
5720    /// Required. The resource that is being updated.
5721    pub framework: std::option::Option<crate::model::Framework>,
5722
5723    /// Optional. The major version ID of the framework to update.
5724    pub major_revision_id: i64,
5725
5726    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5727}
5728
5729impl UpdateFrameworkRequest {
5730    pub fn new() -> Self {
5731        std::default::Default::default()
5732    }
5733
5734    /// Sets the value of [update_mask][crate::model::UpdateFrameworkRequest::update_mask].
5735    ///
5736    /// # Example
5737    /// ```ignore,no_run
5738    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateFrameworkRequest;
5739    /// use wkt::FieldMask;
5740    /// let x = UpdateFrameworkRequest::new().set_update_mask(FieldMask::default()/* use setters */);
5741    /// ```
5742    pub fn set_update_mask<T>(mut self, v: T) -> Self
5743    where
5744        T: std::convert::Into<wkt::FieldMask>,
5745    {
5746        self.update_mask = std::option::Option::Some(v.into());
5747        self
5748    }
5749
5750    /// Sets or clears the value of [update_mask][crate::model::UpdateFrameworkRequest::update_mask].
5751    ///
5752    /// # Example
5753    /// ```ignore,no_run
5754    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateFrameworkRequest;
5755    /// use wkt::FieldMask;
5756    /// let x = UpdateFrameworkRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
5757    /// let x = UpdateFrameworkRequest::new().set_or_clear_update_mask(None::<FieldMask>);
5758    /// ```
5759    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5760    where
5761        T: std::convert::Into<wkt::FieldMask>,
5762    {
5763        self.update_mask = v.map(|x| x.into());
5764        self
5765    }
5766
5767    /// Sets the value of [framework][crate::model::UpdateFrameworkRequest::framework].
5768    ///
5769    /// # Example
5770    /// ```ignore,no_run
5771    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateFrameworkRequest;
5772    /// use google_cloud_cloudsecuritycompliance_v1::model::Framework;
5773    /// let x = UpdateFrameworkRequest::new().set_framework(Framework::default()/* use setters */);
5774    /// ```
5775    pub fn set_framework<T>(mut self, v: T) -> Self
5776    where
5777        T: std::convert::Into<crate::model::Framework>,
5778    {
5779        self.framework = std::option::Option::Some(v.into());
5780        self
5781    }
5782
5783    /// Sets or clears the value of [framework][crate::model::UpdateFrameworkRequest::framework].
5784    ///
5785    /// # Example
5786    /// ```ignore,no_run
5787    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateFrameworkRequest;
5788    /// use google_cloud_cloudsecuritycompliance_v1::model::Framework;
5789    /// let x = UpdateFrameworkRequest::new().set_or_clear_framework(Some(Framework::default()/* use setters */));
5790    /// let x = UpdateFrameworkRequest::new().set_or_clear_framework(None::<Framework>);
5791    /// ```
5792    pub fn set_or_clear_framework<T>(mut self, v: std::option::Option<T>) -> Self
5793    where
5794        T: std::convert::Into<crate::model::Framework>,
5795    {
5796        self.framework = v.map(|x| x.into());
5797        self
5798    }
5799
5800    /// Sets the value of [major_revision_id][crate::model::UpdateFrameworkRequest::major_revision_id].
5801    ///
5802    /// # Example
5803    /// ```ignore,no_run
5804    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateFrameworkRequest;
5805    /// let x = UpdateFrameworkRequest::new().set_major_revision_id(42);
5806    /// ```
5807    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5808        self.major_revision_id = v.into();
5809        self
5810    }
5811}
5812
5813impl wkt::message::Message for UpdateFrameworkRequest {
5814    fn typename() -> &'static str {
5815        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest"
5816    }
5817}
5818
5819/// Request message for [DeleteFramework][].
5820#[derive(Clone, Default, PartialEq)]
5821#[non_exhaustive]
5822pub struct DeleteFrameworkRequest {
5823    /// Required. The name of the resource, in the format
5824    /// `organizations/{organization}/locations/{location}/frameworks/{framework}`.
5825    /// The only supported location is `global`.
5826    pub name: std::string::String,
5827
5828    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5829}
5830
5831impl DeleteFrameworkRequest {
5832    pub fn new() -> Self {
5833        std::default::Default::default()
5834    }
5835
5836    /// Sets the value of [name][crate::model::DeleteFrameworkRequest::name].
5837    ///
5838    /// # Example
5839    /// ```ignore,no_run
5840    /// # use google_cloud_cloudsecuritycompliance_v1::model::DeleteFrameworkRequest;
5841    /// let x = DeleteFrameworkRequest::new().set_name("example");
5842    /// ```
5843    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5844        self.name = v.into();
5845        self
5846    }
5847}
5848
5849impl wkt::message::Message for DeleteFrameworkRequest {
5850    fn typename() -> &'static str {
5851        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest"
5852    }
5853}
5854
5855/// Request message for [ListCloudControls][].
5856#[derive(Clone, Default, PartialEq)]
5857#[non_exhaustive]
5858pub struct ListCloudControlsRequest {
5859    /// Required. The parent resource name, in the format
5860    /// `organizations/{organization}/locations/{location}`.
5861    /// The only supported location is `global`.
5862    pub parent: std::string::String,
5863
5864    /// Optional. The maximum number of cloud controls to return. The default value
5865    /// is `500`.
5866    ///
5867    /// If you exceed the maximum value of `1000`, then the service uses the
5868    /// maximum value.
5869    pub page_size: i32,
5870
5871    /// Optional. A pagination token that's returned from a previous request to
5872    /// list cloud controls. Provide this token to retrieve the next page of
5873    /// results.
5874    ///
5875    /// When paginating, the parent that you provide to the
5876    /// [ListCloudControls][google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls]
5877    /// request must match the call that provided the page token.
5878    ///
5879    /// [google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls]: crate::client::Config::list_cloud_controls
5880    pub page_token: std::string::String,
5881
5882    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5883}
5884
5885impl ListCloudControlsRequest {
5886    pub fn new() -> Self {
5887        std::default::Default::default()
5888    }
5889
5890    /// Sets the value of [parent][crate::model::ListCloudControlsRequest::parent].
5891    ///
5892    /// # Example
5893    /// ```ignore,no_run
5894    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlsRequest;
5895    /// let x = ListCloudControlsRequest::new().set_parent("example");
5896    /// ```
5897    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5898        self.parent = v.into();
5899        self
5900    }
5901
5902    /// Sets the value of [page_size][crate::model::ListCloudControlsRequest::page_size].
5903    ///
5904    /// # Example
5905    /// ```ignore,no_run
5906    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlsRequest;
5907    /// let x = ListCloudControlsRequest::new().set_page_size(42);
5908    /// ```
5909    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5910        self.page_size = v.into();
5911        self
5912    }
5913
5914    /// Sets the value of [page_token][crate::model::ListCloudControlsRequest::page_token].
5915    ///
5916    /// # Example
5917    /// ```ignore,no_run
5918    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlsRequest;
5919    /// let x = ListCloudControlsRequest::new().set_page_token("example");
5920    /// ```
5921    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5922        self.page_token = v.into();
5923        self
5924    }
5925}
5926
5927impl wkt::message::Message for ListCloudControlsRequest {
5928    fn typename() -> &'static str {
5929        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest"
5930    }
5931}
5932
5933/// The response message for [ListCloudControls][].
5934#[derive(Clone, Default, PartialEq)]
5935#[non_exhaustive]
5936pub struct ListCloudControlsResponse {
5937    /// The list of CloudControl resources.
5938    pub cloud_controls: std::vec::Vec<crate::model::CloudControl>,
5939
5940    /// A pagination token. To retrieve the next page of results, call the method
5941    /// again with this token.
5942    pub next_page_token: std::string::String,
5943
5944    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5945}
5946
5947impl ListCloudControlsResponse {
5948    pub fn new() -> Self {
5949        std::default::Default::default()
5950    }
5951
5952    /// Sets the value of [cloud_controls][crate::model::ListCloudControlsResponse::cloud_controls].
5953    ///
5954    /// # Example
5955    /// ```ignore,no_run
5956    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlsResponse;
5957    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
5958    /// let x = ListCloudControlsResponse::new()
5959    ///     .set_cloud_controls([
5960    ///         CloudControl::default()/* use setters */,
5961    ///         CloudControl::default()/* use (different) setters */,
5962    ///     ]);
5963    /// ```
5964    pub fn set_cloud_controls<T, V>(mut self, v: T) -> Self
5965    where
5966        T: std::iter::IntoIterator<Item = V>,
5967        V: std::convert::Into<crate::model::CloudControl>,
5968    {
5969        use std::iter::Iterator;
5970        self.cloud_controls = v.into_iter().map(|i| i.into()).collect();
5971        self
5972    }
5973
5974    /// Sets the value of [next_page_token][crate::model::ListCloudControlsResponse::next_page_token].
5975    ///
5976    /// # Example
5977    /// ```ignore,no_run
5978    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlsResponse;
5979    /// let x = ListCloudControlsResponse::new().set_next_page_token("example");
5980    /// ```
5981    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5982        self.next_page_token = v.into();
5983        self
5984    }
5985}
5986
5987impl wkt::message::Message for ListCloudControlsResponse {
5988    fn typename() -> &'static str {
5989        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse"
5990    }
5991}
5992
5993#[doc(hidden)]
5994impl google_cloud_gax::paginator::internal::PageableResponse for ListCloudControlsResponse {
5995    type PageItem = crate::model::CloudControl;
5996
5997    fn items(self) -> std::vec::Vec<Self::PageItem> {
5998        self.cloud_controls
5999    }
6000
6001    fn next_page_token(&self) -> std::string::String {
6002        use std::clone::Clone;
6003        self.next_page_token.clone()
6004    }
6005}
6006
6007/// The request message for [GetCloudControl][].
6008#[derive(Clone, Default, PartialEq)]
6009#[non_exhaustive]
6010pub struct GetCloudControlRequest {
6011    /// Required. The name of the cloud control to retrieve, in the format
6012    /// `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}`.
6013    /// The only supported location is `global`.
6014    pub name: std::string::String,
6015
6016    /// Optional. The major version of the cloud control to retrieve. If not
6017    /// specified, the most recently updated `revision_id` is retrieved.
6018    pub major_revision_id: i64,
6019
6020    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6021}
6022
6023impl GetCloudControlRequest {
6024    pub fn new() -> Self {
6025        std::default::Default::default()
6026    }
6027
6028    /// Sets the value of [name][crate::model::GetCloudControlRequest::name].
6029    ///
6030    /// # Example
6031    /// ```ignore,no_run
6032    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetCloudControlRequest;
6033    /// let x = GetCloudControlRequest::new().set_name("example");
6034    /// ```
6035    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6036        self.name = v.into();
6037        self
6038    }
6039
6040    /// Sets the value of [major_revision_id][crate::model::GetCloudControlRequest::major_revision_id].
6041    ///
6042    /// # Example
6043    /// ```ignore,no_run
6044    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetCloudControlRequest;
6045    /// let x = GetCloudControlRequest::new().set_major_revision_id(42);
6046    /// ```
6047    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
6048        self.major_revision_id = v.into();
6049        self
6050    }
6051}
6052
6053impl wkt::message::Message for GetCloudControlRequest {
6054    fn typename() -> &'static str {
6055        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest"
6056    }
6057}
6058
6059/// The request message for [CreateCloudControl][].
6060#[derive(Clone, Default, PartialEq)]
6061#[non_exhaustive]
6062pub struct CreateCloudControlRequest {
6063    /// Required. The parent resource name, in the format
6064    /// `organizations/{organization}/locations/{location}`.
6065    /// The only supported location is `global`.
6066    pub parent: std::string::String,
6067
6068    /// Required. The identifier for the cloud control, which is the last segment
6069    /// of the cloud control name. The format is
6070    /// `^[a-zA-Z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$`.
6071    pub cloud_control_id: std::string::String,
6072
6073    /// Required. The cloud control that's being created.
6074    pub cloud_control: std::option::Option<crate::model::CloudControl>,
6075
6076    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6077}
6078
6079impl CreateCloudControlRequest {
6080    pub fn new() -> Self {
6081        std::default::Default::default()
6082    }
6083
6084    /// Sets the value of [parent][crate::model::CreateCloudControlRequest::parent].
6085    ///
6086    /// # Example
6087    /// ```ignore,no_run
6088    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateCloudControlRequest;
6089    /// let x = CreateCloudControlRequest::new().set_parent("example");
6090    /// ```
6091    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6092        self.parent = v.into();
6093        self
6094    }
6095
6096    /// Sets the value of [cloud_control_id][crate::model::CreateCloudControlRequest::cloud_control_id].
6097    ///
6098    /// # Example
6099    /// ```ignore,no_run
6100    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateCloudControlRequest;
6101    /// let x = CreateCloudControlRequest::new().set_cloud_control_id("example");
6102    /// ```
6103    pub fn set_cloud_control_id<T: std::convert::Into<std::string::String>>(
6104        mut self,
6105        v: T,
6106    ) -> Self {
6107        self.cloud_control_id = v.into();
6108        self
6109    }
6110
6111    /// Sets the value of [cloud_control][crate::model::CreateCloudControlRequest::cloud_control].
6112    ///
6113    /// # Example
6114    /// ```ignore,no_run
6115    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateCloudControlRequest;
6116    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
6117    /// let x = CreateCloudControlRequest::new().set_cloud_control(CloudControl::default()/* use setters */);
6118    /// ```
6119    pub fn set_cloud_control<T>(mut self, v: T) -> Self
6120    where
6121        T: std::convert::Into<crate::model::CloudControl>,
6122    {
6123        self.cloud_control = std::option::Option::Some(v.into());
6124        self
6125    }
6126
6127    /// Sets or clears the value of [cloud_control][crate::model::CreateCloudControlRequest::cloud_control].
6128    ///
6129    /// # Example
6130    /// ```ignore,no_run
6131    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateCloudControlRequest;
6132    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
6133    /// let x = CreateCloudControlRequest::new().set_or_clear_cloud_control(Some(CloudControl::default()/* use setters */));
6134    /// let x = CreateCloudControlRequest::new().set_or_clear_cloud_control(None::<CloudControl>);
6135    /// ```
6136    pub fn set_or_clear_cloud_control<T>(mut self, v: std::option::Option<T>) -> Self
6137    where
6138        T: std::convert::Into<crate::model::CloudControl>,
6139    {
6140        self.cloud_control = v.map(|x| x.into());
6141        self
6142    }
6143}
6144
6145impl wkt::message::Message for CreateCloudControlRequest {
6146    fn typename() -> &'static str {
6147        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest"
6148    }
6149}
6150
6151/// The request message for [UpdateCloudControl][].
6152#[derive(Clone, Default, PartialEq)]
6153#[non_exhaustive]
6154pub struct UpdateCloudControlRequest {
6155    /// Optional. Use a field mask to specify the fields to be overwritten in the
6156    /// cloud control during the update.
6157    /// The fields that you specify in the `update_mask` are relative to the
6158    /// cloud control, not the full request. A field is overwritten if it is in
6159    /// the mask. If you don't provide a mask, all fields in the request
6160    /// are updated.
6161    ///
6162    /// You can update the following fields:
6163    ///
6164    /// - Display name
6165    /// - Description
6166    /// - Parameters
6167    /// - Rules
6168    /// - Parameter specification
6169    pub update_mask: std::option::Option<wkt::FieldMask>,
6170
6171    /// Required. The cloud control that you're updating.
6172    pub cloud_control: std::option::Option<crate::model::CloudControl>,
6173
6174    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6175}
6176
6177impl UpdateCloudControlRequest {
6178    pub fn new() -> Self {
6179        std::default::Default::default()
6180    }
6181
6182    /// Sets the value of [update_mask][crate::model::UpdateCloudControlRequest::update_mask].
6183    ///
6184    /// # Example
6185    /// ```ignore,no_run
6186    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCloudControlRequest;
6187    /// use wkt::FieldMask;
6188    /// let x = UpdateCloudControlRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6189    /// ```
6190    pub fn set_update_mask<T>(mut self, v: T) -> Self
6191    where
6192        T: std::convert::Into<wkt::FieldMask>,
6193    {
6194        self.update_mask = std::option::Option::Some(v.into());
6195        self
6196    }
6197
6198    /// Sets or clears the value of [update_mask][crate::model::UpdateCloudControlRequest::update_mask].
6199    ///
6200    /// # Example
6201    /// ```ignore,no_run
6202    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCloudControlRequest;
6203    /// use wkt::FieldMask;
6204    /// let x = UpdateCloudControlRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6205    /// let x = UpdateCloudControlRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6206    /// ```
6207    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6208    where
6209        T: std::convert::Into<wkt::FieldMask>,
6210    {
6211        self.update_mask = v.map(|x| x.into());
6212        self
6213    }
6214
6215    /// Sets the value of [cloud_control][crate::model::UpdateCloudControlRequest::cloud_control].
6216    ///
6217    /// # Example
6218    /// ```ignore,no_run
6219    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCloudControlRequest;
6220    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
6221    /// let x = UpdateCloudControlRequest::new().set_cloud_control(CloudControl::default()/* use setters */);
6222    /// ```
6223    pub fn set_cloud_control<T>(mut self, v: T) -> Self
6224    where
6225        T: std::convert::Into<crate::model::CloudControl>,
6226    {
6227        self.cloud_control = std::option::Option::Some(v.into());
6228        self
6229    }
6230
6231    /// Sets or clears the value of [cloud_control][crate::model::UpdateCloudControlRequest::cloud_control].
6232    ///
6233    /// # Example
6234    /// ```ignore,no_run
6235    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCloudControlRequest;
6236    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
6237    /// let x = UpdateCloudControlRequest::new().set_or_clear_cloud_control(Some(CloudControl::default()/* use setters */));
6238    /// let x = UpdateCloudControlRequest::new().set_or_clear_cloud_control(None::<CloudControl>);
6239    /// ```
6240    pub fn set_or_clear_cloud_control<T>(mut self, v: std::option::Option<T>) -> Self
6241    where
6242        T: std::convert::Into<crate::model::CloudControl>,
6243    {
6244        self.cloud_control = v.map(|x| x.into());
6245        self
6246    }
6247}
6248
6249impl wkt::message::Message for UpdateCloudControlRequest {
6250    fn typename() -> &'static str {
6251        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest"
6252    }
6253}
6254
6255/// The request message for [DeleteCloudControl][].
6256#[derive(Clone, Default, PartialEq)]
6257#[non_exhaustive]
6258pub struct DeleteCloudControlRequest {
6259    /// Required. The name of the cloud control to delete, in the format
6260    /// `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}`.
6261    /// The only supported location is `global`.
6262    pub name: std::string::String,
6263
6264    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6265}
6266
6267impl DeleteCloudControlRequest {
6268    pub fn new() -> Self {
6269        std::default::Default::default()
6270    }
6271
6272    /// Sets the value of [name][crate::model::DeleteCloudControlRequest::name].
6273    ///
6274    /// # Example
6275    /// ```ignore,no_run
6276    /// # use google_cloud_cloudsecuritycompliance_v1::model::DeleteCloudControlRequest;
6277    /// let x = DeleteCloudControlRequest::new().set_name("example");
6278    /// ```
6279    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6280        self.name = v.into();
6281        self
6282    }
6283}
6284
6285impl wkt::message::Message for DeleteCloudControlRequest {
6286    fn typename() -> &'static str {
6287        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest"
6288    }
6289}
6290
6291/// Framework deployments represent the assignment of a framework to a target
6292/// resource. Supported target resources are organizations, folders, and
6293/// projects.
6294#[derive(Clone, Default, PartialEq)]
6295#[non_exhaustive]
6296pub struct FrameworkDeployment {
6297    /// Identifier. The name of the framework deployment, in the format
6298    /// `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`.
6299    /// The only supported location is `global`.
6300    pub name: std::string::String,
6301
6302    /// Required. The details of the target resource that you want to deploy the
6303    /// framework to. You can specify an existing resource, or create a new one.
6304    pub target_resource_config: std::option::Option<crate::model::TargetResourceConfig>,
6305
6306    /// Output only. The target resource to deploy the framework to, in one  the
6307    /// following formats:
6308    ///
6309    /// - `organizations/{organizationID}`
6310    /// - `folders/{folderID}`
6311    /// - `projects/{projectID}`
6312    pub computed_target_resource: std::string::String,
6313
6314    /// Required. A reference to the framework that you're deploying.
6315    pub framework: std::option::Option<crate::model::FrameworkReference>,
6316
6317    /// Optional. A user-provided description of the framework deployment.
6318    pub description: std::string::String,
6319
6320    /// Required. The deployment mode and parameters for each of the cloud controls
6321    /// in the framework. Every cloud control in the framework includes metadata.
6322    pub cloud_control_metadata: std::vec::Vec<crate::model::CloudControlMetadata>,
6323
6324    /// Output only. The state for the framework deployment.
6325    pub deployment_state: crate::model::DeploymentState,
6326
6327    /// Output only. The time at which the resource was created.
6328    pub create_time: std::option::Option<wkt::Timestamp>,
6329
6330    /// Output only. The time at which the resource last updated.
6331    pub update_time: std::option::Option<wkt::Timestamp>,
6332
6333    /// Optional. To prevent concurrent updates from overwriting each other, always
6334    /// provide the `etag` when you update a framework deployment. You can also
6335    /// provide the `etag` when you delete a framework deployment, to help
6336    /// ensure that you're deleting the intended version of the
6337    /// framework deployment.
6338    pub etag: std::string::String,
6339
6340    /// Output only. The display name of the target resource.
6341    pub target_resource_display_name: std::string::String,
6342
6343    /// Output only. The references to the cloud control deployments. The reference
6344    /// includes all the cloud control deployments that are in the framework or in
6345    /// a cloud control group.
6346    ///
6347    /// For example, if a framework deployment deploys two
6348    /// cloud controls, `cc-deployment-1` and `cc-deployment-2`, then the
6349    /// references are:
6350    ///
6351    /// ```norust
6352    /// {
6353    ///  cloud_control_deployment_reference: {
6354    ///    cloud_control_deployment:
6355    ///    "organizations/{organization}/locations/{location}/cloudControlDeployments/cc-deployment-1"
6356    ///  },
6357    ///  cloud_control_deployment_reference: {
6358    ///   cloud_control_deployment:
6359    ///   "organizations/{organization}/locations/{location}/cloudControlDeployments/cc-deployment-2"
6360    ///  }
6361    /// ```
6362    pub cloud_control_deployment_references:
6363        std::vec::Vec<crate::model::CloudControlDeploymentReference>,
6364
6365    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6366}
6367
6368impl FrameworkDeployment {
6369    pub fn new() -> Self {
6370        std::default::Default::default()
6371    }
6372
6373    /// Sets the value of [name][crate::model::FrameworkDeployment::name].
6374    ///
6375    /// # Example
6376    /// ```ignore,no_run
6377    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
6378    /// let x = FrameworkDeployment::new().set_name("example");
6379    /// ```
6380    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6381        self.name = v.into();
6382        self
6383    }
6384
6385    /// Sets the value of [target_resource_config][crate::model::FrameworkDeployment::target_resource_config].
6386    ///
6387    /// # Example
6388    /// ```ignore,no_run
6389    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
6390    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
6391    /// let x = FrameworkDeployment::new().set_target_resource_config(TargetResourceConfig::default()/* use setters */);
6392    /// ```
6393    pub fn set_target_resource_config<T>(mut self, v: T) -> Self
6394    where
6395        T: std::convert::Into<crate::model::TargetResourceConfig>,
6396    {
6397        self.target_resource_config = std::option::Option::Some(v.into());
6398        self
6399    }
6400
6401    /// Sets or clears the value of [target_resource_config][crate::model::FrameworkDeployment::target_resource_config].
6402    ///
6403    /// # Example
6404    /// ```ignore,no_run
6405    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
6406    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
6407    /// let x = FrameworkDeployment::new().set_or_clear_target_resource_config(Some(TargetResourceConfig::default()/* use setters */));
6408    /// let x = FrameworkDeployment::new().set_or_clear_target_resource_config(None::<TargetResourceConfig>);
6409    /// ```
6410    pub fn set_or_clear_target_resource_config<T>(mut self, v: std::option::Option<T>) -> Self
6411    where
6412        T: std::convert::Into<crate::model::TargetResourceConfig>,
6413    {
6414        self.target_resource_config = v.map(|x| x.into());
6415        self
6416    }
6417
6418    /// Sets the value of [computed_target_resource][crate::model::FrameworkDeployment::computed_target_resource].
6419    ///
6420    /// # Example
6421    /// ```ignore,no_run
6422    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
6423    /// let x = FrameworkDeployment::new().set_computed_target_resource("example");
6424    /// ```
6425    pub fn set_computed_target_resource<T: std::convert::Into<std::string::String>>(
6426        mut self,
6427        v: T,
6428    ) -> Self {
6429        self.computed_target_resource = v.into();
6430        self
6431    }
6432
6433    /// Sets the value of [framework][crate::model::FrameworkDeployment::framework].
6434    ///
6435    /// # Example
6436    /// ```ignore,no_run
6437    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
6438    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
6439    /// let x = FrameworkDeployment::new().set_framework(FrameworkReference::default()/* use setters */);
6440    /// ```
6441    pub fn set_framework<T>(mut self, v: T) -> Self
6442    where
6443        T: std::convert::Into<crate::model::FrameworkReference>,
6444    {
6445        self.framework = std::option::Option::Some(v.into());
6446        self
6447    }
6448
6449    /// Sets or clears the value of [framework][crate::model::FrameworkDeployment::framework].
6450    ///
6451    /// # Example
6452    /// ```ignore,no_run
6453    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
6454    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
6455    /// let x = FrameworkDeployment::new().set_or_clear_framework(Some(FrameworkReference::default()/* use setters */));
6456    /// let x = FrameworkDeployment::new().set_or_clear_framework(None::<FrameworkReference>);
6457    /// ```
6458    pub fn set_or_clear_framework<T>(mut self, v: std::option::Option<T>) -> Self
6459    where
6460        T: std::convert::Into<crate::model::FrameworkReference>,
6461    {
6462        self.framework = v.map(|x| x.into());
6463        self
6464    }
6465
6466    /// Sets the value of [description][crate::model::FrameworkDeployment::description].
6467    ///
6468    /// # Example
6469    /// ```ignore,no_run
6470    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
6471    /// let x = FrameworkDeployment::new().set_description("example");
6472    /// ```
6473    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6474        self.description = v.into();
6475        self
6476    }
6477
6478    /// Sets the value of [cloud_control_metadata][crate::model::FrameworkDeployment::cloud_control_metadata].
6479    ///
6480    /// # Example
6481    /// ```ignore,no_run
6482    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
6483    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlMetadata;
6484    /// let x = FrameworkDeployment::new()
6485    ///     .set_cloud_control_metadata([
6486    ///         CloudControlMetadata::default()/* use setters */,
6487    ///         CloudControlMetadata::default()/* use (different) setters */,
6488    ///     ]);
6489    /// ```
6490    pub fn set_cloud_control_metadata<T, V>(mut self, v: T) -> Self
6491    where
6492        T: std::iter::IntoIterator<Item = V>,
6493        V: std::convert::Into<crate::model::CloudControlMetadata>,
6494    {
6495        use std::iter::Iterator;
6496        self.cloud_control_metadata = v.into_iter().map(|i| i.into()).collect();
6497        self
6498    }
6499
6500    /// Sets the value of [deployment_state][crate::model::FrameworkDeployment::deployment_state].
6501    ///
6502    /// # Example
6503    /// ```ignore,no_run
6504    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
6505    /// use google_cloud_cloudsecuritycompliance_v1::model::DeploymentState;
6506    /// let x0 = FrameworkDeployment::new().set_deployment_state(DeploymentState::Validating);
6507    /// let x1 = FrameworkDeployment::new().set_deployment_state(DeploymentState::Creating);
6508    /// let x2 = FrameworkDeployment::new().set_deployment_state(DeploymentState::Deleting);
6509    /// ```
6510    pub fn set_deployment_state<T: std::convert::Into<crate::model::DeploymentState>>(
6511        mut self,
6512        v: T,
6513    ) -> Self {
6514        self.deployment_state = v.into();
6515        self
6516    }
6517
6518    /// Sets the value of [create_time][crate::model::FrameworkDeployment::create_time].
6519    ///
6520    /// # Example
6521    /// ```ignore,no_run
6522    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
6523    /// use wkt::Timestamp;
6524    /// let x = FrameworkDeployment::new().set_create_time(Timestamp::default()/* use setters */);
6525    /// ```
6526    pub fn set_create_time<T>(mut self, v: T) -> Self
6527    where
6528        T: std::convert::Into<wkt::Timestamp>,
6529    {
6530        self.create_time = std::option::Option::Some(v.into());
6531        self
6532    }
6533
6534    /// Sets or clears the value of [create_time][crate::model::FrameworkDeployment::create_time].
6535    ///
6536    /// # Example
6537    /// ```ignore,no_run
6538    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
6539    /// use wkt::Timestamp;
6540    /// let x = FrameworkDeployment::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
6541    /// let x = FrameworkDeployment::new().set_or_clear_create_time(None::<Timestamp>);
6542    /// ```
6543    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6544    where
6545        T: std::convert::Into<wkt::Timestamp>,
6546    {
6547        self.create_time = v.map(|x| x.into());
6548        self
6549    }
6550
6551    /// Sets the value of [update_time][crate::model::FrameworkDeployment::update_time].
6552    ///
6553    /// # Example
6554    /// ```ignore,no_run
6555    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
6556    /// use wkt::Timestamp;
6557    /// let x = FrameworkDeployment::new().set_update_time(Timestamp::default()/* use setters */);
6558    /// ```
6559    pub fn set_update_time<T>(mut self, v: T) -> Self
6560    where
6561        T: std::convert::Into<wkt::Timestamp>,
6562    {
6563        self.update_time = std::option::Option::Some(v.into());
6564        self
6565    }
6566
6567    /// Sets or clears the value of [update_time][crate::model::FrameworkDeployment::update_time].
6568    ///
6569    /// # Example
6570    /// ```ignore,no_run
6571    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
6572    /// use wkt::Timestamp;
6573    /// let x = FrameworkDeployment::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
6574    /// let x = FrameworkDeployment::new().set_or_clear_update_time(None::<Timestamp>);
6575    /// ```
6576    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
6577    where
6578        T: std::convert::Into<wkt::Timestamp>,
6579    {
6580        self.update_time = v.map(|x| x.into());
6581        self
6582    }
6583
6584    /// Sets the value of [etag][crate::model::FrameworkDeployment::etag].
6585    ///
6586    /// # Example
6587    /// ```ignore,no_run
6588    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
6589    /// let x = FrameworkDeployment::new().set_etag("example");
6590    /// ```
6591    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6592        self.etag = v.into();
6593        self
6594    }
6595
6596    /// Sets the value of [target_resource_display_name][crate::model::FrameworkDeployment::target_resource_display_name].
6597    ///
6598    /// # Example
6599    /// ```ignore,no_run
6600    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
6601    /// let x = FrameworkDeployment::new().set_target_resource_display_name("example");
6602    /// ```
6603    pub fn set_target_resource_display_name<T: std::convert::Into<std::string::String>>(
6604        mut self,
6605        v: T,
6606    ) -> Self {
6607        self.target_resource_display_name = v.into();
6608        self
6609    }
6610
6611    /// Sets the value of [cloud_control_deployment_references][crate::model::FrameworkDeployment::cloud_control_deployment_references].
6612    ///
6613    /// # Example
6614    /// ```ignore,no_run
6615    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
6616    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeploymentReference;
6617    /// let x = FrameworkDeployment::new()
6618    ///     .set_cloud_control_deployment_references([
6619    ///         CloudControlDeploymentReference::default()/* use setters */,
6620    ///         CloudControlDeploymentReference::default()/* use (different) setters */,
6621    ///     ]);
6622    /// ```
6623    pub fn set_cloud_control_deployment_references<T, V>(mut self, v: T) -> Self
6624    where
6625        T: std::iter::IntoIterator<Item = V>,
6626        V: std::convert::Into<crate::model::CloudControlDeploymentReference>,
6627    {
6628        use std::iter::Iterator;
6629        self.cloud_control_deployment_references = v.into_iter().map(|i| i.into()).collect();
6630        self
6631    }
6632}
6633
6634impl wkt::message::Message for FrameworkDeployment {
6635    fn typename() -> &'static str {
6636        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment"
6637    }
6638}
6639
6640/// A cloud control deployment represents the deployment of a particular cloud
6641/// control on a target resource. Supported target resources are
6642/// `organizations/{organizationID}`, `folders/{folderID}`, and
6643/// `projects/{projectID}`.
6644#[derive(Clone, Default, PartialEq)]
6645#[non_exhaustive]
6646pub struct CloudControlDeployment {
6647    /// Identifier. The name for the cloud control deployment, in the format
6648    /// `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}`.
6649    /// The only supported location is `global`.
6650    pub name: std::string::String,
6651
6652    /// Required. The details of the target resource that the cloud control is
6653    /// deployed You can use an existing target resource or create a new target.
6654    pub target_resource_config: std::option::Option<crate::model::TargetResourceConfig>,
6655
6656    /// Output only. The resource that the cloud control is deployed on, in one of
6657    /// the following formats:
6658    ///
6659    /// - `organizations/{organizationID}`
6660    /// - `folders/{folderID}`
6661    /// - `projects/{projectID}`
6662    pub target_resource: std::string::String,
6663
6664    /// Required. The deployment mode and parameters for the cloud control.
6665    pub cloud_control_metadata: std::option::Option<crate::model::CloudControlMetadata>,
6666
6667    /// Optional. A friendly description for the cloud control deployment.
6668    pub description: std::string::String,
6669
6670    /// Output only. The state of the cloud control deployment.
6671    pub deployment_state: crate::model::DeploymentState,
6672
6673    /// Output only. The time when the resource was created.
6674    pub create_time: std::option::Option<wkt::Timestamp>,
6675
6676    /// Output only. The time when the resource was last updated.
6677    pub update_time: std::option::Option<wkt::Timestamp>,
6678
6679    /// Optional. To prevent concurrent updates from overwriting each other,
6680    /// provide the `etag` when you update a cloud control deployment. You can also
6681    /// provide the `etag` when you delete a cloud control deployment to help
6682    /// ensure that you're deleting the intended version of the
6683    /// deployment.
6684    pub etag: std::string::String,
6685
6686    /// Output only. The cloud control after the given parameters are substituted.
6687    pub parameter_substituted_cloud_control: std::option::Option<crate::model::CloudControl>,
6688
6689    /// Output only. The references to the framework deployments that this cloud
6690    /// control deployment is part of. A cloud control deployment can be part of
6691    /// multiple framework deployments.
6692    pub framework_deployment_references: std::vec::Vec<crate::model::FrameworkDeploymentReference>,
6693
6694    /// Output only. The display name of the target resource.
6695    pub target_resource_display_name: std::string::String,
6696
6697    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6698}
6699
6700impl CloudControlDeployment {
6701    pub fn new() -> Self {
6702        std::default::Default::default()
6703    }
6704
6705    /// Sets the value of [name][crate::model::CloudControlDeployment::name].
6706    ///
6707    /// # Example
6708    /// ```ignore,no_run
6709    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
6710    /// let x = CloudControlDeployment::new().set_name("example");
6711    /// ```
6712    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6713        self.name = v.into();
6714        self
6715    }
6716
6717    /// Sets the value of [target_resource_config][crate::model::CloudControlDeployment::target_resource_config].
6718    ///
6719    /// # Example
6720    /// ```ignore,no_run
6721    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
6722    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
6723    /// let x = CloudControlDeployment::new().set_target_resource_config(TargetResourceConfig::default()/* use setters */);
6724    /// ```
6725    pub fn set_target_resource_config<T>(mut self, v: T) -> Self
6726    where
6727        T: std::convert::Into<crate::model::TargetResourceConfig>,
6728    {
6729        self.target_resource_config = std::option::Option::Some(v.into());
6730        self
6731    }
6732
6733    /// Sets or clears the value of [target_resource_config][crate::model::CloudControlDeployment::target_resource_config].
6734    ///
6735    /// # Example
6736    /// ```ignore,no_run
6737    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
6738    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
6739    /// let x = CloudControlDeployment::new().set_or_clear_target_resource_config(Some(TargetResourceConfig::default()/* use setters */));
6740    /// let x = CloudControlDeployment::new().set_or_clear_target_resource_config(None::<TargetResourceConfig>);
6741    /// ```
6742    pub fn set_or_clear_target_resource_config<T>(mut self, v: std::option::Option<T>) -> Self
6743    where
6744        T: std::convert::Into<crate::model::TargetResourceConfig>,
6745    {
6746        self.target_resource_config = v.map(|x| x.into());
6747        self
6748    }
6749
6750    /// Sets the value of [target_resource][crate::model::CloudControlDeployment::target_resource].
6751    ///
6752    /// # Example
6753    /// ```ignore,no_run
6754    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
6755    /// let x = CloudControlDeployment::new().set_target_resource("example");
6756    /// ```
6757    pub fn set_target_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6758        self.target_resource = v.into();
6759        self
6760    }
6761
6762    /// Sets the value of [cloud_control_metadata][crate::model::CloudControlDeployment::cloud_control_metadata].
6763    ///
6764    /// # Example
6765    /// ```ignore,no_run
6766    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
6767    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlMetadata;
6768    /// let x = CloudControlDeployment::new().set_cloud_control_metadata(CloudControlMetadata::default()/* use setters */);
6769    /// ```
6770    pub fn set_cloud_control_metadata<T>(mut self, v: T) -> Self
6771    where
6772        T: std::convert::Into<crate::model::CloudControlMetadata>,
6773    {
6774        self.cloud_control_metadata = std::option::Option::Some(v.into());
6775        self
6776    }
6777
6778    /// Sets or clears the value of [cloud_control_metadata][crate::model::CloudControlDeployment::cloud_control_metadata].
6779    ///
6780    /// # Example
6781    /// ```ignore,no_run
6782    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
6783    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlMetadata;
6784    /// let x = CloudControlDeployment::new().set_or_clear_cloud_control_metadata(Some(CloudControlMetadata::default()/* use setters */));
6785    /// let x = CloudControlDeployment::new().set_or_clear_cloud_control_metadata(None::<CloudControlMetadata>);
6786    /// ```
6787    pub fn set_or_clear_cloud_control_metadata<T>(mut self, v: std::option::Option<T>) -> Self
6788    where
6789        T: std::convert::Into<crate::model::CloudControlMetadata>,
6790    {
6791        self.cloud_control_metadata = v.map(|x| x.into());
6792        self
6793    }
6794
6795    /// Sets the value of [description][crate::model::CloudControlDeployment::description].
6796    ///
6797    /// # Example
6798    /// ```ignore,no_run
6799    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
6800    /// let x = CloudControlDeployment::new().set_description("example");
6801    /// ```
6802    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6803        self.description = v.into();
6804        self
6805    }
6806
6807    /// Sets the value of [deployment_state][crate::model::CloudControlDeployment::deployment_state].
6808    ///
6809    /// # Example
6810    /// ```ignore,no_run
6811    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
6812    /// use google_cloud_cloudsecuritycompliance_v1::model::DeploymentState;
6813    /// let x0 = CloudControlDeployment::new().set_deployment_state(DeploymentState::Validating);
6814    /// let x1 = CloudControlDeployment::new().set_deployment_state(DeploymentState::Creating);
6815    /// let x2 = CloudControlDeployment::new().set_deployment_state(DeploymentState::Deleting);
6816    /// ```
6817    pub fn set_deployment_state<T: std::convert::Into<crate::model::DeploymentState>>(
6818        mut self,
6819        v: T,
6820    ) -> Self {
6821        self.deployment_state = v.into();
6822        self
6823    }
6824
6825    /// Sets the value of [create_time][crate::model::CloudControlDeployment::create_time].
6826    ///
6827    /// # Example
6828    /// ```ignore,no_run
6829    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
6830    /// use wkt::Timestamp;
6831    /// let x = CloudControlDeployment::new().set_create_time(Timestamp::default()/* use setters */);
6832    /// ```
6833    pub fn set_create_time<T>(mut self, v: T) -> Self
6834    where
6835        T: std::convert::Into<wkt::Timestamp>,
6836    {
6837        self.create_time = std::option::Option::Some(v.into());
6838        self
6839    }
6840
6841    /// Sets or clears the value of [create_time][crate::model::CloudControlDeployment::create_time].
6842    ///
6843    /// # Example
6844    /// ```ignore,no_run
6845    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
6846    /// use wkt::Timestamp;
6847    /// let x = CloudControlDeployment::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
6848    /// let x = CloudControlDeployment::new().set_or_clear_create_time(None::<Timestamp>);
6849    /// ```
6850    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6851    where
6852        T: std::convert::Into<wkt::Timestamp>,
6853    {
6854        self.create_time = v.map(|x| x.into());
6855        self
6856    }
6857
6858    /// Sets the value of [update_time][crate::model::CloudControlDeployment::update_time].
6859    ///
6860    /// # Example
6861    /// ```ignore,no_run
6862    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
6863    /// use wkt::Timestamp;
6864    /// let x = CloudControlDeployment::new().set_update_time(Timestamp::default()/* use setters */);
6865    /// ```
6866    pub fn set_update_time<T>(mut self, v: T) -> Self
6867    where
6868        T: std::convert::Into<wkt::Timestamp>,
6869    {
6870        self.update_time = std::option::Option::Some(v.into());
6871        self
6872    }
6873
6874    /// Sets or clears the value of [update_time][crate::model::CloudControlDeployment::update_time].
6875    ///
6876    /// # Example
6877    /// ```ignore,no_run
6878    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
6879    /// use wkt::Timestamp;
6880    /// let x = CloudControlDeployment::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
6881    /// let x = CloudControlDeployment::new().set_or_clear_update_time(None::<Timestamp>);
6882    /// ```
6883    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
6884    where
6885        T: std::convert::Into<wkt::Timestamp>,
6886    {
6887        self.update_time = v.map(|x| x.into());
6888        self
6889    }
6890
6891    /// Sets the value of [etag][crate::model::CloudControlDeployment::etag].
6892    ///
6893    /// # Example
6894    /// ```ignore,no_run
6895    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
6896    /// let x = CloudControlDeployment::new().set_etag("example");
6897    /// ```
6898    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6899        self.etag = v.into();
6900        self
6901    }
6902
6903    /// Sets the value of [parameter_substituted_cloud_control][crate::model::CloudControlDeployment::parameter_substituted_cloud_control].
6904    ///
6905    /// # Example
6906    /// ```ignore,no_run
6907    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
6908    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
6909    /// let x = CloudControlDeployment::new().set_parameter_substituted_cloud_control(CloudControl::default()/* use setters */);
6910    /// ```
6911    pub fn set_parameter_substituted_cloud_control<T>(mut self, v: T) -> Self
6912    where
6913        T: std::convert::Into<crate::model::CloudControl>,
6914    {
6915        self.parameter_substituted_cloud_control = std::option::Option::Some(v.into());
6916        self
6917    }
6918
6919    /// Sets or clears the value of [parameter_substituted_cloud_control][crate::model::CloudControlDeployment::parameter_substituted_cloud_control].
6920    ///
6921    /// # Example
6922    /// ```ignore,no_run
6923    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
6924    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
6925    /// let x = CloudControlDeployment::new().set_or_clear_parameter_substituted_cloud_control(Some(CloudControl::default()/* use setters */));
6926    /// let x = CloudControlDeployment::new().set_or_clear_parameter_substituted_cloud_control(None::<CloudControl>);
6927    /// ```
6928    pub fn set_or_clear_parameter_substituted_cloud_control<T>(
6929        mut self,
6930        v: std::option::Option<T>,
6931    ) -> Self
6932    where
6933        T: std::convert::Into<crate::model::CloudControl>,
6934    {
6935        self.parameter_substituted_cloud_control = v.map(|x| x.into());
6936        self
6937    }
6938
6939    /// Sets the value of [framework_deployment_references][crate::model::CloudControlDeployment::framework_deployment_references].
6940    ///
6941    /// # Example
6942    /// ```ignore,no_run
6943    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
6944    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeploymentReference;
6945    /// let x = CloudControlDeployment::new()
6946    ///     .set_framework_deployment_references([
6947    ///         FrameworkDeploymentReference::default()/* use setters */,
6948    ///         FrameworkDeploymentReference::default()/* use (different) setters */,
6949    ///     ]);
6950    /// ```
6951    pub fn set_framework_deployment_references<T, V>(mut self, v: T) -> Self
6952    where
6953        T: std::iter::IntoIterator<Item = V>,
6954        V: std::convert::Into<crate::model::FrameworkDeploymentReference>,
6955    {
6956        use std::iter::Iterator;
6957        self.framework_deployment_references = v.into_iter().map(|i| i.into()).collect();
6958        self
6959    }
6960
6961    /// Sets the value of [target_resource_display_name][crate::model::CloudControlDeployment::target_resource_display_name].
6962    ///
6963    /// # Example
6964    /// ```ignore,no_run
6965    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
6966    /// let x = CloudControlDeployment::new().set_target_resource_display_name("example");
6967    /// ```
6968    pub fn set_target_resource_display_name<T: std::convert::Into<std::string::String>>(
6969        mut self,
6970        v: T,
6971    ) -> Self {
6972        self.target_resource_display_name = v.into();
6973        self
6974    }
6975}
6976
6977impl wkt::message::Message for CloudControlDeployment {
6978    fn typename() -> &'static str {
6979        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment"
6980    }
6981}
6982
6983/// The name of the target resource or the configuration that's required to
6984/// create a new target resource.
6985#[derive(Clone, Default, PartialEq)]
6986#[non_exhaustive]
6987pub struct TargetResourceConfig {
6988    /// The resource configuration for the target resource.
6989    pub resource_config: std::option::Option<crate::model::target_resource_config::ResourceConfig>,
6990
6991    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6992}
6993
6994impl TargetResourceConfig {
6995    pub fn new() -> Self {
6996        std::default::Default::default()
6997    }
6998
6999    /// Sets the value of [resource_config][crate::model::TargetResourceConfig::resource_config].
7000    ///
7001    /// Note that all the setters affecting `resource_config` are mutually
7002    /// exclusive.
7003    ///
7004    /// # Example
7005    /// ```ignore,no_run
7006    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
7007    /// use google_cloud_cloudsecuritycompliance_v1::model::target_resource_config::ResourceConfig;
7008    /// let x = TargetResourceConfig::new().set_resource_config(Some(ResourceConfig::ExistingTargetResource("example".to_string())));
7009    /// ```
7010    pub fn set_resource_config<
7011        T: std::convert::Into<
7012                std::option::Option<crate::model::target_resource_config::ResourceConfig>,
7013            >,
7014    >(
7015        mut self,
7016        v: T,
7017    ) -> Self {
7018        self.resource_config = v.into();
7019        self
7020    }
7021
7022    /// The value of [resource_config][crate::model::TargetResourceConfig::resource_config]
7023    /// if it holds a `ExistingTargetResource`, `None` if the field is not set or
7024    /// holds a different branch.
7025    pub fn existing_target_resource(&self) -> std::option::Option<&std::string::String> {
7026        #[allow(unreachable_patterns)]
7027        self.resource_config.as_ref().and_then(|v| match v {
7028            crate::model::target_resource_config::ResourceConfig::ExistingTargetResource(v) => {
7029                std::option::Option::Some(v)
7030            }
7031            _ => std::option::Option::None,
7032        })
7033    }
7034
7035    /// Sets the value of [resource_config][crate::model::TargetResourceConfig::resource_config]
7036    /// to hold a `ExistingTargetResource`.
7037    ///
7038    /// Note that all the setters affecting `resource_config` are
7039    /// mutually exclusive.
7040    ///
7041    /// # Example
7042    /// ```ignore,no_run
7043    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
7044    /// let x = TargetResourceConfig::new().set_existing_target_resource("example");
7045    /// assert!(x.existing_target_resource().is_some());
7046    /// assert!(x.target_resource_creation_config().is_none());
7047    /// ```
7048    pub fn set_existing_target_resource<T: std::convert::Into<std::string::String>>(
7049        mut self,
7050        v: T,
7051    ) -> Self {
7052        self.resource_config = std::option::Option::Some(
7053            crate::model::target_resource_config::ResourceConfig::ExistingTargetResource(v.into()),
7054        );
7055        self
7056    }
7057
7058    /// The value of [resource_config][crate::model::TargetResourceConfig::resource_config]
7059    /// if it holds a `TargetResourceCreationConfig`, `None` if the field is not set or
7060    /// holds a different branch.
7061    pub fn target_resource_creation_config(
7062        &self,
7063    ) -> std::option::Option<&std::boxed::Box<crate::model::TargetResourceCreationConfig>> {
7064        #[allow(unreachable_patterns)]
7065        self.resource_config.as_ref().and_then(|v| match v {
7066            crate::model::target_resource_config::ResourceConfig::TargetResourceCreationConfig(
7067                v,
7068            ) => std::option::Option::Some(v),
7069            _ => std::option::Option::None,
7070        })
7071    }
7072
7073    /// Sets the value of [resource_config][crate::model::TargetResourceConfig::resource_config]
7074    /// to hold a `TargetResourceCreationConfig`.
7075    ///
7076    /// Note that all the setters affecting `resource_config` are
7077    /// mutually exclusive.
7078    ///
7079    /// # Example
7080    /// ```ignore,no_run
7081    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
7082    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceCreationConfig;
7083    /// let x = TargetResourceConfig::new().set_target_resource_creation_config(TargetResourceCreationConfig::default()/* use setters */);
7084    /// assert!(x.target_resource_creation_config().is_some());
7085    /// assert!(x.existing_target_resource().is_none());
7086    /// ```
7087    pub fn set_target_resource_creation_config<
7088        T: std::convert::Into<std::boxed::Box<crate::model::TargetResourceCreationConfig>>,
7089    >(
7090        mut self,
7091        v: T,
7092    ) -> Self {
7093        self.resource_config = std::option::Option::Some(
7094            crate::model::target_resource_config::ResourceConfig::TargetResourceCreationConfig(
7095                v.into(),
7096            ),
7097        );
7098        self
7099    }
7100}
7101
7102impl wkt::message::Message for TargetResourceConfig {
7103    fn typename() -> &'static str {
7104        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig"
7105    }
7106}
7107
7108/// Defines additional types related to [TargetResourceConfig].
7109pub mod target_resource_config {
7110    #[allow(unused_imports)]
7111    use super::*;
7112
7113    /// The resource configuration for the target resource.
7114    #[derive(Clone, Debug, PartialEq)]
7115    #[non_exhaustive]
7116    pub enum ResourceConfig {
7117        /// Optional. The resource hierarchy node, in one of the following formats:
7118        ///
7119        /// - `organizations/{organizationID}`
7120        /// - `folders/{folderID}`
7121        /// - `projects/{projectID}`
7122        ExistingTargetResource(std::string::String),
7123        /// Optional. The details that are required to create a resource and use
7124        /// that resource as the target resource for deployment.
7125        TargetResourceCreationConfig(std::boxed::Box<crate::model::TargetResourceCreationConfig>),
7126    }
7127}
7128
7129/// The configuration that's required to create a target resource.
7130#[derive(Clone, Default, PartialEq)]
7131#[non_exhaustive]
7132pub struct TargetResourceCreationConfig {
7133    /// The configuration that's required to create the target resource.
7134    pub resource_creation_config:
7135        std::option::Option<crate::model::target_resource_creation_config::ResourceCreationConfig>,
7136
7137    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7138}
7139
7140impl TargetResourceCreationConfig {
7141    pub fn new() -> Self {
7142        std::default::Default::default()
7143    }
7144
7145    /// Sets the value of [resource_creation_config][crate::model::TargetResourceCreationConfig::resource_creation_config].
7146    ///
7147    /// Note that all the setters affecting `resource_creation_config` are mutually
7148    /// exclusive.
7149    ///
7150    /// # Example
7151    /// ```ignore,no_run
7152    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceCreationConfig;
7153    /// use google_cloud_cloudsecuritycompliance_v1::model::FolderCreationConfig;
7154    /// let x = TargetResourceCreationConfig::new().set_resource_creation_config(Some(
7155    ///     google_cloud_cloudsecuritycompliance_v1::model::target_resource_creation_config::ResourceCreationConfig::FolderCreationConfig(FolderCreationConfig::default().into())));
7156    /// ```
7157    pub fn set_resource_creation_config<
7158        T: std::convert::Into<
7159                std::option::Option<
7160                    crate::model::target_resource_creation_config::ResourceCreationConfig,
7161                >,
7162            >,
7163    >(
7164        mut self,
7165        v: T,
7166    ) -> Self {
7167        self.resource_creation_config = v.into();
7168        self
7169    }
7170
7171    /// The value of [resource_creation_config][crate::model::TargetResourceCreationConfig::resource_creation_config]
7172    /// if it holds a `FolderCreationConfig`, `None` if the field is not set or
7173    /// holds a different branch.
7174    pub fn folder_creation_config(
7175        &self,
7176    ) -> std::option::Option<&std::boxed::Box<crate::model::FolderCreationConfig>> {
7177        #[allow(unreachable_patterns)]
7178        self.resource_creation_config.as_ref().and_then(|v| match v {
7179            crate::model::target_resource_creation_config::ResourceCreationConfig::FolderCreationConfig(v) => std::option::Option::Some(v),
7180            _ => std::option::Option::None,
7181        })
7182    }
7183
7184    /// Sets the value of [resource_creation_config][crate::model::TargetResourceCreationConfig::resource_creation_config]
7185    /// to hold a `FolderCreationConfig`.
7186    ///
7187    /// Note that all the setters affecting `resource_creation_config` are
7188    /// mutually exclusive.
7189    ///
7190    /// # Example
7191    /// ```ignore,no_run
7192    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceCreationConfig;
7193    /// use google_cloud_cloudsecuritycompliance_v1::model::FolderCreationConfig;
7194    /// let x = TargetResourceCreationConfig::new().set_folder_creation_config(FolderCreationConfig::default()/* use setters */);
7195    /// assert!(x.folder_creation_config().is_some());
7196    /// assert!(x.project_creation_config().is_none());
7197    /// ```
7198    pub fn set_folder_creation_config<
7199        T: std::convert::Into<std::boxed::Box<crate::model::FolderCreationConfig>>,
7200    >(
7201        mut self,
7202        v: T,
7203    ) -> Self {
7204        self.resource_creation_config = std::option::Option::Some(
7205            crate::model::target_resource_creation_config::ResourceCreationConfig::FolderCreationConfig(
7206                v.into()
7207            )
7208        );
7209        self
7210    }
7211
7212    /// The value of [resource_creation_config][crate::model::TargetResourceCreationConfig::resource_creation_config]
7213    /// if it holds a `ProjectCreationConfig`, `None` if the field is not set or
7214    /// holds a different branch.
7215    pub fn project_creation_config(
7216        &self,
7217    ) -> std::option::Option<&std::boxed::Box<crate::model::ProjectCreationConfig>> {
7218        #[allow(unreachable_patterns)]
7219        self.resource_creation_config.as_ref().and_then(|v| match v {
7220            crate::model::target_resource_creation_config::ResourceCreationConfig::ProjectCreationConfig(v) => std::option::Option::Some(v),
7221            _ => std::option::Option::None,
7222        })
7223    }
7224
7225    /// Sets the value of [resource_creation_config][crate::model::TargetResourceCreationConfig::resource_creation_config]
7226    /// to hold a `ProjectCreationConfig`.
7227    ///
7228    /// Note that all the setters affecting `resource_creation_config` are
7229    /// mutually exclusive.
7230    ///
7231    /// # Example
7232    /// ```ignore,no_run
7233    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceCreationConfig;
7234    /// use google_cloud_cloudsecuritycompliance_v1::model::ProjectCreationConfig;
7235    /// let x = TargetResourceCreationConfig::new().set_project_creation_config(ProjectCreationConfig::default()/* use setters */);
7236    /// assert!(x.project_creation_config().is_some());
7237    /// assert!(x.folder_creation_config().is_none());
7238    /// ```
7239    pub fn set_project_creation_config<
7240        T: std::convert::Into<std::boxed::Box<crate::model::ProjectCreationConfig>>,
7241    >(
7242        mut self,
7243        v: T,
7244    ) -> Self {
7245        self.resource_creation_config = std::option::Option::Some(
7246            crate::model::target_resource_creation_config::ResourceCreationConfig::ProjectCreationConfig(
7247                v.into()
7248            )
7249        );
7250        self
7251    }
7252}
7253
7254impl wkt::message::Message for TargetResourceCreationConfig {
7255    fn typename() -> &'static str {
7256        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig"
7257    }
7258}
7259
7260/// Defines additional types related to [TargetResourceCreationConfig].
7261pub mod target_resource_creation_config {
7262    #[allow(unused_imports)]
7263    use super::*;
7264
7265    /// The configuration that's required to create the target resource.
7266    #[derive(Clone, Debug, PartialEq)]
7267    #[non_exhaustive]
7268    pub enum ResourceCreationConfig {
7269        /// Optional. The configuration that's required to create a folder.
7270        FolderCreationConfig(std::boxed::Box<crate::model::FolderCreationConfig>),
7271        /// Optional. The configuration that's required to create a project.
7272        ProjectCreationConfig(std::boxed::Box<crate::model::ProjectCreationConfig>),
7273    }
7274}
7275
7276/// The configuration that's required to create a folder to be used
7277/// as the target resource for a deployment.
7278#[derive(Clone, Default, PartialEq)]
7279#[non_exhaustive]
7280pub struct FolderCreationConfig {
7281    /// Required. The parent of the folder, in the format
7282    /// `organizations/{organizationID}` or `folders/{folderID}`.
7283    pub parent: std::string::String,
7284
7285    /// Required. The display name of the folder.
7286    pub folder_display_name: std::string::String,
7287
7288    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7289}
7290
7291impl FolderCreationConfig {
7292    pub fn new() -> Self {
7293        std::default::Default::default()
7294    }
7295
7296    /// Sets the value of [parent][crate::model::FolderCreationConfig::parent].
7297    ///
7298    /// # Example
7299    /// ```ignore,no_run
7300    /// # use google_cloud_cloudsecuritycompliance_v1::model::FolderCreationConfig;
7301    /// let x = FolderCreationConfig::new().set_parent("example");
7302    /// ```
7303    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7304        self.parent = v.into();
7305        self
7306    }
7307
7308    /// Sets the value of [folder_display_name][crate::model::FolderCreationConfig::folder_display_name].
7309    ///
7310    /// # Example
7311    /// ```ignore,no_run
7312    /// # use google_cloud_cloudsecuritycompliance_v1::model::FolderCreationConfig;
7313    /// let x = FolderCreationConfig::new().set_folder_display_name("example");
7314    /// ```
7315    pub fn set_folder_display_name<T: std::convert::Into<std::string::String>>(
7316        mut self,
7317        v: T,
7318    ) -> Self {
7319        self.folder_display_name = v.into();
7320        self
7321    }
7322}
7323
7324impl wkt::message::Message for FolderCreationConfig {
7325    fn typename() -> &'static str {
7326        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig"
7327    }
7328}
7329
7330/// The configuration that's required to create a project to be used
7331/// as the target resource of a deployment.
7332#[derive(Clone, Default, PartialEq)]
7333#[non_exhaustive]
7334pub struct ProjectCreationConfig {
7335    /// Required. The parent of the project, in the format
7336    /// `organizations/{organizationID}` or `folders/{folderID}`.
7337    pub parent: std::string::String,
7338
7339    /// Required. The display name of the project.
7340    pub project_display_name: std::string::String,
7341
7342    /// Required. The billing account ID for the project.
7343    pub billing_account_id: std::string::String,
7344
7345    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7346}
7347
7348impl ProjectCreationConfig {
7349    pub fn new() -> Self {
7350        std::default::Default::default()
7351    }
7352
7353    /// Sets the value of [parent][crate::model::ProjectCreationConfig::parent].
7354    ///
7355    /// # Example
7356    /// ```ignore,no_run
7357    /// # use google_cloud_cloudsecuritycompliance_v1::model::ProjectCreationConfig;
7358    /// let x = ProjectCreationConfig::new().set_parent("example");
7359    /// ```
7360    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7361        self.parent = v.into();
7362        self
7363    }
7364
7365    /// Sets the value of [project_display_name][crate::model::ProjectCreationConfig::project_display_name].
7366    ///
7367    /// # Example
7368    /// ```ignore,no_run
7369    /// # use google_cloud_cloudsecuritycompliance_v1::model::ProjectCreationConfig;
7370    /// let x = ProjectCreationConfig::new().set_project_display_name("example");
7371    /// ```
7372    pub fn set_project_display_name<T: std::convert::Into<std::string::String>>(
7373        mut self,
7374        v: T,
7375    ) -> Self {
7376        self.project_display_name = v.into();
7377        self
7378    }
7379
7380    /// Sets the value of [billing_account_id][crate::model::ProjectCreationConfig::billing_account_id].
7381    ///
7382    /// # Example
7383    /// ```ignore,no_run
7384    /// # use google_cloud_cloudsecuritycompliance_v1::model::ProjectCreationConfig;
7385    /// let x = ProjectCreationConfig::new().set_billing_account_id("example");
7386    /// ```
7387    pub fn set_billing_account_id<T: std::convert::Into<std::string::String>>(
7388        mut self,
7389        v: T,
7390    ) -> Self {
7391        self.billing_account_id = v.into();
7392        self
7393    }
7394}
7395
7396impl wkt::message::Message for ProjectCreationConfig {
7397    fn typename() -> &'static str {
7398        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig"
7399    }
7400}
7401
7402/// The enforcement mode and parameters of a cloud
7403/// control deployment.
7404#[derive(Clone, Default, PartialEq)]
7405#[non_exhaustive]
7406pub struct CloudControlMetadata {
7407    /// Required. The cloud control name and parameters.
7408    pub cloud_control_details: std::option::Option<crate::model::CloudControlDetails>,
7409
7410    /// Required. The enforcement mode of the cloud control.
7411    pub enforcement_mode: crate::model::EnforcementMode,
7412
7413    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7414}
7415
7416impl CloudControlMetadata {
7417    pub fn new() -> Self {
7418        std::default::Default::default()
7419    }
7420
7421    /// Sets the value of [cloud_control_details][crate::model::CloudControlMetadata::cloud_control_details].
7422    ///
7423    /// # Example
7424    /// ```ignore,no_run
7425    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlMetadata;
7426    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDetails;
7427    /// let x = CloudControlMetadata::new().set_cloud_control_details(CloudControlDetails::default()/* use setters */);
7428    /// ```
7429    pub fn set_cloud_control_details<T>(mut self, v: T) -> Self
7430    where
7431        T: std::convert::Into<crate::model::CloudControlDetails>,
7432    {
7433        self.cloud_control_details = std::option::Option::Some(v.into());
7434        self
7435    }
7436
7437    /// Sets or clears the value of [cloud_control_details][crate::model::CloudControlMetadata::cloud_control_details].
7438    ///
7439    /// # Example
7440    /// ```ignore,no_run
7441    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlMetadata;
7442    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDetails;
7443    /// let x = CloudControlMetadata::new().set_or_clear_cloud_control_details(Some(CloudControlDetails::default()/* use setters */));
7444    /// let x = CloudControlMetadata::new().set_or_clear_cloud_control_details(None::<CloudControlDetails>);
7445    /// ```
7446    pub fn set_or_clear_cloud_control_details<T>(mut self, v: std::option::Option<T>) -> Self
7447    where
7448        T: std::convert::Into<crate::model::CloudControlDetails>,
7449    {
7450        self.cloud_control_details = v.map(|x| x.into());
7451        self
7452    }
7453
7454    /// Sets the value of [enforcement_mode][crate::model::CloudControlMetadata::enforcement_mode].
7455    ///
7456    /// # Example
7457    /// ```ignore,no_run
7458    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlMetadata;
7459    /// use google_cloud_cloudsecuritycompliance_v1::model::EnforcementMode;
7460    /// let x0 = CloudControlMetadata::new().set_enforcement_mode(EnforcementMode::Preventive);
7461    /// let x1 = CloudControlMetadata::new().set_enforcement_mode(EnforcementMode::Detective);
7462    /// let x2 = CloudControlMetadata::new().set_enforcement_mode(EnforcementMode::Audit);
7463    /// ```
7464    pub fn set_enforcement_mode<T: std::convert::Into<crate::model::EnforcementMode>>(
7465        mut self,
7466        v: T,
7467    ) -> Self {
7468        self.enforcement_mode = v.into();
7469        self
7470    }
7471}
7472
7473impl wkt::message::Message for CloudControlMetadata {
7474    fn typename() -> &'static str {
7475        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata"
7476    }
7477}
7478
7479/// The request message for [CreateFrameworkDeployment][].
7480#[derive(Clone, Default, PartialEq)]
7481#[non_exhaustive]
7482pub struct CreateFrameworkDeploymentRequest {
7483    /// Required. The parent resource of the framework deployment in the format
7484    /// `organizations/{organization}/locations/{location}`.
7485    /// Only the global location is supported.
7486    pub parent: std::string::String,
7487
7488    /// Optional. An identifier for the framework deployment that's unique in scope
7489    /// of the parent. If you don't specify a value, then a random UUID is
7490    /// generated.
7491    pub framework_deployment_id: std::string::String,
7492
7493    /// Required. The framework deployment that you're creating.
7494    pub framework_deployment: std::option::Option<crate::model::FrameworkDeployment>,
7495
7496    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7497}
7498
7499impl CreateFrameworkDeploymentRequest {
7500    pub fn new() -> Self {
7501        std::default::Default::default()
7502    }
7503
7504    /// Sets the value of [parent][crate::model::CreateFrameworkDeploymentRequest::parent].
7505    ///
7506    /// # Example
7507    /// ```ignore,no_run
7508    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkDeploymentRequest;
7509    /// let x = CreateFrameworkDeploymentRequest::new().set_parent("example");
7510    /// ```
7511    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7512        self.parent = v.into();
7513        self
7514    }
7515
7516    /// Sets the value of [framework_deployment_id][crate::model::CreateFrameworkDeploymentRequest::framework_deployment_id].
7517    ///
7518    /// # Example
7519    /// ```ignore,no_run
7520    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkDeploymentRequest;
7521    /// let x = CreateFrameworkDeploymentRequest::new().set_framework_deployment_id("example");
7522    /// ```
7523    pub fn set_framework_deployment_id<T: std::convert::Into<std::string::String>>(
7524        mut self,
7525        v: T,
7526    ) -> Self {
7527        self.framework_deployment_id = v.into();
7528        self
7529    }
7530
7531    /// Sets the value of [framework_deployment][crate::model::CreateFrameworkDeploymentRequest::framework_deployment].
7532    ///
7533    /// # Example
7534    /// ```ignore,no_run
7535    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkDeploymentRequest;
7536    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7537    /// let x = CreateFrameworkDeploymentRequest::new().set_framework_deployment(FrameworkDeployment::default()/* use setters */);
7538    /// ```
7539    pub fn set_framework_deployment<T>(mut self, v: T) -> Self
7540    where
7541        T: std::convert::Into<crate::model::FrameworkDeployment>,
7542    {
7543        self.framework_deployment = std::option::Option::Some(v.into());
7544        self
7545    }
7546
7547    /// Sets or clears the value of [framework_deployment][crate::model::CreateFrameworkDeploymentRequest::framework_deployment].
7548    ///
7549    /// # Example
7550    /// ```ignore,no_run
7551    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkDeploymentRequest;
7552    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7553    /// let x = CreateFrameworkDeploymentRequest::new().set_or_clear_framework_deployment(Some(FrameworkDeployment::default()/* use setters */));
7554    /// let x = CreateFrameworkDeploymentRequest::new().set_or_clear_framework_deployment(None::<FrameworkDeployment>);
7555    /// ```
7556    pub fn set_or_clear_framework_deployment<T>(mut self, v: std::option::Option<T>) -> Self
7557    where
7558        T: std::convert::Into<crate::model::FrameworkDeployment>,
7559    {
7560        self.framework_deployment = v.map(|x| x.into());
7561        self
7562    }
7563}
7564
7565impl wkt::message::Message for CreateFrameworkDeploymentRequest {
7566    fn typename() -> &'static str {
7567        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest"
7568    }
7569}
7570
7571/// The request message for [DeleteFrameworkDeployment][].
7572#[derive(Clone, Default, PartialEq)]
7573#[non_exhaustive]
7574pub struct DeleteFrameworkDeploymentRequest {
7575    /// Required. The name of the framework deployment that you want to delete,
7576    /// in the format
7577    /// `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`.
7578    /// The only supported location is `global`.
7579    pub name: std::string::String,
7580
7581    /// Optional. An opaque identifier for the current version of the resource.
7582    ///
7583    /// If you provide this value, then it must match the existing value. If the
7584    /// values don't match, then the request fails with an
7585    /// [`ABORTED`][google.rpc.Code.ABORTED] error.
7586    ///
7587    /// If you omit this value, then the resource is deleted regardless of its
7588    /// current `etag` value.
7589    pub etag: std::string::String,
7590
7591    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7592}
7593
7594impl DeleteFrameworkDeploymentRequest {
7595    pub fn new() -> Self {
7596        std::default::Default::default()
7597    }
7598
7599    /// Sets the value of [name][crate::model::DeleteFrameworkDeploymentRequest::name].
7600    ///
7601    /// # Example
7602    /// ```ignore,no_run
7603    /// # use google_cloud_cloudsecuritycompliance_v1::model::DeleteFrameworkDeploymentRequest;
7604    /// let x = DeleteFrameworkDeploymentRequest::new().set_name("example");
7605    /// ```
7606    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7607        self.name = v.into();
7608        self
7609    }
7610
7611    /// Sets the value of [etag][crate::model::DeleteFrameworkDeploymentRequest::etag].
7612    ///
7613    /// # Example
7614    /// ```ignore,no_run
7615    /// # use google_cloud_cloudsecuritycompliance_v1::model::DeleteFrameworkDeploymentRequest;
7616    /// let x = DeleteFrameworkDeploymentRequest::new().set_etag("example");
7617    /// ```
7618    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7619        self.etag = v.into();
7620        self
7621    }
7622}
7623
7624impl wkt::message::Message for DeleteFrameworkDeploymentRequest {
7625    fn typename() -> &'static str {
7626        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest"
7627    }
7628}
7629
7630/// The request message for [GetFrameworkDeployment][].
7631#[derive(Clone, Default, PartialEq)]
7632#[non_exhaustive]
7633pub struct GetFrameworkDeploymentRequest {
7634    /// Required. The name of the framework deployment, in the format
7635    /// `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`.
7636    /// The only supported location is `global`.
7637    pub name: std::string::String,
7638
7639    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7640}
7641
7642impl GetFrameworkDeploymentRequest {
7643    pub fn new() -> Self {
7644        std::default::Default::default()
7645    }
7646
7647    /// Sets the value of [name][crate::model::GetFrameworkDeploymentRequest::name].
7648    ///
7649    /// # Example
7650    /// ```ignore,no_run
7651    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetFrameworkDeploymentRequest;
7652    /// let x = GetFrameworkDeploymentRequest::new().set_name("example");
7653    /// ```
7654    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7655        self.name = v.into();
7656        self
7657    }
7658}
7659
7660impl wkt::message::Message for GetFrameworkDeploymentRequest {
7661    fn typename() -> &'static str {
7662        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest"
7663    }
7664}
7665
7666/// The request message for [ListFrameworkDeployments][].
7667#[derive(Clone, Default, PartialEq)]
7668#[non_exhaustive]
7669pub struct ListFrameworkDeploymentsRequest {
7670    /// Required. The parent resource of the framework deployment, in the format
7671    /// `organizations/{organization}/locations/{location}`.
7672    /// The only supported location is `global`.
7673    pub parent: std::string::String,
7674
7675    /// Optional. The requested page size. The server might return fewer items than
7676    /// requested.
7677    /// If unspecified, the server picks an appropriate default.
7678    pub page_size: i32,
7679
7680    /// Optional. A token that identifies a page of results the server should
7681    /// return.
7682    pub page_token: std::string::String,
7683
7684    /// Optional. The filter to be applied on the resource, as defined by
7685    /// [AIP-160: Filtering](https://google.aip.dev/160).
7686    pub filter: std::string::String,
7687
7688    /// Optional. The sort order for the results. The following values are
7689    /// supported:
7690    ///
7691    /// * `name`
7692    /// * `name desc`
7693    ///
7694    /// If you do not specify a value, then the results are not sorted.
7695    pub order_by: std::string::String,
7696
7697    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7698}
7699
7700impl ListFrameworkDeploymentsRequest {
7701    pub fn new() -> Self {
7702        std::default::Default::default()
7703    }
7704
7705    /// Sets the value of [parent][crate::model::ListFrameworkDeploymentsRequest::parent].
7706    ///
7707    /// # Example
7708    /// ```ignore,no_run
7709    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsRequest;
7710    /// let x = ListFrameworkDeploymentsRequest::new().set_parent("example");
7711    /// ```
7712    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7713        self.parent = v.into();
7714        self
7715    }
7716
7717    /// Sets the value of [page_size][crate::model::ListFrameworkDeploymentsRequest::page_size].
7718    ///
7719    /// # Example
7720    /// ```ignore,no_run
7721    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsRequest;
7722    /// let x = ListFrameworkDeploymentsRequest::new().set_page_size(42);
7723    /// ```
7724    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7725        self.page_size = v.into();
7726        self
7727    }
7728
7729    /// Sets the value of [page_token][crate::model::ListFrameworkDeploymentsRequest::page_token].
7730    ///
7731    /// # Example
7732    /// ```ignore,no_run
7733    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsRequest;
7734    /// let x = ListFrameworkDeploymentsRequest::new().set_page_token("example");
7735    /// ```
7736    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7737        self.page_token = v.into();
7738        self
7739    }
7740
7741    /// Sets the value of [filter][crate::model::ListFrameworkDeploymentsRequest::filter].
7742    ///
7743    /// # Example
7744    /// ```ignore,no_run
7745    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsRequest;
7746    /// let x = ListFrameworkDeploymentsRequest::new().set_filter("example");
7747    /// ```
7748    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7749        self.filter = v.into();
7750        self
7751    }
7752
7753    /// Sets the value of [order_by][crate::model::ListFrameworkDeploymentsRequest::order_by].
7754    ///
7755    /// # Example
7756    /// ```ignore,no_run
7757    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsRequest;
7758    /// let x = ListFrameworkDeploymentsRequest::new().set_order_by("example");
7759    /// ```
7760    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7761        self.order_by = v.into();
7762        self
7763    }
7764}
7765
7766impl wkt::message::Message for ListFrameworkDeploymentsRequest {
7767    fn typename() -> &'static str {
7768        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest"
7769    }
7770}
7771
7772/// The response message for [ListFrameworkDeployments][].
7773#[derive(Clone, Default, PartialEq)]
7774#[non_exhaustive]
7775pub struct ListFrameworkDeploymentsResponse {
7776    /// The list of framework deployments.
7777    pub framework_deployments: std::vec::Vec<crate::model::FrameworkDeployment>,
7778
7779    /// A token that identifies the next page of results that the server
7780    /// should return.
7781    pub next_page_token: std::string::String,
7782
7783    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7784}
7785
7786impl ListFrameworkDeploymentsResponse {
7787    pub fn new() -> Self {
7788        std::default::Default::default()
7789    }
7790
7791    /// Sets the value of [framework_deployments][crate::model::ListFrameworkDeploymentsResponse::framework_deployments].
7792    ///
7793    /// # Example
7794    /// ```ignore,no_run
7795    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsResponse;
7796    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7797    /// let x = ListFrameworkDeploymentsResponse::new()
7798    ///     .set_framework_deployments([
7799    ///         FrameworkDeployment::default()/* use setters */,
7800    ///         FrameworkDeployment::default()/* use (different) setters */,
7801    ///     ]);
7802    /// ```
7803    pub fn set_framework_deployments<T, V>(mut self, v: T) -> Self
7804    where
7805        T: std::iter::IntoIterator<Item = V>,
7806        V: std::convert::Into<crate::model::FrameworkDeployment>,
7807    {
7808        use std::iter::Iterator;
7809        self.framework_deployments = v.into_iter().map(|i| i.into()).collect();
7810        self
7811    }
7812
7813    /// Sets the value of [next_page_token][crate::model::ListFrameworkDeploymentsResponse::next_page_token].
7814    ///
7815    /// # Example
7816    /// ```ignore,no_run
7817    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsResponse;
7818    /// let x = ListFrameworkDeploymentsResponse::new().set_next_page_token("example");
7819    /// ```
7820    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7821        self.next_page_token = v.into();
7822        self
7823    }
7824}
7825
7826impl wkt::message::Message for ListFrameworkDeploymentsResponse {
7827    fn typename() -> &'static str {
7828        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse"
7829    }
7830}
7831
7832#[doc(hidden)]
7833impl google_cloud_gax::paginator::internal::PageableResponse for ListFrameworkDeploymentsResponse {
7834    type PageItem = crate::model::FrameworkDeployment;
7835
7836    fn items(self) -> std::vec::Vec<Self::PageItem> {
7837        self.framework_deployments
7838    }
7839
7840    fn next_page_token(&self) -> std::string::String {
7841        use std::clone::Clone;
7842        self.next_page_token.clone()
7843    }
7844}
7845
7846/// The request message for [GetCloudControlDeployment][].
7847#[derive(Clone, Default, PartialEq)]
7848#[non_exhaustive]
7849pub struct GetCloudControlDeploymentRequest {
7850    /// Required. The name for the cloud control deployment, in the format
7851    /// `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}`.
7852    /// The only supported location is `global`.
7853    pub name: std::string::String,
7854
7855    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7856}
7857
7858impl GetCloudControlDeploymentRequest {
7859    pub fn new() -> Self {
7860        std::default::Default::default()
7861    }
7862
7863    /// Sets the value of [name][crate::model::GetCloudControlDeploymentRequest::name].
7864    ///
7865    /// # Example
7866    /// ```ignore,no_run
7867    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetCloudControlDeploymentRequest;
7868    /// let x = GetCloudControlDeploymentRequest::new().set_name("example");
7869    /// ```
7870    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7871        self.name = v.into();
7872        self
7873    }
7874}
7875
7876impl wkt::message::Message for GetCloudControlDeploymentRequest {
7877    fn typename() -> &'static str {
7878        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest"
7879    }
7880}
7881
7882/// The request message for [ListCloudControlDeployments][].
7883#[derive(Clone, Default, PartialEq)]
7884#[non_exhaustive]
7885pub struct ListCloudControlDeploymentsRequest {
7886    /// Required. The parent resource for the cloud control deployment, in the
7887    /// format `organizations/{organization}/locations/{location}`. The only
7888    /// supported location is `global`.
7889    pub parent: std::string::String,
7890
7891    /// Optional. The requested page size. The server might return fewer items than
7892    /// you requested.
7893    /// If unspecified, the server picks an appropriate default.
7894    pub page_size: i32,
7895
7896    /// Optional. A token that identifies the page of results that the server
7897    /// should return.
7898    pub page_token: std::string::String,
7899
7900    /// Optional. The filter to apply on the resource, as defined by
7901    /// [AIP-160: Filtering](https://google.aip.dev/160).
7902    pub filter: std::string::String,
7903
7904    /// Optional. The sort order for the results. The following values are
7905    /// supported:
7906    ///
7907    /// * `name`
7908    /// * `name desc`
7909    ///
7910    /// If you do not specify a value, then the results are not sorted.
7911    pub order_by: std::string::String,
7912
7913    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7914}
7915
7916impl ListCloudControlDeploymentsRequest {
7917    pub fn new() -> Self {
7918        std::default::Default::default()
7919    }
7920
7921    /// Sets the value of [parent][crate::model::ListCloudControlDeploymentsRequest::parent].
7922    ///
7923    /// # Example
7924    /// ```ignore,no_run
7925    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsRequest;
7926    /// let x = ListCloudControlDeploymentsRequest::new().set_parent("example");
7927    /// ```
7928    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7929        self.parent = v.into();
7930        self
7931    }
7932
7933    /// Sets the value of [page_size][crate::model::ListCloudControlDeploymentsRequest::page_size].
7934    ///
7935    /// # Example
7936    /// ```ignore,no_run
7937    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsRequest;
7938    /// let x = ListCloudControlDeploymentsRequest::new().set_page_size(42);
7939    /// ```
7940    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7941        self.page_size = v.into();
7942        self
7943    }
7944
7945    /// Sets the value of [page_token][crate::model::ListCloudControlDeploymentsRequest::page_token].
7946    ///
7947    /// # Example
7948    /// ```ignore,no_run
7949    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsRequest;
7950    /// let x = ListCloudControlDeploymentsRequest::new().set_page_token("example");
7951    /// ```
7952    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7953        self.page_token = v.into();
7954        self
7955    }
7956
7957    /// Sets the value of [filter][crate::model::ListCloudControlDeploymentsRequest::filter].
7958    ///
7959    /// # Example
7960    /// ```ignore,no_run
7961    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsRequest;
7962    /// let x = ListCloudControlDeploymentsRequest::new().set_filter("example");
7963    /// ```
7964    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7965        self.filter = v.into();
7966        self
7967    }
7968
7969    /// Sets the value of [order_by][crate::model::ListCloudControlDeploymentsRequest::order_by].
7970    ///
7971    /// # Example
7972    /// ```ignore,no_run
7973    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsRequest;
7974    /// let x = ListCloudControlDeploymentsRequest::new().set_order_by("example");
7975    /// ```
7976    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7977        self.order_by = v.into();
7978        self
7979    }
7980}
7981
7982impl wkt::message::Message for ListCloudControlDeploymentsRequest {
7983    fn typename() -> &'static str {
7984        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest"
7985    }
7986}
7987
7988/// The response message for [ListCloudControlDeployments][].
7989#[derive(Clone, Default, PartialEq)]
7990#[non_exhaustive]
7991pub struct ListCloudControlDeploymentsResponse {
7992    /// The list of cloud control deployments.
7993    pub cloud_control_deployments: std::vec::Vec<crate::model::CloudControlDeployment>,
7994
7995    /// A token that identifies the next page of results that the server
7996    /// should return.
7997    pub next_page_token: std::string::String,
7998
7999    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8000}
8001
8002impl ListCloudControlDeploymentsResponse {
8003    pub fn new() -> Self {
8004        std::default::Default::default()
8005    }
8006
8007    /// Sets the value of [cloud_control_deployments][crate::model::ListCloudControlDeploymentsResponse::cloud_control_deployments].
8008    ///
8009    /// # Example
8010    /// ```ignore,no_run
8011    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsResponse;
8012    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
8013    /// let x = ListCloudControlDeploymentsResponse::new()
8014    ///     .set_cloud_control_deployments([
8015    ///         CloudControlDeployment::default()/* use setters */,
8016    ///         CloudControlDeployment::default()/* use (different) setters */,
8017    ///     ]);
8018    /// ```
8019    pub fn set_cloud_control_deployments<T, V>(mut self, v: T) -> Self
8020    where
8021        T: std::iter::IntoIterator<Item = V>,
8022        V: std::convert::Into<crate::model::CloudControlDeployment>,
8023    {
8024        use std::iter::Iterator;
8025        self.cloud_control_deployments = v.into_iter().map(|i| i.into()).collect();
8026        self
8027    }
8028
8029    /// Sets the value of [next_page_token][crate::model::ListCloudControlDeploymentsResponse::next_page_token].
8030    ///
8031    /// # Example
8032    /// ```ignore,no_run
8033    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsResponse;
8034    /// let x = ListCloudControlDeploymentsResponse::new().set_next_page_token("example");
8035    /// ```
8036    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8037        self.next_page_token = v.into();
8038        self
8039    }
8040}
8041
8042impl wkt::message::Message for ListCloudControlDeploymentsResponse {
8043    fn typename() -> &'static str {
8044        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse"
8045    }
8046}
8047
8048#[doc(hidden)]
8049impl google_cloud_gax::paginator::internal::PageableResponse
8050    for ListCloudControlDeploymentsResponse
8051{
8052    type PageItem = crate::model::CloudControlDeployment;
8053
8054    fn items(self) -> std::vec::Vec<Self::PageItem> {
8055        self.cloud_control_deployments
8056    }
8057
8058    fn next_page_token(&self) -> std::string::String {
8059        use std::clone::Clone;
8060        self.next_page_token.clone()
8061    }
8062}
8063
8064/// The reference to a cloud control deployment.
8065#[derive(Clone, Default, PartialEq)]
8066#[non_exhaustive]
8067pub struct CloudControlDeploymentReference {
8068    /// Output only. The name of the CloudControlDeployment. The format is
8069    /// `organizations/{org}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}`.
8070    /// The only supported location is `global`.
8071    pub cloud_control_deployment: std::string::String,
8072
8073    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8074}
8075
8076impl CloudControlDeploymentReference {
8077    pub fn new() -> Self {
8078        std::default::Default::default()
8079    }
8080
8081    /// Sets the value of [cloud_control_deployment][crate::model::CloudControlDeploymentReference::cloud_control_deployment].
8082    ///
8083    /// # Example
8084    /// ```ignore,no_run
8085    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeploymentReference;
8086    /// let x = CloudControlDeploymentReference::new().set_cloud_control_deployment("example");
8087    /// ```
8088    pub fn set_cloud_control_deployment<T: std::convert::Into<std::string::String>>(
8089        mut self,
8090        v: T,
8091    ) -> Self {
8092        self.cloud_control_deployment = v.into();
8093        self
8094    }
8095}
8096
8097impl wkt::message::Message for CloudControlDeploymentReference {
8098    fn typename() -> &'static str {
8099        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference"
8100    }
8101}
8102
8103/// The reference to a framework deployment.
8104#[derive(Clone, Default, PartialEq)]
8105#[non_exhaustive]
8106pub struct FrameworkDeploymentReference {
8107    /// Output only. The name of the framework deployment, in the format
8108    /// `organizations/{org}/locations/{location}/frameworkDeployments/{framework_deployment_id}`.
8109    /// The only supported location is `global`.
8110    pub framework_deployment: std::string::String,
8111
8112    /// Optional. The reference to the framework that this deployment is for.
8113    /// For example:
8114    ///
8115    /// ```norust
8116    /// {
8117    ///   framework:
8118    ///   "organizations/{org}/locations/{location}/frameworks/{framework}",
8119    ///   major_revision_id: 1
8120    /// }
8121    /// ```
8122    ///
8123    /// The only supported location is `global`.
8124    pub framework_reference: std::option::Option<crate::model::FrameworkReference>,
8125
8126    /// Optional. The display name of the framework that this framework deployment
8127    /// is for.
8128    pub framework_display_name: std::string::String,
8129
8130    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8131}
8132
8133impl FrameworkDeploymentReference {
8134    pub fn new() -> Self {
8135        std::default::Default::default()
8136    }
8137
8138    /// Sets the value of [framework_deployment][crate::model::FrameworkDeploymentReference::framework_deployment].
8139    ///
8140    /// # Example
8141    /// ```ignore,no_run
8142    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeploymentReference;
8143    /// let x = FrameworkDeploymentReference::new().set_framework_deployment("example");
8144    /// ```
8145    pub fn set_framework_deployment<T: std::convert::Into<std::string::String>>(
8146        mut self,
8147        v: T,
8148    ) -> Self {
8149        self.framework_deployment = v.into();
8150        self
8151    }
8152
8153    /// Sets the value of [framework_reference][crate::model::FrameworkDeploymentReference::framework_reference].
8154    ///
8155    /// # Example
8156    /// ```ignore,no_run
8157    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeploymentReference;
8158    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
8159    /// let x = FrameworkDeploymentReference::new().set_framework_reference(FrameworkReference::default()/* use setters */);
8160    /// ```
8161    pub fn set_framework_reference<T>(mut self, v: T) -> Self
8162    where
8163        T: std::convert::Into<crate::model::FrameworkReference>,
8164    {
8165        self.framework_reference = std::option::Option::Some(v.into());
8166        self
8167    }
8168
8169    /// Sets or clears the value of [framework_reference][crate::model::FrameworkDeploymentReference::framework_reference].
8170    ///
8171    /// # Example
8172    /// ```ignore,no_run
8173    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeploymentReference;
8174    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
8175    /// let x = FrameworkDeploymentReference::new().set_or_clear_framework_reference(Some(FrameworkReference::default()/* use setters */));
8176    /// let x = FrameworkDeploymentReference::new().set_or_clear_framework_reference(None::<FrameworkReference>);
8177    /// ```
8178    pub fn set_or_clear_framework_reference<T>(mut self, v: std::option::Option<T>) -> Self
8179    where
8180        T: std::convert::Into<crate::model::FrameworkReference>,
8181    {
8182        self.framework_reference = v.map(|x| x.into());
8183        self
8184    }
8185
8186    /// Sets the value of [framework_display_name][crate::model::FrameworkDeploymentReference::framework_display_name].
8187    ///
8188    /// # Example
8189    /// ```ignore,no_run
8190    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeploymentReference;
8191    /// let x = FrameworkDeploymentReference::new().set_framework_display_name("example");
8192    /// ```
8193    pub fn set_framework_display_name<T: std::convert::Into<std::string::String>>(
8194        mut self,
8195        v: T,
8196    ) -> Self {
8197        self.framework_display_name = v.into();
8198        self
8199    }
8200}
8201
8202impl wkt::message::Message for FrameworkDeploymentReference {
8203    fn typename() -> &'static str {
8204        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference"
8205    }
8206}
8207
8208/// The request message for
8209/// [ListFrameworkComplianceSummariesRequest][google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest].
8210///
8211/// [google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest]: crate::model::ListFrameworkComplianceSummariesRequest
8212#[derive(Clone, Default, PartialEq)]
8213#[non_exhaustive]
8214pub struct ListFrameworkComplianceSummariesRequest {
8215    /// Required. The parent scope for the framework compliance summary.
8216    pub parent: std::string::String,
8217
8218    /// Optional. The requested page size. The server might return fewer items than
8219    /// requested. If unspecified, the server picks an appropriate default.
8220    pub page_size: i32,
8221
8222    /// Optional. A token that identifies the page of results that the server
8223    /// should return.
8224    pub page_token: std::string::String,
8225
8226    /// Optional. The filtering results.
8227    pub filter: std::string::String,
8228
8229    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8230}
8231
8232impl ListFrameworkComplianceSummariesRequest {
8233    pub fn new() -> Self {
8234        std::default::Default::default()
8235    }
8236
8237    /// Sets the value of [parent][crate::model::ListFrameworkComplianceSummariesRequest::parent].
8238    ///
8239    /// # Example
8240    /// ```ignore,no_run
8241    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesRequest;
8242    /// let x = ListFrameworkComplianceSummariesRequest::new().set_parent("example");
8243    /// ```
8244    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8245        self.parent = v.into();
8246        self
8247    }
8248
8249    /// Sets the value of [page_size][crate::model::ListFrameworkComplianceSummariesRequest::page_size].
8250    ///
8251    /// # Example
8252    /// ```ignore,no_run
8253    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesRequest;
8254    /// let x = ListFrameworkComplianceSummariesRequest::new().set_page_size(42);
8255    /// ```
8256    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8257        self.page_size = v.into();
8258        self
8259    }
8260
8261    /// Sets the value of [page_token][crate::model::ListFrameworkComplianceSummariesRequest::page_token].
8262    ///
8263    /// # Example
8264    /// ```ignore,no_run
8265    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesRequest;
8266    /// let x = ListFrameworkComplianceSummariesRequest::new().set_page_token("example");
8267    /// ```
8268    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8269        self.page_token = v.into();
8270        self
8271    }
8272
8273    /// Sets the value of [filter][crate::model::ListFrameworkComplianceSummariesRequest::filter].
8274    ///
8275    /// # Example
8276    /// ```ignore,no_run
8277    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesRequest;
8278    /// let x = ListFrameworkComplianceSummariesRequest::new().set_filter("example");
8279    /// ```
8280    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8281        self.filter = v.into();
8282        self
8283    }
8284}
8285
8286impl wkt::message::Message for ListFrameworkComplianceSummariesRequest {
8287    fn typename() -> &'static str {
8288        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest"
8289    }
8290}
8291
8292/// The response message for
8293/// [ListFrameworkComplianceSummariesResponse][google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse].
8294///
8295/// [google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse]: crate::model::ListFrameworkComplianceSummariesResponse
8296#[derive(Clone, Default, PartialEq)]
8297#[non_exhaustive]
8298pub struct ListFrameworkComplianceSummariesResponse {
8299    /// The list of framework compliance summaries.
8300    pub framework_compliance_summaries: std::vec::Vec<crate::model::FrameworkComplianceSummary>,
8301
8302    /// Output only. The token to retrieve the next page of results.
8303    pub next_page_token: std::string::String,
8304
8305    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8306}
8307
8308impl ListFrameworkComplianceSummariesResponse {
8309    pub fn new() -> Self {
8310        std::default::Default::default()
8311    }
8312
8313    /// Sets the value of [framework_compliance_summaries][crate::model::ListFrameworkComplianceSummariesResponse::framework_compliance_summaries].
8314    ///
8315    /// # Example
8316    /// ```ignore,no_run
8317    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesResponse;
8318    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
8319    /// let x = ListFrameworkComplianceSummariesResponse::new()
8320    ///     .set_framework_compliance_summaries([
8321    ///         FrameworkComplianceSummary::default()/* use setters */,
8322    ///         FrameworkComplianceSummary::default()/* use (different) setters */,
8323    ///     ]);
8324    /// ```
8325    pub fn set_framework_compliance_summaries<T, V>(mut self, v: T) -> Self
8326    where
8327        T: std::iter::IntoIterator<Item = V>,
8328        V: std::convert::Into<crate::model::FrameworkComplianceSummary>,
8329    {
8330        use std::iter::Iterator;
8331        self.framework_compliance_summaries = v.into_iter().map(|i| i.into()).collect();
8332        self
8333    }
8334
8335    /// Sets the value of [next_page_token][crate::model::ListFrameworkComplianceSummariesResponse::next_page_token].
8336    ///
8337    /// # Example
8338    /// ```ignore,no_run
8339    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesResponse;
8340    /// let x = ListFrameworkComplianceSummariesResponse::new().set_next_page_token("example");
8341    /// ```
8342    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8343        self.next_page_token = v.into();
8344        self
8345    }
8346}
8347
8348impl wkt::message::Message for ListFrameworkComplianceSummariesResponse {
8349    fn typename() -> &'static str {
8350        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse"
8351    }
8352}
8353
8354#[doc(hidden)]
8355impl google_cloud_gax::paginator::internal::PageableResponse
8356    for ListFrameworkComplianceSummariesResponse
8357{
8358    type PageItem = crate::model::FrameworkComplianceSummary;
8359
8360    fn items(self) -> std::vec::Vec<Self::PageItem> {
8361        self.framework_compliance_summaries
8362    }
8363
8364    fn next_page_token(&self) -> std::string::String {
8365        use std::clone::Clone;
8366        self.next_page_token.clone()
8367    }
8368}
8369
8370/// The response message for [GetFrameworkComplianceReport][].
8371#[derive(Clone, Default, PartialEq)]
8372#[non_exhaustive]
8373pub struct FrameworkComplianceReport {
8374    /// The name of the framework.
8375    pub framework: std::string::String,
8376
8377    /// The description of the framework.
8378    pub framework_description: std::string::String,
8379
8380    /// Output only. The last updated time of the report.
8381    pub update_time: std::option::Option<wkt::Timestamp>,
8382
8383    /// The control assessment details of the framework.
8384    pub control_assessment_details: std::option::Option<crate::model::ControlAssessmentDetails>,
8385
8386    /// The type of framework.
8387    pub framework_type: crate::model::framework::FrameworkType,
8388
8389    /// The list of cloud providers supported by the framework.
8390    pub supported_cloud_providers: std::vec::Vec<crate::model::CloudProvider>,
8391
8392    /// The list of framework categories supported.
8393    pub framework_categories: std::vec::Vec<crate::model::FrameworkCategory>,
8394
8395    /// Optional. The display name for the framework.
8396    pub framework_display_name: std::string::String,
8397
8398    /// Identifier. The name of the framework compliance report.
8399    pub name: std::string::String,
8400
8401    /// The latest major revision ID of the framework.
8402    pub major_revision_id: i64,
8403
8404    /// The latest minor revision ID of the latest major revision of the framework.
8405    pub minor_revision_id: i64,
8406
8407    /// The target resource details of the framework.
8408    pub target_resource_details: std::vec::Vec<crate::model::TargetResourceDetails>,
8409
8410    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8411}
8412
8413impl FrameworkComplianceReport {
8414    pub fn new() -> Self {
8415        std::default::Default::default()
8416    }
8417
8418    /// Sets the value of [framework][crate::model::FrameworkComplianceReport::framework].
8419    ///
8420    /// # Example
8421    /// ```ignore,no_run
8422    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
8423    /// let x = FrameworkComplianceReport::new().set_framework("example");
8424    /// ```
8425    pub fn set_framework<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8426        self.framework = v.into();
8427        self
8428    }
8429
8430    /// Sets the value of [framework_description][crate::model::FrameworkComplianceReport::framework_description].
8431    ///
8432    /// # Example
8433    /// ```ignore,no_run
8434    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
8435    /// let x = FrameworkComplianceReport::new().set_framework_description("example");
8436    /// ```
8437    pub fn set_framework_description<T: std::convert::Into<std::string::String>>(
8438        mut self,
8439        v: T,
8440    ) -> Self {
8441        self.framework_description = v.into();
8442        self
8443    }
8444
8445    /// Sets the value of [update_time][crate::model::FrameworkComplianceReport::update_time].
8446    ///
8447    /// # Example
8448    /// ```ignore,no_run
8449    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
8450    /// use wkt::Timestamp;
8451    /// let x = FrameworkComplianceReport::new().set_update_time(Timestamp::default()/* use setters */);
8452    /// ```
8453    pub fn set_update_time<T>(mut self, v: T) -> Self
8454    where
8455        T: std::convert::Into<wkt::Timestamp>,
8456    {
8457        self.update_time = std::option::Option::Some(v.into());
8458        self
8459    }
8460
8461    /// Sets or clears the value of [update_time][crate::model::FrameworkComplianceReport::update_time].
8462    ///
8463    /// # Example
8464    /// ```ignore,no_run
8465    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
8466    /// use wkt::Timestamp;
8467    /// let x = FrameworkComplianceReport::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
8468    /// let x = FrameworkComplianceReport::new().set_or_clear_update_time(None::<Timestamp>);
8469    /// ```
8470    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
8471    where
8472        T: std::convert::Into<wkt::Timestamp>,
8473    {
8474        self.update_time = v.map(|x| x.into());
8475        self
8476    }
8477
8478    /// Sets the value of [control_assessment_details][crate::model::FrameworkComplianceReport::control_assessment_details].
8479    ///
8480    /// # Example
8481    /// ```ignore,no_run
8482    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
8483    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
8484    /// let x = FrameworkComplianceReport::new().set_control_assessment_details(ControlAssessmentDetails::default()/* use setters */);
8485    /// ```
8486    pub fn set_control_assessment_details<T>(mut self, v: T) -> Self
8487    where
8488        T: std::convert::Into<crate::model::ControlAssessmentDetails>,
8489    {
8490        self.control_assessment_details = std::option::Option::Some(v.into());
8491        self
8492    }
8493
8494    /// Sets or clears the value of [control_assessment_details][crate::model::FrameworkComplianceReport::control_assessment_details].
8495    ///
8496    /// # Example
8497    /// ```ignore,no_run
8498    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
8499    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
8500    /// let x = FrameworkComplianceReport::new().set_or_clear_control_assessment_details(Some(ControlAssessmentDetails::default()/* use setters */));
8501    /// let x = FrameworkComplianceReport::new().set_or_clear_control_assessment_details(None::<ControlAssessmentDetails>);
8502    /// ```
8503    pub fn set_or_clear_control_assessment_details<T>(mut self, v: std::option::Option<T>) -> Self
8504    where
8505        T: std::convert::Into<crate::model::ControlAssessmentDetails>,
8506    {
8507        self.control_assessment_details = v.map(|x| x.into());
8508        self
8509    }
8510
8511    /// Sets the value of [framework_type][crate::model::FrameworkComplianceReport::framework_type].
8512    ///
8513    /// # Example
8514    /// ```ignore,no_run
8515    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
8516    /// use google_cloud_cloudsecuritycompliance_v1::model::framework::FrameworkType;
8517    /// let x0 = FrameworkComplianceReport::new().set_framework_type(FrameworkType::BuiltIn);
8518    /// let x1 = FrameworkComplianceReport::new().set_framework_type(FrameworkType::Custom);
8519    /// ```
8520    pub fn set_framework_type<T: std::convert::Into<crate::model::framework::FrameworkType>>(
8521        mut self,
8522        v: T,
8523    ) -> Self {
8524        self.framework_type = v.into();
8525        self
8526    }
8527
8528    /// Sets the value of [supported_cloud_providers][crate::model::FrameworkComplianceReport::supported_cloud_providers].
8529    ///
8530    /// # Example
8531    /// ```ignore,no_run
8532    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
8533    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudProvider;
8534    /// let x = FrameworkComplianceReport::new().set_supported_cloud_providers([
8535    ///     CloudProvider::Aws,
8536    ///     CloudProvider::Azure,
8537    ///     CloudProvider::Gcp,
8538    /// ]);
8539    /// ```
8540    pub fn set_supported_cloud_providers<T, V>(mut self, v: T) -> Self
8541    where
8542        T: std::iter::IntoIterator<Item = V>,
8543        V: std::convert::Into<crate::model::CloudProvider>,
8544    {
8545        use std::iter::Iterator;
8546        self.supported_cloud_providers = v.into_iter().map(|i| i.into()).collect();
8547        self
8548    }
8549
8550    /// Sets the value of [framework_categories][crate::model::FrameworkComplianceReport::framework_categories].
8551    ///
8552    /// # Example
8553    /// ```ignore,no_run
8554    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
8555    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkCategory;
8556    /// let x = FrameworkComplianceReport::new().set_framework_categories([
8557    ///     FrameworkCategory::IndustryDefinedStandard,
8558    ///     FrameworkCategory::AssuredWorkloads,
8559    ///     FrameworkCategory::DataSecurity,
8560    /// ]);
8561    /// ```
8562    pub fn set_framework_categories<T, V>(mut self, v: T) -> Self
8563    where
8564        T: std::iter::IntoIterator<Item = V>,
8565        V: std::convert::Into<crate::model::FrameworkCategory>,
8566    {
8567        use std::iter::Iterator;
8568        self.framework_categories = v.into_iter().map(|i| i.into()).collect();
8569        self
8570    }
8571
8572    /// Sets the value of [framework_display_name][crate::model::FrameworkComplianceReport::framework_display_name].
8573    ///
8574    /// # Example
8575    /// ```ignore,no_run
8576    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
8577    /// let x = FrameworkComplianceReport::new().set_framework_display_name("example");
8578    /// ```
8579    pub fn set_framework_display_name<T: std::convert::Into<std::string::String>>(
8580        mut self,
8581        v: T,
8582    ) -> Self {
8583        self.framework_display_name = v.into();
8584        self
8585    }
8586
8587    /// Sets the value of [name][crate::model::FrameworkComplianceReport::name].
8588    ///
8589    /// # Example
8590    /// ```ignore,no_run
8591    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
8592    /// let x = FrameworkComplianceReport::new().set_name("example");
8593    /// ```
8594    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8595        self.name = v.into();
8596        self
8597    }
8598
8599    /// Sets the value of [major_revision_id][crate::model::FrameworkComplianceReport::major_revision_id].
8600    ///
8601    /// # Example
8602    /// ```ignore,no_run
8603    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
8604    /// let x = FrameworkComplianceReport::new().set_major_revision_id(42);
8605    /// ```
8606    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
8607        self.major_revision_id = v.into();
8608        self
8609    }
8610
8611    /// Sets the value of [minor_revision_id][crate::model::FrameworkComplianceReport::minor_revision_id].
8612    ///
8613    /// # Example
8614    /// ```ignore,no_run
8615    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
8616    /// let x = FrameworkComplianceReport::new().set_minor_revision_id(42);
8617    /// ```
8618    pub fn set_minor_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
8619        self.minor_revision_id = v.into();
8620        self
8621    }
8622
8623    /// Sets the value of [target_resource_details][crate::model::FrameworkComplianceReport::target_resource_details].
8624    ///
8625    /// # Example
8626    /// ```ignore,no_run
8627    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
8628    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
8629    /// let x = FrameworkComplianceReport::new()
8630    ///     .set_target_resource_details([
8631    ///         TargetResourceDetails::default()/* use setters */,
8632    ///         TargetResourceDetails::default()/* use (different) setters */,
8633    ///     ]);
8634    /// ```
8635    pub fn set_target_resource_details<T, V>(mut self, v: T) -> Self
8636    where
8637        T: std::iter::IntoIterator<Item = V>,
8638        V: std::convert::Into<crate::model::TargetResourceDetails>,
8639    {
8640        use std::iter::Iterator;
8641        self.target_resource_details = v.into_iter().map(|i| i.into()).collect();
8642        self
8643    }
8644}
8645
8646impl wkt::message::Message for FrameworkComplianceReport {
8647    fn typename() -> &'static str {
8648        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport"
8649    }
8650}
8651
8652/// The request message for [FetchFrameworkComplianceReport][].
8653#[derive(Clone, Default, PartialEq)]
8654#[non_exhaustive]
8655pub struct FetchFrameworkComplianceReportRequest {
8656    /// Required. The name of the framework compliance report to retrieve.
8657    pub name: std::string::String,
8658
8659    /// Optional. The end time of the report.
8660    pub end_time: std::option::Option<wkt::Timestamp>,
8661
8662    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8663}
8664
8665impl FetchFrameworkComplianceReportRequest {
8666    pub fn new() -> Self {
8667        std::default::Default::default()
8668    }
8669
8670    /// Sets the value of [name][crate::model::FetchFrameworkComplianceReportRequest::name].
8671    ///
8672    /// # Example
8673    /// ```ignore,no_run
8674    /// # use google_cloud_cloudsecuritycompliance_v1::model::FetchFrameworkComplianceReportRequest;
8675    /// let x = FetchFrameworkComplianceReportRequest::new().set_name("example");
8676    /// ```
8677    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8678        self.name = v.into();
8679        self
8680    }
8681
8682    /// Sets the value of [end_time][crate::model::FetchFrameworkComplianceReportRequest::end_time].
8683    ///
8684    /// # Example
8685    /// ```ignore,no_run
8686    /// # use google_cloud_cloudsecuritycompliance_v1::model::FetchFrameworkComplianceReportRequest;
8687    /// use wkt::Timestamp;
8688    /// let x = FetchFrameworkComplianceReportRequest::new().set_end_time(Timestamp::default()/* use setters */);
8689    /// ```
8690    pub fn set_end_time<T>(mut self, v: T) -> Self
8691    where
8692        T: std::convert::Into<wkt::Timestamp>,
8693    {
8694        self.end_time = std::option::Option::Some(v.into());
8695        self
8696    }
8697
8698    /// Sets or clears the value of [end_time][crate::model::FetchFrameworkComplianceReportRequest::end_time].
8699    ///
8700    /// # Example
8701    /// ```ignore,no_run
8702    /// # use google_cloud_cloudsecuritycompliance_v1::model::FetchFrameworkComplianceReportRequest;
8703    /// use wkt::Timestamp;
8704    /// let x = FetchFrameworkComplianceReportRequest::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
8705    /// let x = FetchFrameworkComplianceReportRequest::new().set_or_clear_end_time(None::<Timestamp>);
8706    /// ```
8707    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8708    where
8709        T: std::convert::Into<wkt::Timestamp>,
8710    {
8711        self.end_time = v.map(|x| x.into());
8712        self
8713    }
8714}
8715
8716impl wkt::message::Message for FetchFrameworkComplianceReportRequest {
8717    fn typename() -> &'static str {
8718        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest"
8719    }
8720}
8721
8722/// The request message for [ListFindingSummaries][].
8723#[derive(Clone, Default, PartialEq)]
8724#[non_exhaustive]
8725pub struct ListFindingSummariesRequest {
8726    /// Required. The parent scope for the framework overview page.
8727    pub parent: std::string::String,
8728
8729    /// Optional. The requested page size. The server might return fewer items than
8730    /// requested. If unspecified, the server picks an appropriate default.
8731    pub page_size: i32,
8732
8733    /// Optional. A token that identifies the page of results that the server
8734    /// should return.
8735    pub page_token: std::string::String,
8736
8737    /// Optional. The filtering results.
8738    pub filter: std::string::String,
8739
8740    /// Optional. The end time of the finding summary.
8741    #[deprecated]
8742    pub end_time: std::option::Option<wkt::Timestamp>,
8743
8744    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8745}
8746
8747impl ListFindingSummariesRequest {
8748    pub fn new() -> Self {
8749        std::default::Default::default()
8750    }
8751
8752    /// Sets the value of [parent][crate::model::ListFindingSummariesRequest::parent].
8753    ///
8754    /// # Example
8755    /// ```ignore,no_run
8756    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesRequest;
8757    /// let x = ListFindingSummariesRequest::new().set_parent("example");
8758    /// ```
8759    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8760        self.parent = v.into();
8761        self
8762    }
8763
8764    /// Sets the value of [page_size][crate::model::ListFindingSummariesRequest::page_size].
8765    ///
8766    /// # Example
8767    /// ```ignore,no_run
8768    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesRequest;
8769    /// let x = ListFindingSummariesRequest::new().set_page_size(42);
8770    /// ```
8771    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8772        self.page_size = v.into();
8773        self
8774    }
8775
8776    /// Sets the value of [page_token][crate::model::ListFindingSummariesRequest::page_token].
8777    ///
8778    /// # Example
8779    /// ```ignore,no_run
8780    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesRequest;
8781    /// let x = ListFindingSummariesRequest::new().set_page_token("example");
8782    /// ```
8783    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8784        self.page_token = v.into();
8785        self
8786    }
8787
8788    /// Sets the value of [filter][crate::model::ListFindingSummariesRequest::filter].
8789    ///
8790    /// # Example
8791    /// ```ignore,no_run
8792    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesRequest;
8793    /// let x = ListFindingSummariesRequest::new().set_filter("example");
8794    /// ```
8795    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8796        self.filter = v.into();
8797        self
8798    }
8799
8800    /// Sets the value of [end_time][crate::model::ListFindingSummariesRequest::end_time].
8801    ///
8802    /// # Example
8803    /// ```ignore,no_run
8804    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesRequest;
8805    /// use wkt::Timestamp;
8806    /// let x = ListFindingSummariesRequest::new().set_end_time(Timestamp::default()/* use setters */);
8807    /// ```
8808    #[deprecated]
8809    pub fn set_end_time<T>(mut self, v: T) -> Self
8810    where
8811        T: std::convert::Into<wkt::Timestamp>,
8812    {
8813        self.end_time = std::option::Option::Some(v.into());
8814        self
8815    }
8816
8817    /// Sets or clears the value of [end_time][crate::model::ListFindingSummariesRequest::end_time].
8818    ///
8819    /// # Example
8820    /// ```ignore,no_run
8821    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesRequest;
8822    /// use wkt::Timestamp;
8823    /// let x = ListFindingSummariesRequest::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
8824    /// let x = ListFindingSummariesRequest::new().set_or_clear_end_time(None::<Timestamp>);
8825    /// ```
8826    #[deprecated]
8827    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8828    where
8829        T: std::convert::Into<wkt::Timestamp>,
8830    {
8831        self.end_time = v.map(|x| x.into());
8832        self
8833    }
8834}
8835
8836impl wkt::message::Message for ListFindingSummariesRequest {
8837    fn typename() -> &'static str {
8838        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest"
8839    }
8840}
8841
8842/// The response message for [ListFindingSummaries][].
8843#[derive(Clone, Default, PartialEq)]
8844#[non_exhaustive]
8845pub struct ListFindingSummariesResponse {
8846    /// List of finding summary by category.
8847    pub finding_summaries: std::vec::Vec<crate::model::FindingSummary>,
8848
8849    /// Output only. The token to retrieve the next page of results.
8850    pub next_page_token: std::string::String,
8851
8852    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8853}
8854
8855impl ListFindingSummariesResponse {
8856    pub fn new() -> Self {
8857        std::default::Default::default()
8858    }
8859
8860    /// Sets the value of [finding_summaries][crate::model::ListFindingSummariesResponse::finding_summaries].
8861    ///
8862    /// # Example
8863    /// ```ignore,no_run
8864    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesResponse;
8865    /// use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
8866    /// let x = ListFindingSummariesResponse::new()
8867    ///     .set_finding_summaries([
8868    ///         FindingSummary::default()/* use setters */,
8869    ///         FindingSummary::default()/* use (different) setters */,
8870    ///     ]);
8871    /// ```
8872    pub fn set_finding_summaries<T, V>(mut self, v: T) -> Self
8873    where
8874        T: std::iter::IntoIterator<Item = V>,
8875        V: std::convert::Into<crate::model::FindingSummary>,
8876    {
8877        use std::iter::Iterator;
8878        self.finding_summaries = v.into_iter().map(|i| i.into()).collect();
8879        self
8880    }
8881
8882    /// Sets the value of [next_page_token][crate::model::ListFindingSummariesResponse::next_page_token].
8883    ///
8884    /// # Example
8885    /// ```ignore,no_run
8886    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesResponse;
8887    /// let x = ListFindingSummariesResponse::new().set_next_page_token("example");
8888    /// ```
8889    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8890        self.next_page_token = v.into();
8891        self
8892    }
8893}
8894
8895impl wkt::message::Message for ListFindingSummariesResponse {
8896    fn typename() -> &'static str {
8897        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse"
8898    }
8899}
8900
8901#[doc(hidden)]
8902impl google_cloud_gax::paginator::internal::PageableResponse for ListFindingSummariesResponse {
8903    type PageItem = crate::model::FindingSummary;
8904
8905    fn items(self) -> std::vec::Vec<Self::PageItem> {
8906        self.finding_summaries
8907    }
8908
8909    fn next_page_token(&self) -> std::string::String {
8910        use std::clone::Clone;
8911        self.next_page_token.clone()
8912    }
8913}
8914
8915/// The request message for [ListControlComplianceSummaries][].
8916#[derive(Clone, Default, PartialEq)]
8917#[non_exhaustive]
8918pub struct ListControlComplianceSummariesRequest {
8919    /// Required. The parent scope for the framework overview page.
8920    pub parent: std::string::String,
8921
8922    /// Optional. The end time of the control compliance summary.
8923    #[deprecated]
8924    pub end_time: std::option::Option<wkt::Timestamp>,
8925
8926    /// Optional. The requested page size. The server might return fewer items than
8927    /// requested. If unspecified, the server picks an appropriate default.
8928    pub page_size: i32,
8929
8930    /// Optional. A token that identifies the page of results that the server
8931    /// should return.
8932    pub page_token: std::string::String,
8933
8934    /// Optional. The filtering results.
8935    pub filter: std::string::String,
8936
8937    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8938}
8939
8940impl ListControlComplianceSummariesRequest {
8941    pub fn new() -> Self {
8942        std::default::Default::default()
8943    }
8944
8945    /// Sets the value of [parent][crate::model::ListControlComplianceSummariesRequest::parent].
8946    ///
8947    /// # Example
8948    /// ```ignore,no_run
8949    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesRequest;
8950    /// let x = ListControlComplianceSummariesRequest::new().set_parent("example");
8951    /// ```
8952    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8953        self.parent = v.into();
8954        self
8955    }
8956
8957    /// Sets the value of [end_time][crate::model::ListControlComplianceSummariesRequest::end_time].
8958    ///
8959    /// # Example
8960    /// ```ignore,no_run
8961    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesRequest;
8962    /// use wkt::Timestamp;
8963    /// let x = ListControlComplianceSummariesRequest::new().set_end_time(Timestamp::default()/* use setters */);
8964    /// ```
8965    #[deprecated]
8966    pub fn set_end_time<T>(mut self, v: T) -> Self
8967    where
8968        T: std::convert::Into<wkt::Timestamp>,
8969    {
8970        self.end_time = std::option::Option::Some(v.into());
8971        self
8972    }
8973
8974    /// Sets or clears the value of [end_time][crate::model::ListControlComplianceSummariesRequest::end_time].
8975    ///
8976    /// # Example
8977    /// ```ignore,no_run
8978    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesRequest;
8979    /// use wkt::Timestamp;
8980    /// let x = ListControlComplianceSummariesRequest::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
8981    /// let x = ListControlComplianceSummariesRequest::new().set_or_clear_end_time(None::<Timestamp>);
8982    /// ```
8983    #[deprecated]
8984    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8985    where
8986        T: std::convert::Into<wkt::Timestamp>,
8987    {
8988        self.end_time = v.map(|x| x.into());
8989        self
8990    }
8991
8992    /// Sets the value of [page_size][crate::model::ListControlComplianceSummariesRequest::page_size].
8993    ///
8994    /// # Example
8995    /// ```ignore,no_run
8996    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesRequest;
8997    /// let x = ListControlComplianceSummariesRequest::new().set_page_size(42);
8998    /// ```
8999    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9000        self.page_size = v.into();
9001        self
9002    }
9003
9004    /// Sets the value of [page_token][crate::model::ListControlComplianceSummariesRequest::page_token].
9005    ///
9006    /// # Example
9007    /// ```ignore,no_run
9008    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesRequest;
9009    /// let x = ListControlComplianceSummariesRequest::new().set_page_token("example");
9010    /// ```
9011    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9012        self.page_token = v.into();
9013        self
9014    }
9015
9016    /// Sets the value of [filter][crate::model::ListControlComplianceSummariesRequest::filter].
9017    ///
9018    /// # Example
9019    /// ```ignore,no_run
9020    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesRequest;
9021    /// let x = ListControlComplianceSummariesRequest::new().set_filter("example");
9022    /// ```
9023    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9024        self.filter = v.into();
9025        self
9026    }
9027}
9028
9029impl wkt::message::Message for ListControlComplianceSummariesRequest {
9030    fn typename() -> &'static str {
9031        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest"
9032    }
9033}
9034
9035/// The response message for [ListControlComplianceSummaries][].
9036#[derive(Clone, Default, PartialEq)]
9037#[non_exhaustive]
9038pub struct ListControlComplianceSummariesResponse {
9039    /// The list of control compliance details.
9040    pub control_compliance_summaries: std::vec::Vec<crate::model::ControlComplianceSummary>,
9041
9042    /// Output only. The token to retrieve the next page of results.
9043    pub next_page_token: std::string::String,
9044
9045    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9046}
9047
9048impl ListControlComplianceSummariesResponse {
9049    pub fn new() -> Self {
9050        std::default::Default::default()
9051    }
9052
9053    /// Sets the value of [control_compliance_summaries][crate::model::ListControlComplianceSummariesResponse::control_compliance_summaries].
9054    ///
9055    /// # Example
9056    /// ```ignore,no_run
9057    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesResponse;
9058    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
9059    /// let x = ListControlComplianceSummariesResponse::new()
9060    ///     .set_control_compliance_summaries([
9061    ///         ControlComplianceSummary::default()/* use setters */,
9062    ///         ControlComplianceSummary::default()/* use (different) setters */,
9063    ///     ]);
9064    /// ```
9065    pub fn set_control_compliance_summaries<T, V>(mut self, v: T) -> Self
9066    where
9067        T: std::iter::IntoIterator<Item = V>,
9068        V: std::convert::Into<crate::model::ControlComplianceSummary>,
9069    {
9070        use std::iter::Iterator;
9071        self.control_compliance_summaries = v.into_iter().map(|i| i.into()).collect();
9072        self
9073    }
9074
9075    /// Sets the value of [next_page_token][crate::model::ListControlComplianceSummariesResponse::next_page_token].
9076    ///
9077    /// # Example
9078    /// ```ignore,no_run
9079    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesResponse;
9080    /// let x = ListControlComplianceSummariesResponse::new().set_next_page_token("example");
9081    /// ```
9082    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9083        self.next_page_token = v.into();
9084        self
9085    }
9086}
9087
9088impl wkt::message::Message for ListControlComplianceSummariesResponse {
9089    fn typename() -> &'static str {
9090        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse"
9091    }
9092}
9093
9094#[doc(hidden)]
9095impl google_cloud_gax::paginator::internal::PageableResponse
9096    for ListControlComplianceSummariesResponse
9097{
9098    type PageItem = crate::model::ControlComplianceSummary;
9099
9100    fn items(self) -> std::vec::Vec<Self::PageItem> {
9101        self.control_compliance_summaries
9102    }
9103
9104    fn next_page_token(&self) -> std::string::String {
9105        use std::clone::Clone;
9106        self.next_page_token.clone()
9107    }
9108}
9109
9110/// The request message for [AggregateFrameworkComplianceReport][].
9111#[derive(Clone, Default, PartialEq)]
9112#[non_exhaustive]
9113pub struct AggregateFrameworkComplianceReportRequest {
9114    /// Required. The name of the aggregated compliance report over time to
9115    /// retrieve.
9116    ///
9117    /// The supported format is:
9118    /// `organizations/{organization_id}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}`
9119    pub name: std::string::String,
9120
9121    /// Optional. The start and end time range for the aggregated compliance
9122    /// report.
9123    pub interval: std::option::Option<google_cloud_type::model::Interval>,
9124
9125    /// Optional. The filtering results.
9126    pub filter: std::string::String,
9127
9128    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9129}
9130
9131impl AggregateFrameworkComplianceReportRequest {
9132    pub fn new() -> Self {
9133        std::default::Default::default()
9134    }
9135
9136    /// Sets the value of [name][crate::model::AggregateFrameworkComplianceReportRequest::name].
9137    ///
9138    /// # Example
9139    /// ```ignore,no_run
9140    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregateFrameworkComplianceReportRequest;
9141    /// let x = AggregateFrameworkComplianceReportRequest::new().set_name("example");
9142    /// ```
9143    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9144        self.name = v.into();
9145        self
9146    }
9147
9148    /// Sets the value of [interval][crate::model::AggregateFrameworkComplianceReportRequest::interval].
9149    ///
9150    /// # Example
9151    /// ```ignore,no_run
9152    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregateFrameworkComplianceReportRequest;
9153    /// use google_cloud_type::model::Interval;
9154    /// let x = AggregateFrameworkComplianceReportRequest::new().set_interval(Interval::default()/* use setters */);
9155    /// ```
9156    pub fn set_interval<T>(mut self, v: T) -> Self
9157    where
9158        T: std::convert::Into<google_cloud_type::model::Interval>,
9159    {
9160        self.interval = std::option::Option::Some(v.into());
9161        self
9162    }
9163
9164    /// Sets or clears the value of [interval][crate::model::AggregateFrameworkComplianceReportRequest::interval].
9165    ///
9166    /// # Example
9167    /// ```ignore,no_run
9168    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregateFrameworkComplianceReportRequest;
9169    /// use google_cloud_type::model::Interval;
9170    /// let x = AggregateFrameworkComplianceReportRequest::new().set_or_clear_interval(Some(Interval::default()/* use setters */));
9171    /// let x = AggregateFrameworkComplianceReportRequest::new().set_or_clear_interval(None::<Interval>);
9172    /// ```
9173    pub fn set_or_clear_interval<T>(mut self, v: std::option::Option<T>) -> Self
9174    where
9175        T: std::convert::Into<google_cloud_type::model::Interval>,
9176    {
9177        self.interval = v.map(|x| x.into());
9178        self
9179    }
9180
9181    /// Sets the value of [filter][crate::model::AggregateFrameworkComplianceReportRequest::filter].
9182    ///
9183    /// # Example
9184    /// ```ignore,no_run
9185    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregateFrameworkComplianceReportRequest;
9186    /// let x = AggregateFrameworkComplianceReportRequest::new().set_filter("example");
9187    /// ```
9188    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9189        self.filter = v.into();
9190        self
9191    }
9192}
9193
9194impl wkt::message::Message for AggregateFrameworkComplianceReportRequest {
9195    fn typename() -> &'static str {
9196        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest"
9197    }
9198}
9199
9200/// The response message for [AggregateFrameworkComplianceReport][].
9201#[derive(Clone, Default, PartialEq)]
9202#[non_exhaustive]
9203pub struct AggregateFrameworkComplianceReportResponse {
9204    /// The list of aggregated compliance reports.
9205    pub aggregated_compliance_reports: std::vec::Vec<crate::model::AggregatedComplianceReport>,
9206
9207    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9208}
9209
9210impl AggregateFrameworkComplianceReportResponse {
9211    pub fn new() -> Self {
9212        std::default::Default::default()
9213    }
9214
9215    /// Sets the value of [aggregated_compliance_reports][crate::model::AggregateFrameworkComplianceReportResponse::aggregated_compliance_reports].
9216    ///
9217    /// # Example
9218    /// ```ignore,no_run
9219    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregateFrameworkComplianceReportResponse;
9220    /// use google_cloud_cloudsecuritycompliance_v1::model::AggregatedComplianceReport;
9221    /// let x = AggregateFrameworkComplianceReportResponse::new()
9222    ///     .set_aggregated_compliance_reports([
9223    ///         AggregatedComplianceReport::default()/* use setters */,
9224    ///         AggregatedComplianceReport::default()/* use (different) setters */,
9225    ///     ]);
9226    /// ```
9227    pub fn set_aggregated_compliance_reports<T, V>(mut self, v: T) -> Self
9228    where
9229        T: std::iter::IntoIterator<Item = V>,
9230        V: std::convert::Into<crate::model::AggregatedComplianceReport>,
9231    {
9232        use std::iter::Iterator;
9233        self.aggregated_compliance_reports = v.into_iter().map(|i| i.into()).collect();
9234        self
9235    }
9236}
9237
9238impl wkt::message::Message for AggregateFrameworkComplianceReportResponse {
9239    fn typename() -> &'static str {
9240        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse"
9241    }
9242}
9243
9244/// The details for a control assessment.
9245#[derive(Clone, Default, PartialEq)]
9246#[non_exhaustive]
9247pub struct ControlAssessmentDetails {
9248    /// The number of controls that are passing or not assessed.
9249    pub passing_controls: i32,
9250
9251    /// The number of controls that are failing.
9252    pub failing_controls: i32,
9253
9254    /// The number of controls that were assessed and are passing.
9255    pub assessed_passing_controls: i32,
9256
9257    /// The number of controls that aren't assessed because they require manual
9258    /// review.
9259    pub not_assessed_controls: i32,
9260
9261    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9262}
9263
9264impl ControlAssessmentDetails {
9265    pub fn new() -> Self {
9266        std::default::Default::default()
9267    }
9268
9269    /// Sets the value of [passing_controls][crate::model::ControlAssessmentDetails::passing_controls].
9270    ///
9271    /// # Example
9272    /// ```ignore,no_run
9273    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
9274    /// let x = ControlAssessmentDetails::new().set_passing_controls(42);
9275    /// ```
9276    pub fn set_passing_controls<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9277        self.passing_controls = v.into();
9278        self
9279    }
9280
9281    /// Sets the value of [failing_controls][crate::model::ControlAssessmentDetails::failing_controls].
9282    ///
9283    /// # Example
9284    /// ```ignore,no_run
9285    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
9286    /// let x = ControlAssessmentDetails::new().set_failing_controls(42);
9287    /// ```
9288    pub fn set_failing_controls<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9289        self.failing_controls = v.into();
9290        self
9291    }
9292
9293    /// Sets the value of [assessed_passing_controls][crate::model::ControlAssessmentDetails::assessed_passing_controls].
9294    ///
9295    /// # Example
9296    /// ```ignore,no_run
9297    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
9298    /// let x = ControlAssessmentDetails::new().set_assessed_passing_controls(42);
9299    /// ```
9300    pub fn set_assessed_passing_controls<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9301        self.assessed_passing_controls = v.into();
9302        self
9303    }
9304
9305    /// Sets the value of [not_assessed_controls][crate::model::ControlAssessmentDetails::not_assessed_controls].
9306    ///
9307    /// # Example
9308    /// ```ignore,no_run
9309    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
9310    /// let x = ControlAssessmentDetails::new().set_not_assessed_controls(42);
9311    /// ```
9312    pub fn set_not_assessed_controls<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9313        self.not_assessed_controls = v.into();
9314        self
9315    }
9316}
9317
9318impl wkt::message::Message for ControlAssessmentDetails {
9319    fn typename() -> &'static str {
9320        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails"
9321    }
9322}
9323
9324/// The details for a framework compliance summary.
9325#[derive(Clone, Default, PartialEq)]
9326#[non_exhaustive]
9327pub struct FrameworkComplianceSummary {
9328    /// The name of the framework.
9329    pub framework: std::string::String,
9330
9331    /// The control assessment details of the framework.
9332    pub control_assessment_details: std::option::Option<crate::model::ControlAssessmentDetails>,
9333
9334    /// The type of framework.
9335    pub framework_type: crate::model::framework::FrameworkType,
9336
9337    /// The list of cloud providers supported by the framework.
9338    pub supported_cloud_providers: std::vec::Vec<crate::model::CloudProvider>,
9339
9340    /// The list of framework categories supported by the framework.
9341    pub framework_categories: std::vec::Vec<crate::model::FrameworkCategory>,
9342
9343    /// Optional. The display name for the framework.
9344    pub framework_display_name: std::string::String,
9345
9346    /// Identifier. The name of the framework compliance summary.
9347    pub name: std::string::String,
9348
9349    /// The major revision ID of the framework.
9350    pub major_revision_id: i64,
9351
9352    /// The minor revision ID of the framework.
9353    pub minor_revision_id: i64,
9354
9355    /// The target resource details for the framework.
9356    pub target_resource_details: std::vec::Vec<crate::model::TargetResourceDetails>,
9357
9358    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9359}
9360
9361impl FrameworkComplianceSummary {
9362    pub fn new() -> Self {
9363        std::default::Default::default()
9364    }
9365
9366    /// Sets the value of [framework][crate::model::FrameworkComplianceSummary::framework].
9367    ///
9368    /// # Example
9369    /// ```ignore,no_run
9370    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
9371    /// let x = FrameworkComplianceSummary::new().set_framework("example");
9372    /// ```
9373    pub fn set_framework<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9374        self.framework = v.into();
9375        self
9376    }
9377
9378    /// Sets the value of [control_assessment_details][crate::model::FrameworkComplianceSummary::control_assessment_details].
9379    ///
9380    /// # Example
9381    /// ```ignore,no_run
9382    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
9383    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
9384    /// let x = FrameworkComplianceSummary::new().set_control_assessment_details(ControlAssessmentDetails::default()/* use setters */);
9385    /// ```
9386    pub fn set_control_assessment_details<T>(mut self, v: T) -> Self
9387    where
9388        T: std::convert::Into<crate::model::ControlAssessmentDetails>,
9389    {
9390        self.control_assessment_details = std::option::Option::Some(v.into());
9391        self
9392    }
9393
9394    /// Sets or clears the value of [control_assessment_details][crate::model::FrameworkComplianceSummary::control_assessment_details].
9395    ///
9396    /// # Example
9397    /// ```ignore,no_run
9398    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
9399    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
9400    /// let x = FrameworkComplianceSummary::new().set_or_clear_control_assessment_details(Some(ControlAssessmentDetails::default()/* use setters */));
9401    /// let x = FrameworkComplianceSummary::new().set_or_clear_control_assessment_details(None::<ControlAssessmentDetails>);
9402    /// ```
9403    pub fn set_or_clear_control_assessment_details<T>(mut self, v: std::option::Option<T>) -> Self
9404    where
9405        T: std::convert::Into<crate::model::ControlAssessmentDetails>,
9406    {
9407        self.control_assessment_details = v.map(|x| x.into());
9408        self
9409    }
9410
9411    /// Sets the value of [framework_type][crate::model::FrameworkComplianceSummary::framework_type].
9412    ///
9413    /// # Example
9414    /// ```ignore,no_run
9415    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
9416    /// use google_cloud_cloudsecuritycompliance_v1::model::framework::FrameworkType;
9417    /// let x0 = FrameworkComplianceSummary::new().set_framework_type(FrameworkType::BuiltIn);
9418    /// let x1 = FrameworkComplianceSummary::new().set_framework_type(FrameworkType::Custom);
9419    /// ```
9420    pub fn set_framework_type<T: std::convert::Into<crate::model::framework::FrameworkType>>(
9421        mut self,
9422        v: T,
9423    ) -> Self {
9424        self.framework_type = v.into();
9425        self
9426    }
9427
9428    /// Sets the value of [supported_cloud_providers][crate::model::FrameworkComplianceSummary::supported_cloud_providers].
9429    ///
9430    /// # Example
9431    /// ```ignore,no_run
9432    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
9433    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudProvider;
9434    /// let x = FrameworkComplianceSummary::new().set_supported_cloud_providers([
9435    ///     CloudProvider::Aws,
9436    ///     CloudProvider::Azure,
9437    ///     CloudProvider::Gcp,
9438    /// ]);
9439    /// ```
9440    pub fn set_supported_cloud_providers<T, V>(mut self, v: T) -> Self
9441    where
9442        T: std::iter::IntoIterator<Item = V>,
9443        V: std::convert::Into<crate::model::CloudProvider>,
9444    {
9445        use std::iter::Iterator;
9446        self.supported_cloud_providers = v.into_iter().map(|i| i.into()).collect();
9447        self
9448    }
9449
9450    /// Sets the value of [framework_categories][crate::model::FrameworkComplianceSummary::framework_categories].
9451    ///
9452    /// # Example
9453    /// ```ignore,no_run
9454    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
9455    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkCategory;
9456    /// let x = FrameworkComplianceSummary::new().set_framework_categories([
9457    ///     FrameworkCategory::IndustryDefinedStandard,
9458    ///     FrameworkCategory::AssuredWorkloads,
9459    ///     FrameworkCategory::DataSecurity,
9460    /// ]);
9461    /// ```
9462    pub fn set_framework_categories<T, V>(mut self, v: T) -> Self
9463    where
9464        T: std::iter::IntoIterator<Item = V>,
9465        V: std::convert::Into<crate::model::FrameworkCategory>,
9466    {
9467        use std::iter::Iterator;
9468        self.framework_categories = v.into_iter().map(|i| i.into()).collect();
9469        self
9470    }
9471
9472    /// Sets the value of [framework_display_name][crate::model::FrameworkComplianceSummary::framework_display_name].
9473    ///
9474    /// # Example
9475    /// ```ignore,no_run
9476    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
9477    /// let x = FrameworkComplianceSummary::new().set_framework_display_name("example");
9478    /// ```
9479    pub fn set_framework_display_name<T: std::convert::Into<std::string::String>>(
9480        mut self,
9481        v: T,
9482    ) -> Self {
9483        self.framework_display_name = v.into();
9484        self
9485    }
9486
9487    /// Sets the value of [name][crate::model::FrameworkComplianceSummary::name].
9488    ///
9489    /// # Example
9490    /// ```ignore,no_run
9491    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
9492    /// let x = FrameworkComplianceSummary::new().set_name("example");
9493    /// ```
9494    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9495        self.name = v.into();
9496        self
9497    }
9498
9499    /// Sets the value of [major_revision_id][crate::model::FrameworkComplianceSummary::major_revision_id].
9500    ///
9501    /// # Example
9502    /// ```ignore,no_run
9503    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
9504    /// let x = FrameworkComplianceSummary::new().set_major_revision_id(42);
9505    /// ```
9506    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9507        self.major_revision_id = v.into();
9508        self
9509    }
9510
9511    /// Sets the value of [minor_revision_id][crate::model::FrameworkComplianceSummary::minor_revision_id].
9512    ///
9513    /// # Example
9514    /// ```ignore,no_run
9515    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
9516    /// let x = FrameworkComplianceSummary::new().set_minor_revision_id(42);
9517    /// ```
9518    pub fn set_minor_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9519        self.minor_revision_id = v.into();
9520        self
9521    }
9522
9523    /// Sets the value of [target_resource_details][crate::model::FrameworkComplianceSummary::target_resource_details].
9524    ///
9525    /// # Example
9526    /// ```ignore,no_run
9527    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
9528    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
9529    /// let x = FrameworkComplianceSummary::new()
9530    ///     .set_target_resource_details([
9531    ///         TargetResourceDetails::default()/* use setters */,
9532    ///         TargetResourceDetails::default()/* use (different) setters */,
9533    ///     ]);
9534    /// ```
9535    pub fn set_target_resource_details<T, V>(mut self, v: T) -> Self
9536    where
9537        T: std::iter::IntoIterator<Item = V>,
9538        V: std::convert::Into<crate::model::TargetResourceDetails>,
9539    {
9540        use std::iter::Iterator;
9541        self.target_resource_details = v.into_iter().map(|i| i.into()).collect();
9542        self
9543    }
9544}
9545
9546impl wkt::message::Message for FrameworkComplianceSummary {
9547    fn typename() -> &'static str {
9548        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary"
9549    }
9550}
9551
9552/// The details for a finding.
9553#[derive(Clone, Default, PartialEq)]
9554#[non_exhaustive]
9555pub struct FindingSummary {
9556    /// The category of the finding.
9557    pub finding_category: std::string::String,
9558
9559    /// The class of the finding.
9560    pub finding_class: crate::model::FindingClass,
9561
9562    /// The severity of the finding.
9563    pub severity: crate::model::Severity,
9564
9565    /// The count of the finding.
9566    pub finding_count: i64,
9567
9568    /// Output only. The last updated time of the finding.
9569    pub update_time: std::option::Option<wkt::Timestamp>,
9570
9571    /// Optional. The list of compliance frameworks that the finding belongs to.
9572    pub related_frameworks: std::vec::Vec<std::string::String>,
9573
9574    /// Identifier. The name of the finding summary.
9575    pub name: std::string::String,
9576
9577    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9578}
9579
9580impl FindingSummary {
9581    pub fn new() -> Self {
9582        std::default::Default::default()
9583    }
9584
9585    /// Sets the value of [finding_category][crate::model::FindingSummary::finding_category].
9586    ///
9587    /// # Example
9588    /// ```ignore,no_run
9589    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
9590    /// let x = FindingSummary::new().set_finding_category("example");
9591    /// ```
9592    pub fn set_finding_category<T: std::convert::Into<std::string::String>>(
9593        mut self,
9594        v: T,
9595    ) -> Self {
9596        self.finding_category = v.into();
9597        self
9598    }
9599
9600    /// Sets the value of [finding_class][crate::model::FindingSummary::finding_class].
9601    ///
9602    /// # Example
9603    /// ```ignore,no_run
9604    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
9605    /// use google_cloud_cloudsecuritycompliance_v1::model::FindingClass;
9606    /// let x0 = FindingSummary::new().set_finding_class(FindingClass::Threat);
9607    /// let x1 = FindingSummary::new().set_finding_class(FindingClass::Vulnerability);
9608    /// let x2 = FindingSummary::new().set_finding_class(FindingClass::Misconfiguration);
9609    /// ```
9610    pub fn set_finding_class<T: std::convert::Into<crate::model::FindingClass>>(
9611        mut self,
9612        v: T,
9613    ) -> Self {
9614        self.finding_class = v.into();
9615        self
9616    }
9617
9618    /// Sets the value of [severity][crate::model::FindingSummary::severity].
9619    ///
9620    /// # Example
9621    /// ```ignore,no_run
9622    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
9623    /// use google_cloud_cloudsecuritycompliance_v1::model::Severity;
9624    /// let x0 = FindingSummary::new().set_severity(Severity::Critical);
9625    /// let x1 = FindingSummary::new().set_severity(Severity::High);
9626    /// let x2 = FindingSummary::new().set_severity(Severity::Medium);
9627    /// ```
9628    pub fn set_severity<T: std::convert::Into<crate::model::Severity>>(mut self, v: T) -> Self {
9629        self.severity = v.into();
9630        self
9631    }
9632
9633    /// Sets the value of [finding_count][crate::model::FindingSummary::finding_count].
9634    ///
9635    /// # Example
9636    /// ```ignore,no_run
9637    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
9638    /// let x = FindingSummary::new().set_finding_count(42);
9639    /// ```
9640    pub fn set_finding_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9641        self.finding_count = v.into();
9642        self
9643    }
9644
9645    /// Sets the value of [update_time][crate::model::FindingSummary::update_time].
9646    ///
9647    /// # Example
9648    /// ```ignore,no_run
9649    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
9650    /// use wkt::Timestamp;
9651    /// let x = FindingSummary::new().set_update_time(Timestamp::default()/* use setters */);
9652    /// ```
9653    pub fn set_update_time<T>(mut self, v: T) -> Self
9654    where
9655        T: std::convert::Into<wkt::Timestamp>,
9656    {
9657        self.update_time = std::option::Option::Some(v.into());
9658        self
9659    }
9660
9661    /// Sets or clears the value of [update_time][crate::model::FindingSummary::update_time].
9662    ///
9663    /// # Example
9664    /// ```ignore,no_run
9665    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
9666    /// use wkt::Timestamp;
9667    /// let x = FindingSummary::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
9668    /// let x = FindingSummary::new().set_or_clear_update_time(None::<Timestamp>);
9669    /// ```
9670    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
9671    where
9672        T: std::convert::Into<wkt::Timestamp>,
9673    {
9674        self.update_time = v.map(|x| x.into());
9675        self
9676    }
9677
9678    /// Sets the value of [related_frameworks][crate::model::FindingSummary::related_frameworks].
9679    ///
9680    /// # Example
9681    /// ```ignore,no_run
9682    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
9683    /// let x = FindingSummary::new().set_related_frameworks(["a", "b", "c"]);
9684    /// ```
9685    pub fn set_related_frameworks<T, V>(mut self, v: T) -> Self
9686    where
9687        T: std::iter::IntoIterator<Item = V>,
9688        V: std::convert::Into<std::string::String>,
9689    {
9690        use std::iter::Iterator;
9691        self.related_frameworks = v.into_iter().map(|i| i.into()).collect();
9692        self
9693    }
9694
9695    /// Sets the value of [name][crate::model::FindingSummary::name].
9696    ///
9697    /// # Example
9698    /// ```ignore,no_run
9699    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
9700    /// let x = FindingSummary::new().set_name("example");
9701    /// ```
9702    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9703        self.name = v.into();
9704        self
9705    }
9706}
9707
9708impl wkt::message::Message for FindingSummary {
9709    fn typename() -> &'static str {
9710        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FindingSummary"
9711    }
9712}
9713
9714/// The details for control compliance.
9715#[derive(Clone, Default, PartialEq)]
9716#[non_exhaustive]
9717pub struct ControlComplianceSummary {
9718    /// The name of the control.
9719    pub control: std::string::String,
9720
9721    /// The display name of the control.
9722    pub display_name: std::string::String,
9723
9724    /// The description of the control.
9725    pub description: std::string::String,
9726
9727    /// Output only. The overall evaluation status of the control.
9728    pub overall_evaluation_state: crate::model::EvaluationState,
9729
9730    /// The total number of findings for the control.
9731    pub total_findings_count: i32,
9732
9733    /// The list of compliance frameworks that the control belongs to.
9734    pub compliance_frameworks: std::vec::Vec<std::string::String>,
9735
9736    /// The list of similar controls.
9737    pub similar_controls: std::vec::Vec<crate::model::SimilarControls>,
9738
9739    /// The list of cloud control reports.
9740    pub cloud_control_reports: std::vec::Vec<crate::model::CloudControlReport>,
9741
9742    /// The responsibility type for the control.
9743    pub control_responsibility_type: crate::model::RegulatoryControlResponsibilityType,
9744
9745    /// Whether the control is a fake control. Fake controls are created
9746    /// and mapped to cloud controls that don't belong to a control group.
9747    pub is_fake_control: bool,
9748
9749    /// Identifier. The name of the control compliance summary.
9750    pub name: std::string::String,
9751
9752    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9753}
9754
9755impl ControlComplianceSummary {
9756    pub fn new() -> Self {
9757        std::default::Default::default()
9758    }
9759
9760    /// Sets the value of [control][crate::model::ControlComplianceSummary::control].
9761    ///
9762    /// # Example
9763    /// ```ignore,no_run
9764    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
9765    /// let x = ControlComplianceSummary::new().set_control("example");
9766    /// ```
9767    pub fn set_control<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9768        self.control = v.into();
9769        self
9770    }
9771
9772    /// Sets the value of [display_name][crate::model::ControlComplianceSummary::display_name].
9773    ///
9774    /// # Example
9775    /// ```ignore,no_run
9776    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
9777    /// let x = ControlComplianceSummary::new().set_display_name("example");
9778    /// ```
9779    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9780        self.display_name = v.into();
9781        self
9782    }
9783
9784    /// Sets the value of [description][crate::model::ControlComplianceSummary::description].
9785    ///
9786    /// # Example
9787    /// ```ignore,no_run
9788    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
9789    /// let x = ControlComplianceSummary::new().set_description("example");
9790    /// ```
9791    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9792        self.description = v.into();
9793        self
9794    }
9795
9796    /// Sets the value of [overall_evaluation_state][crate::model::ControlComplianceSummary::overall_evaluation_state].
9797    ///
9798    /// # Example
9799    /// ```ignore,no_run
9800    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
9801    /// use google_cloud_cloudsecuritycompliance_v1::model::EvaluationState;
9802    /// let x0 = ControlComplianceSummary::new().set_overall_evaluation_state(EvaluationState::Passed);
9803    /// let x1 = ControlComplianceSummary::new().set_overall_evaluation_state(EvaluationState::Failed);
9804    /// let x2 = ControlComplianceSummary::new().set_overall_evaluation_state(EvaluationState::NotAssessed);
9805    /// ```
9806    pub fn set_overall_evaluation_state<T: std::convert::Into<crate::model::EvaluationState>>(
9807        mut self,
9808        v: T,
9809    ) -> Self {
9810        self.overall_evaluation_state = v.into();
9811        self
9812    }
9813
9814    /// Sets the value of [total_findings_count][crate::model::ControlComplianceSummary::total_findings_count].
9815    ///
9816    /// # Example
9817    /// ```ignore,no_run
9818    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
9819    /// let x = ControlComplianceSummary::new().set_total_findings_count(42);
9820    /// ```
9821    pub fn set_total_findings_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9822        self.total_findings_count = v.into();
9823        self
9824    }
9825
9826    /// Sets the value of [compliance_frameworks][crate::model::ControlComplianceSummary::compliance_frameworks].
9827    ///
9828    /// # Example
9829    /// ```ignore,no_run
9830    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
9831    /// let x = ControlComplianceSummary::new().set_compliance_frameworks(["a", "b", "c"]);
9832    /// ```
9833    pub fn set_compliance_frameworks<T, V>(mut self, v: T) -> Self
9834    where
9835        T: std::iter::IntoIterator<Item = V>,
9836        V: std::convert::Into<std::string::String>,
9837    {
9838        use std::iter::Iterator;
9839        self.compliance_frameworks = v.into_iter().map(|i| i.into()).collect();
9840        self
9841    }
9842
9843    /// Sets the value of [similar_controls][crate::model::ControlComplianceSummary::similar_controls].
9844    ///
9845    /// # Example
9846    /// ```ignore,no_run
9847    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
9848    /// use google_cloud_cloudsecuritycompliance_v1::model::SimilarControls;
9849    /// let x = ControlComplianceSummary::new()
9850    ///     .set_similar_controls([
9851    ///         SimilarControls::default()/* use setters */,
9852    ///         SimilarControls::default()/* use (different) setters */,
9853    ///     ]);
9854    /// ```
9855    pub fn set_similar_controls<T, V>(mut self, v: T) -> Self
9856    where
9857        T: std::iter::IntoIterator<Item = V>,
9858        V: std::convert::Into<crate::model::SimilarControls>,
9859    {
9860        use std::iter::Iterator;
9861        self.similar_controls = v.into_iter().map(|i| i.into()).collect();
9862        self
9863    }
9864
9865    /// Sets the value of [cloud_control_reports][crate::model::ControlComplianceSummary::cloud_control_reports].
9866    ///
9867    /// # Example
9868    /// ```ignore,no_run
9869    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
9870    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
9871    /// let x = ControlComplianceSummary::new()
9872    ///     .set_cloud_control_reports([
9873    ///         CloudControlReport::default()/* use setters */,
9874    ///         CloudControlReport::default()/* use (different) setters */,
9875    ///     ]);
9876    /// ```
9877    pub fn set_cloud_control_reports<T, V>(mut self, v: T) -> Self
9878    where
9879        T: std::iter::IntoIterator<Item = V>,
9880        V: std::convert::Into<crate::model::CloudControlReport>,
9881    {
9882        use std::iter::Iterator;
9883        self.cloud_control_reports = v.into_iter().map(|i| i.into()).collect();
9884        self
9885    }
9886
9887    /// Sets the value of [control_responsibility_type][crate::model::ControlComplianceSummary::control_responsibility_type].
9888    ///
9889    /// # Example
9890    /// ```ignore,no_run
9891    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
9892    /// use google_cloud_cloudsecuritycompliance_v1::model::RegulatoryControlResponsibilityType;
9893    /// let x0 = ControlComplianceSummary::new().set_control_responsibility_type(RegulatoryControlResponsibilityType::Google);
9894    /// let x1 = ControlComplianceSummary::new().set_control_responsibility_type(RegulatoryControlResponsibilityType::Customer);
9895    /// let x2 = ControlComplianceSummary::new().set_control_responsibility_type(RegulatoryControlResponsibilityType::Shared);
9896    /// ```
9897    pub fn set_control_responsibility_type<
9898        T: std::convert::Into<crate::model::RegulatoryControlResponsibilityType>,
9899    >(
9900        mut self,
9901        v: T,
9902    ) -> Self {
9903        self.control_responsibility_type = v.into();
9904        self
9905    }
9906
9907    /// Sets the value of [is_fake_control][crate::model::ControlComplianceSummary::is_fake_control].
9908    ///
9909    /// # Example
9910    /// ```ignore,no_run
9911    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
9912    /// let x = ControlComplianceSummary::new().set_is_fake_control(true);
9913    /// ```
9914    pub fn set_is_fake_control<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9915        self.is_fake_control = v.into();
9916        self
9917    }
9918
9919    /// Sets the value of [name][crate::model::ControlComplianceSummary::name].
9920    ///
9921    /// # Example
9922    /// ```ignore,no_run
9923    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
9924    /// let x = ControlComplianceSummary::new().set_name("example");
9925    /// ```
9926    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9927        self.name = v.into();
9928        self
9929    }
9930}
9931
9932impl wkt::message::Message for ControlComplianceSummary {
9933    fn typename() -> &'static str {
9934        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary"
9935    }
9936}
9937
9938/// The cloud control report.
9939#[derive(Clone, Default, PartialEq)]
9940#[non_exhaustive]
9941pub struct CloudControlReport {
9942    /// The name of the cloud control.
9943    pub cloud_control: std::string::String,
9944
9945    /// The display name of the cloud control.
9946    pub display_name: std::string::String,
9947
9948    /// The description of the cloud control.
9949    pub description: std::string::String,
9950
9951    /// The list of categories for the cloud control.
9952    pub categories: std::vec::Vec<std::string::String>,
9953
9954    /// The list of similar controls.
9955    pub similar_controls: std::vec::Vec<crate::model::SimilarControls>,
9956
9957    /// The type of the cloud control.
9958    pub cloud_control_type: crate::model::cloud_control::Type,
9959
9960    /// The category of the finding.
9961    pub finding_category: std::string::String,
9962
9963    /// The list of rules that correspond to the cloud control.
9964    pub rules: std::vec::Vec<crate::model::Rule>,
9965
9966    /// The severity of the finding.
9967    pub finding_severity: crate::model::Severity,
9968
9969    /// The enforcement mode of the cloud control.
9970    pub enforcement_mode: crate::model::EnforcementMode,
9971
9972    /// The name of the cloud control deployment.
9973    pub cloud_control_deployment: std::string::String,
9974
9975    /// The major revision ID of the cloud control.
9976    pub major_revision_id: i64,
9977
9978    /// The minor revision ID of the cloud control.
9979    pub minor_revision_id: i64,
9980
9981    /// The major revision IDs of the frameworks that the cloud control belongs to.
9982    pub framework_major_revision_ids: std::vec::Vec<i64>,
9983
9984    /// The assessment details of the cloud control.
9985    pub assessment_details:
9986        std::option::Option<crate::model::cloud_control_report::AssessmentDetails>,
9987
9988    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9989}
9990
9991impl CloudControlReport {
9992    pub fn new() -> Self {
9993        std::default::Default::default()
9994    }
9995
9996    /// Sets the value of [cloud_control][crate::model::CloudControlReport::cloud_control].
9997    ///
9998    /// # Example
9999    /// ```ignore,no_run
10000    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10001    /// let x = CloudControlReport::new().set_cloud_control("example");
10002    /// ```
10003    pub fn set_cloud_control<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10004        self.cloud_control = v.into();
10005        self
10006    }
10007
10008    /// Sets the value of [display_name][crate::model::CloudControlReport::display_name].
10009    ///
10010    /// # Example
10011    /// ```ignore,no_run
10012    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10013    /// let x = CloudControlReport::new().set_display_name("example");
10014    /// ```
10015    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10016        self.display_name = v.into();
10017        self
10018    }
10019
10020    /// Sets the value of [description][crate::model::CloudControlReport::description].
10021    ///
10022    /// # Example
10023    /// ```ignore,no_run
10024    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10025    /// let x = CloudControlReport::new().set_description("example");
10026    /// ```
10027    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10028        self.description = v.into();
10029        self
10030    }
10031
10032    /// Sets the value of [categories][crate::model::CloudControlReport::categories].
10033    ///
10034    /// # Example
10035    /// ```ignore,no_run
10036    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10037    /// let x = CloudControlReport::new().set_categories(["a", "b", "c"]);
10038    /// ```
10039    pub fn set_categories<T, V>(mut self, v: T) -> Self
10040    where
10041        T: std::iter::IntoIterator<Item = V>,
10042        V: std::convert::Into<std::string::String>,
10043    {
10044        use std::iter::Iterator;
10045        self.categories = v.into_iter().map(|i| i.into()).collect();
10046        self
10047    }
10048
10049    /// Sets the value of [similar_controls][crate::model::CloudControlReport::similar_controls].
10050    ///
10051    /// # Example
10052    /// ```ignore,no_run
10053    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10054    /// use google_cloud_cloudsecuritycompliance_v1::model::SimilarControls;
10055    /// let x = CloudControlReport::new()
10056    ///     .set_similar_controls([
10057    ///         SimilarControls::default()/* use setters */,
10058    ///         SimilarControls::default()/* use (different) setters */,
10059    ///     ]);
10060    /// ```
10061    pub fn set_similar_controls<T, V>(mut self, v: T) -> Self
10062    where
10063        T: std::iter::IntoIterator<Item = V>,
10064        V: std::convert::Into<crate::model::SimilarControls>,
10065    {
10066        use std::iter::Iterator;
10067        self.similar_controls = v.into_iter().map(|i| i.into()).collect();
10068        self
10069    }
10070
10071    /// Sets the value of [cloud_control_type][crate::model::CloudControlReport::cloud_control_type].
10072    ///
10073    /// # Example
10074    /// ```ignore,no_run
10075    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10076    /// use google_cloud_cloudsecuritycompliance_v1::model::cloud_control::Type;
10077    /// let x0 = CloudControlReport::new().set_cloud_control_type(Type::Custom);
10078    /// let x1 = CloudControlReport::new().set_cloud_control_type(Type::BuiltIn);
10079    /// ```
10080    pub fn set_cloud_control_type<T: std::convert::Into<crate::model::cloud_control::Type>>(
10081        mut self,
10082        v: T,
10083    ) -> Self {
10084        self.cloud_control_type = v.into();
10085        self
10086    }
10087
10088    /// Sets the value of [finding_category][crate::model::CloudControlReport::finding_category].
10089    ///
10090    /// # Example
10091    /// ```ignore,no_run
10092    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10093    /// let x = CloudControlReport::new().set_finding_category("example");
10094    /// ```
10095    pub fn set_finding_category<T: std::convert::Into<std::string::String>>(
10096        mut self,
10097        v: T,
10098    ) -> Self {
10099        self.finding_category = v.into();
10100        self
10101    }
10102
10103    /// Sets the value of [rules][crate::model::CloudControlReport::rules].
10104    ///
10105    /// # Example
10106    /// ```ignore,no_run
10107    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10108    /// use google_cloud_cloudsecuritycompliance_v1::model::Rule;
10109    /// let x = CloudControlReport::new()
10110    ///     .set_rules([
10111    ///         Rule::default()/* use setters */,
10112    ///         Rule::default()/* use (different) setters */,
10113    ///     ]);
10114    /// ```
10115    pub fn set_rules<T, V>(mut self, v: T) -> Self
10116    where
10117        T: std::iter::IntoIterator<Item = V>,
10118        V: std::convert::Into<crate::model::Rule>,
10119    {
10120        use std::iter::Iterator;
10121        self.rules = v.into_iter().map(|i| i.into()).collect();
10122        self
10123    }
10124
10125    /// Sets the value of [finding_severity][crate::model::CloudControlReport::finding_severity].
10126    ///
10127    /// # Example
10128    /// ```ignore,no_run
10129    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10130    /// use google_cloud_cloudsecuritycompliance_v1::model::Severity;
10131    /// let x0 = CloudControlReport::new().set_finding_severity(Severity::Critical);
10132    /// let x1 = CloudControlReport::new().set_finding_severity(Severity::High);
10133    /// let x2 = CloudControlReport::new().set_finding_severity(Severity::Medium);
10134    /// ```
10135    pub fn set_finding_severity<T: std::convert::Into<crate::model::Severity>>(
10136        mut self,
10137        v: T,
10138    ) -> Self {
10139        self.finding_severity = v.into();
10140        self
10141    }
10142
10143    /// Sets the value of [enforcement_mode][crate::model::CloudControlReport::enforcement_mode].
10144    ///
10145    /// # Example
10146    /// ```ignore,no_run
10147    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10148    /// use google_cloud_cloudsecuritycompliance_v1::model::EnforcementMode;
10149    /// let x0 = CloudControlReport::new().set_enforcement_mode(EnforcementMode::Preventive);
10150    /// let x1 = CloudControlReport::new().set_enforcement_mode(EnforcementMode::Detective);
10151    /// let x2 = CloudControlReport::new().set_enforcement_mode(EnforcementMode::Audit);
10152    /// ```
10153    pub fn set_enforcement_mode<T: std::convert::Into<crate::model::EnforcementMode>>(
10154        mut self,
10155        v: T,
10156    ) -> Self {
10157        self.enforcement_mode = v.into();
10158        self
10159    }
10160
10161    /// Sets the value of [cloud_control_deployment][crate::model::CloudControlReport::cloud_control_deployment].
10162    ///
10163    /// # Example
10164    /// ```ignore,no_run
10165    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10166    /// let x = CloudControlReport::new().set_cloud_control_deployment("example");
10167    /// ```
10168    pub fn set_cloud_control_deployment<T: std::convert::Into<std::string::String>>(
10169        mut self,
10170        v: T,
10171    ) -> Self {
10172        self.cloud_control_deployment = v.into();
10173        self
10174    }
10175
10176    /// Sets the value of [major_revision_id][crate::model::CloudControlReport::major_revision_id].
10177    ///
10178    /// # Example
10179    /// ```ignore,no_run
10180    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10181    /// let x = CloudControlReport::new().set_major_revision_id(42);
10182    /// ```
10183    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10184        self.major_revision_id = v.into();
10185        self
10186    }
10187
10188    /// Sets the value of [minor_revision_id][crate::model::CloudControlReport::minor_revision_id].
10189    ///
10190    /// # Example
10191    /// ```ignore,no_run
10192    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10193    /// let x = CloudControlReport::new().set_minor_revision_id(42);
10194    /// ```
10195    pub fn set_minor_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10196        self.minor_revision_id = v.into();
10197        self
10198    }
10199
10200    /// Sets the value of [framework_major_revision_ids][crate::model::CloudControlReport::framework_major_revision_ids].
10201    ///
10202    /// # Example
10203    /// ```ignore,no_run
10204    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10205    /// let x = CloudControlReport::new().set_framework_major_revision_ids([1, 2, 3]);
10206    /// ```
10207    pub fn set_framework_major_revision_ids<T, V>(mut self, v: T) -> Self
10208    where
10209        T: std::iter::IntoIterator<Item = V>,
10210        V: std::convert::Into<i64>,
10211    {
10212        use std::iter::Iterator;
10213        self.framework_major_revision_ids = v.into_iter().map(|i| i.into()).collect();
10214        self
10215    }
10216
10217    /// Sets the value of [assessment_details][crate::model::CloudControlReport::assessment_details].
10218    ///
10219    /// Note that all the setters affecting `assessment_details` are mutually
10220    /// exclusive.
10221    ///
10222    /// # Example
10223    /// ```ignore,no_run
10224    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10225    /// use google_cloud_cloudsecuritycompliance_v1::model::ManualCloudControlAssessmentDetails;
10226    /// let x = CloudControlReport::new().set_assessment_details(Some(
10227    ///     google_cloud_cloudsecuritycompliance_v1::model::cloud_control_report::AssessmentDetails::ManualCloudControlAssessmentDetails(ManualCloudControlAssessmentDetails::default().into())));
10228    /// ```
10229    pub fn set_assessment_details<
10230        T: std::convert::Into<
10231                std::option::Option<crate::model::cloud_control_report::AssessmentDetails>,
10232            >,
10233    >(
10234        mut self,
10235        v: T,
10236    ) -> Self {
10237        self.assessment_details = v.into();
10238        self
10239    }
10240
10241    /// The value of [assessment_details][crate::model::CloudControlReport::assessment_details]
10242    /// if it holds a `ManualCloudControlAssessmentDetails`, `None` if the field is not set or
10243    /// holds a different branch.
10244    pub fn manual_cloud_control_assessment_details(
10245        &self,
10246    ) -> std::option::Option<&std::boxed::Box<crate::model::ManualCloudControlAssessmentDetails>>
10247    {
10248        #[allow(unreachable_patterns)]
10249        self.assessment_details.as_ref().and_then(|v| match v {
10250            crate::model::cloud_control_report::AssessmentDetails::ManualCloudControlAssessmentDetails(v) => std::option::Option::Some(v),
10251            _ => std::option::Option::None,
10252        })
10253    }
10254
10255    /// Sets the value of [assessment_details][crate::model::CloudControlReport::assessment_details]
10256    /// to hold a `ManualCloudControlAssessmentDetails`.
10257    ///
10258    /// Note that all the setters affecting `assessment_details` are
10259    /// mutually exclusive.
10260    ///
10261    /// # Example
10262    /// ```ignore,no_run
10263    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10264    /// use google_cloud_cloudsecuritycompliance_v1::model::ManualCloudControlAssessmentDetails;
10265    /// let x = CloudControlReport::new().set_manual_cloud_control_assessment_details(ManualCloudControlAssessmentDetails::default()/* use setters */);
10266    /// assert!(x.manual_cloud_control_assessment_details().is_some());
10267    /// assert!(x.cloud_control_assessment_details().is_none());
10268    /// ```
10269    pub fn set_manual_cloud_control_assessment_details<
10270        T: std::convert::Into<std::boxed::Box<crate::model::ManualCloudControlAssessmentDetails>>,
10271    >(
10272        mut self,
10273        v: T,
10274    ) -> Self {
10275        self.assessment_details = std::option::Option::Some(
10276            crate::model::cloud_control_report::AssessmentDetails::ManualCloudControlAssessmentDetails(
10277                v.into()
10278            )
10279        );
10280        self
10281    }
10282
10283    /// The value of [assessment_details][crate::model::CloudControlReport::assessment_details]
10284    /// if it holds a `CloudControlAssessmentDetails`, `None` if the field is not set or
10285    /// holds a different branch.
10286    pub fn cloud_control_assessment_details(
10287        &self,
10288    ) -> std::option::Option<&std::boxed::Box<crate::model::CloudControlAssessmentDetails>> {
10289        #[allow(unreachable_patterns)]
10290        self.assessment_details.as_ref().and_then(|v| match v {
10291            crate::model::cloud_control_report::AssessmentDetails::CloudControlAssessmentDetails(v) => std::option::Option::Some(v),
10292            _ => std::option::Option::None,
10293        })
10294    }
10295
10296    /// Sets the value of [assessment_details][crate::model::CloudControlReport::assessment_details]
10297    /// to hold a `CloudControlAssessmentDetails`.
10298    ///
10299    /// Note that all the setters affecting `assessment_details` are
10300    /// mutually exclusive.
10301    ///
10302    /// # Example
10303    /// ```ignore,no_run
10304    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10305    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAssessmentDetails;
10306    /// let x = CloudControlReport::new().set_cloud_control_assessment_details(CloudControlAssessmentDetails::default()/* use setters */);
10307    /// assert!(x.cloud_control_assessment_details().is_some());
10308    /// assert!(x.manual_cloud_control_assessment_details().is_none());
10309    /// ```
10310    pub fn set_cloud_control_assessment_details<
10311        T: std::convert::Into<std::boxed::Box<crate::model::CloudControlAssessmentDetails>>,
10312    >(
10313        mut self,
10314        v: T,
10315    ) -> Self {
10316        self.assessment_details = std::option::Option::Some(
10317            crate::model::cloud_control_report::AssessmentDetails::CloudControlAssessmentDetails(
10318                v.into(),
10319            ),
10320        );
10321        self
10322    }
10323}
10324
10325impl wkt::message::Message for CloudControlReport {
10326    fn typename() -> &'static str {
10327        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlReport"
10328    }
10329}
10330
10331/// Defines additional types related to [CloudControlReport].
10332pub mod cloud_control_report {
10333    #[allow(unused_imports)]
10334    use super::*;
10335
10336    /// The assessment details of the cloud control.
10337    #[derive(Clone, Debug, PartialEq)]
10338    #[non_exhaustive]
10339    pub enum AssessmentDetails {
10340        /// The details of a manual cloud control assessment.
10341        ManualCloudControlAssessmentDetails(
10342            std::boxed::Box<crate::model::ManualCloudControlAssessmentDetails>,
10343        ),
10344        /// The details of a cloud control assessment.
10345        CloudControlAssessmentDetails(std::boxed::Box<crate::model::CloudControlAssessmentDetails>),
10346    }
10347}
10348
10349/// The details for a manual cloud control assessment.
10350#[derive(Clone, Default, PartialEq)]
10351#[non_exhaustive]
10352pub struct ManualCloudControlAssessmentDetails {
10353    /// The guide for assessing a cloud control manually.
10354    pub manual_cloud_control_guide: std::vec::Vec<std::string::String>,
10355
10356    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10357}
10358
10359impl ManualCloudControlAssessmentDetails {
10360    pub fn new() -> Self {
10361        std::default::Default::default()
10362    }
10363
10364    /// Sets the value of [manual_cloud_control_guide][crate::model::ManualCloudControlAssessmentDetails::manual_cloud_control_guide].
10365    ///
10366    /// # Example
10367    /// ```ignore,no_run
10368    /// # use google_cloud_cloudsecuritycompliance_v1::model::ManualCloudControlAssessmentDetails;
10369    /// let x = ManualCloudControlAssessmentDetails::new().set_manual_cloud_control_guide(["a", "b", "c"]);
10370    /// ```
10371    pub fn set_manual_cloud_control_guide<T, V>(mut self, v: T) -> Self
10372    where
10373        T: std::iter::IntoIterator<Item = V>,
10374        V: std::convert::Into<std::string::String>,
10375    {
10376        use std::iter::Iterator;
10377        self.manual_cloud_control_guide = v.into_iter().map(|i| i.into()).collect();
10378        self
10379    }
10380}
10381
10382impl wkt::message::Message for ManualCloudControlAssessmentDetails {
10383    fn typename() -> &'static str {
10384        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails"
10385    }
10386}
10387
10388/// The cloud control assessment details for non-manual cloud controls.
10389#[derive(Clone, Default, PartialEq)]
10390#[non_exhaustive]
10391pub struct CloudControlAssessmentDetails {
10392    /// The number of findings for the cloud control.
10393    pub findings_count: i32,
10394
10395    /// Output only. The evaluation status of the cloud control.
10396    pub evaluation_state: crate::model::EvaluationState,
10397
10398    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10399}
10400
10401impl CloudControlAssessmentDetails {
10402    pub fn new() -> Self {
10403        std::default::Default::default()
10404    }
10405
10406    /// Sets the value of [findings_count][crate::model::CloudControlAssessmentDetails::findings_count].
10407    ///
10408    /// # Example
10409    /// ```ignore,no_run
10410    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAssessmentDetails;
10411    /// let x = CloudControlAssessmentDetails::new().set_findings_count(42);
10412    /// ```
10413    pub fn set_findings_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10414        self.findings_count = v.into();
10415        self
10416    }
10417
10418    /// Sets the value of [evaluation_state][crate::model::CloudControlAssessmentDetails::evaluation_state].
10419    ///
10420    /// # Example
10421    /// ```ignore,no_run
10422    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAssessmentDetails;
10423    /// use google_cloud_cloudsecuritycompliance_v1::model::EvaluationState;
10424    /// let x0 = CloudControlAssessmentDetails::new().set_evaluation_state(EvaluationState::Passed);
10425    /// let x1 = CloudControlAssessmentDetails::new().set_evaluation_state(EvaluationState::Failed);
10426    /// let x2 = CloudControlAssessmentDetails::new().set_evaluation_state(EvaluationState::NotAssessed);
10427    /// ```
10428    pub fn set_evaluation_state<T: std::convert::Into<crate::model::EvaluationState>>(
10429        mut self,
10430        v: T,
10431    ) -> Self {
10432        self.evaluation_state = v.into();
10433        self
10434    }
10435}
10436
10437impl wkt::message::Message for CloudControlAssessmentDetails {
10438    fn typename() -> &'static str {
10439        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails"
10440    }
10441}
10442
10443/// The similar controls.
10444#[derive(Clone, Default, PartialEq)]
10445#[non_exhaustive]
10446pub struct SimilarControls {
10447    /// The name of the framework.
10448    pub framework: std::string::String,
10449
10450    /// The ID of the control.
10451    pub control_id: std::string::String,
10452
10453    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10454}
10455
10456impl SimilarControls {
10457    pub fn new() -> Self {
10458        std::default::Default::default()
10459    }
10460
10461    /// Sets the value of [framework][crate::model::SimilarControls::framework].
10462    ///
10463    /// # Example
10464    /// ```ignore,no_run
10465    /// # use google_cloud_cloudsecuritycompliance_v1::model::SimilarControls;
10466    /// let x = SimilarControls::new().set_framework("example");
10467    /// ```
10468    pub fn set_framework<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10469        self.framework = v.into();
10470        self
10471    }
10472
10473    /// Sets the value of [control_id][crate::model::SimilarControls::control_id].
10474    ///
10475    /// # Example
10476    /// ```ignore,no_run
10477    /// # use google_cloud_cloudsecuritycompliance_v1::model::SimilarControls;
10478    /// let x = SimilarControls::new().set_control_id("example");
10479    /// ```
10480    pub fn set_control_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10481        self.control_id = v.into();
10482        self
10483    }
10484}
10485
10486impl wkt::message::Message for SimilarControls {
10487    fn typename() -> &'static str {
10488        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.SimilarControls"
10489    }
10490}
10491
10492/// The aggregated compliance report.
10493#[derive(Clone, Default, PartialEq)]
10494#[non_exhaustive]
10495pub struct AggregatedComplianceReport {
10496    /// The control assessment details of the framework.
10497    pub control_assessment_details: std::option::Option<crate::model::ControlAssessmentDetails>,
10498
10499    /// The report time of the aggregated compliance report.
10500    pub report_time: std::option::Option<wkt::Timestamp>,
10501
10502    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10503}
10504
10505impl AggregatedComplianceReport {
10506    pub fn new() -> Self {
10507        std::default::Default::default()
10508    }
10509
10510    /// Sets the value of [control_assessment_details][crate::model::AggregatedComplianceReport::control_assessment_details].
10511    ///
10512    /// # Example
10513    /// ```ignore,no_run
10514    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregatedComplianceReport;
10515    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
10516    /// let x = AggregatedComplianceReport::new().set_control_assessment_details(ControlAssessmentDetails::default()/* use setters */);
10517    /// ```
10518    pub fn set_control_assessment_details<T>(mut self, v: T) -> Self
10519    where
10520        T: std::convert::Into<crate::model::ControlAssessmentDetails>,
10521    {
10522        self.control_assessment_details = std::option::Option::Some(v.into());
10523        self
10524    }
10525
10526    /// Sets or clears the value of [control_assessment_details][crate::model::AggregatedComplianceReport::control_assessment_details].
10527    ///
10528    /// # Example
10529    /// ```ignore,no_run
10530    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregatedComplianceReport;
10531    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
10532    /// let x = AggregatedComplianceReport::new().set_or_clear_control_assessment_details(Some(ControlAssessmentDetails::default()/* use setters */));
10533    /// let x = AggregatedComplianceReport::new().set_or_clear_control_assessment_details(None::<ControlAssessmentDetails>);
10534    /// ```
10535    pub fn set_or_clear_control_assessment_details<T>(mut self, v: std::option::Option<T>) -> Self
10536    where
10537        T: std::convert::Into<crate::model::ControlAssessmentDetails>,
10538    {
10539        self.control_assessment_details = v.map(|x| x.into());
10540        self
10541    }
10542
10543    /// Sets the value of [report_time][crate::model::AggregatedComplianceReport::report_time].
10544    ///
10545    /// # Example
10546    /// ```ignore,no_run
10547    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregatedComplianceReport;
10548    /// use wkt::Timestamp;
10549    /// let x = AggregatedComplianceReport::new().set_report_time(Timestamp::default()/* use setters */);
10550    /// ```
10551    pub fn set_report_time<T>(mut self, v: T) -> Self
10552    where
10553        T: std::convert::Into<wkt::Timestamp>,
10554    {
10555        self.report_time = std::option::Option::Some(v.into());
10556        self
10557    }
10558
10559    /// Sets or clears the value of [report_time][crate::model::AggregatedComplianceReport::report_time].
10560    ///
10561    /// # Example
10562    /// ```ignore,no_run
10563    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregatedComplianceReport;
10564    /// use wkt::Timestamp;
10565    /// let x = AggregatedComplianceReport::new().set_or_clear_report_time(Some(Timestamp::default()/* use setters */));
10566    /// let x = AggregatedComplianceReport::new().set_or_clear_report_time(None::<Timestamp>);
10567    /// ```
10568    pub fn set_or_clear_report_time<T>(mut self, v: std::option::Option<T>) -> Self
10569    where
10570        T: std::convert::Into<wkt::Timestamp>,
10571    {
10572        self.report_time = v.map(|x| x.into());
10573        self
10574    }
10575}
10576
10577impl wkt::message::Message for AggregatedComplianceReport {
10578    fn typename() -> &'static str {
10579        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport"
10580    }
10581}
10582
10583/// The details for a target resource.
10584#[derive(Clone, Default, PartialEq)]
10585#[non_exhaustive]
10586pub struct TargetResourceDetails {
10587    /// The framework deployment name for the target resource.
10588    ///
10589    /// For example,
10590    /// `organizations/{organization_id}/locations/{location}/frameworkDeployments/{framework_deployment_id}`
10591    pub framework_deployment: std::string::String,
10592
10593    /// The display name of the target resource. For example, `google.com`,
10594    /// `staging-project`, or `development-folder`.
10595    pub target_resource_display_name: std::string::String,
10596
10597    /// The target resource. For example, `organizations/1234567890`,
10598    /// `projects/1234567890`, or `folders/1234567890`.
10599    pub target_resource: std::string::String,
10600
10601    /// The create time of the target resource.
10602    pub create_time: std::option::Option<wkt::Timestamp>,
10603
10604    /// The update time of the target resource.
10605    pub update_time: std::option::Option<wkt::Timestamp>,
10606
10607    /// The major revision ID of the framework for the target resource.
10608    pub major_revision_id: i64,
10609
10610    /// The minor revision ID of the framework for the target resource.
10611    pub minor_revision_id: i64,
10612
10613    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10614}
10615
10616impl TargetResourceDetails {
10617    pub fn new() -> Self {
10618        std::default::Default::default()
10619    }
10620
10621    /// Sets the value of [framework_deployment][crate::model::TargetResourceDetails::framework_deployment].
10622    ///
10623    /// # Example
10624    /// ```ignore,no_run
10625    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
10626    /// let x = TargetResourceDetails::new().set_framework_deployment("example");
10627    /// ```
10628    pub fn set_framework_deployment<T: std::convert::Into<std::string::String>>(
10629        mut self,
10630        v: T,
10631    ) -> Self {
10632        self.framework_deployment = v.into();
10633        self
10634    }
10635
10636    /// Sets the value of [target_resource_display_name][crate::model::TargetResourceDetails::target_resource_display_name].
10637    ///
10638    /// # Example
10639    /// ```ignore,no_run
10640    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
10641    /// let x = TargetResourceDetails::new().set_target_resource_display_name("example");
10642    /// ```
10643    pub fn set_target_resource_display_name<T: std::convert::Into<std::string::String>>(
10644        mut self,
10645        v: T,
10646    ) -> Self {
10647        self.target_resource_display_name = v.into();
10648        self
10649    }
10650
10651    /// Sets the value of [target_resource][crate::model::TargetResourceDetails::target_resource].
10652    ///
10653    /// # Example
10654    /// ```ignore,no_run
10655    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
10656    /// let x = TargetResourceDetails::new().set_target_resource("example");
10657    /// ```
10658    pub fn set_target_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10659        self.target_resource = v.into();
10660        self
10661    }
10662
10663    /// Sets the value of [create_time][crate::model::TargetResourceDetails::create_time].
10664    ///
10665    /// # Example
10666    /// ```ignore,no_run
10667    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
10668    /// use wkt::Timestamp;
10669    /// let x = TargetResourceDetails::new().set_create_time(Timestamp::default()/* use setters */);
10670    /// ```
10671    pub fn set_create_time<T>(mut self, v: T) -> Self
10672    where
10673        T: std::convert::Into<wkt::Timestamp>,
10674    {
10675        self.create_time = std::option::Option::Some(v.into());
10676        self
10677    }
10678
10679    /// Sets or clears the value of [create_time][crate::model::TargetResourceDetails::create_time].
10680    ///
10681    /// # Example
10682    /// ```ignore,no_run
10683    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
10684    /// use wkt::Timestamp;
10685    /// let x = TargetResourceDetails::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
10686    /// let x = TargetResourceDetails::new().set_or_clear_create_time(None::<Timestamp>);
10687    /// ```
10688    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
10689    where
10690        T: std::convert::Into<wkt::Timestamp>,
10691    {
10692        self.create_time = v.map(|x| x.into());
10693        self
10694    }
10695
10696    /// Sets the value of [update_time][crate::model::TargetResourceDetails::update_time].
10697    ///
10698    /// # Example
10699    /// ```ignore,no_run
10700    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
10701    /// use wkt::Timestamp;
10702    /// let x = TargetResourceDetails::new().set_update_time(Timestamp::default()/* use setters */);
10703    /// ```
10704    pub fn set_update_time<T>(mut self, v: T) -> Self
10705    where
10706        T: std::convert::Into<wkt::Timestamp>,
10707    {
10708        self.update_time = std::option::Option::Some(v.into());
10709        self
10710    }
10711
10712    /// Sets or clears the value of [update_time][crate::model::TargetResourceDetails::update_time].
10713    ///
10714    /// # Example
10715    /// ```ignore,no_run
10716    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
10717    /// use wkt::Timestamp;
10718    /// let x = TargetResourceDetails::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
10719    /// let x = TargetResourceDetails::new().set_or_clear_update_time(None::<Timestamp>);
10720    /// ```
10721    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
10722    where
10723        T: std::convert::Into<wkt::Timestamp>,
10724    {
10725        self.update_time = v.map(|x| x.into());
10726        self
10727    }
10728
10729    /// Sets the value of [major_revision_id][crate::model::TargetResourceDetails::major_revision_id].
10730    ///
10731    /// # Example
10732    /// ```ignore,no_run
10733    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
10734    /// let x = TargetResourceDetails::new().set_major_revision_id(42);
10735    /// ```
10736    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10737        self.major_revision_id = v.into();
10738        self
10739    }
10740
10741    /// Sets the value of [minor_revision_id][crate::model::TargetResourceDetails::minor_revision_id].
10742    ///
10743    /// # Example
10744    /// ```ignore,no_run
10745    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
10746    /// let x = TargetResourceDetails::new().set_minor_revision_id(42);
10747    /// ```
10748    pub fn set_minor_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10749        self.minor_revision_id = v.into();
10750        self
10751    }
10752}
10753
10754impl wkt::message::Message for TargetResourceDetails {
10755    fn typename() -> &'static str {
10756        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails"
10757    }
10758}
10759
10760/// The state of compliance after evaluation is complete.
10761///
10762/// # Working with unknown values
10763///
10764/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10765/// additional enum variants at any time. Adding new variants is not considered
10766/// a breaking change. Applications should write their code in anticipation of:
10767///
10768/// - New values appearing in future releases of the client library, **and**
10769/// - New values received dynamically, without application changes.
10770///
10771/// Please consult the [Working with enums] section in the user guide for some
10772/// guidelines.
10773///
10774/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10775#[derive(Clone, Debug, PartialEq)]
10776#[non_exhaustive]
10777pub enum ComplianceState {
10778    /// Default value. This value is unused.
10779    Unspecified,
10780    /// The resource is compliant.
10781    Compliant,
10782    /// The resource has a violation.
10783    Violation,
10784    /// The resource requires manual review from you.
10785    ManualReviewNeeded,
10786    /// An error occurred while computing the resource status.
10787    Error,
10788    /// The resource can't be audited.
10789    AuditNotSupported,
10790    /// If set, the enum was initialized with an unknown value.
10791    ///
10792    /// Applications can examine the value using [ComplianceState::value] or
10793    /// [ComplianceState::name].
10794    UnknownValue(compliance_state::UnknownValue),
10795}
10796
10797#[doc(hidden)]
10798pub mod compliance_state {
10799    #[allow(unused_imports)]
10800    use super::*;
10801    #[derive(Clone, Debug, PartialEq)]
10802    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10803}
10804
10805impl ComplianceState {
10806    /// Gets the enum value.
10807    ///
10808    /// Returns `None` if the enum contains an unknown value deserialized from
10809    /// the string representation of enums.
10810    pub fn value(&self) -> std::option::Option<i32> {
10811        match self {
10812            Self::Unspecified => std::option::Option::Some(0),
10813            Self::Compliant => std::option::Option::Some(1),
10814            Self::Violation => std::option::Option::Some(2),
10815            Self::ManualReviewNeeded => std::option::Option::Some(3),
10816            Self::Error => std::option::Option::Some(4),
10817            Self::AuditNotSupported => std::option::Option::Some(5),
10818            Self::UnknownValue(u) => u.0.value(),
10819        }
10820    }
10821
10822    /// Gets the enum value as a string.
10823    ///
10824    /// Returns `None` if the enum contains an unknown value deserialized from
10825    /// the integer representation of enums.
10826    pub fn name(&self) -> std::option::Option<&str> {
10827        match self {
10828            Self::Unspecified => std::option::Option::Some("COMPLIANCE_STATE_UNSPECIFIED"),
10829            Self::Compliant => std::option::Option::Some("COMPLIANT"),
10830            Self::Violation => std::option::Option::Some("VIOLATION"),
10831            Self::ManualReviewNeeded => std::option::Option::Some("MANUAL_REVIEW_NEEDED"),
10832            Self::Error => std::option::Option::Some("ERROR"),
10833            Self::AuditNotSupported => std::option::Option::Some("AUDIT_NOT_SUPPORTED"),
10834            Self::UnknownValue(u) => u.0.name(),
10835        }
10836    }
10837}
10838
10839impl std::default::Default for ComplianceState {
10840    fn default() -> Self {
10841        use std::convert::From;
10842        Self::from(0)
10843    }
10844}
10845
10846impl std::fmt::Display for ComplianceState {
10847    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10848        wkt::internal::display_enum(f, self.name(), self.value())
10849    }
10850}
10851
10852impl std::convert::From<i32> for ComplianceState {
10853    fn from(value: i32) -> Self {
10854        match value {
10855            0 => Self::Unspecified,
10856            1 => Self::Compliant,
10857            2 => Self::Violation,
10858            3 => Self::ManualReviewNeeded,
10859            4 => Self::Error,
10860            5 => Self::AuditNotSupported,
10861            _ => Self::UnknownValue(compliance_state::UnknownValue(
10862                wkt::internal::UnknownEnumValue::Integer(value),
10863            )),
10864        }
10865    }
10866}
10867
10868impl std::convert::From<&str> for ComplianceState {
10869    fn from(value: &str) -> Self {
10870        use std::string::ToString;
10871        match value {
10872            "COMPLIANCE_STATE_UNSPECIFIED" => Self::Unspecified,
10873            "COMPLIANT" => Self::Compliant,
10874            "VIOLATION" => Self::Violation,
10875            "MANUAL_REVIEW_NEEDED" => Self::ManualReviewNeeded,
10876            "ERROR" => Self::Error,
10877            "AUDIT_NOT_SUPPORTED" => Self::AuditNotSupported,
10878            _ => Self::UnknownValue(compliance_state::UnknownValue(
10879                wkt::internal::UnknownEnumValue::String(value.to_string()),
10880            )),
10881        }
10882    }
10883}
10884
10885impl serde::ser::Serialize for ComplianceState {
10886    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10887    where
10888        S: serde::Serializer,
10889    {
10890        match self {
10891            Self::Unspecified => serializer.serialize_i32(0),
10892            Self::Compliant => serializer.serialize_i32(1),
10893            Self::Violation => serializer.serialize_i32(2),
10894            Self::ManualReviewNeeded => serializer.serialize_i32(3),
10895            Self::Error => serializer.serialize_i32(4),
10896            Self::AuditNotSupported => serializer.serialize_i32(5),
10897            Self::UnknownValue(u) => u.0.serialize(serializer),
10898        }
10899    }
10900}
10901
10902impl<'de> serde::de::Deserialize<'de> for ComplianceState {
10903    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10904    where
10905        D: serde::Deserializer<'de>,
10906    {
10907        deserializer.deserialize_any(wkt::internal::EnumVisitor::<ComplianceState>::new(
10908            ".google.cloud.cloudsecuritycompliance.v1.ComplianceState",
10909        ))
10910    }
10911}
10912
10913/// The responsibility type for the regulatory control.
10914///
10915/// # Working with unknown values
10916///
10917/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10918/// additional enum variants at any time. Adding new variants is not considered
10919/// a breaking change. Applications should write their code in anticipation of:
10920///
10921/// - New values appearing in future releases of the client library, **and**
10922/// - New values received dynamically, without application changes.
10923///
10924/// Please consult the [Working with enums] section in the user guide for some
10925/// guidelines.
10926///
10927/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10928#[derive(Clone, Debug, PartialEq)]
10929#[non_exhaustive]
10930pub enum RegulatoryControlResponsibilityType {
10931    /// Default value. This value is unused.
10932    Unspecified,
10933    /// Google's responsibility.
10934    Google,
10935    /// Your responsibility.
10936    Customer,
10937    /// Shared responsibility.
10938    Shared,
10939    /// If set, the enum was initialized with an unknown value.
10940    ///
10941    /// Applications can examine the value using [RegulatoryControlResponsibilityType::value] or
10942    /// [RegulatoryControlResponsibilityType::name].
10943    UnknownValue(regulatory_control_responsibility_type::UnknownValue),
10944}
10945
10946#[doc(hidden)]
10947pub mod regulatory_control_responsibility_type {
10948    #[allow(unused_imports)]
10949    use super::*;
10950    #[derive(Clone, Debug, PartialEq)]
10951    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10952}
10953
10954impl RegulatoryControlResponsibilityType {
10955    /// Gets the enum value.
10956    ///
10957    /// Returns `None` if the enum contains an unknown value deserialized from
10958    /// the string representation of enums.
10959    pub fn value(&self) -> std::option::Option<i32> {
10960        match self {
10961            Self::Unspecified => std::option::Option::Some(0),
10962            Self::Google => std::option::Option::Some(1),
10963            Self::Customer => std::option::Option::Some(2),
10964            Self::Shared => std::option::Option::Some(3),
10965            Self::UnknownValue(u) => u.0.value(),
10966        }
10967    }
10968
10969    /// Gets the enum value as a string.
10970    ///
10971    /// Returns `None` if the enum contains an unknown value deserialized from
10972    /// the integer representation of enums.
10973    pub fn name(&self) -> std::option::Option<&str> {
10974        match self {
10975            Self::Unspecified => {
10976                std::option::Option::Some("REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED")
10977            }
10978            Self::Google => std::option::Option::Some("GOOGLE"),
10979            Self::Customer => std::option::Option::Some("CUSTOMER"),
10980            Self::Shared => std::option::Option::Some("SHARED"),
10981            Self::UnknownValue(u) => u.0.name(),
10982        }
10983    }
10984}
10985
10986impl std::default::Default for RegulatoryControlResponsibilityType {
10987    fn default() -> Self {
10988        use std::convert::From;
10989        Self::from(0)
10990    }
10991}
10992
10993impl std::fmt::Display for RegulatoryControlResponsibilityType {
10994    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10995        wkt::internal::display_enum(f, self.name(), self.value())
10996    }
10997}
10998
10999impl std::convert::From<i32> for RegulatoryControlResponsibilityType {
11000    fn from(value: i32) -> Self {
11001        match value {
11002            0 => Self::Unspecified,
11003            1 => Self::Google,
11004            2 => Self::Customer,
11005            3 => Self::Shared,
11006            _ => Self::UnknownValue(regulatory_control_responsibility_type::UnknownValue(
11007                wkt::internal::UnknownEnumValue::Integer(value),
11008            )),
11009        }
11010    }
11011}
11012
11013impl std::convert::From<&str> for RegulatoryControlResponsibilityType {
11014    fn from(value: &str) -> Self {
11015        use std::string::ToString;
11016        match value {
11017            "REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED" => Self::Unspecified,
11018            "GOOGLE" => Self::Google,
11019            "CUSTOMER" => Self::Customer,
11020            "SHARED" => Self::Shared,
11021            _ => Self::UnknownValue(regulatory_control_responsibility_type::UnknownValue(
11022                wkt::internal::UnknownEnumValue::String(value.to_string()),
11023            )),
11024        }
11025    }
11026}
11027
11028impl serde::ser::Serialize for RegulatoryControlResponsibilityType {
11029    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11030    where
11031        S: serde::Serializer,
11032    {
11033        match self {
11034            Self::Unspecified => serializer.serialize_i32(0),
11035            Self::Google => serializer.serialize_i32(1),
11036            Self::Customer => serializer.serialize_i32(2),
11037            Self::Shared => serializer.serialize_i32(3),
11038            Self::UnknownValue(u) => u.0.serialize(serializer),
11039        }
11040    }
11041}
11042
11043impl<'de> serde::de::Deserialize<'de> for RegulatoryControlResponsibilityType {
11044    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11045    where
11046        D: serde::Deserializer<'de>,
11047    {
11048        deserializer.deserialize_any(wkt::internal::EnumVisitor::<
11049            RegulatoryControlResponsibilityType,
11050        >::new(
11051            ".google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType",
11052        ))
11053    }
11054}
11055
11056/// The enforcement mode for the cloud control.
11057///
11058/// # Working with unknown values
11059///
11060/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11061/// additional enum variants at any time. Adding new variants is not considered
11062/// a breaking change. Applications should write their code in anticipation of:
11063///
11064/// - New values appearing in future releases of the client library, **and**
11065/// - New values received dynamically, without application changes.
11066///
11067/// Please consult the [Working with enums] section in the user guide for some
11068/// guidelines.
11069///
11070/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11071#[derive(Clone, Debug, PartialEq)]
11072#[non_exhaustive]
11073pub enum EnforcementMode {
11074    /// Default value. This value is unused.
11075    Unspecified,
11076    /// The cloud control is enforced to prevent non-compliance.
11077    Preventive,
11078    /// The cloud control is enforced to detect non-compliance.
11079    Detective,
11080    /// The cloud control is enforced to audit for non-compliance.
11081    Audit,
11082    /// If set, the enum was initialized with an unknown value.
11083    ///
11084    /// Applications can examine the value using [EnforcementMode::value] or
11085    /// [EnforcementMode::name].
11086    UnknownValue(enforcement_mode::UnknownValue),
11087}
11088
11089#[doc(hidden)]
11090pub mod enforcement_mode {
11091    #[allow(unused_imports)]
11092    use super::*;
11093    #[derive(Clone, Debug, PartialEq)]
11094    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11095}
11096
11097impl EnforcementMode {
11098    /// Gets the enum value.
11099    ///
11100    /// Returns `None` if the enum contains an unknown value deserialized from
11101    /// the string representation of enums.
11102    pub fn value(&self) -> std::option::Option<i32> {
11103        match self {
11104            Self::Unspecified => std::option::Option::Some(0),
11105            Self::Preventive => std::option::Option::Some(1),
11106            Self::Detective => std::option::Option::Some(2),
11107            Self::Audit => std::option::Option::Some(3),
11108            Self::UnknownValue(u) => u.0.value(),
11109        }
11110    }
11111
11112    /// Gets the enum value as a string.
11113    ///
11114    /// Returns `None` if the enum contains an unknown value deserialized from
11115    /// the integer representation of enums.
11116    pub fn name(&self) -> std::option::Option<&str> {
11117        match self {
11118            Self::Unspecified => std::option::Option::Some("ENFORCEMENT_MODE_UNSPECIFIED"),
11119            Self::Preventive => std::option::Option::Some("PREVENTIVE"),
11120            Self::Detective => std::option::Option::Some("DETECTIVE"),
11121            Self::Audit => std::option::Option::Some("AUDIT"),
11122            Self::UnknownValue(u) => u.0.name(),
11123        }
11124    }
11125}
11126
11127impl std::default::Default for EnforcementMode {
11128    fn default() -> Self {
11129        use std::convert::From;
11130        Self::from(0)
11131    }
11132}
11133
11134impl std::fmt::Display for EnforcementMode {
11135    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11136        wkt::internal::display_enum(f, self.name(), self.value())
11137    }
11138}
11139
11140impl std::convert::From<i32> for EnforcementMode {
11141    fn from(value: i32) -> Self {
11142        match value {
11143            0 => Self::Unspecified,
11144            1 => Self::Preventive,
11145            2 => Self::Detective,
11146            3 => Self::Audit,
11147            _ => Self::UnknownValue(enforcement_mode::UnknownValue(
11148                wkt::internal::UnknownEnumValue::Integer(value),
11149            )),
11150        }
11151    }
11152}
11153
11154impl std::convert::From<&str> for EnforcementMode {
11155    fn from(value: &str) -> Self {
11156        use std::string::ToString;
11157        match value {
11158            "ENFORCEMENT_MODE_UNSPECIFIED" => Self::Unspecified,
11159            "PREVENTIVE" => Self::Preventive,
11160            "DETECTIVE" => Self::Detective,
11161            "AUDIT" => Self::Audit,
11162            _ => Self::UnknownValue(enforcement_mode::UnknownValue(
11163                wkt::internal::UnknownEnumValue::String(value.to_string()),
11164            )),
11165        }
11166    }
11167}
11168
11169impl serde::ser::Serialize for EnforcementMode {
11170    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11171    where
11172        S: serde::Serializer,
11173    {
11174        match self {
11175            Self::Unspecified => serializer.serialize_i32(0),
11176            Self::Preventive => serializer.serialize_i32(1),
11177            Self::Detective => serializer.serialize_i32(2),
11178            Self::Audit => serializer.serialize_i32(3),
11179            Self::UnknownValue(u) => u.0.serialize(serializer),
11180        }
11181    }
11182}
11183
11184impl<'de> serde::de::Deserialize<'de> for EnforcementMode {
11185    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11186    where
11187        D: serde::Deserializer<'de>,
11188    {
11189        deserializer.deserialize_any(wkt::internal::EnumVisitor::<EnforcementMode>::new(
11190            ".google.cloud.cloudsecuritycompliance.v1.EnforcementMode",
11191        ))
11192    }
11193}
11194
11195/// The category for the framework.
11196///
11197/// # Working with unknown values
11198///
11199/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11200/// additional enum variants at any time. Adding new variants is not considered
11201/// a breaking change. Applications should write their code in anticipation of:
11202///
11203/// - New values appearing in future releases of the client library, **and**
11204/// - New values received dynamically, without application changes.
11205///
11206/// Please consult the [Working with enums] section in the user guide for some
11207/// guidelines.
11208///
11209/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11210#[derive(Clone, Debug, PartialEq)]
11211#[non_exhaustive]
11212pub enum FrameworkCategory {
11213    /// Default value. This value is unused.
11214    Unspecified,
11215    /// An industry-defined framework.
11216    IndustryDefinedStandard,
11217    /// An Assured Workloads framework.
11218    AssuredWorkloads,
11219    /// A data security posture framework.
11220    DataSecurity,
11221    /// A Google's best practices framework.
11222    GoogleBestPractices,
11223    /// A user-created framework.
11224    CustomFramework,
11225    /// If set, the enum was initialized with an unknown value.
11226    ///
11227    /// Applications can examine the value using [FrameworkCategory::value] or
11228    /// [FrameworkCategory::name].
11229    UnknownValue(framework_category::UnknownValue),
11230}
11231
11232#[doc(hidden)]
11233pub mod framework_category {
11234    #[allow(unused_imports)]
11235    use super::*;
11236    #[derive(Clone, Debug, PartialEq)]
11237    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11238}
11239
11240impl FrameworkCategory {
11241    /// Gets the enum value.
11242    ///
11243    /// Returns `None` if the enum contains an unknown value deserialized from
11244    /// the string representation of enums.
11245    pub fn value(&self) -> std::option::Option<i32> {
11246        match self {
11247            Self::Unspecified => std::option::Option::Some(0),
11248            Self::IndustryDefinedStandard => std::option::Option::Some(1),
11249            Self::AssuredWorkloads => std::option::Option::Some(2),
11250            Self::DataSecurity => std::option::Option::Some(3),
11251            Self::GoogleBestPractices => std::option::Option::Some(4),
11252            Self::CustomFramework => std::option::Option::Some(5),
11253            Self::UnknownValue(u) => u.0.value(),
11254        }
11255    }
11256
11257    /// Gets the enum value as a string.
11258    ///
11259    /// Returns `None` if the enum contains an unknown value deserialized from
11260    /// the integer representation of enums.
11261    pub fn name(&self) -> std::option::Option<&str> {
11262        match self {
11263            Self::Unspecified => std::option::Option::Some("FRAMEWORK_CATEGORY_UNSPECIFIED"),
11264            Self::IndustryDefinedStandard => std::option::Option::Some("INDUSTRY_DEFINED_STANDARD"),
11265            Self::AssuredWorkloads => std::option::Option::Some("ASSURED_WORKLOADS"),
11266            Self::DataSecurity => std::option::Option::Some("DATA_SECURITY"),
11267            Self::GoogleBestPractices => std::option::Option::Some("GOOGLE_BEST_PRACTICES"),
11268            Self::CustomFramework => std::option::Option::Some("CUSTOM_FRAMEWORK"),
11269            Self::UnknownValue(u) => u.0.name(),
11270        }
11271    }
11272}
11273
11274impl std::default::Default for FrameworkCategory {
11275    fn default() -> Self {
11276        use std::convert::From;
11277        Self::from(0)
11278    }
11279}
11280
11281impl std::fmt::Display for FrameworkCategory {
11282    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11283        wkt::internal::display_enum(f, self.name(), self.value())
11284    }
11285}
11286
11287impl std::convert::From<i32> for FrameworkCategory {
11288    fn from(value: i32) -> Self {
11289        match value {
11290            0 => Self::Unspecified,
11291            1 => Self::IndustryDefinedStandard,
11292            2 => Self::AssuredWorkloads,
11293            3 => Self::DataSecurity,
11294            4 => Self::GoogleBestPractices,
11295            5 => Self::CustomFramework,
11296            _ => Self::UnknownValue(framework_category::UnknownValue(
11297                wkt::internal::UnknownEnumValue::Integer(value),
11298            )),
11299        }
11300    }
11301}
11302
11303impl std::convert::From<&str> for FrameworkCategory {
11304    fn from(value: &str) -> Self {
11305        use std::string::ToString;
11306        match value {
11307            "FRAMEWORK_CATEGORY_UNSPECIFIED" => Self::Unspecified,
11308            "INDUSTRY_DEFINED_STANDARD" => Self::IndustryDefinedStandard,
11309            "ASSURED_WORKLOADS" => Self::AssuredWorkloads,
11310            "DATA_SECURITY" => Self::DataSecurity,
11311            "GOOGLE_BEST_PRACTICES" => Self::GoogleBestPractices,
11312            "CUSTOM_FRAMEWORK" => Self::CustomFramework,
11313            _ => Self::UnknownValue(framework_category::UnknownValue(
11314                wkt::internal::UnknownEnumValue::String(value.to_string()),
11315            )),
11316        }
11317    }
11318}
11319
11320impl serde::ser::Serialize for FrameworkCategory {
11321    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11322    where
11323        S: serde::Serializer,
11324    {
11325        match self {
11326            Self::Unspecified => serializer.serialize_i32(0),
11327            Self::IndustryDefinedStandard => serializer.serialize_i32(1),
11328            Self::AssuredWorkloads => serializer.serialize_i32(2),
11329            Self::DataSecurity => serializer.serialize_i32(3),
11330            Self::GoogleBestPractices => serializer.serialize_i32(4),
11331            Self::CustomFramework => serializer.serialize_i32(5),
11332            Self::UnknownValue(u) => u.0.serialize(serializer),
11333        }
11334    }
11335}
11336
11337impl<'de> serde::de::Deserialize<'de> for FrameworkCategory {
11338    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11339    where
11340        D: serde::Deserializer<'de>,
11341    {
11342        deserializer.deserialize_any(wkt::internal::EnumVisitor::<FrameworkCategory>::new(
11343            ".google.cloud.cloudsecuritycompliance.v1.FrameworkCategory",
11344        ))
11345    }
11346}
11347
11348/// The category for the cloud control.
11349///
11350/// # Working with unknown values
11351///
11352/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11353/// additional enum variants at any time. Adding new variants is not considered
11354/// a breaking change. Applications should write their code in anticipation of:
11355///
11356/// - New values appearing in future releases of the client library, **and**
11357/// - New values received dynamically, without application changes.
11358///
11359/// Please consult the [Working with enums] section in the user guide for some
11360/// guidelines.
11361///
11362/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11363#[derive(Clone, Debug, PartialEq)]
11364#[non_exhaustive]
11365pub enum CloudControlCategory {
11366    /// Default value. This value is unused.
11367    Unspecified,
11368    /// The infrastructure security category.
11369    CcCategoryInfrastructure,
11370    /// The artificial intelligence category.
11371    CcCategoryArtificialIntelligence,
11372    /// The physical security category.
11373    CcCategoryPhysicalSecurity,
11374    /// The data security category.
11375    CcCategoryDataSecurity,
11376    /// The network security category.
11377    CcCategoryNetworkSecurity,
11378    /// The incident management category.
11379    CcCategoryIncidentManagement,
11380    /// The identity and access management category.
11381    CcCategoryIdentityAndAccessManagement,
11382    /// The encryption category.
11383    CcCategoryEncryption,
11384    /// The logs management and infrastructure category.
11385    CcCategoryLogsManagementAndInfrastructure,
11386    /// The HR, admin, and processes category.
11387    CcCategoryHrAdminAndProcesses,
11388    /// The third-party and sub-processor management category.
11389    CcCategoryThirdPartyAndSubProcessorManagement,
11390    /// The legal and disclosures category.
11391    CcCategoryLegalAndDisclosures,
11392    /// The vulnerability management category.
11393    CcCategoryVulnerabilityManagement,
11394    /// The privacy category.
11395    CcCategoryPrivacy,
11396    /// The business continuity and disaster recovery (BCDR) category.
11397    CcCategoryBcdr,
11398    /// If set, the enum was initialized with an unknown value.
11399    ///
11400    /// Applications can examine the value using [CloudControlCategory::value] or
11401    /// [CloudControlCategory::name].
11402    UnknownValue(cloud_control_category::UnknownValue),
11403}
11404
11405#[doc(hidden)]
11406pub mod cloud_control_category {
11407    #[allow(unused_imports)]
11408    use super::*;
11409    #[derive(Clone, Debug, PartialEq)]
11410    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11411}
11412
11413impl CloudControlCategory {
11414    /// Gets the enum value.
11415    ///
11416    /// Returns `None` if the enum contains an unknown value deserialized from
11417    /// the string representation of enums.
11418    pub fn value(&self) -> std::option::Option<i32> {
11419        match self {
11420            Self::Unspecified => std::option::Option::Some(0),
11421            Self::CcCategoryInfrastructure => std::option::Option::Some(1),
11422            Self::CcCategoryArtificialIntelligence => std::option::Option::Some(2),
11423            Self::CcCategoryPhysicalSecurity => std::option::Option::Some(3),
11424            Self::CcCategoryDataSecurity => std::option::Option::Some(4),
11425            Self::CcCategoryNetworkSecurity => std::option::Option::Some(5),
11426            Self::CcCategoryIncidentManagement => std::option::Option::Some(6),
11427            Self::CcCategoryIdentityAndAccessManagement => std::option::Option::Some(7),
11428            Self::CcCategoryEncryption => std::option::Option::Some(8),
11429            Self::CcCategoryLogsManagementAndInfrastructure => std::option::Option::Some(9),
11430            Self::CcCategoryHrAdminAndProcesses => std::option::Option::Some(10),
11431            Self::CcCategoryThirdPartyAndSubProcessorManagement => std::option::Option::Some(11),
11432            Self::CcCategoryLegalAndDisclosures => std::option::Option::Some(12),
11433            Self::CcCategoryVulnerabilityManagement => std::option::Option::Some(13),
11434            Self::CcCategoryPrivacy => std::option::Option::Some(14),
11435            Self::CcCategoryBcdr => std::option::Option::Some(15),
11436            Self::UnknownValue(u) => u.0.value(),
11437        }
11438    }
11439
11440    /// Gets the enum value as a string.
11441    ///
11442    /// Returns `None` if the enum contains an unknown value deserialized from
11443    /// the integer representation of enums.
11444    pub fn name(&self) -> std::option::Option<&str> {
11445        match self {
11446            Self::Unspecified => std::option::Option::Some("CLOUD_CONTROL_CATEGORY_UNSPECIFIED"),
11447            Self::CcCategoryInfrastructure => {
11448                std::option::Option::Some("CC_CATEGORY_INFRASTRUCTURE")
11449            }
11450            Self::CcCategoryArtificialIntelligence => {
11451                std::option::Option::Some("CC_CATEGORY_ARTIFICIAL_INTELLIGENCE")
11452            }
11453            Self::CcCategoryPhysicalSecurity => {
11454                std::option::Option::Some("CC_CATEGORY_PHYSICAL_SECURITY")
11455            }
11456            Self::CcCategoryDataSecurity => std::option::Option::Some("CC_CATEGORY_DATA_SECURITY"),
11457            Self::CcCategoryNetworkSecurity => {
11458                std::option::Option::Some("CC_CATEGORY_NETWORK_SECURITY")
11459            }
11460            Self::CcCategoryIncidentManagement => {
11461                std::option::Option::Some("CC_CATEGORY_INCIDENT_MANAGEMENT")
11462            }
11463            Self::CcCategoryIdentityAndAccessManagement => {
11464                std::option::Option::Some("CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT")
11465            }
11466            Self::CcCategoryEncryption => std::option::Option::Some("CC_CATEGORY_ENCRYPTION"),
11467            Self::CcCategoryLogsManagementAndInfrastructure => {
11468                std::option::Option::Some("CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE")
11469            }
11470            Self::CcCategoryHrAdminAndProcesses => {
11471                std::option::Option::Some("CC_CATEGORY_HR_ADMIN_AND_PROCESSES")
11472            }
11473            Self::CcCategoryThirdPartyAndSubProcessorManagement => {
11474                std::option::Option::Some("CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT")
11475            }
11476            Self::CcCategoryLegalAndDisclosures => {
11477                std::option::Option::Some("CC_CATEGORY_LEGAL_AND_DISCLOSURES")
11478            }
11479            Self::CcCategoryVulnerabilityManagement => {
11480                std::option::Option::Some("CC_CATEGORY_VULNERABILITY_MANAGEMENT")
11481            }
11482            Self::CcCategoryPrivacy => std::option::Option::Some("CC_CATEGORY_PRIVACY"),
11483            Self::CcCategoryBcdr => std::option::Option::Some("CC_CATEGORY_BCDR"),
11484            Self::UnknownValue(u) => u.0.name(),
11485        }
11486    }
11487}
11488
11489impl std::default::Default for CloudControlCategory {
11490    fn default() -> Self {
11491        use std::convert::From;
11492        Self::from(0)
11493    }
11494}
11495
11496impl std::fmt::Display for CloudControlCategory {
11497    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11498        wkt::internal::display_enum(f, self.name(), self.value())
11499    }
11500}
11501
11502impl std::convert::From<i32> for CloudControlCategory {
11503    fn from(value: i32) -> Self {
11504        match value {
11505            0 => Self::Unspecified,
11506            1 => Self::CcCategoryInfrastructure,
11507            2 => Self::CcCategoryArtificialIntelligence,
11508            3 => Self::CcCategoryPhysicalSecurity,
11509            4 => Self::CcCategoryDataSecurity,
11510            5 => Self::CcCategoryNetworkSecurity,
11511            6 => Self::CcCategoryIncidentManagement,
11512            7 => Self::CcCategoryIdentityAndAccessManagement,
11513            8 => Self::CcCategoryEncryption,
11514            9 => Self::CcCategoryLogsManagementAndInfrastructure,
11515            10 => Self::CcCategoryHrAdminAndProcesses,
11516            11 => Self::CcCategoryThirdPartyAndSubProcessorManagement,
11517            12 => Self::CcCategoryLegalAndDisclosures,
11518            13 => Self::CcCategoryVulnerabilityManagement,
11519            14 => Self::CcCategoryPrivacy,
11520            15 => Self::CcCategoryBcdr,
11521            _ => Self::UnknownValue(cloud_control_category::UnknownValue(
11522                wkt::internal::UnknownEnumValue::Integer(value),
11523            )),
11524        }
11525    }
11526}
11527
11528impl std::convert::From<&str> for CloudControlCategory {
11529    fn from(value: &str) -> Self {
11530        use std::string::ToString;
11531        match value {
11532            "CLOUD_CONTROL_CATEGORY_UNSPECIFIED" => Self::Unspecified,
11533            "CC_CATEGORY_INFRASTRUCTURE" => Self::CcCategoryInfrastructure,
11534            "CC_CATEGORY_ARTIFICIAL_INTELLIGENCE" => Self::CcCategoryArtificialIntelligence,
11535            "CC_CATEGORY_PHYSICAL_SECURITY" => Self::CcCategoryPhysicalSecurity,
11536            "CC_CATEGORY_DATA_SECURITY" => Self::CcCategoryDataSecurity,
11537            "CC_CATEGORY_NETWORK_SECURITY" => Self::CcCategoryNetworkSecurity,
11538            "CC_CATEGORY_INCIDENT_MANAGEMENT" => Self::CcCategoryIncidentManagement,
11539            "CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT" => {
11540                Self::CcCategoryIdentityAndAccessManagement
11541            }
11542            "CC_CATEGORY_ENCRYPTION" => Self::CcCategoryEncryption,
11543            "CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE" => {
11544                Self::CcCategoryLogsManagementAndInfrastructure
11545            }
11546            "CC_CATEGORY_HR_ADMIN_AND_PROCESSES" => Self::CcCategoryHrAdminAndProcesses,
11547            "CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT" => {
11548                Self::CcCategoryThirdPartyAndSubProcessorManagement
11549            }
11550            "CC_CATEGORY_LEGAL_AND_DISCLOSURES" => Self::CcCategoryLegalAndDisclosures,
11551            "CC_CATEGORY_VULNERABILITY_MANAGEMENT" => Self::CcCategoryVulnerabilityManagement,
11552            "CC_CATEGORY_PRIVACY" => Self::CcCategoryPrivacy,
11553            "CC_CATEGORY_BCDR" => Self::CcCategoryBcdr,
11554            _ => Self::UnknownValue(cloud_control_category::UnknownValue(
11555                wkt::internal::UnknownEnumValue::String(value.to_string()),
11556            )),
11557        }
11558    }
11559}
11560
11561impl serde::ser::Serialize for CloudControlCategory {
11562    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11563    where
11564        S: serde::Serializer,
11565    {
11566        match self {
11567            Self::Unspecified => serializer.serialize_i32(0),
11568            Self::CcCategoryInfrastructure => serializer.serialize_i32(1),
11569            Self::CcCategoryArtificialIntelligence => serializer.serialize_i32(2),
11570            Self::CcCategoryPhysicalSecurity => serializer.serialize_i32(3),
11571            Self::CcCategoryDataSecurity => serializer.serialize_i32(4),
11572            Self::CcCategoryNetworkSecurity => serializer.serialize_i32(5),
11573            Self::CcCategoryIncidentManagement => serializer.serialize_i32(6),
11574            Self::CcCategoryIdentityAndAccessManagement => serializer.serialize_i32(7),
11575            Self::CcCategoryEncryption => serializer.serialize_i32(8),
11576            Self::CcCategoryLogsManagementAndInfrastructure => serializer.serialize_i32(9),
11577            Self::CcCategoryHrAdminAndProcesses => serializer.serialize_i32(10),
11578            Self::CcCategoryThirdPartyAndSubProcessorManagement => serializer.serialize_i32(11),
11579            Self::CcCategoryLegalAndDisclosures => serializer.serialize_i32(12),
11580            Self::CcCategoryVulnerabilityManagement => serializer.serialize_i32(13),
11581            Self::CcCategoryPrivacy => serializer.serialize_i32(14),
11582            Self::CcCategoryBcdr => serializer.serialize_i32(15),
11583            Self::UnknownValue(u) => u.0.serialize(serializer),
11584        }
11585    }
11586}
11587
11588impl<'de> serde::de::Deserialize<'de> for CloudControlCategory {
11589    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11590    where
11591        D: serde::Deserializer<'de>,
11592    {
11593        deserializer.deserialize_any(wkt::internal::EnumVisitor::<CloudControlCategory>::new(
11594            ".google.cloud.cloudsecuritycompliance.v1.CloudControlCategory",
11595        ))
11596    }
11597}
11598
11599/// The cloud provider that's associated with the cloud control.
11600///
11601/// # Working with unknown values
11602///
11603/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11604/// additional enum variants at any time. Adding new variants is not considered
11605/// a breaking change. Applications should write their code in anticipation of:
11606///
11607/// - New values appearing in future releases of the client library, **and**
11608/// - New values received dynamically, without application changes.
11609///
11610/// Please consult the [Working with enums] section in the user guide for some
11611/// guidelines.
11612///
11613/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11614#[derive(Clone, Debug, PartialEq)]
11615#[non_exhaustive]
11616pub enum CloudProvider {
11617    /// Default value. This value is unused.
11618    Unspecified,
11619    /// Amazon Web Services (AWS).
11620    Aws,
11621    /// Microsoft Azure.
11622    Azure,
11623    /// Google Cloud.
11624    Gcp,
11625    /// If set, the enum was initialized with an unknown value.
11626    ///
11627    /// Applications can examine the value using [CloudProvider::value] or
11628    /// [CloudProvider::name].
11629    UnknownValue(cloud_provider::UnknownValue),
11630}
11631
11632#[doc(hidden)]
11633pub mod cloud_provider {
11634    #[allow(unused_imports)]
11635    use super::*;
11636    #[derive(Clone, Debug, PartialEq)]
11637    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11638}
11639
11640impl CloudProvider {
11641    /// Gets the enum value.
11642    ///
11643    /// Returns `None` if the enum contains an unknown value deserialized from
11644    /// the string representation of enums.
11645    pub fn value(&self) -> std::option::Option<i32> {
11646        match self {
11647            Self::Unspecified => std::option::Option::Some(0),
11648            Self::Aws => std::option::Option::Some(1),
11649            Self::Azure => std::option::Option::Some(2),
11650            Self::Gcp => std::option::Option::Some(3),
11651            Self::UnknownValue(u) => u.0.value(),
11652        }
11653    }
11654
11655    /// Gets the enum value as a string.
11656    ///
11657    /// Returns `None` if the enum contains an unknown value deserialized from
11658    /// the integer representation of enums.
11659    pub fn name(&self) -> std::option::Option<&str> {
11660        match self {
11661            Self::Unspecified => std::option::Option::Some("CLOUD_PROVIDER_UNSPECIFIED"),
11662            Self::Aws => std::option::Option::Some("AWS"),
11663            Self::Azure => std::option::Option::Some("AZURE"),
11664            Self::Gcp => std::option::Option::Some("GCP"),
11665            Self::UnknownValue(u) => u.0.name(),
11666        }
11667    }
11668}
11669
11670impl std::default::Default for CloudProvider {
11671    fn default() -> Self {
11672        use std::convert::From;
11673        Self::from(0)
11674    }
11675}
11676
11677impl std::fmt::Display for CloudProvider {
11678    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11679        wkt::internal::display_enum(f, self.name(), self.value())
11680    }
11681}
11682
11683impl std::convert::From<i32> for CloudProvider {
11684    fn from(value: i32) -> Self {
11685        match value {
11686            0 => Self::Unspecified,
11687            1 => Self::Aws,
11688            2 => Self::Azure,
11689            3 => Self::Gcp,
11690            _ => Self::UnknownValue(cloud_provider::UnknownValue(
11691                wkt::internal::UnknownEnumValue::Integer(value),
11692            )),
11693        }
11694    }
11695}
11696
11697impl std::convert::From<&str> for CloudProvider {
11698    fn from(value: &str) -> Self {
11699        use std::string::ToString;
11700        match value {
11701            "CLOUD_PROVIDER_UNSPECIFIED" => Self::Unspecified,
11702            "AWS" => Self::Aws,
11703            "AZURE" => Self::Azure,
11704            "GCP" => Self::Gcp,
11705            _ => Self::UnknownValue(cloud_provider::UnknownValue(
11706                wkt::internal::UnknownEnumValue::String(value.to_string()),
11707            )),
11708        }
11709    }
11710}
11711
11712impl serde::ser::Serialize for CloudProvider {
11713    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11714    where
11715        S: serde::Serializer,
11716    {
11717        match self {
11718            Self::Unspecified => serializer.serialize_i32(0),
11719            Self::Aws => serializer.serialize_i32(1),
11720            Self::Azure => serializer.serialize_i32(2),
11721            Self::Gcp => serializer.serialize_i32(3),
11722            Self::UnknownValue(u) => u.0.serialize(serializer),
11723        }
11724    }
11725}
11726
11727impl<'de> serde::de::Deserialize<'de> for CloudProvider {
11728    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11729    where
11730        D: serde::Deserializer<'de>,
11731    {
11732        deserializer.deserialize_any(wkt::internal::EnumVisitor::<CloudProvider>::new(
11733            ".google.cloud.cloudsecuritycompliance.v1.CloudProvider",
11734        ))
11735    }
11736}
11737
11738/// The severity of the finding.
11739///
11740/// # Working with unknown values
11741///
11742/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11743/// additional enum variants at any time. Adding new variants is not considered
11744/// a breaking change. Applications should write their code in anticipation of:
11745///
11746/// - New values appearing in future releases of the client library, **and**
11747/// - New values received dynamically, without application changes.
11748///
11749/// Please consult the [Working with enums] section in the user guide for some
11750/// guidelines.
11751///
11752/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11753#[derive(Clone, Debug, PartialEq)]
11754#[non_exhaustive]
11755pub enum Severity {
11756    /// Default value. This value is unused.
11757    Unspecified,
11758    /// A critical vulnerability is easily discoverable by an external actor,
11759    /// exploitable, and results in the direct ability to execute arbitrary code,
11760    /// exfiltrate data, and otherwise gain additional access and privileges to
11761    /// cloud resources and workloads. Examples include publicly accessible
11762    /// unprotected user data and public SSH access with weak or no
11763    /// passwords.
11764    ///
11765    /// A critical threat is a threat that can access, modify, or delete data or
11766    /// execute unauthorized code within existing resources.
11767    Critical,
11768    /// A high-risk vulnerability can be easily discovered and exploited in
11769    /// combination with other vulnerabilities to gain direct access and
11770    /// the ability to execute arbitrary code, exfiltrate data, and otherwise
11771    /// gain additional access and privileges to cloud resources and workloads.
11772    /// An example is a database with weak or no passwords that is only
11773    /// accessible internally. This database could easily be compromised by an
11774    /// actor that had access to the internal network.
11775    ///
11776    /// A high-risk threat is a threat that can create new computational
11777    /// resources in an environment but can't access data or execute code in
11778    /// existing resources.
11779    High,
11780    /// A medium-risk vulnerability can be used by an actor to gain access to
11781    /// resources or privileges that enable them to eventually (through multiple
11782    /// steps or a complex exploit) gain access and the ability to execute
11783    /// arbitrary code or exfiltrate data. An example is a service account with
11784    /// access to more projects than it should have. If an actor gains access to
11785    /// the service account, they could potentially use that access to manipulate
11786    /// a project the service account was not intended to.
11787    ///
11788    /// A medium-risk threat can cause operational impact but might not
11789    /// access data or execute unauthorized code.
11790    Medium,
11791    /// A low-risk vulnerability hampers a security organization's ability to
11792    /// detect vulnerabilities or active threats in their deployment, or prevents
11793    /// the root cause investigation of security issues. An example is monitoring
11794    /// and logs being disabled for resource configurations and access.
11795    ///
11796    /// A low-risk threat is a threat that has obtained minimal access to an
11797    /// environment but can't access data, execute code, or create resources.
11798    Low,
11799    /// If set, the enum was initialized with an unknown value.
11800    ///
11801    /// Applications can examine the value using [Severity::value] or
11802    /// [Severity::name].
11803    UnknownValue(severity::UnknownValue),
11804}
11805
11806#[doc(hidden)]
11807pub mod severity {
11808    #[allow(unused_imports)]
11809    use super::*;
11810    #[derive(Clone, Debug, PartialEq)]
11811    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11812}
11813
11814impl Severity {
11815    /// Gets the enum value.
11816    ///
11817    /// Returns `None` if the enum contains an unknown value deserialized from
11818    /// the string representation of enums.
11819    pub fn value(&self) -> std::option::Option<i32> {
11820        match self {
11821            Self::Unspecified => std::option::Option::Some(0),
11822            Self::Critical => std::option::Option::Some(1),
11823            Self::High => std::option::Option::Some(2),
11824            Self::Medium => std::option::Option::Some(3),
11825            Self::Low => std::option::Option::Some(4),
11826            Self::UnknownValue(u) => u.0.value(),
11827        }
11828    }
11829
11830    /// Gets the enum value as a string.
11831    ///
11832    /// Returns `None` if the enum contains an unknown value deserialized from
11833    /// the integer representation of enums.
11834    pub fn name(&self) -> std::option::Option<&str> {
11835        match self {
11836            Self::Unspecified => std::option::Option::Some("SEVERITY_UNSPECIFIED"),
11837            Self::Critical => std::option::Option::Some("CRITICAL"),
11838            Self::High => std::option::Option::Some("HIGH"),
11839            Self::Medium => std::option::Option::Some("MEDIUM"),
11840            Self::Low => std::option::Option::Some("LOW"),
11841            Self::UnknownValue(u) => u.0.name(),
11842        }
11843    }
11844}
11845
11846impl std::default::Default for Severity {
11847    fn default() -> Self {
11848        use std::convert::From;
11849        Self::from(0)
11850    }
11851}
11852
11853impl std::fmt::Display for Severity {
11854    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11855        wkt::internal::display_enum(f, self.name(), self.value())
11856    }
11857}
11858
11859impl std::convert::From<i32> for Severity {
11860    fn from(value: i32) -> Self {
11861        match value {
11862            0 => Self::Unspecified,
11863            1 => Self::Critical,
11864            2 => Self::High,
11865            3 => Self::Medium,
11866            4 => Self::Low,
11867            _ => Self::UnknownValue(severity::UnknownValue(
11868                wkt::internal::UnknownEnumValue::Integer(value),
11869            )),
11870        }
11871    }
11872}
11873
11874impl std::convert::From<&str> for Severity {
11875    fn from(value: &str) -> Self {
11876        use std::string::ToString;
11877        match value {
11878            "SEVERITY_UNSPECIFIED" => Self::Unspecified,
11879            "CRITICAL" => Self::Critical,
11880            "HIGH" => Self::High,
11881            "MEDIUM" => Self::Medium,
11882            "LOW" => Self::Low,
11883            _ => Self::UnknownValue(severity::UnknownValue(
11884                wkt::internal::UnknownEnumValue::String(value.to_string()),
11885            )),
11886        }
11887    }
11888}
11889
11890impl serde::ser::Serialize for Severity {
11891    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11892    where
11893        S: serde::Serializer,
11894    {
11895        match self {
11896            Self::Unspecified => serializer.serialize_i32(0),
11897            Self::Critical => serializer.serialize_i32(1),
11898            Self::High => serializer.serialize_i32(2),
11899            Self::Medium => serializer.serialize_i32(3),
11900            Self::Low => serializer.serialize_i32(4),
11901            Self::UnknownValue(u) => u.0.serialize(serializer),
11902        }
11903    }
11904}
11905
11906impl<'de> serde::de::Deserialize<'de> for Severity {
11907    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11908    where
11909        D: serde::Deserializer<'de>,
11910    {
11911        deserializer.deserialize_any(wkt::internal::EnumVisitor::<Severity>::new(
11912            ".google.cloud.cloudsecuritycompliance.v1.Severity",
11913        ))
11914    }
11915}
11916
11917/// The action type of the rule.
11918///
11919/// # Working with unknown values
11920///
11921/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11922/// additional enum variants at any time. Adding new variants is not considered
11923/// a breaking change. Applications should write their code in anticipation of:
11924///
11925/// - New values appearing in future releases of the client library, **and**
11926/// - New values received dynamically, without application changes.
11927///
11928/// Please consult the [Working with enums] section in the user guide for some
11929/// guidelines.
11930///
11931/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11932#[derive(Clone, Debug, PartialEq)]
11933#[non_exhaustive]
11934pub enum RuleActionType {
11935    /// Default value. This value is unused.
11936    Unspecified,
11937    /// The rule is intended to prevent non-compliance.
11938    Preventive,
11939    /// The rule is intended to detect non-compliance.
11940    Detective,
11941    /// The rule is intended to audit non-compliance.
11942    Audit,
11943    /// If set, the enum was initialized with an unknown value.
11944    ///
11945    /// Applications can examine the value using [RuleActionType::value] or
11946    /// [RuleActionType::name].
11947    UnknownValue(rule_action_type::UnknownValue),
11948}
11949
11950#[doc(hidden)]
11951pub mod rule_action_type {
11952    #[allow(unused_imports)]
11953    use super::*;
11954    #[derive(Clone, Debug, PartialEq)]
11955    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11956}
11957
11958impl RuleActionType {
11959    /// Gets the enum value.
11960    ///
11961    /// Returns `None` if the enum contains an unknown value deserialized from
11962    /// the string representation of enums.
11963    pub fn value(&self) -> std::option::Option<i32> {
11964        match self {
11965            Self::Unspecified => std::option::Option::Some(0),
11966            Self::Preventive => std::option::Option::Some(1),
11967            Self::Detective => std::option::Option::Some(2),
11968            Self::Audit => std::option::Option::Some(3),
11969            Self::UnknownValue(u) => u.0.value(),
11970        }
11971    }
11972
11973    /// Gets the enum value as a string.
11974    ///
11975    /// Returns `None` if the enum contains an unknown value deserialized from
11976    /// the integer representation of enums.
11977    pub fn name(&self) -> std::option::Option<&str> {
11978        match self {
11979            Self::Unspecified => std::option::Option::Some("RULE_ACTION_TYPE_UNSPECIFIED"),
11980            Self::Preventive => std::option::Option::Some("RULE_ACTION_TYPE_PREVENTIVE"),
11981            Self::Detective => std::option::Option::Some("RULE_ACTION_TYPE_DETECTIVE"),
11982            Self::Audit => std::option::Option::Some("RULE_ACTION_TYPE_AUDIT"),
11983            Self::UnknownValue(u) => u.0.name(),
11984        }
11985    }
11986}
11987
11988impl std::default::Default for RuleActionType {
11989    fn default() -> Self {
11990        use std::convert::From;
11991        Self::from(0)
11992    }
11993}
11994
11995impl std::fmt::Display for RuleActionType {
11996    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11997        wkt::internal::display_enum(f, self.name(), self.value())
11998    }
11999}
12000
12001impl std::convert::From<i32> for RuleActionType {
12002    fn from(value: i32) -> Self {
12003        match value {
12004            0 => Self::Unspecified,
12005            1 => Self::Preventive,
12006            2 => Self::Detective,
12007            3 => Self::Audit,
12008            _ => Self::UnknownValue(rule_action_type::UnknownValue(
12009                wkt::internal::UnknownEnumValue::Integer(value),
12010            )),
12011        }
12012    }
12013}
12014
12015impl std::convert::From<&str> for RuleActionType {
12016    fn from(value: &str) -> Self {
12017        use std::string::ToString;
12018        match value {
12019            "RULE_ACTION_TYPE_UNSPECIFIED" => Self::Unspecified,
12020            "RULE_ACTION_TYPE_PREVENTIVE" => Self::Preventive,
12021            "RULE_ACTION_TYPE_DETECTIVE" => Self::Detective,
12022            "RULE_ACTION_TYPE_AUDIT" => Self::Audit,
12023            _ => Self::UnknownValue(rule_action_type::UnknownValue(
12024                wkt::internal::UnknownEnumValue::String(value.to_string()),
12025            )),
12026        }
12027    }
12028}
12029
12030impl serde::ser::Serialize for RuleActionType {
12031    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12032    where
12033        S: serde::Serializer,
12034    {
12035        match self {
12036            Self::Unspecified => serializer.serialize_i32(0),
12037            Self::Preventive => serializer.serialize_i32(1),
12038            Self::Detective => serializer.serialize_i32(2),
12039            Self::Audit => serializer.serialize_i32(3),
12040            Self::UnknownValue(u) => u.0.serialize(serializer),
12041        }
12042    }
12043}
12044
12045impl<'de> serde::de::Deserialize<'de> for RuleActionType {
12046    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12047    where
12048        D: serde::Deserializer<'de>,
12049    {
12050        deserializer.deserialize_any(wkt::internal::EnumVisitor::<RuleActionType>::new(
12051            ".google.cloud.cloudsecuritycompliance.v1.RuleActionType",
12052        ))
12053    }
12054}
12055
12056/// The type of resource that a control or framework can be applied to.
12057///
12058/// # Working with unknown values
12059///
12060/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12061/// additional enum variants at any time. Adding new variants is not considered
12062/// a breaking change. Applications should write their code in anticipation of:
12063///
12064/// - New values appearing in future releases of the client library, **and**
12065/// - New values received dynamically, without application changes.
12066///
12067/// Please consult the [Working with enums] section in the user guide for some
12068/// guidelines.
12069///
12070/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12071#[derive(Clone, Debug, PartialEq)]
12072#[non_exhaustive]
12073pub enum TargetResourceType {
12074    /// Default value. This value is unused.
12075    Unspecified,
12076    /// The target resource is a Google Cloud organization.
12077    TargetResourceCrmTypeOrg,
12078    /// The target resource is a folder.
12079    TargetResourceCrmTypeFolder,
12080    /// The target resource is a project.
12081    TargetResourceCrmTypeProject,
12082    /// The target resource is an application in App Hub.
12083    Application,
12084    /// If set, the enum was initialized with an unknown value.
12085    ///
12086    /// Applications can examine the value using [TargetResourceType::value] or
12087    /// [TargetResourceType::name].
12088    UnknownValue(target_resource_type::UnknownValue),
12089}
12090
12091#[doc(hidden)]
12092pub mod target_resource_type {
12093    #[allow(unused_imports)]
12094    use super::*;
12095    #[derive(Clone, Debug, PartialEq)]
12096    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12097}
12098
12099impl TargetResourceType {
12100    /// Gets the enum value.
12101    ///
12102    /// Returns `None` if the enum contains an unknown value deserialized from
12103    /// the string representation of enums.
12104    pub fn value(&self) -> std::option::Option<i32> {
12105        match self {
12106            Self::Unspecified => std::option::Option::Some(0),
12107            Self::TargetResourceCrmTypeOrg => std::option::Option::Some(1),
12108            Self::TargetResourceCrmTypeFolder => std::option::Option::Some(2),
12109            Self::TargetResourceCrmTypeProject => std::option::Option::Some(3),
12110            Self::Application => std::option::Option::Some(4),
12111            Self::UnknownValue(u) => u.0.value(),
12112        }
12113    }
12114
12115    /// Gets the enum value as a string.
12116    ///
12117    /// Returns `None` if the enum contains an unknown value deserialized from
12118    /// the integer representation of enums.
12119    pub fn name(&self) -> std::option::Option<&str> {
12120        match self {
12121            Self::Unspecified => std::option::Option::Some("TARGET_RESOURCE_TYPE_UNSPECIFIED"),
12122            Self::TargetResourceCrmTypeOrg => {
12123                std::option::Option::Some("TARGET_RESOURCE_CRM_TYPE_ORG")
12124            }
12125            Self::TargetResourceCrmTypeFolder => {
12126                std::option::Option::Some("TARGET_RESOURCE_CRM_TYPE_FOLDER")
12127            }
12128            Self::TargetResourceCrmTypeProject => {
12129                std::option::Option::Some("TARGET_RESOURCE_CRM_TYPE_PROJECT")
12130            }
12131            Self::Application => std::option::Option::Some("TARGET_RESOURCE_TYPE_APPLICATION"),
12132            Self::UnknownValue(u) => u.0.name(),
12133        }
12134    }
12135}
12136
12137impl std::default::Default for TargetResourceType {
12138    fn default() -> Self {
12139        use std::convert::From;
12140        Self::from(0)
12141    }
12142}
12143
12144impl std::fmt::Display for TargetResourceType {
12145    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12146        wkt::internal::display_enum(f, self.name(), self.value())
12147    }
12148}
12149
12150impl std::convert::From<i32> for TargetResourceType {
12151    fn from(value: i32) -> Self {
12152        match value {
12153            0 => Self::Unspecified,
12154            1 => Self::TargetResourceCrmTypeOrg,
12155            2 => Self::TargetResourceCrmTypeFolder,
12156            3 => Self::TargetResourceCrmTypeProject,
12157            4 => Self::Application,
12158            _ => Self::UnknownValue(target_resource_type::UnknownValue(
12159                wkt::internal::UnknownEnumValue::Integer(value),
12160            )),
12161        }
12162    }
12163}
12164
12165impl std::convert::From<&str> for TargetResourceType {
12166    fn from(value: &str) -> Self {
12167        use std::string::ToString;
12168        match value {
12169            "TARGET_RESOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
12170            "TARGET_RESOURCE_CRM_TYPE_ORG" => Self::TargetResourceCrmTypeOrg,
12171            "TARGET_RESOURCE_CRM_TYPE_FOLDER" => Self::TargetResourceCrmTypeFolder,
12172            "TARGET_RESOURCE_CRM_TYPE_PROJECT" => Self::TargetResourceCrmTypeProject,
12173            "TARGET_RESOURCE_TYPE_APPLICATION" => Self::Application,
12174            _ => Self::UnknownValue(target_resource_type::UnknownValue(
12175                wkt::internal::UnknownEnumValue::String(value.to_string()),
12176            )),
12177        }
12178    }
12179}
12180
12181impl serde::ser::Serialize for TargetResourceType {
12182    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12183    where
12184        S: serde::Serializer,
12185    {
12186        match self {
12187            Self::Unspecified => serializer.serialize_i32(0),
12188            Self::TargetResourceCrmTypeOrg => serializer.serialize_i32(1),
12189            Self::TargetResourceCrmTypeFolder => serializer.serialize_i32(2),
12190            Self::TargetResourceCrmTypeProject => serializer.serialize_i32(3),
12191            Self::Application => serializer.serialize_i32(4),
12192            Self::UnknownValue(u) => u.0.serialize(serializer),
12193        }
12194    }
12195}
12196
12197impl<'de> serde::de::Deserialize<'de> for TargetResourceType {
12198    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12199    where
12200        D: serde::Deserializer<'de>,
12201    {
12202        deserializer.deserialize_any(wkt::internal::EnumVisitor::<TargetResourceType>::new(
12203            ".google.cloud.cloudsecuritycompliance.v1.TargetResourceType",
12204        ))
12205    }
12206}
12207
12208/// The state of the deployment resource.
12209///
12210/// # Working with unknown values
12211///
12212/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12213/// additional enum variants at any time. Adding new variants is not considered
12214/// a breaking change. Applications should write their code in anticipation of:
12215///
12216/// - New values appearing in future releases of the client library, **and**
12217/// - New values received dynamically, without application changes.
12218///
12219/// Please consult the [Working with enums] section in the user guide for some
12220/// guidelines.
12221///
12222/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12223#[derive(Clone, Debug, PartialEq)]
12224#[non_exhaustive]
12225pub enum DeploymentState {
12226    /// Default value. This value is unused.
12227    Unspecified,
12228    /// Validating the deployment.
12229    Validating,
12230    /// Deployment is being created.
12231    Creating,
12232    /// Deployment is being deleted.
12233    Deleting,
12234    /// Deployment has failed. All the changes made by the deployment were
12235    /// successfully rolled back. You can retry or delete a deployment that's
12236    /// in this state.
12237    Failed,
12238    /// Deployment is successful and ready to use.
12239    Ready,
12240    /// Deployment is partially deployed. All the cloud controls weren't deployed
12241    /// successfully. Retrying the operation resumes from the first failed
12242    /// step.
12243    PartiallyDeployed,
12244    /// Deployment is partially deleted. All the cloud control deployments weren't
12245    /// deleted successfully. Retrying the operation resumes from the first
12246    /// failed step.
12247    PartiallyDeleted,
12248    /// If set, the enum was initialized with an unknown value.
12249    ///
12250    /// Applications can examine the value using [DeploymentState::value] or
12251    /// [DeploymentState::name].
12252    UnknownValue(deployment_state::UnknownValue),
12253}
12254
12255#[doc(hidden)]
12256pub mod deployment_state {
12257    #[allow(unused_imports)]
12258    use super::*;
12259    #[derive(Clone, Debug, PartialEq)]
12260    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12261}
12262
12263impl DeploymentState {
12264    /// Gets the enum value.
12265    ///
12266    /// Returns `None` if the enum contains an unknown value deserialized from
12267    /// the string representation of enums.
12268    pub fn value(&self) -> std::option::Option<i32> {
12269        match self {
12270            Self::Unspecified => std::option::Option::Some(0),
12271            Self::Validating => std::option::Option::Some(1),
12272            Self::Creating => std::option::Option::Some(2),
12273            Self::Deleting => std::option::Option::Some(3),
12274            Self::Failed => std::option::Option::Some(4),
12275            Self::Ready => std::option::Option::Some(5),
12276            Self::PartiallyDeployed => std::option::Option::Some(6),
12277            Self::PartiallyDeleted => std::option::Option::Some(7),
12278            Self::UnknownValue(u) => u.0.value(),
12279        }
12280    }
12281
12282    /// Gets the enum value as a string.
12283    ///
12284    /// Returns `None` if the enum contains an unknown value deserialized from
12285    /// the integer representation of enums.
12286    pub fn name(&self) -> std::option::Option<&str> {
12287        match self {
12288            Self::Unspecified => std::option::Option::Some("DEPLOYMENT_STATE_UNSPECIFIED"),
12289            Self::Validating => std::option::Option::Some("DEPLOYMENT_STATE_VALIDATING"),
12290            Self::Creating => std::option::Option::Some("DEPLOYMENT_STATE_CREATING"),
12291            Self::Deleting => std::option::Option::Some("DEPLOYMENT_STATE_DELETING"),
12292            Self::Failed => std::option::Option::Some("DEPLOYMENT_STATE_FAILED"),
12293            Self::Ready => std::option::Option::Some("DEPLOYMENT_STATE_READY"),
12294            Self::PartiallyDeployed => {
12295                std::option::Option::Some("DEPLOYMENT_STATE_PARTIALLY_DEPLOYED")
12296            }
12297            Self::PartiallyDeleted => {
12298                std::option::Option::Some("DEPLOYMENT_STATE_PARTIALLY_DELETED")
12299            }
12300            Self::UnknownValue(u) => u.0.name(),
12301        }
12302    }
12303}
12304
12305impl std::default::Default for DeploymentState {
12306    fn default() -> Self {
12307        use std::convert::From;
12308        Self::from(0)
12309    }
12310}
12311
12312impl std::fmt::Display for DeploymentState {
12313    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12314        wkt::internal::display_enum(f, self.name(), self.value())
12315    }
12316}
12317
12318impl std::convert::From<i32> for DeploymentState {
12319    fn from(value: i32) -> Self {
12320        match value {
12321            0 => Self::Unspecified,
12322            1 => Self::Validating,
12323            2 => Self::Creating,
12324            3 => Self::Deleting,
12325            4 => Self::Failed,
12326            5 => Self::Ready,
12327            6 => Self::PartiallyDeployed,
12328            7 => Self::PartiallyDeleted,
12329            _ => Self::UnknownValue(deployment_state::UnknownValue(
12330                wkt::internal::UnknownEnumValue::Integer(value),
12331            )),
12332        }
12333    }
12334}
12335
12336impl std::convert::From<&str> for DeploymentState {
12337    fn from(value: &str) -> Self {
12338        use std::string::ToString;
12339        match value {
12340            "DEPLOYMENT_STATE_UNSPECIFIED" => Self::Unspecified,
12341            "DEPLOYMENT_STATE_VALIDATING" => Self::Validating,
12342            "DEPLOYMENT_STATE_CREATING" => Self::Creating,
12343            "DEPLOYMENT_STATE_DELETING" => Self::Deleting,
12344            "DEPLOYMENT_STATE_FAILED" => Self::Failed,
12345            "DEPLOYMENT_STATE_READY" => Self::Ready,
12346            "DEPLOYMENT_STATE_PARTIALLY_DEPLOYED" => Self::PartiallyDeployed,
12347            "DEPLOYMENT_STATE_PARTIALLY_DELETED" => Self::PartiallyDeleted,
12348            _ => Self::UnknownValue(deployment_state::UnknownValue(
12349                wkt::internal::UnknownEnumValue::String(value.to_string()),
12350            )),
12351        }
12352    }
12353}
12354
12355impl serde::ser::Serialize for DeploymentState {
12356    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12357    where
12358        S: serde::Serializer,
12359    {
12360        match self {
12361            Self::Unspecified => serializer.serialize_i32(0),
12362            Self::Validating => serializer.serialize_i32(1),
12363            Self::Creating => serializer.serialize_i32(2),
12364            Self::Deleting => serializer.serialize_i32(3),
12365            Self::Failed => serializer.serialize_i32(4),
12366            Self::Ready => serializer.serialize_i32(5),
12367            Self::PartiallyDeployed => serializer.serialize_i32(6),
12368            Self::PartiallyDeleted => serializer.serialize_i32(7),
12369            Self::UnknownValue(u) => u.0.serialize(serializer),
12370        }
12371    }
12372}
12373
12374impl<'de> serde::de::Deserialize<'de> for DeploymentState {
12375    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12376    where
12377        D: serde::Deserializer<'de>,
12378    {
12379        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DeploymentState>::new(
12380            ".google.cloud.cloudsecuritycompliance.v1.DeploymentState",
12381        ))
12382    }
12383}
12384
12385/// The evaluation state of the control.
12386///
12387/// # Working with unknown values
12388///
12389/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12390/// additional enum variants at any time. Adding new variants is not considered
12391/// a breaking change. Applications should write their code in anticipation of:
12392///
12393/// - New values appearing in future releases of the client library, **and**
12394/// - New values received dynamically, without application changes.
12395///
12396/// Please consult the [Working with enums] section in the user guide for some
12397/// guidelines.
12398///
12399/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12400#[derive(Clone, Debug, PartialEq)]
12401#[non_exhaustive]
12402pub enum EvaluationState {
12403    /// Default value. This value is unused.
12404    Unspecified,
12405    /// The control is passing.
12406    Passed,
12407    /// The control is failing.
12408    Failed,
12409    /// The control is not assessed.
12410    NotAssessed,
12411    /// If set, the enum was initialized with an unknown value.
12412    ///
12413    /// Applications can examine the value using [EvaluationState::value] or
12414    /// [EvaluationState::name].
12415    UnknownValue(evaluation_state::UnknownValue),
12416}
12417
12418#[doc(hidden)]
12419pub mod evaluation_state {
12420    #[allow(unused_imports)]
12421    use super::*;
12422    #[derive(Clone, Debug, PartialEq)]
12423    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12424}
12425
12426impl EvaluationState {
12427    /// Gets the enum value.
12428    ///
12429    /// Returns `None` if the enum contains an unknown value deserialized from
12430    /// the string representation of enums.
12431    pub fn value(&self) -> std::option::Option<i32> {
12432        match self {
12433            Self::Unspecified => std::option::Option::Some(0),
12434            Self::Passed => std::option::Option::Some(1),
12435            Self::Failed => std::option::Option::Some(2),
12436            Self::NotAssessed => std::option::Option::Some(3),
12437            Self::UnknownValue(u) => u.0.value(),
12438        }
12439    }
12440
12441    /// Gets the enum value as a string.
12442    ///
12443    /// Returns `None` if the enum contains an unknown value deserialized from
12444    /// the integer representation of enums.
12445    pub fn name(&self) -> std::option::Option<&str> {
12446        match self {
12447            Self::Unspecified => std::option::Option::Some("EVALUATION_STATE_UNSPECIFIED"),
12448            Self::Passed => std::option::Option::Some("EVALUATION_STATE_PASSED"),
12449            Self::Failed => std::option::Option::Some("EVALUATION_STATE_FAILED"),
12450            Self::NotAssessed => std::option::Option::Some("EVALUATION_STATE_NOT_ASSESSED"),
12451            Self::UnknownValue(u) => u.0.name(),
12452        }
12453    }
12454}
12455
12456impl std::default::Default for EvaluationState {
12457    fn default() -> Self {
12458        use std::convert::From;
12459        Self::from(0)
12460    }
12461}
12462
12463impl std::fmt::Display for EvaluationState {
12464    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12465        wkt::internal::display_enum(f, self.name(), self.value())
12466    }
12467}
12468
12469impl std::convert::From<i32> for EvaluationState {
12470    fn from(value: i32) -> Self {
12471        match value {
12472            0 => Self::Unspecified,
12473            1 => Self::Passed,
12474            2 => Self::Failed,
12475            3 => Self::NotAssessed,
12476            _ => Self::UnknownValue(evaluation_state::UnknownValue(
12477                wkt::internal::UnknownEnumValue::Integer(value),
12478            )),
12479        }
12480    }
12481}
12482
12483impl std::convert::From<&str> for EvaluationState {
12484    fn from(value: &str) -> Self {
12485        use std::string::ToString;
12486        match value {
12487            "EVALUATION_STATE_UNSPECIFIED" => Self::Unspecified,
12488            "EVALUATION_STATE_PASSED" => Self::Passed,
12489            "EVALUATION_STATE_FAILED" => Self::Failed,
12490            "EVALUATION_STATE_NOT_ASSESSED" => Self::NotAssessed,
12491            _ => Self::UnknownValue(evaluation_state::UnknownValue(
12492                wkt::internal::UnknownEnumValue::String(value.to_string()),
12493            )),
12494        }
12495    }
12496}
12497
12498impl serde::ser::Serialize for EvaluationState {
12499    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12500    where
12501        S: serde::Serializer,
12502    {
12503        match self {
12504            Self::Unspecified => serializer.serialize_i32(0),
12505            Self::Passed => serializer.serialize_i32(1),
12506            Self::Failed => serializer.serialize_i32(2),
12507            Self::NotAssessed => serializer.serialize_i32(3),
12508            Self::UnknownValue(u) => u.0.serialize(serializer),
12509        }
12510    }
12511}
12512
12513impl<'de> serde::de::Deserialize<'de> for EvaluationState {
12514    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12515    where
12516        D: serde::Deserializer<'de>,
12517    {
12518        deserializer.deserialize_any(wkt::internal::EnumVisitor::<EvaluationState>::new(
12519            ".google.cloud.cloudsecuritycompliance.v1.EvaluationState",
12520        ))
12521    }
12522}
12523
12524/// A finding is a record of assessment data like security, risk, health, or
12525/// privacy.
12526///
12527/// # Working with unknown values
12528///
12529/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12530/// additional enum variants at any time. Adding new variants is not considered
12531/// a breaking change. Applications should write their code in anticipation of:
12532///
12533/// - New values appearing in future releases of the client library, **and**
12534/// - New values received dynamically, without application changes.
12535///
12536/// Please consult the [Working with enums] section in the user guide for some
12537/// guidelines.
12538///
12539/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12540#[derive(Clone, Debug, PartialEq)]
12541#[non_exhaustive]
12542pub enum FindingClass {
12543    /// Default value. This value is unused.
12544    Unspecified,
12545    /// The activity is unwanted or malicious.
12546    Threat,
12547    /// A potential weakness in software that increases risk to
12548    /// confidentiality, integrity, and availability.
12549    Vulnerability,
12550    /// A potential weakness in a cloud resource or asset configuration that
12551    /// increases risk.
12552    Misconfiguration,
12553    /// A security observation that is for informational purposes.
12554    Observation,
12555    /// An error that prevents Security Command Center from functioning properly.
12556    SccError,
12557    /// A potential security risk that's due to a change in the security
12558    /// posture.
12559    PostureViolation,
12560    /// A combination of security issues that represent a more severe
12561    /// security problem when taken together.
12562    ToxicCombination,
12563    /// A potential security risk to data assets that contain sensitive
12564    /// data.
12565    SensitiveDataRisk,
12566    /// A resource or resource group where high risk attack paths
12567    /// converge, based on attack path simulations (APS).
12568    Chokepoint,
12569    /// If set, the enum was initialized with an unknown value.
12570    ///
12571    /// Applications can examine the value using [FindingClass::value] or
12572    /// [FindingClass::name].
12573    UnknownValue(finding_class::UnknownValue),
12574}
12575
12576#[doc(hidden)]
12577pub mod finding_class {
12578    #[allow(unused_imports)]
12579    use super::*;
12580    #[derive(Clone, Debug, PartialEq)]
12581    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12582}
12583
12584impl FindingClass {
12585    /// Gets the enum value.
12586    ///
12587    /// Returns `None` if the enum contains an unknown value deserialized from
12588    /// the string representation of enums.
12589    pub fn value(&self) -> std::option::Option<i32> {
12590        match self {
12591            Self::Unspecified => std::option::Option::Some(0),
12592            Self::Threat => std::option::Option::Some(1),
12593            Self::Vulnerability => std::option::Option::Some(2),
12594            Self::Misconfiguration => std::option::Option::Some(3),
12595            Self::Observation => std::option::Option::Some(4),
12596            Self::SccError => std::option::Option::Some(5),
12597            Self::PostureViolation => std::option::Option::Some(6),
12598            Self::ToxicCombination => std::option::Option::Some(7),
12599            Self::SensitiveDataRisk => std::option::Option::Some(8),
12600            Self::Chokepoint => std::option::Option::Some(9),
12601            Self::UnknownValue(u) => u.0.value(),
12602        }
12603    }
12604
12605    /// Gets the enum value as a string.
12606    ///
12607    /// Returns `None` if the enum contains an unknown value deserialized from
12608    /// the integer representation of enums.
12609    pub fn name(&self) -> std::option::Option<&str> {
12610        match self {
12611            Self::Unspecified => std::option::Option::Some("FINDING_CLASS_UNSPECIFIED"),
12612            Self::Threat => std::option::Option::Some("THREAT"),
12613            Self::Vulnerability => std::option::Option::Some("VULNERABILITY"),
12614            Self::Misconfiguration => std::option::Option::Some("MISCONFIGURATION"),
12615            Self::Observation => std::option::Option::Some("OBSERVATION"),
12616            Self::SccError => std::option::Option::Some("SCC_ERROR"),
12617            Self::PostureViolation => std::option::Option::Some("POSTURE_VIOLATION"),
12618            Self::ToxicCombination => std::option::Option::Some("TOXIC_COMBINATION"),
12619            Self::SensitiveDataRisk => std::option::Option::Some("SENSITIVE_DATA_RISK"),
12620            Self::Chokepoint => std::option::Option::Some("CHOKEPOINT"),
12621            Self::UnknownValue(u) => u.0.name(),
12622        }
12623    }
12624}
12625
12626impl std::default::Default for FindingClass {
12627    fn default() -> Self {
12628        use std::convert::From;
12629        Self::from(0)
12630    }
12631}
12632
12633impl std::fmt::Display for FindingClass {
12634    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12635        wkt::internal::display_enum(f, self.name(), self.value())
12636    }
12637}
12638
12639impl std::convert::From<i32> for FindingClass {
12640    fn from(value: i32) -> Self {
12641        match value {
12642            0 => Self::Unspecified,
12643            1 => Self::Threat,
12644            2 => Self::Vulnerability,
12645            3 => Self::Misconfiguration,
12646            4 => Self::Observation,
12647            5 => Self::SccError,
12648            6 => Self::PostureViolation,
12649            7 => Self::ToxicCombination,
12650            8 => Self::SensitiveDataRisk,
12651            9 => Self::Chokepoint,
12652            _ => Self::UnknownValue(finding_class::UnknownValue(
12653                wkt::internal::UnknownEnumValue::Integer(value),
12654            )),
12655        }
12656    }
12657}
12658
12659impl std::convert::From<&str> for FindingClass {
12660    fn from(value: &str) -> Self {
12661        use std::string::ToString;
12662        match value {
12663            "FINDING_CLASS_UNSPECIFIED" => Self::Unspecified,
12664            "THREAT" => Self::Threat,
12665            "VULNERABILITY" => Self::Vulnerability,
12666            "MISCONFIGURATION" => Self::Misconfiguration,
12667            "OBSERVATION" => Self::Observation,
12668            "SCC_ERROR" => Self::SccError,
12669            "POSTURE_VIOLATION" => Self::PostureViolation,
12670            "TOXIC_COMBINATION" => Self::ToxicCombination,
12671            "SENSITIVE_DATA_RISK" => Self::SensitiveDataRisk,
12672            "CHOKEPOINT" => Self::Chokepoint,
12673            _ => Self::UnknownValue(finding_class::UnknownValue(
12674                wkt::internal::UnknownEnumValue::String(value.to_string()),
12675            )),
12676        }
12677    }
12678}
12679
12680impl serde::ser::Serialize for FindingClass {
12681    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12682    where
12683        S: serde::Serializer,
12684    {
12685        match self {
12686            Self::Unspecified => serializer.serialize_i32(0),
12687            Self::Threat => serializer.serialize_i32(1),
12688            Self::Vulnerability => serializer.serialize_i32(2),
12689            Self::Misconfiguration => serializer.serialize_i32(3),
12690            Self::Observation => serializer.serialize_i32(4),
12691            Self::SccError => serializer.serialize_i32(5),
12692            Self::PostureViolation => serializer.serialize_i32(6),
12693            Self::ToxicCombination => serializer.serialize_i32(7),
12694            Self::SensitiveDataRisk => serializer.serialize_i32(8),
12695            Self::Chokepoint => serializer.serialize_i32(9),
12696            Self::UnknownValue(u) => u.0.serialize(serializer),
12697        }
12698    }
12699}
12700
12701impl<'de> serde::de::Deserialize<'de> for FindingClass {
12702    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12703    where
12704        D: serde::Deserializer<'de>,
12705    {
12706        deserializer.deserialize_any(wkt::internal::EnumVisitor::<FindingClass>::new(
12707            ".google.cloud.cloudsecuritycompliance.v1.FindingClass",
12708        ))
12709    }
12710}