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    /// Creates a new default instance.
63    pub fn new() -> Self {
64        std::default::Default::default()
65    }
66
67    /// Sets the value of [scope][crate::model::GenerateFrameworkAuditScopeReportRequest::scope].
68    ///
69    /// # Example
70    /// ```ignore,no_run
71    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportRequest;
72    /// let x = GenerateFrameworkAuditScopeReportRequest::new().set_scope("example");
73    /// ```
74    pub fn set_scope<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75        self.scope = v.into();
76        self
77    }
78
79    /// Sets the value of [report_format][crate::model::GenerateFrameworkAuditScopeReportRequest::report_format].
80    ///
81    /// # Example
82    /// ```ignore,no_run
83    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportRequest;
84    /// use google_cloud_cloudsecuritycompliance_v1::model::generate_framework_audit_scope_report_request::Format;
85    /// let x0 = GenerateFrameworkAuditScopeReportRequest::new().set_report_format(Format::Odf);
86    /// ```
87    pub fn set_report_format<
88        T: std::convert::Into<crate::model::generate_framework_audit_scope_report_request::Format>,
89    >(
90        mut self,
91        v: T,
92    ) -> Self {
93        self.report_format = v.into();
94        self
95    }
96
97    /// Sets the value of [compliance_framework][crate::model::GenerateFrameworkAuditScopeReportRequest::compliance_framework].
98    ///
99    /// # Example
100    /// ```ignore,no_run
101    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportRequest;
102    /// let x = GenerateFrameworkAuditScopeReportRequest::new().set_compliance_framework("example");
103    /// ```
104    pub fn set_compliance_framework<T: std::convert::Into<std::string::String>>(
105        mut self,
106        v: T,
107    ) -> Self {
108        self.compliance_framework = v.into();
109        self
110    }
111}
112
113impl wkt::message::Message for GenerateFrameworkAuditScopeReportRequest {
114    fn typename() -> &'static str {
115        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest"
116    }
117}
118
119/// Defines additional types related to [GenerateFrameworkAuditScopeReportRequest].
120pub mod generate_framework_audit_scope_report_request {
121    #[allow(unused_imports)]
122    use super::*;
123
124    /// The set of options for the audit scope report format.
125    ///
126    /// # Working with unknown values
127    ///
128    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
129    /// additional enum variants at any time. Adding new variants is not considered
130    /// a breaking change. Applications should write their code in anticipation of:
131    ///
132    /// - New values appearing in future releases of the client library, **and**
133    /// - New values received dynamically, without application changes.
134    ///
135    /// Please consult the [Working with enums] section in the user guide for some
136    /// guidelines.
137    ///
138    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
139    #[derive(Clone, Debug, PartialEq)]
140    #[non_exhaustive]
141    pub enum Format {
142        /// Default value. This value is unused.
143        Unspecified,
144        /// The report format is the Open Document Format (ODF).
145        Odf,
146        /// If set, the enum was initialized with an unknown value.
147        ///
148        /// Applications can examine the value using [Format::value] or
149        /// [Format::name].
150        UnknownValue(format::UnknownValue),
151    }
152
153    #[doc(hidden)]
154    pub mod format {
155        #[allow(unused_imports)]
156        use super::*;
157        #[derive(Clone, Debug, PartialEq)]
158        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
159    }
160
161    impl Format {
162        /// Gets the enum value.
163        ///
164        /// Returns `None` if the enum contains an unknown value deserialized from
165        /// the string representation of enums.
166        pub fn value(&self) -> std::option::Option<i32> {
167            match self {
168                Self::Unspecified => std::option::Option::Some(0),
169                Self::Odf => std::option::Option::Some(1),
170                Self::UnknownValue(u) => u.0.value(),
171            }
172        }
173
174        /// Gets the enum value as a string.
175        ///
176        /// Returns `None` if the enum contains an unknown value deserialized from
177        /// the integer representation of enums.
178        pub fn name(&self) -> std::option::Option<&str> {
179            match self {
180                Self::Unspecified => std::option::Option::Some("FORMAT_UNSPECIFIED"),
181                Self::Odf => std::option::Option::Some("ODF"),
182                Self::UnknownValue(u) => u.0.name(),
183            }
184        }
185    }
186
187    impl std::default::Default for Format {
188        fn default() -> Self {
189            use std::convert::From;
190            Self::from(0)
191        }
192    }
193
194    impl std::fmt::Display for Format {
195        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
196            wkt::internal::display_enum(f, self.name(), self.value())
197        }
198    }
199
200    impl std::convert::From<i32> for Format {
201        fn from(value: i32) -> Self {
202            match value {
203                0 => Self::Unspecified,
204                1 => Self::Odf,
205                _ => Self::UnknownValue(format::UnknownValue(
206                    wkt::internal::UnknownEnumValue::Integer(value),
207                )),
208            }
209        }
210    }
211
212    impl std::convert::From<&str> for Format {
213        fn from(value: &str) -> Self {
214            use std::string::ToString;
215            match value {
216                "FORMAT_UNSPECIFIED" => Self::Unspecified,
217                "ODF" => Self::Odf,
218                _ => Self::UnknownValue(format::UnknownValue(
219                    wkt::internal::UnknownEnumValue::String(value.to_string()),
220                )),
221            }
222        }
223    }
224
225    impl serde::ser::Serialize for Format {
226        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
227        where
228            S: serde::Serializer,
229        {
230            match self {
231                Self::Unspecified => serializer.serialize_i32(0),
232                Self::Odf => serializer.serialize_i32(1),
233                Self::UnknownValue(u) => u.0.serialize(serializer),
234            }
235        }
236    }
237
238    impl<'de> serde::de::Deserialize<'de> for Format {
239        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
240        where
241            D: serde::Deserializer<'de>,
242        {
243            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Format>::new(
244                ".google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format"))
245        }
246    }
247}
248
249/// The response message for [GenerateFrameworkAuditScopeReport][].
250#[derive(Clone, Default, PartialEq)]
251#[non_exhaustive]
252pub struct GenerateFrameworkAuditScopeReportResponse {
253    /// Identifier. The name of the audit report, in the format that was
254    /// given in the request.
255    pub name: std::string::String,
256
257    /// Required. The compliance framework that the audit scope report is generated
258    /// for.
259    pub compliance_framework: std::string::String,
260
261    /// The set of options that the audit scope report is exported in.
262    pub audit_report: std::option::Option<
263        crate::model::generate_framework_audit_scope_report_response::AuditReport,
264    >,
265
266    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
267}
268
269impl GenerateFrameworkAuditScopeReportResponse {
270    /// Creates a new default instance.
271    pub fn new() -> Self {
272        std::default::Default::default()
273    }
274
275    /// Sets the value of [name][crate::model::GenerateFrameworkAuditScopeReportResponse::name].
276    ///
277    /// # Example
278    /// ```ignore,no_run
279    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportResponse;
280    /// let x = GenerateFrameworkAuditScopeReportResponse::new().set_name("example");
281    /// ```
282    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
283        self.name = v.into();
284        self
285    }
286
287    /// Sets the value of [compliance_framework][crate::model::GenerateFrameworkAuditScopeReportResponse::compliance_framework].
288    ///
289    /// # Example
290    /// ```ignore,no_run
291    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportResponse;
292    /// let x = GenerateFrameworkAuditScopeReportResponse::new().set_compliance_framework("example");
293    /// ```
294    pub fn set_compliance_framework<T: std::convert::Into<std::string::String>>(
295        mut self,
296        v: T,
297    ) -> Self {
298        self.compliance_framework = v.into();
299        self
300    }
301
302    /// Sets the value of [audit_report][crate::model::GenerateFrameworkAuditScopeReportResponse::audit_report].
303    ///
304    /// Note that all the setters affecting `audit_report` are mutually
305    /// exclusive.
306    ///
307    /// # Example
308    /// ```ignore,no_run
309    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportResponse;
310    /// use google_cloud_cloudsecuritycompliance_v1::model::generate_framework_audit_scope_report_response::AuditReport;
311    /// let x = GenerateFrameworkAuditScopeReportResponse::new().set_audit_report(Some(AuditReport::ScopeReportContents(bytes::Bytes::from_static(b"example"))));
312    /// ```
313    pub fn set_audit_report<
314        T: std::convert::Into<
315                std::option::Option<
316                    crate::model::generate_framework_audit_scope_report_response::AuditReport,
317                >,
318            >,
319    >(
320        mut self,
321        v: T,
322    ) -> Self {
323        self.audit_report = v.into();
324        self
325    }
326
327    /// The value of [audit_report][crate::model::GenerateFrameworkAuditScopeReportResponse::audit_report]
328    /// if it holds a `ScopeReportContents`, `None` if the field is not set or
329    /// holds a different branch.
330    pub fn scope_report_contents(&self) -> std::option::Option<&::bytes::Bytes> {
331        #[allow(unreachable_patterns)]
332        self.audit_report.as_ref().and_then(|v| match v {
333            crate::model::generate_framework_audit_scope_report_response::AuditReport::ScopeReportContents(v) => std::option::Option::Some(v),
334            _ => std::option::Option::None,
335        })
336    }
337
338    /// Sets the value of [audit_report][crate::model::GenerateFrameworkAuditScopeReportResponse::audit_report]
339    /// to hold a `ScopeReportContents`.
340    ///
341    /// Note that all the setters affecting `audit_report` are
342    /// mutually exclusive.
343    ///
344    /// # Example
345    /// ```ignore,no_run
346    /// # use google_cloud_cloudsecuritycompliance_v1::model::GenerateFrameworkAuditScopeReportResponse;
347    /// let x = GenerateFrameworkAuditScopeReportResponse::new().set_scope_report_contents(bytes::Bytes::from_static(b"example"));
348    /// assert!(x.scope_report_contents().is_some());
349    /// ```
350    pub fn set_scope_report_contents<T: std::convert::Into<::bytes::Bytes>>(
351        mut self,
352        v: T,
353    ) -> Self {
354        self.audit_report = std::option::Option::Some(
355            crate::model::generate_framework_audit_scope_report_response::AuditReport::ScopeReportContents(
356                v.into()
357            )
358        );
359        self
360    }
361}
362
363impl wkt::message::Message for GenerateFrameworkAuditScopeReportResponse {
364    fn typename() -> &'static str {
365        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse"
366    }
367}
368
369/// Defines additional types related to [GenerateFrameworkAuditScopeReportResponse].
370pub mod generate_framework_audit_scope_report_response {
371    #[allow(unused_imports)]
372    use super::*;
373
374    /// The set of options that the audit scope report is exported in.
375    #[derive(Clone, Debug, PartialEq)]
376    #[non_exhaustive]
377    pub enum AuditReport {
378        /// The audit scope report content in byte format.
379        ScopeReportContents(::bytes::Bytes),
380    }
381}
382
383/// Additional information for an audit operation.
384#[derive(Clone, Default, PartialEq)]
385#[non_exhaustive]
386pub struct ReportSummary {
387    /// Output only. The total number of checks.
388    pub total_count: i32,
389
390    /// Output only. The number of compliant checks.
391    pub compliant_count: i32,
392
393    /// Output only. The number of checks with violations.
394    pub violation_count: i32,
395
396    /// Output only. The number of checks with "manual review needed" status.
397    pub manual_review_needed_count: i32,
398
399    /// Output only. The number of checks that can't be performed due to errors.
400    pub error_count: i32,
401
402    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
403}
404
405impl ReportSummary {
406    /// Creates a new default instance.
407    pub fn new() -> Self {
408        std::default::Default::default()
409    }
410
411    /// Sets the value of [total_count][crate::model::ReportSummary::total_count].
412    ///
413    /// # Example
414    /// ```ignore,no_run
415    /// # use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
416    /// let x = ReportSummary::new().set_total_count(42);
417    /// ```
418    pub fn set_total_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
419        self.total_count = v.into();
420        self
421    }
422
423    /// Sets the value of [compliant_count][crate::model::ReportSummary::compliant_count].
424    ///
425    /// # Example
426    /// ```ignore,no_run
427    /// # use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
428    /// let x = ReportSummary::new().set_compliant_count(42);
429    /// ```
430    pub fn set_compliant_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
431        self.compliant_count = v.into();
432        self
433    }
434
435    /// Sets the value of [violation_count][crate::model::ReportSummary::violation_count].
436    ///
437    /// # Example
438    /// ```ignore,no_run
439    /// # use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
440    /// let x = ReportSummary::new().set_violation_count(42);
441    /// ```
442    pub fn set_violation_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
443        self.violation_count = v.into();
444        self
445    }
446
447    /// Sets the value of [manual_review_needed_count][crate::model::ReportSummary::manual_review_needed_count].
448    ///
449    /// # Example
450    /// ```ignore,no_run
451    /// # use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
452    /// let x = ReportSummary::new().set_manual_review_needed_count(42);
453    /// ```
454    pub fn set_manual_review_needed_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
455        self.manual_review_needed_count = v.into();
456        self
457    }
458
459    /// Sets the value of [error_count][crate::model::ReportSummary::error_count].
460    ///
461    /// # Example
462    /// ```ignore,no_run
463    /// # use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
464    /// let x = ReportSummary::new().set_error_count(42);
465    /// ```
466    pub fn set_error_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
467        self.error_count = v.into();
468        self
469    }
470}
471
472impl wkt::message::Message for ReportSummary {
473    fn typename() -> &'static str {
474        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ReportSummary"
475    }
476}
477
478/// The request message for [CreateFrameworkAudit][].
479#[derive(Clone, Default, PartialEq)]
480#[non_exhaustive]
481pub struct CreateFrameworkAuditRequest {
482    /// Required. The parent resource where this framework audit is created.
483    ///
484    /// Supported formats are the following:
485    ///
486    /// * `organizations/{organization_id}/locations/{location}`
487    /// * `folders/{folder_id}/locations/{location}`
488    /// * `projects/{project_id}/locations/{location}`
489    pub parent: std::string::String,
490
491    /// Optional. The ID to use for the framework audit. The ID becomes the final
492    /// component of the framework audit's full resource name.
493    ///
494    /// The ID must be between 4-63 characters, and valid characters
495    /// are `\[a-z][0-9]-\`.
496    pub framework_audit_id: std::string::String,
497
498    /// Required. The framework audit to create.
499    pub framework_audit: std::option::Option<crate::model::FrameworkAudit>,
500
501    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
502}
503
504impl CreateFrameworkAuditRequest {
505    /// Creates a new default instance.
506    pub fn new() -> Self {
507        std::default::Default::default()
508    }
509
510    /// Sets the value of [parent][crate::model::CreateFrameworkAuditRequest::parent].
511    ///
512    /// # Example
513    /// ```ignore,no_run
514    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkAuditRequest;
515    /// let x = CreateFrameworkAuditRequest::new().set_parent("example");
516    /// ```
517    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
518        self.parent = v.into();
519        self
520    }
521
522    /// Sets the value of [framework_audit_id][crate::model::CreateFrameworkAuditRequest::framework_audit_id].
523    ///
524    /// # Example
525    /// ```ignore,no_run
526    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkAuditRequest;
527    /// let x = CreateFrameworkAuditRequest::new().set_framework_audit_id("example");
528    /// ```
529    pub fn set_framework_audit_id<T: std::convert::Into<std::string::String>>(
530        mut self,
531        v: T,
532    ) -> Self {
533        self.framework_audit_id = v.into();
534        self
535    }
536
537    /// Sets the value of [framework_audit][crate::model::CreateFrameworkAuditRequest::framework_audit].
538    ///
539    /// # Example
540    /// ```ignore,no_run
541    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkAuditRequest;
542    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
543    /// let x = CreateFrameworkAuditRequest::new().set_framework_audit(FrameworkAudit::default()/* use setters */);
544    /// ```
545    pub fn set_framework_audit<T>(mut self, v: T) -> Self
546    where
547        T: std::convert::Into<crate::model::FrameworkAudit>,
548    {
549        self.framework_audit = std::option::Option::Some(v.into());
550        self
551    }
552
553    /// Sets or clears the value of [framework_audit][crate::model::CreateFrameworkAuditRequest::framework_audit].
554    ///
555    /// # Example
556    /// ```ignore,no_run
557    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkAuditRequest;
558    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
559    /// let x = CreateFrameworkAuditRequest::new().set_or_clear_framework_audit(Some(FrameworkAudit::default()/* use setters */));
560    /// let x = CreateFrameworkAuditRequest::new().set_or_clear_framework_audit(None::<FrameworkAudit>);
561    /// ```
562    pub fn set_or_clear_framework_audit<T>(mut self, v: std::option::Option<T>) -> Self
563    where
564        T: std::convert::Into<crate::model::FrameworkAudit>,
565    {
566        self.framework_audit = v.map(|x| x.into());
567        self
568    }
569}
570
571impl wkt::message::Message for CreateFrameworkAuditRequest {
572    fn typename() -> &'static str {
573        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest"
574    }
575}
576
577/// A destination for the framework audit.
578#[derive(Clone, Default, PartialEq)]
579#[non_exhaustive]
580pub struct FrameworkAuditDestination {
581    /// The type of destination.
582    pub destination_type:
583        std::option::Option<crate::model::framework_audit_destination::DestinationType>,
584
585    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
586}
587
588impl FrameworkAuditDestination {
589    /// Creates a new default instance.
590    pub fn new() -> Self {
591        std::default::Default::default()
592    }
593
594    /// Sets the value of [destination_type][crate::model::FrameworkAuditDestination::destination_type].
595    ///
596    /// Note that all the setters affecting `destination_type` are mutually
597    /// exclusive.
598    ///
599    /// # Example
600    /// ```ignore,no_run
601    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAuditDestination;
602    /// use google_cloud_cloudsecuritycompliance_v1::model::BucketDestination;
603    /// let x = FrameworkAuditDestination::new().set_destination_type(Some(
604    ///     google_cloud_cloudsecuritycompliance_v1::model::framework_audit_destination::DestinationType::Bucket(BucketDestination::default().into())));
605    /// ```
606    pub fn set_destination_type<
607        T: std::convert::Into<
608                std::option::Option<crate::model::framework_audit_destination::DestinationType>,
609            >,
610    >(
611        mut self,
612        v: T,
613    ) -> Self {
614        self.destination_type = v.into();
615        self
616    }
617
618    /// The value of [destination_type][crate::model::FrameworkAuditDestination::destination_type]
619    /// if it holds a `Bucket`, `None` if the field is not set or
620    /// holds a different branch.
621    pub fn bucket(&self) -> std::option::Option<&std::boxed::Box<crate::model::BucketDestination>> {
622        #[allow(unreachable_patterns)]
623        self.destination_type.as_ref().and_then(|v| match v {
624            crate::model::framework_audit_destination::DestinationType::Bucket(v) => {
625                std::option::Option::Some(v)
626            }
627            _ => std::option::Option::None,
628        })
629    }
630
631    /// Sets the value of [destination_type][crate::model::FrameworkAuditDestination::destination_type]
632    /// to hold a `Bucket`.
633    ///
634    /// Note that all the setters affecting `destination_type` are
635    /// mutually exclusive.
636    ///
637    /// # Example
638    /// ```ignore,no_run
639    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAuditDestination;
640    /// use google_cloud_cloudsecuritycompliance_v1::model::BucketDestination;
641    /// let x = FrameworkAuditDestination::new().set_bucket(BucketDestination::default()/* use setters */);
642    /// assert!(x.bucket().is_some());
643    /// ```
644    pub fn set_bucket<T: std::convert::Into<std::boxed::Box<crate::model::BucketDestination>>>(
645        mut self,
646        v: T,
647    ) -> Self {
648        self.destination_type = std::option::Option::Some(
649            crate::model::framework_audit_destination::DestinationType::Bucket(v.into()),
650        );
651        self
652    }
653}
654
655impl wkt::message::Message for FrameworkAuditDestination {
656    fn typename() -> &'static str {
657        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination"
658    }
659}
660
661/// Defines additional types related to [FrameworkAuditDestination].
662pub mod framework_audit_destination {
663    #[allow(unused_imports)]
664    use super::*;
665
666    /// The type of destination.
667    #[derive(Clone, Debug, PartialEq)]
668    #[non_exhaustive]
669    pub enum DestinationType {
670        /// The Cloud Storage bucket destination.
671        Bucket(std::boxed::Box<crate::model::BucketDestination>),
672    }
673}
674
675/// A Cloud Storage bucket destination.
676#[derive(Clone, Default, PartialEq)]
677#[non_exhaustive]
678pub struct BucketDestination {
679    /// Required. The URI of the Cloud Storage bucket.
680    pub bucket_uri: std::string::String,
681
682    /// Optional. The format of the framework audit.
683    pub framework_audit_format: crate::model::bucket_destination::Format,
684
685    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
686}
687
688impl BucketDestination {
689    /// Creates a new default instance.
690    pub fn new() -> Self {
691        std::default::Default::default()
692    }
693
694    /// Sets the value of [bucket_uri][crate::model::BucketDestination::bucket_uri].
695    ///
696    /// # Example
697    /// ```ignore,no_run
698    /// # use google_cloud_cloudsecuritycompliance_v1::model::BucketDestination;
699    /// let x = BucketDestination::new().set_bucket_uri("example");
700    /// ```
701    pub fn set_bucket_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
702        self.bucket_uri = v.into();
703        self
704    }
705
706    /// Sets the value of [framework_audit_format][crate::model::BucketDestination::framework_audit_format].
707    ///
708    /// # Example
709    /// ```ignore,no_run
710    /// # use google_cloud_cloudsecuritycompliance_v1::model::BucketDestination;
711    /// use google_cloud_cloudsecuritycompliance_v1::model::bucket_destination::Format;
712    /// let x0 = BucketDestination::new().set_framework_audit_format(Format::Odf);
713    /// ```
714    pub fn set_framework_audit_format<
715        T: std::convert::Into<crate::model::bucket_destination::Format>,
716    >(
717        mut self,
718        v: T,
719    ) -> Self {
720        self.framework_audit_format = v.into();
721        self
722    }
723}
724
725impl wkt::message::Message for BucketDestination {
726    fn typename() -> &'static str {
727        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.BucketDestination"
728    }
729}
730
731/// Defines additional types related to [BucketDestination].
732pub mod bucket_destination {
733    #[allow(unused_imports)]
734    use super::*;
735
736    /// The set of options for the framework audit format.
737    ///
738    /// # Working with unknown values
739    ///
740    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
741    /// additional enum variants at any time. Adding new variants is not considered
742    /// a breaking change. Applications should write their code in anticipation of:
743    ///
744    /// - New values appearing in future releases of the client library, **and**
745    /// - New values received dynamically, without application changes.
746    ///
747    /// Please consult the [Working with enums] section in the user guide for some
748    /// guidelines.
749    ///
750    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
751    #[derive(Clone, Debug, PartialEq)]
752    #[non_exhaustive]
753    pub enum Format {
754        /// Default value. This value is unused.
755        Unspecified,
756        /// The format for the framework audit report is Open Document.
757        Odf,
758        /// If set, the enum was initialized with an unknown value.
759        ///
760        /// Applications can examine the value using [Format::value] or
761        /// [Format::name].
762        UnknownValue(format::UnknownValue),
763    }
764
765    #[doc(hidden)]
766    pub mod format {
767        #[allow(unused_imports)]
768        use super::*;
769        #[derive(Clone, Debug, PartialEq)]
770        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
771    }
772
773    impl Format {
774        /// Gets the enum value.
775        ///
776        /// Returns `None` if the enum contains an unknown value deserialized from
777        /// the string representation of enums.
778        pub fn value(&self) -> std::option::Option<i32> {
779            match self {
780                Self::Unspecified => std::option::Option::Some(0),
781                Self::Odf => std::option::Option::Some(1),
782                Self::UnknownValue(u) => u.0.value(),
783            }
784        }
785
786        /// Gets the enum value as a string.
787        ///
788        /// Returns `None` if the enum contains an unknown value deserialized from
789        /// the integer representation of enums.
790        pub fn name(&self) -> std::option::Option<&str> {
791            match self {
792                Self::Unspecified => std::option::Option::Some("FORMAT_UNSPECIFIED"),
793                Self::Odf => std::option::Option::Some("ODF"),
794                Self::UnknownValue(u) => u.0.name(),
795            }
796        }
797    }
798
799    impl std::default::Default for Format {
800        fn default() -> Self {
801            use std::convert::From;
802            Self::from(0)
803        }
804    }
805
806    impl std::fmt::Display for Format {
807        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
808            wkt::internal::display_enum(f, self.name(), self.value())
809        }
810    }
811
812    impl std::convert::From<i32> for Format {
813        fn from(value: i32) -> Self {
814            match value {
815                0 => Self::Unspecified,
816                1 => Self::Odf,
817                _ => Self::UnknownValue(format::UnknownValue(
818                    wkt::internal::UnknownEnumValue::Integer(value),
819                )),
820            }
821        }
822    }
823
824    impl std::convert::From<&str> for Format {
825        fn from(value: &str) -> Self {
826            use std::string::ToString;
827            match value {
828                "FORMAT_UNSPECIFIED" => Self::Unspecified,
829                "ODF" => Self::Odf,
830                _ => Self::UnknownValue(format::UnknownValue(
831                    wkt::internal::UnknownEnumValue::String(value.to_string()),
832                )),
833            }
834        }
835    }
836
837    impl serde::ser::Serialize for Format {
838        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
839        where
840            S: serde::Serializer,
841        {
842            match self {
843                Self::Unspecified => serializer.serialize_i32(0),
844                Self::Odf => serializer.serialize_i32(1),
845                Self::UnknownValue(u) => u.0.serialize(serializer),
846            }
847        }
848    }
849
850    impl<'de> serde::de::Deserialize<'de> for Format {
851        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
852        where
853            D: serde::Deserializer<'de>,
854        {
855            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Format>::new(
856                ".google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format",
857            ))
858        }
859    }
860}
861
862/// A framework audit.
863#[derive(Clone, Default, PartialEq)]
864#[non_exhaustive]
865pub struct FrameworkAudit {
866    /// Output only. Identifier. The name of the framework audit.
867    pub name: std::string::String,
868
869    /// Output only. The ID of the framework audit.
870    pub framework_audit_id: std::string::String,
871
872    /// Output only. The compliance framework used for the audit.
873    pub compliance_framework: std::string::String,
874
875    /// Output only. The scope of the audit.
876    pub scope: std::string::String,
877
878    /// Required. The destination for the audit reports.
879    pub framework_audit_destination: std::option::Option<crate::model::FrameworkAuditDestination>,
880
881    /// Output only. The time that the audit started.
882    pub start_time: std::option::Option<wkt::Timestamp>,
883
884    /// Output only. The time that the audit finished.
885    pub finish_time: std::option::Option<wkt::Timestamp>,
886
887    /// Output only. The overall compliance state of the audit.
888    pub compliance_state: crate::model::ComplianceState,
889
890    /// Output only. The summary of the report.
891    pub report_summary: std::option::Option<crate::model::ReportSummary>,
892
893    /// Optional. The details for the cloud control groups within this audit.
894    pub cloud_control_group_audit_details:
895        std::vec::Vec<crate::model::CloudControlGroupAuditDetails>,
896
897    /// Optional. The details for the cloud controls within this audit.
898    pub cloud_control_audit_details: std::vec::Vec<crate::model::CloudControlAuditDetails>,
899
900    /// Output only. The ID of the long-running operation.
901    pub operation_id: std::string::String,
902
903    /// Output only. The framework audit state of the audit.
904    pub state: crate::model::framework_audit::State,
905
906    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
907}
908
909impl FrameworkAudit {
910    /// Creates a new default instance.
911    pub fn new() -> Self {
912        std::default::Default::default()
913    }
914
915    /// Sets the value of [name][crate::model::FrameworkAudit::name].
916    ///
917    /// # Example
918    /// ```ignore,no_run
919    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
920    /// let x = FrameworkAudit::new().set_name("example");
921    /// ```
922    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
923        self.name = v.into();
924        self
925    }
926
927    /// Sets the value of [framework_audit_id][crate::model::FrameworkAudit::framework_audit_id].
928    ///
929    /// # Example
930    /// ```ignore,no_run
931    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
932    /// let x = FrameworkAudit::new().set_framework_audit_id("example");
933    /// ```
934    pub fn set_framework_audit_id<T: std::convert::Into<std::string::String>>(
935        mut self,
936        v: T,
937    ) -> Self {
938        self.framework_audit_id = v.into();
939        self
940    }
941
942    /// Sets the value of [compliance_framework][crate::model::FrameworkAudit::compliance_framework].
943    ///
944    /// # Example
945    /// ```ignore,no_run
946    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
947    /// let x = FrameworkAudit::new().set_compliance_framework("example");
948    /// ```
949    pub fn set_compliance_framework<T: std::convert::Into<std::string::String>>(
950        mut self,
951        v: T,
952    ) -> Self {
953        self.compliance_framework = v.into();
954        self
955    }
956
957    /// Sets the value of [scope][crate::model::FrameworkAudit::scope].
958    ///
959    /// # Example
960    /// ```ignore,no_run
961    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
962    /// let x = FrameworkAudit::new().set_scope("example");
963    /// ```
964    pub fn set_scope<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
965        self.scope = v.into();
966        self
967    }
968
969    /// Sets the value of [framework_audit_destination][crate::model::FrameworkAudit::framework_audit_destination].
970    ///
971    /// # Example
972    /// ```ignore,no_run
973    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
974    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAuditDestination;
975    /// let x = FrameworkAudit::new().set_framework_audit_destination(FrameworkAuditDestination::default()/* use setters */);
976    /// ```
977    pub fn set_framework_audit_destination<T>(mut self, v: T) -> Self
978    where
979        T: std::convert::Into<crate::model::FrameworkAuditDestination>,
980    {
981        self.framework_audit_destination = std::option::Option::Some(v.into());
982        self
983    }
984
985    /// Sets or clears the value of [framework_audit_destination][crate::model::FrameworkAudit::framework_audit_destination].
986    ///
987    /// # Example
988    /// ```ignore,no_run
989    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
990    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAuditDestination;
991    /// let x = FrameworkAudit::new().set_or_clear_framework_audit_destination(Some(FrameworkAuditDestination::default()/* use setters */));
992    /// let x = FrameworkAudit::new().set_or_clear_framework_audit_destination(None::<FrameworkAuditDestination>);
993    /// ```
994    pub fn set_or_clear_framework_audit_destination<T>(mut self, v: std::option::Option<T>) -> Self
995    where
996        T: std::convert::Into<crate::model::FrameworkAuditDestination>,
997    {
998        self.framework_audit_destination = v.map(|x| x.into());
999        self
1000    }
1001
1002    /// Sets the value of [start_time][crate::model::FrameworkAudit::start_time].
1003    ///
1004    /// # Example
1005    /// ```ignore,no_run
1006    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1007    /// use wkt::Timestamp;
1008    /// let x = FrameworkAudit::new().set_start_time(Timestamp::default()/* use setters */);
1009    /// ```
1010    pub fn set_start_time<T>(mut self, v: T) -> Self
1011    where
1012        T: std::convert::Into<wkt::Timestamp>,
1013    {
1014        self.start_time = std::option::Option::Some(v.into());
1015        self
1016    }
1017
1018    /// Sets or clears the value of [start_time][crate::model::FrameworkAudit::start_time].
1019    ///
1020    /// # Example
1021    /// ```ignore,no_run
1022    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1023    /// use wkt::Timestamp;
1024    /// let x = FrameworkAudit::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
1025    /// let x = FrameworkAudit::new().set_or_clear_start_time(None::<Timestamp>);
1026    /// ```
1027    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
1028    where
1029        T: std::convert::Into<wkt::Timestamp>,
1030    {
1031        self.start_time = v.map(|x| x.into());
1032        self
1033    }
1034
1035    /// Sets the value of [finish_time][crate::model::FrameworkAudit::finish_time].
1036    ///
1037    /// # Example
1038    /// ```ignore,no_run
1039    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1040    /// use wkt::Timestamp;
1041    /// let x = FrameworkAudit::new().set_finish_time(Timestamp::default()/* use setters */);
1042    /// ```
1043    pub fn set_finish_time<T>(mut self, v: T) -> Self
1044    where
1045        T: std::convert::Into<wkt::Timestamp>,
1046    {
1047        self.finish_time = std::option::Option::Some(v.into());
1048        self
1049    }
1050
1051    /// Sets or clears the value of [finish_time][crate::model::FrameworkAudit::finish_time].
1052    ///
1053    /// # Example
1054    /// ```ignore,no_run
1055    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1056    /// use wkt::Timestamp;
1057    /// let x = FrameworkAudit::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1058    /// let x = FrameworkAudit::new().set_or_clear_finish_time(None::<Timestamp>);
1059    /// ```
1060    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1061    where
1062        T: std::convert::Into<wkt::Timestamp>,
1063    {
1064        self.finish_time = v.map(|x| x.into());
1065        self
1066    }
1067
1068    /// Sets the value of [compliance_state][crate::model::FrameworkAudit::compliance_state].
1069    ///
1070    /// # Example
1071    /// ```ignore,no_run
1072    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1073    /// use google_cloud_cloudsecuritycompliance_v1::model::ComplianceState;
1074    /// let x0 = FrameworkAudit::new().set_compliance_state(ComplianceState::Compliant);
1075    /// let x1 = FrameworkAudit::new().set_compliance_state(ComplianceState::Violation);
1076    /// let x2 = FrameworkAudit::new().set_compliance_state(ComplianceState::ManualReviewNeeded);
1077    /// ```
1078    pub fn set_compliance_state<T: std::convert::Into<crate::model::ComplianceState>>(
1079        mut self,
1080        v: T,
1081    ) -> Self {
1082        self.compliance_state = v.into();
1083        self
1084    }
1085
1086    /// Sets the value of [report_summary][crate::model::FrameworkAudit::report_summary].
1087    ///
1088    /// # Example
1089    /// ```ignore,no_run
1090    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1091    /// use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
1092    /// let x = FrameworkAudit::new().set_report_summary(ReportSummary::default()/* use setters */);
1093    /// ```
1094    pub fn set_report_summary<T>(mut self, v: T) -> Self
1095    where
1096        T: std::convert::Into<crate::model::ReportSummary>,
1097    {
1098        self.report_summary = std::option::Option::Some(v.into());
1099        self
1100    }
1101
1102    /// Sets or clears the value of [report_summary][crate::model::FrameworkAudit::report_summary].
1103    ///
1104    /// # Example
1105    /// ```ignore,no_run
1106    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1107    /// use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
1108    /// let x = FrameworkAudit::new().set_or_clear_report_summary(Some(ReportSummary::default()/* use setters */));
1109    /// let x = FrameworkAudit::new().set_or_clear_report_summary(None::<ReportSummary>);
1110    /// ```
1111    pub fn set_or_clear_report_summary<T>(mut self, v: std::option::Option<T>) -> Self
1112    where
1113        T: std::convert::Into<crate::model::ReportSummary>,
1114    {
1115        self.report_summary = v.map(|x| x.into());
1116        self
1117    }
1118
1119    /// Sets the value of [cloud_control_group_audit_details][crate::model::FrameworkAudit::cloud_control_group_audit_details].
1120    ///
1121    /// # Example
1122    /// ```ignore,no_run
1123    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1124    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1125    /// let x = FrameworkAudit::new()
1126    ///     .set_cloud_control_group_audit_details([
1127    ///         CloudControlGroupAuditDetails::default()/* use setters */,
1128    ///         CloudControlGroupAuditDetails::default()/* use (different) setters */,
1129    ///     ]);
1130    /// ```
1131    pub fn set_cloud_control_group_audit_details<T, V>(mut self, v: T) -> Self
1132    where
1133        T: std::iter::IntoIterator<Item = V>,
1134        V: std::convert::Into<crate::model::CloudControlGroupAuditDetails>,
1135    {
1136        use std::iter::Iterator;
1137        self.cloud_control_group_audit_details = v.into_iter().map(|i| i.into()).collect();
1138        self
1139    }
1140
1141    /// Sets the value of [cloud_control_audit_details][crate::model::FrameworkAudit::cloud_control_audit_details].
1142    ///
1143    /// # Example
1144    /// ```ignore,no_run
1145    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1146    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
1147    /// let x = FrameworkAudit::new()
1148    ///     .set_cloud_control_audit_details([
1149    ///         CloudControlAuditDetails::default()/* use setters */,
1150    ///         CloudControlAuditDetails::default()/* use (different) setters */,
1151    ///     ]);
1152    /// ```
1153    pub fn set_cloud_control_audit_details<T, V>(mut self, v: T) -> Self
1154    where
1155        T: std::iter::IntoIterator<Item = V>,
1156        V: std::convert::Into<crate::model::CloudControlAuditDetails>,
1157    {
1158        use std::iter::Iterator;
1159        self.cloud_control_audit_details = v.into_iter().map(|i| i.into()).collect();
1160        self
1161    }
1162
1163    /// Sets the value of [operation_id][crate::model::FrameworkAudit::operation_id].
1164    ///
1165    /// # Example
1166    /// ```ignore,no_run
1167    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1168    /// let x = FrameworkAudit::new().set_operation_id("example");
1169    /// ```
1170    pub fn set_operation_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1171        self.operation_id = v.into();
1172        self
1173    }
1174
1175    /// Sets the value of [state][crate::model::FrameworkAudit::state].
1176    ///
1177    /// # Example
1178    /// ```ignore,no_run
1179    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1180    /// use google_cloud_cloudsecuritycompliance_v1::model::framework_audit::State;
1181    /// let x0 = FrameworkAudit::new().set_state(State::Scheduled);
1182    /// let x1 = FrameworkAudit::new().set_state(State::Running);
1183    /// let x2 = FrameworkAudit::new().set_state(State::Uploading);
1184    /// ```
1185    pub fn set_state<T: std::convert::Into<crate::model::framework_audit::State>>(
1186        mut self,
1187        v: T,
1188    ) -> Self {
1189        self.state = v.into();
1190        self
1191    }
1192}
1193
1194impl wkt::message::Message for FrameworkAudit {
1195    fn typename() -> &'static str {
1196        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkAudit"
1197    }
1198}
1199
1200/// Defines additional types related to [FrameworkAudit].
1201pub mod framework_audit {
1202    #[allow(unused_imports)]
1203    use super::*;
1204
1205    /// The state of the framework audit.
1206    ///
1207    /// # Working with unknown values
1208    ///
1209    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1210    /// additional enum variants at any time. Adding new variants is not considered
1211    /// a breaking change. Applications should write their code in anticipation of:
1212    ///
1213    /// - New values appearing in future releases of the client library, **and**
1214    /// - New values received dynamically, without application changes.
1215    ///
1216    /// Please consult the [Working with enums] section in the user guide for some
1217    /// guidelines.
1218    ///
1219    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1220    #[derive(Clone, Debug, PartialEq)]
1221    #[non_exhaustive]
1222    pub enum State {
1223        /// Default value. This value is unused.
1224        Unspecified,
1225        /// The audit is scheduled.
1226        Scheduled,
1227        /// The audit is running.
1228        Running,
1229        /// The audit results are being uploaded.
1230        Uploading,
1231        /// The audit failed.
1232        Failed,
1233        /// The audit completed successfully.
1234        Succeeded,
1235        /// If set, the enum was initialized with an unknown value.
1236        ///
1237        /// Applications can examine the value using [State::value] or
1238        /// [State::name].
1239        UnknownValue(state::UnknownValue),
1240    }
1241
1242    #[doc(hidden)]
1243    pub mod state {
1244        #[allow(unused_imports)]
1245        use super::*;
1246        #[derive(Clone, Debug, PartialEq)]
1247        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1248    }
1249
1250    impl State {
1251        /// Gets the enum value.
1252        ///
1253        /// Returns `None` if the enum contains an unknown value deserialized from
1254        /// the string representation of enums.
1255        pub fn value(&self) -> std::option::Option<i32> {
1256            match self {
1257                Self::Unspecified => std::option::Option::Some(0),
1258                Self::Scheduled => std::option::Option::Some(1),
1259                Self::Running => std::option::Option::Some(2),
1260                Self::Uploading => std::option::Option::Some(3),
1261                Self::Failed => std::option::Option::Some(4),
1262                Self::Succeeded => std::option::Option::Some(5),
1263                Self::UnknownValue(u) => u.0.value(),
1264            }
1265        }
1266
1267        /// Gets the enum value as a string.
1268        ///
1269        /// Returns `None` if the enum contains an unknown value deserialized from
1270        /// the integer representation of enums.
1271        pub fn name(&self) -> std::option::Option<&str> {
1272            match self {
1273                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
1274                Self::Scheduled => std::option::Option::Some("SCHEDULED"),
1275                Self::Running => std::option::Option::Some("RUNNING"),
1276                Self::Uploading => std::option::Option::Some("UPLOADING"),
1277                Self::Failed => std::option::Option::Some("FAILED"),
1278                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
1279                Self::UnknownValue(u) => u.0.name(),
1280            }
1281        }
1282    }
1283
1284    impl std::default::Default for State {
1285        fn default() -> Self {
1286            use std::convert::From;
1287            Self::from(0)
1288        }
1289    }
1290
1291    impl std::fmt::Display for State {
1292        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1293            wkt::internal::display_enum(f, self.name(), self.value())
1294        }
1295    }
1296
1297    impl std::convert::From<i32> for State {
1298        fn from(value: i32) -> Self {
1299            match value {
1300                0 => Self::Unspecified,
1301                1 => Self::Scheduled,
1302                2 => Self::Running,
1303                3 => Self::Uploading,
1304                4 => Self::Failed,
1305                5 => Self::Succeeded,
1306                _ => Self::UnknownValue(state::UnknownValue(
1307                    wkt::internal::UnknownEnumValue::Integer(value),
1308                )),
1309            }
1310        }
1311    }
1312
1313    impl std::convert::From<&str> for State {
1314        fn from(value: &str) -> Self {
1315            use std::string::ToString;
1316            match value {
1317                "STATE_UNSPECIFIED" => Self::Unspecified,
1318                "SCHEDULED" => Self::Scheduled,
1319                "RUNNING" => Self::Running,
1320                "UPLOADING" => Self::Uploading,
1321                "FAILED" => Self::Failed,
1322                "SUCCEEDED" => Self::Succeeded,
1323                _ => Self::UnknownValue(state::UnknownValue(
1324                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1325                )),
1326            }
1327        }
1328    }
1329
1330    impl serde::ser::Serialize for State {
1331        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1332        where
1333            S: serde::Serializer,
1334        {
1335            match self {
1336                Self::Unspecified => serializer.serialize_i32(0),
1337                Self::Scheduled => serializer.serialize_i32(1),
1338                Self::Running => serializer.serialize_i32(2),
1339                Self::Uploading => serializer.serialize_i32(3),
1340                Self::Failed => serializer.serialize_i32(4),
1341                Self::Succeeded => serializer.serialize_i32(5),
1342                Self::UnknownValue(u) => u.0.serialize(serializer),
1343            }
1344        }
1345    }
1346
1347    impl<'de> serde::de::Deserialize<'de> for State {
1348        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1349        where
1350            D: serde::Deserializer<'de>,
1351        {
1352            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
1353                ".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State",
1354            ))
1355        }
1356    }
1357}
1358
1359/// The request message for [ListFrameworkAudits][].
1360#[derive(Clone, Default, PartialEq)]
1361#[non_exhaustive]
1362pub struct ListFrameworkAuditsRequest {
1363    /// Required. The parent resource where the framework audits are listed.
1364    ///
1365    /// Supported formats are the following:
1366    ///
1367    /// * `organizations/{organization_id}/locations/{location}`
1368    /// * `folders/{folder_id}/locations/{location}`
1369    /// * `projects/{project_id}/locations/{location}`
1370    pub parent: std::string::String,
1371
1372    /// Optional. The maximum number of framework audits to return. The service
1373    /// might return fewer audits than this value. If unspecified, a maximum of 10
1374    /// framework audits are returned. The maximum value is 50; values above 50 are
1375    /// limited to 50.
1376    pub page_size: i32,
1377
1378    /// Optional. The `next_page_token` value that's returned from a previous list
1379    /// request, if any.
1380    pub page_token: std::string::String,
1381
1382    /// Optional. The filters to apply to the framework audits.
1383    /// Supported filters are `compliance_framework`, `compliance_state`,
1384    /// `create_time,` and `framework_audit_name`. If the filter is invalid, an
1385    /// invalid argument error is returned.
1386    /// For syntax details, see [AIP-160][<https://google.aip.dev/160>].
1387    pub filter: std::string::String,
1388
1389    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1390}
1391
1392impl ListFrameworkAuditsRequest {
1393    /// Creates a new default instance.
1394    pub fn new() -> Self {
1395        std::default::Default::default()
1396    }
1397
1398    /// Sets the value of [parent][crate::model::ListFrameworkAuditsRequest::parent].
1399    ///
1400    /// # Example
1401    /// ```ignore,no_run
1402    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkAuditsRequest;
1403    /// let x = ListFrameworkAuditsRequest::new().set_parent("example");
1404    /// ```
1405    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1406        self.parent = v.into();
1407        self
1408    }
1409
1410    /// Sets the value of [page_size][crate::model::ListFrameworkAuditsRequest::page_size].
1411    ///
1412    /// # Example
1413    /// ```ignore,no_run
1414    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkAuditsRequest;
1415    /// let x = ListFrameworkAuditsRequest::new().set_page_size(42);
1416    /// ```
1417    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1418        self.page_size = v.into();
1419        self
1420    }
1421
1422    /// Sets the value of [page_token][crate::model::ListFrameworkAuditsRequest::page_token].
1423    ///
1424    /// # Example
1425    /// ```ignore,no_run
1426    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkAuditsRequest;
1427    /// let x = ListFrameworkAuditsRequest::new().set_page_token("example");
1428    /// ```
1429    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1430        self.page_token = v.into();
1431        self
1432    }
1433
1434    /// Sets the value of [filter][crate::model::ListFrameworkAuditsRequest::filter].
1435    ///
1436    /// # Example
1437    /// ```ignore,no_run
1438    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkAuditsRequest;
1439    /// let x = ListFrameworkAuditsRequest::new().set_filter("example");
1440    /// ```
1441    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1442        self.filter = v.into();
1443        self
1444    }
1445}
1446
1447impl wkt::message::Message for ListFrameworkAuditsRequest {
1448    fn typename() -> &'static str {
1449        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest"
1450    }
1451}
1452
1453/// The response message for [ListFrameworkAudits][].
1454#[derive(Clone, Default, PartialEq)]
1455#[non_exhaustive]
1456pub struct ListFrameworkAuditsResponse {
1457    /// The framework audits.
1458    pub framework_audits: std::vec::Vec<crate::model::FrameworkAudit>,
1459
1460    /// A token, which you can send as the `page_token` to retrieve the next page.
1461    /// If this field is omitted, there are no subsequent pages.
1462    pub next_page_token: std::string::String,
1463
1464    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1465}
1466
1467impl ListFrameworkAuditsResponse {
1468    /// Creates a new default instance.
1469    pub fn new() -> Self {
1470        std::default::Default::default()
1471    }
1472
1473    /// Sets the value of [framework_audits][crate::model::ListFrameworkAuditsResponse::framework_audits].
1474    ///
1475    /// # Example
1476    /// ```ignore,no_run
1477    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkAuditsResponse;
1478    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkAudit;
1479    /// let x = ListFrameworkAuditsResponse::new()
1480    ///     .set_framework_audits([
1481    ///         FrameworkAudit::default()/* use setters */,
1482    ///         FrameworkAudit::default()/* use (different) setters */,
1483    ///     ]);
1484    /// ```
1485    pub fn set_framework_audits<T, V>(mut self, v: T) -> Self
1486    where
1487        T: std::iter::IntoIterator<Item = V>,
1488        V: std::convert::Into<crate::model::FrameworkAudit>,
1489    {
1490        use std::iter::Iterator;
1491        self.framework_audits = v.into_iter().map(|i| i.into()).collect();
1492        self
1493    }
1494
1495    /// Sets the value of [next_page_token][crate::model::ListFrameworkAuditsResponse::next_page_token].
1496    ///
1497    /// # Example
1498    /// ```ignore,no_run
1499    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkAuditsResponse;
1500    /// let x = ListFrameworkAuditsResponse::new().set_next_page_token("example");
1501    /// ```
1502    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1503        self.next_page_token = v.into();
1504        self
1505    }
1506}
1507
1508impl wkt::message::Message for ListFrameworkAuditsResponse {
1509    fn typename() -> &'static str {
1510        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse"
1511    }
1512}
1513
1514#[doc(hidden)]
1515impl google_cloud_gax::paginator::internal::PageableResponse for ListFrameworkAuditsResponse {
1516    type PageItem = crate::model::FrameworkAudit;
1517
1518    fn items(self) -> std::vec::Vec<Self::PageItem> {
1519        self.framework_audits
1520    }
1521
1522    fn next_page_token(&self) -> std::string::String {
1523        use std::clone::Clone;
1524        self.next_page_token.clone()
1525    }
1526}
1527
1528/// The request message for [GetFrameworkAudit][].
1529#[derive(Clone, Default, PartialEq)]
1530#[non_exhaustive]
1531pub struct GetFrameworkAuditRequest {
1532    /// Required. The name of the framework audit to retrieve.
1533    ///
1534    /// Supported formats are the following:
1535    ///
1536    /// * `organizations/{organization_id}/locations/{location}/frameworkAudits/{frameworkAuditName}`
1537    /// * `folders/{folder_id}/locations/{location}/frameworkAudits/{frameworkAuditName}`
1538    /// * `projects/{project_id}/locations/{location}/frameworkAudits/{frameworkAuditName}`
1539    pub name: std::string::String,
1540
1541    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1542}
1543
1544impl GetFrameworkAuditRequest {
1545    /// Creates a new default instance.
1546    pub fn new() -> Self {
1547        std::default::Default::default()
1548    }
1549
1550    /// Sets the value of [name][crate::model::GetFrameworkAuditRequest::name].
1551    ///
1552    /// # Example
1553    /// ```ignore,no_run
1554    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetFrameworkAuditRequest;
1555    /// let x = GetFrameworkAuditRequest::new().set_name("example");
1556    /// ```
1557    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1558        self.name = v.into();
1559        self
1560    }
1561}
1562
1563impl wkt::message::Message for GetFrameworkAuditRequest {
1564    fn typename() -> &'static str {
1565        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest"
1566    }
1567}
1568
1569/// The details for a cloud control group.
1570#[derive(Clone, Default, PartialEq)]
1571#[non_exhaustive]
1572pub struct CloudControlGroupAuditDetails {
1573    /// Output only. The ID of the cloud control group.
1574    pub cloud_control_group_id: std::string::String,
1575
1576    /// Output only. The display name of the cloud control group.
1577    pub display_name: std::string::String,
1578
1579    /// Output only. The description of the cloud control group.
1580    pub description: std::string::String,
1581
1582    /// Output only. The responsibility type.
1583    pub responsibility_type: std::string::String,
1584
1585    /// Output only. The description of Google's responsibility.
1586    pub google_responsibility_description: std::string::String,
1587
1588    /// Output only. The implementation of Google's responsibility.
1589    pub google_responsibility_implementation: std::string::String,
1590
1591    /// Output only. The description of your responsibility.
1592    pub customer_responsibility_description: std::string::String,
1593
1594    /// Output only. The implementation of your responsibility.
1595    pub customer_responsibility_implementation: std::string::String,
1596
1597    /// Output only. The compliance state of the control group.
1598    pub compliance_state: crate::model::ComplianceState,
1599
1600    /// Output only. The ID of the regulatory control.
1601    pub control_id: std::string::String,
1602
1603    /// Output only. The control family.
1604    pub control_family: std::option::Option<crate::model::ControlFamily>,
1605
1606    /// Output only. The details for the cloud controls within this group.
1607    pub cloud_control_details: std::vec::Vec<crate::model::CloudControlAuditDetails>,
1608
1609    /// Output only. The summary of the report.
1610    pub report_summary: std::option::Option<crate::model::ReportSummary>,
1611
1612    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1613}
1614
1615impl CloudControlGroupAuditDetails {
1616    /// Creates a new default instance.
1617    pub fn new() -> Self {
1618        std::default::Default::default()
1619    }
1620
1621    /// Sets the value of [cloud_control_group_id][crate::model::CloudControlGroupAuditDetails::cloud_control_group_id].
1622    ///
1623    /// # Example
1624    /// ```ignore,no_run
1625    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1626    /// let x = CloudControlGroupAuditDetails::new().set_cloud_control_group_id("example");
1627    /// ```
1628    pub fn set_cloud_control_group_id<T: std::convert::Into<std::string::String>>(
1629        mut self,
1630        v: T,
1631    ) -> Self {
1632        self.cloud_control_group_id = v.into();
1633        self
1634    }
1635
1636    /// Sets the value of [display_name][crate::model::CloudControlGroupAuditDetails::display_name].
1637    ///
1638    /// # Example
1639    /// ```ignore,no_run
1640    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1641    /// let x = CloudControlGroupAuditDetails::new().set_display_name("example");
1642    /// ```
1643    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1644        self.display_name = v.into();
1645        self
1646    }
1647
1648    /// Sets the value of [description][crate::model::CloudControlGroupAuditDetails::description].
1649    ///
1650    /// # Example
1651    /// ```ignore,no_run
1652    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1653    /// let x = CloudControlGroupAuditDetails::new().set_description("example");
1654    /// ```
1655    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1656        self.description = v.into();
1657        self
1658    }
1659
1660    /// Sets the value of [responsibility_type][crate::model::CloudControlGroupAuditDetails::responsibility_type].
1661    ///
1662    /// # Example
1663    /// ```ignore,no_run
1664    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1665    /// let x = CloudControlGroupAuditDetails::new().set_responsibility_type("example");
1666    /// ```
1667    pub fn set_responsibility_type<T: std::convert::Into<std::string::String>>(
1668        mut self,
1669        v: T,
1670    ) -> Self {
1671        self.responsibility_type = v.into();
1672        self
1673    }
1674
1675    /// Sets the value of [google_responsibility_description][crate::model::CloudControlGroupAuditDetails::google_responsibility_description].
1676    ///
1677    /// # Example
1678    /// ```ignore,no_run
1679    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1680    /// let x = CloudControlGroupAuditDetails::new().set_google_responsibility_description("example");
1681    /// ```
1682    pub fn set_google_responsibility_description<T: std::convert::Into<std::string::String>>(
1683        mut self,
1684        v: T,
1685    ) -> Self {
1686        self.google_responsibility_description = v.into();
1687        self
1688    }
1689
1690    /// Sets the value of [google_responsibility_implementation][crate::model::CloudControlGroupAuditDetails::google_responsibility_implementation].
1691    ///
1692    /// # Example
1693    /// ```ignore,no_run
1694    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1695    /// let x = CloudControlGroupAuditDetails::new().set_google_responsibility_implementation("example");
1696    /// ```
1697    pub fn set_google_responsibility_implementation<T: std::convert::Into<std::string::String>>(
1698        mut self,
1699        v: T,
1700    ) -> Self {
1701        self.google_responsibility_implementation = v.into();
1702        self
1703    }
1704
1705    /// Sets the value of [customer_responsibility_description][crate::model::CloudControlGroupAuditDetails::customer_responsibility_description].
1706    ///
1707    /// # Example
1708    /// ```ignore,no_run
1709    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1710    /// let x = CloudControlGroupAuditDetails::new().set_customer_responsibility_description("example");
1711    /// ```
1712    pub fn set_customer_responsibility_description<T: std::convert::Into<std::string::String>>(
1713        mut self,
1714        v: T,
1715    ) -> Self {
1716        self.customer_responsibility_description = v.into();
1717        self
1718    }
1719
1720    /// Sets the value of [customer_responsibility_implementation][crate::model::CloudControlGroupAuditDetails::customer_responsibility_implementation].
1721    ///
1722    /// # Example
1723    /// ```ignore,no_run
1724    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1725    /// let x = CloudControlGroupAuditDetails::new().set_customer_responsibility_implementation("example");
1726    /// ```
1727    pub fn set_customer_responsibility_implementation<
1728        T: std::convert::Into<std::string::String>,
1729    >(
1730        mut self,
1731        v: T,
1732    ) -> Self {
1733        self.customer_responsibility_implementation = v.into();
1734        self
1735    }
1736
1737    /// Sets the value of [compliance_state][crate::model::CloudControlGroupAuditDetails::compliance_state].
1738    ///
1739    /// # Example
1740    /// ```ignore,no_run
1741    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1742    /// use google_cloud_cloudsecuritycompliance_v1::model::ComplianceState;
1743    /// let x0 = CloudControlGroupAuditDetails::new().set_compliance_state(ComplianceState::Compliant);
1744    /// let x1 = CloudControlGroupAuditDetails::new().set_compliance_state(ComplianceState::Violation);
1745    /// let x2 = CloudControlGroupAuditDetails::new().set_compliance_state(ComplianceState::ManualReviewNeeded);
1746    /// ```
1747    pub fn set_compliance_state<T: std::convert::Into<crate::model::ComplianceState>>(
1748        mut self,
1749        v: T,
1750    ) -> Self {
1751        self.compliance_state = v.into();
1752        self
1753    }
1754
1755    /// Sets the value of [control_id][crate::model::CloudControlGroupAuditDetails::control_id].
1756    ///
1757    /// # Example
1758    /// ```ignore,no_run
1759    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1760    /// let x = CloudControlGroupAuditDetails::new().set_control_id("example");
1761    /// ```
1762    pub fn set_control_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1763        self.control_id = v.into();
1764        self
1765    }
1766
1767    /// Sets the value of [control_family][crate::model::CloudControlGroupAuditDetails::control_family].
1768    ///
1769    /// # Example
1770    /// ```ignore,no_run
1771    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1772    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlFamily;
1773    /// let x = CloudControlGroupAuditDetails::new().set_control_family(ControlFamily::default()/* use setters */);
1774    /// ```
1775    pub fn set_control_family<T>(mut self, v: T) -> Self
1776    where
1777        T: std::convert::Into<crate::model::ControlFamily>,
1778    {
1779        self.control_family = std::option::Option::Some(v.into());
1780        self
1781    }
1782
1783    /// Sets or clears the value of [control_family][crate::model::CloudControlGroupAuditDetails::control_family].
1784    ///
1785    /// # Example
1786    /// ```ignore,no_run
1787    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1788    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlFamily;
1789    /// let x = CloudControlGroupAuditDetails::new().set_or_clear_control_family(Some(ControlFamily::default()/* use setters */));
1790    /// let x = CloudControlGroupAuditDetails::new().set_or_clear_control_family(None::<ControlFamily>);
1791    /// ```
1792    pub fn set_or_clear_control_family<T>(mut self, v: std::option::Option<T>) -> Self
1793    where
1794        T: std::convert::Into<crate::model::ControlFamily>,
1795    {
1796        self.control_family = v.map(|x| x.into());
1797        self
1798    }
1799
1800    /// Sets the value of [cloud_control_details][crate::model::CloudControlGroupAuditDetails::cloud_control_details].
1801    ///
1802    /// # Example
1803    /// ```ignore,no_run
1804    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1805    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
1806    /// let x = CloudControlGroupAuditDetails::new()
1807    ///     .set_cloud_control_details([
1808    ///         CloudControlAuditDetails::default()/* use setters */,
1809    ///         CloudControlAuditDetails::default()/* use (different) setters */,
1810    ///     ]);
1811    /// ```
1812    pub fn set_cloud_control_details<T, V>(mut self, v: T) -> Self
1813    where
1814        T: std::iter::IntoIterator<Item = V>,
1815        V: std::convert::Into<crate::model::CloudControlAuditDetails>,
1816    {
1817        use std::iter::Iterator;
1818        self.cloud_control_details = v.into_iter().map(|i| i.into()).collect();
1819        self
1820    }
1821
1822    /// Sets the value of [report_summary][crate::model::CloudControlGroupAuditDetails::report_summary].
1823    ///
1824    /// # Example
1825    /// ```ignore,no_run
1826    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1827    /// use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
1828    /// let x = CloudControlGroupAuditDetails::new().set_report_summary(ReportSummary::default()/* use setters */);
1829    /// ```
1830    pub fn set_report_summary<T>(mut self, v: T) -> Self
1831    where
1832        T: std::convert::Into<crate::model::ReportSummary>,
1833    {
1834        self.report_summary = std::option::Option::Some(v.into());
1835        self
1836    }
1837
1838    /// Sets or clears the value of [report_summary][crate::model::CloudControlGroupAuditDetails::report_summary].
1839    ///
1840    /// # Example
1841    /// ```ignore,no_run
1842    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlGroupAuditDetails;
1843    /// use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
1844    /// let x = CloudControlGroupAuditDetails::new().set_or_clear_report_summary(Some(ReportSummary::default()/* use setters */));
1845    /// let x = CloudControlGroupAuditDetails::new().set_or_clear_report_summary(None::<ReportSummary>);
1846    /// ```
1847    pub fn set_or_clear_report_summary<T>(mut self, v: std::option::Option<T>) -> Self
1848    where
1849        T: std::convert::Into<crate::model::ReportSummary>,
1850    {
1851        self.report_summary = v.map(|x| x.into());
1852        self
1853    }
1854}
1855
1856impl wkt::message::Message for CloudControlGroupAuditDetails {
1857    fn typename() -> &'static str {
1858        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails"
1859    }
1860}
1861
1862/// The details for a finding.
1863#[derive(Clone, Default, PartialEq)]
1864#[non_exhaustive]
1865pub struct FindingDetails {
1866    /// Output only. The name of the finding.
1867    pub name: std::string::String,
1868
1869    /// Output only. The compliance state of the finding.
1870    pub compliance_state: crate::model::ComplianceState,
1871
1872    /// Output only. The observation details for the finding.
1873    pub observation: std::option::Option<crate::model::ObservationDetails>,
1874
1875    /// Output only. The evidence details for the finding.
1876    pub evidence: std::option::Option<crate::model::EvidenceDetails>,
1877
1878    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1879}
1880
1881impl FindingDetails {
1882    /// Creates a new default instance.
1883    pub fn new() -> Self {
1884        std::default::Default::default()
1885    }
1886
1887    /// Sets the value of [name][crate::model::FindingDetails::name].
1888    ///
1889    /// # Example
1890    /// ```ignore,no_run
1891    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
1892    /// let x = FindingDetails::new().set_name("example");
1893    /// ```
1894    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1895        self.name = v.into();
1896        self
1897    }
1898
1899    /// Sets the value of [compliance_state][crate::model::FindingDetails::compliance_state].
1900    ///
1901    /// # Example
1902    /// ```ignore,no_run
1903    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
1904    /// use google_cloud_cloudsecuritycompliance_v1::model::ComplianceState;
1905    /// let x0 = FindingDetails::new().set_compliance_state(ComplianceState::Compliant);
1906    /// let x1 = FindingDetails::new().set_compliance_state(ComplianceState::Violation);
1907    /// let x2 = FindingDetails::new().set_compliance_state(ComplianceState::ManualReviewNeeded);
1908    /// ```
1909    pub fn set_compliance_state<T: std::convert::Into<crate::model::ComplianceState>>(
1910        mut self,
1911        v: T,
1912    ) -> Self {
1913        self.compliance_state = v.into();
1914        self
1915    }
1916
1917    /// Sets the value of [observation][crate::model::FindingDetails::observation].
1918    ///
1919    /// # Example
1920    /// ```ignore,no_run
1921    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
1922    /// use google_cloud_cloudsecuritycompliance_v1::model::ObservationDetails;
1923    /// let x = FindingDetails::new().set_observation(ObservationDetails::default()/* use setters */);
1924    /// ```
1925    pub fn set_observation<T>(mut self, v: T) -> Self
1926    where
1927        T: std::convert::Into<crate::model::ObservationDetails>,
1928    {
1929        self.observation = std::option::Option::Some(v.into());
1930        self
1931    }
1932
1933    /// Sets or clears the value of [observation][crate::model::FindingDetails::observation].
1934    ///
1935    /// # Example
1936    /// ```ignore,no_run
1937    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
1938    /// use google_cloud_cloudsecuritycompliance_v1::model::ObservationDetails;
1939    /// let x = FindingDetails::new().set_or_clear_observation(Some(ObservationDetails::default()/* use setters */));
1940    /// let x = FindingDetails::new().set_or_clear_observation(None::<ObservationDetails>);
1941    /// ```
1942    pub fn set_or_clear_observation<T>(mut self, v: std::option::Option<T>) -> Self
1943    where
1944        T: std::convert::Into<crate::model::ObservationDetails>,
1945    {
1946        self.observation = v.map(|x| x.into());
1947        self
1948    }
1949
1950    /// Sets the value of [evidence][crate::model::FindingDetails::evidence].
1951    ///
1952    /// # Example
1953    /// ```ignore,no_run
1954    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
1955    /// use google_cloud_cloudsecuritycompliance_v1::model::EvidenceDetails;
1956    /// let x = FindingDetails::new().set_evidence(EvidenceDetails::default()/* use setters */);
1957    /// ```
1958    pub fn set_evidence<T>(mut self, v: T) -> Self
1959    where
1960        T: std::convert::Into<crate::model::EvidenceDetails>,
1961    {
1962        self.evidence = std::option::Option::Some(v.into());
1963        self
1964    }
1965
1966    /// Sets or clears the value of [evidence][crate::model::FindingDetails::evidence].
1967    ///
1968    /// # Example
1969    /// ```ignore,no_run
1970    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
1971    /// use google_cloud_cloudsecuritycompliance_v1::model::EvidenceDetails;
1972    /// let x = FindingDetails::new().set_or_clear_evidence(Some(EvidenceDetails::default()/* use setters */));
1973    /// let x = FindingDetails::new().set_or_clear_evidence(None::<EvidenceDetails>);
1974    /// ```
1975    pub fn set_or_clear_evidence<T>(mut self, v: std::option::Option<T>) -> Self
1976    where
1977        T: std::convert::Into<crate::model::EvidenceDetails>,
1978    {
1979        self.evidence = v.map(|x| x.into());
1980        self
1981    }
1982}
1983
1984impl wkt::message::Message for FindingDetails {
1985    fn typename() -> &'static str {
1986        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FindingDetails"
1987    }
1988}
1989
1990/// The observation details for a finding.
1991#[derive(Clone, Default, PartialEq)]
1992#[non_exhaustive]
1993pub struct ObservationDetails {
1994    /// Output only. The current value.
1995    pub current_value: std::string::String,
1996
1997    /// Optional. The expected value.
1998    pub expected_value: std::string::String,
1999
2000    /// Output only. Any guidance for the observation.
2001    pub guidance: std::string::String,
2002
2003    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2004}
2005
2006impl ObservationDetails {
2007    /// Creates a new default instance.
2008    pub fn new() -> Self {
2009        std::default::Default::default()
2010    }
2011
2012    /// Sets the value of [current_value][crate::model::ObservationDetails::current_value].
2013    ///
2014    /// # Example
2015    /// ```ignore,no_run
2016    /// # use google_cloud_cloudsecuritycompliance_v1::model::ObservationDetails;
2017    /// let x = ObservationDetails::new().set_current_value("example");
2018    /// ```
2019    pub fn set_current_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2020        self.current_value = v.into();
2021        self
2022    }
2023
2024    /// Sets the value of [expected_value][crate::model::ObservationDetails::expected_value].
2025    ///
2026    /// # Example
2027    /// ```ignore,no_run
2028    /// # use google_cloud_cloudsecuritycompliance_v1::model::ObservationDetails;
2029    /// let x = ObservationDetails::new().set_expected_value("example");
2030    /// ```
2031    pub fn set_expected_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2032        self.expected_value = v.into();
2033        self
2034    }
2035
2036    /// Sets the value of [guidance][crate::model::ObservationDetails::guidance].
2037    ///
2038    /// # Example
2039    /// ```ignore,no_run
2040    /// # use google_cloud_cloudsecuritycompliance_v1::model::ObservationDetails;
2041    /// let x = ObservationDetails::new().set_guidance("example");
2042    /// ```
2043    pub fn set_guidance<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2044        self.guidance = v.into();
2045        self
2046    }
2047}
2048
2049impl wkt::message::Message for ObservationDetails {
2050    fn typename() -> &'static str {
2051        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ObservationDetails"
2052    }
2053}
2054
2055/// The evidence details for a finding.
2056#[derive(Clone, Default, PartialEq)]
2057#[non_exhaustive]
2058pub struct EvidenceDetails {
2059    /// Output only. The resource identifier.
2060    pub resource: std::string::String,
2061
2062    /// Output only. The service identifier.
2063    pub service: std::string::String,
2064
2065    /// Output only. The path to the evidence.
2066    pub evidence_path: std::string::String,
2067
2068    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2069}
2070
2071impl EvidenceDetails {
2072    /// Creates a new default instance.
2073    pub fn new() -> Self {
2074        std::default::Default::default()
2075    }
2076
2077    /// Sets the value of [resource][crate::model::EvidenceDetails::resource].
2078    ///
2079    /// # Example
2080    /// ```ignore,no_run
2081    /// # use google_cloud_cloudsecuritycompliance_v1::model::EvidenceDetails;
2082    /// let x = EvidenceDetails::new().set_resource("example");
2083    /// ```
2084    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2085        self.resource = v.into();
2086        self
2087    }
2088
2089    /// Sets the value of [service][crate::model::EvidenceDetails::service].
2090    ///
2091    /// # Example
2092    /// ```ignore,no_run
2093    /// # use google_cloud_cloudsecuritycompliance_v1::model::EvidenceDetails;
2094    /// let x = EvidenceDetails::new().set_service("example");
2095    /// ```
2096    pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2097        self.service = v.into();
2098        self
2099    }
2100
2101    /// Sets the value of [evidence_path][crate::model::EvidenceDetails::evidence_path].
2102    ///
2103    /// # Example
2104    /// ```ignore,no_run
2105    /// # use google_cloud_cloudsecuritycompliance_v1::model::EvidenceDetails;
2106    /// let x = EvidenceDetails::new().set_evidence_path("example");
2107    /// ```
2108    pub fn set_evidence_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2109        self.evidence_path = v.into();
2110        self
2111    }
2112}
2113
2114impl wkt::message::Message for EvidenceDetails {
2115    fn typename() -> &'static str {
2116        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.EvidenceDetails"
2117    }
2118}
2119
2120/// The details for a cloud control audit.
2121#[derive(Clone, Default, PartialEq)]
2122#[non_exhaustive]
2123pub struct CloudControlAuditDetails {
2124    /// Output only. The name of the cloud control.
2125    pub cloud_control: std::string::String,
2126
2127    /// Output only. The ID of the cloud control.
2128    pub cloud_control_id: std::string::String,
2129
2130    /// Output only. The description of the cloud control.
2131    pub cloud_control_description: std::string::String,
2132
2133    /// Output only. The overall status of the findings for the control.
2134    pub compliance_state: crate::model::ComplianceState,
2135
2136    /// Output only. The summary of the report.
2137    pub report_summary: std::option::Option<crate::model::ReportSummary>,
2138
2139    /// Output only. The findings for the control.
2140    pub findings: std::vec::Vec<crate::model::FindingDetails>,
2141
2142    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2143}
2144
2145impl CloudControlAuditDetails {
2146    /// Creates a new default instance.
2147    pub fn new() -> Self {
2148        std::default::Default::default()
2149    }
2150
2151    /// Sets the value of [cloud_control][crate::model::CloudControlAuditDetails::cloud_control].
2152    ///
2153    /// # Example
2154    /// ```ignore,no_run
2155    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2156    /// let x = CloudControlAuditDetails::new().set_cloud_control("example");
2157    /// ```
2158    pub fn set_cloud_control<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2159        self.cloud_control = v.into();
2160        self
2161    }
2162
2163    /// Sets the value of [cloud_control_id][crate::model::CloudControlAuditDetails::cloud_control_id].
2164    ///
2165    /// # Example
2166    /// ```ignore,no_run
2167    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2168    /// let x = CloudControlAuditDetails::new().set_cloud_control_id("example");
2169    /// ```
2170    pub fn set_cloud_control_id<T: std::convert::Into<std::string::String>>(
2171        mut self,
2172        v: T,
2173    ) -> Self {
2174        self.cloud_control_id = v.into();
2175        self
2176    }
2177
2178    /// Sets the value of [cloud_control_description][crate::model::CloudControlAuditDetails::cloud_control_description].
2179    ///
2180    /// # Example
2181    /// ```ignore,no_run
2182    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2183    /// let x = CloudControlAuditDetails::new().set_cloud_control_description("example");
2184    /// ```
2185    pub fn set_cloud_control_description<T: std::convert::Into<std::string::String>>(
2186        mut self,
2187        v: T,
2188    ) -> Self {
2189        self.cloud_control_description = v.into();
2190        self
2191    }
2192
2193    /// Sets the value of [compliance_state][crate::model::CloudControlAuditDetails::compliance_state].
2194    ///
2195    /// # Example
2196    /// ```ignore,no_run
2197    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2198    /// use google_cloud_cloudsecuritycompliance_v1::model::ComplianceState;
2199    /// let x0 = CloudControlAuditDetails::new().set_compliance_state(ComplianceState::Compliant);
2200    /// let x1 = CloudControlAuditDetails::new().set_compliance_state(ComplianceState::Violation);
2201    /// let x2 = CloudControlAuditDetails::new().set_compliance_state(ComplianceState::ManualReviewNeeded);
2202    /// ```
2203    pub fn set_compliance_state<T: std::convert::Into<crate::model::ComplianceState>>(
2204        mut self,
2205        v: T,
2206    ) -> Self {
2207        self.compliance_state = v.into();
2208        self
2209    }
2210
2211    /// Sets the value of [report_summary][crate::model::CloudControlAuditDetails::report_summary].
2212    ///
2213    /// # Example
2214    /// ```ignore,no_run
2215    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2216    /// use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
2217    /// let x = CloudControlAuditDetails::new().set_report_summary(ReportSummary::default()/* use setters */);
2218    /// ```
2219    pub fn set_report_summary<T>(mut self, v: T) -> Self
2220    where
2221        T: std::convert::Into<crate::model::ReportSummary>,
2222    {
2223        self.report_summary = std::option::Option::Some(v.into());
2224        self
2225    }
2226
2227    /// Sets or clears the value of [report_summary][crate::model::CloudControlAuditDetails::report_summary].
2228    ///
2229    /// # Example
2230    /// ```ignore,no_run
2231    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2232    /// use google_cloud_cloudsecuritycompliance_v1::model::ReportSummary;
2233    /// let x = CloudControlAuditDetails::new().set_or_clear_report_summary(Some(ReportSummary::default()/* use setters */));
2234    /// let x = CloudControlAuditDetails::new().set_or_clear_report_summary(None::<ReportSummary>);
2235    /// ```
2236    pub fn set_or_clear_report_summary<T>(mut self, v: std::option::Option<T>) -> Self
2237    where
2238        T: std::convert::Into<crate::model::ReportSummary>,
2239    {
2240        self.report_summary = v.map(|x| x.into());
2241        self
2242    }
2243
2244    /// Sets the value of [findings][crate::model::CloudControlAuditDetails::findings].
2245    ///
2246    /// # Example
2247    /// ```ignore,no_run
2248    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAuditDetails;
2249    /// use google_cloud_cloudsecuritycompliance_v1::model::FindingDetails;
2250    /// let x = CloudControlAuditDetails::new()
2251    ///     .set_findings([
2252    ///         FindingDetails::default()/* use setters */,
2253    ///         FindingDetails::default()/* use (different) setters */,
2254    ///     ]);
2255    /// ```
2256    pub fn set_findings<T, V>(mut self, v: T) -> Self
2257    where
2258        T: std::iter::IntoIterator<Item = V>,
2259        V: std::convert::Into<crate::model::FindingDetails>,
2260    {
2261        use std::iter::Iterator;
2262        self.findings = v.into_iter().map(|i| i.into()).collect();
2263        self
2264    }
2265}
2266
2267impl wkt::message::Message for CloudControlAuditDetails {
2268    fn typename() -> &'static str {
2269        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails"
2270    }
2271}
2272
2273/// The request message for [UpdateCmEnrollment][].
2274#[derive(Clone, Default, PartialEq)]
2275#[non_exhaustive]
2276pub struct UpdateCmEnrollmentRequest {
2277    /// Required. The Compliance Manager enrollment to update.
2278    /// The `name` field is used to identify the settings that you want to update.
2279    pub cm_enrollment: std::option::Option<crate::model::CmEnrollment>,
2280
2281    /// Optional. The list of fields that you want to update.
2282    pub update_mask: std::option::Option<wkt::FieldMask>,
2283
2284    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2285}
2286
2287impl UpdateCmEnrollmentRequest {
2288    /// Creates a new default instance.
2289    pub fn new() -> Self {
2290        std::default::Default::default()
2291    }
2292
2293    /// Sets 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_cm_enrollment(CmEnrollment::default()/* use setters */);
2300    /// ```
2301    pub fn set_cm_enrollment<T>(mut self, v: T) -> Self
2302    where
2303        T: std::convert::Into<crate::model::CmEnrollment>,
2304    {
2305        self.cm_enrollment = std::option::Option::Some(v.into());
2306        self
2307    }
2308
2309    /// Sets or clears the value of [cm_enrollment][crate::model::UpdateCmEnrollmentRequest::cm_enrollment].
2310    ///
2311    /// # Example
2312    /// ```ignore,no_run
2313    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCmEnrollmentRequest;
2314    /// use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2315    /// let x = UpdateCmEnrollmentRequest::new().set_or_clear_cm_enrollment(Some(CmEnrollment::default()/* use setters */));
2316    /// let x = UpdateCmEnrollmentRequest::new().set_or_clear_cm_enrollment(None::<CmEnrollment>);
2317    /// ```
2318    pub fn set_or_clear_cm_enrollment<T>(mut self, v: std::option::Option<T>) -> Self
2319    where
2320        T: std::convert::Into<crate::model::CmEnrollment>,
2321    {
2322        self.cm_enrollment = v.map(|x| x.into());
2323        self
2324    }
2325
2326    /// Sets 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_update_mask(FieldMask::default()/* use setters */);
2333    /// ```
2334    pub fn set_update_mask<T>(mut self, v: T) -> Self
2335    where
2336        T: std::convert::Into<wkt::FieldMask>,
2337    {
2338        self.update_mask = std::option::Option::Some(v.into());
2339        self
2340    }
2341
2342    /// Sets or clears the value of [update_mask][crate::model::UpdateCmEnrollmentRequest::update_mask].
2343    ///
2344    /// # Example
2345    /// ```ignore,no_run
2346    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCmEnrollmentRequest;
2347    /// use wkt::FieldMask;
2348    /// let x = UpdateCmEnrollmentRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2349    /// let x = UpdateCmEnrollmentRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2350    /// ```
2351    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2352    where
2353        T: std::convert::Into<wkt::FieldMask>,
2354    {
2355        self.update_mask = v.map(|x| x.into());
2356        self
2357    }
2358}
2359
2360impl wkt::message::Message for UpdateCmEnrollmentRequest {
2361    fn typename() -> &'static str {
2362        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest"
2363    }
2364}
2365
2366/// The request message for [CalculateEffectiveCmEnrollment][].
2367#[derive(Clone, Default, PartialEq)]
2368#[non_exhaustive]
2369pub struct CalculateEffectiveCmEnrollmentRequest {
2370    /// Required. The name of the Compliance Manager enrollment to calculate.
2371    ///
2372    /// Supported formats are the following:
2373    ///
2374    /// * `organizations/{organization_id}/locations/{location}/cmEnrollment`
2375    /// * `folders/{folder_id}/locations/{location}/cmEnrollment`
2376    /// * `projects/{project_id}/locations/{location}/cmEnrollment`
2377    pub name: std::string::String,
2378
2379    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2380}
2381
2382impl CalculateEffectiveCmEnrollmentRequest {
2383    /// Creates a new default instance.
2384    pub fn new() -> Self {
2385        std::default::Default::default()
2386    }
2387
2388    /// Sets the value of [name][crate::model::CalculateEffectiveCmEnrollmentRequest::name].
2389    ///
2390    /// # Example
2391    /// ```ignore,no_run
2392    /// # use google_cloud_cloudsecuritycompliance_v1::model::CalculateEffectiveCmEnrollmentRequest;
2393    /// let x = CalculateEffectiveCmEnrollmentRequest::new().set_name("example");
2394    /// ```
2395    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2396        self.name = v.into();
2397        self
2398    }
2399}
2400
2401impl wkt::message::Message for CalculateEffectiveCmEnrollmentRequest {
2402    fn typename() -> &'static str {
2403        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest"
2404    }
2405}
2406
2407/// The settings for Compliance Manager at a specific resource scope.=
2408#[derive(Clone, Default, PartialEq)]
2409#[non_exhaustive]
2410pub struct CmEnrollment {
2411    /// Identifier. The name of the Compliance Manager enrollment.
2412    ///
2413    /// Supported formats are the following:
2414    ///
2415    /// * `organizations/{organization_id}/locations/{location}/cmEnrollment`
2416    /// * `folders/{folder_id}/locations/{location}/cmEnrollment`
2417    /// * `projects/{project_id}/locations/{location}/cmEnrollment`
2418    pub name: std::string::String,
2419
2420    /// Optional. Whether the resource is enrolled in Compliance Manager.
2421    /// This setting is inherited by all descendants.
2422    pub enrolled: bool,
2423
2424    /// Optional. The audit configuration for Compliance Manager.
2425    /// If set at a scope, this configuration overrides any inherited audit
2426    /// configuration.
2427    pub audit_config: std::option::Option<crate::model::AuditConfig>,
2428
2429    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2430}
2431
2432impl CmEnrollment {
2433    /// Creates a new default instance.
2434    pub fn new() -> Self {
2435        std::default::Default::default()
2436    }
2437
2438    /// Sets the value of [name][crate::model::CmEnrollment::name].
2439    ///
2440    /// # Example
2441    /// ```ignore,no_run
2442    /// # use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2443    /// let x = CmEnrollment::new().set_name("example");
2444    /// ```
2445    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2446        self.name = v.into();
2447        self
2448    }
2449
2450    /// Sets the value of [enrolled][crate::model::CmEnrollment::enrolled].
2451    ///
2452    /// # Example
2453    /// ```ignore,no_run
2454    /// # use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2455    /// let x = CmEnrollment::new().set_enrolled(true);
2456    /// ```
2457    pub fn set_enrolled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2458        self.enrolled = v.into();
2459        self
2460    }
2461
2462    /// Sets the value of [audit_config][crate::model::CmEnrollment::audit_config].
2463    ///
2464    /// # Example
2465    /// ```ignore,no_run
2466    /// # use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2467    /// use google_cloud_cloudsecuritycompliance_v1::model::AuditConfig;
2468    /// let x = CmEnrollment::new().set_audit_config(AuditConfig::default()/* use setters */);
2469    /// ```
2470    pub fn set_audit_config<T>(mut self, v: T) -> Self
2471    where
2472        T: std::convert::Into<crate::model::AuditConfig>,
2473    {
2474        self.audit_config = std::option::Option::Some(v.into());
2475        self
2476    }
2477
2478    /// Sets or clears the value of [audit_config][crate::model::CmEnrollment::audit_config].
2479    ///
2480    /// # Example
2481    /// ```ignore,no_run
2482    /// # use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2483    /// use google_cloud_cloudsecuritycompliance_v1::model::AuditConfig;
2484    /// let x = CmEnrollment::new().set_or_clear_audit_config(Some(AuditConfig::default()/* use setters */));
2485    /// let x = CmEnrollment::new().set_or_clear_audit_config(None::<AuditConfig>);
2486    /// ```
2487    pub fn set_or_clear_audit_config<T>(mut self, v: std::option::Option<T>) -> Self
2488    where
2489        T: std::convert::Into<crate::model::AuditConfig>,
2490    {
2491        self.audit_config = v.map(|x| x.into());
2492        self
2493    }
2494}
2495
2496impl wkt::message::Message for CmEnrollment {
2497    fn typename() -> &'static str {
2498        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CmEnrollment"
2499    }
2500}
2501
2502/// The response message for [CalculateEffectiveCmEnrollment][].
2503#[derive(Clone, Default, PartialEq)]
2504#[non_exhaustive]
2505pub struct CalculateEffectiveCmEnrollmentResponse {
2506    /// The effective Compliance Manager enrollment for the resource.
2507    pub cm_enrollment: std::option::Option<crate::model::CmEnrollment>,
2508
2509    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2510}
2511
2512impl CalculateEffectiveCmEnrollmentResponse {
2513    /// Creates a new default instance.
2514    pub fn new() -> Self {
2515        std::default::Default::default()
2516    }
2517
2518    /// Sets the value of [cm_enrollment][crate::model::CalculateEffectiveCmEnrollmentResponse::cm_enrollment].
2519    ///
2520    /// # Example
2521    /// ```ignore,no_run
2522    /// # use google_cloud_cloudsecuritycompliance_v1::model::CalculateEffectiveCmEnrollmentResponse;
2523    /// use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2524    /// let x = CalculateEffectiveCmEnrollmentResponse::new().set_cm_enrollment(CmEnrollment::default()/* use setters */);
2525    /// ```
2526    pub fn set_cm_enrollment<T>(mut self, v: T) -> Self
2527    where
2528        T: std::convert::Into<crate::model::CmEnrollment>,
2529    {
2530        self.cm_enrollment = std::option::Option::Some(v.into());
2531        self
2532    }
2533
2534    /// Sets or clears the value of [cm_enrollment][crate::model::CalculateEffectiveCmEnrollmentResponse::cm_enrollment].
2535    ///
2536    /// # Example
2537    /// ```ignore,no_run
2538    /// # use google_cloud_cloudsecuritycompliance_v1::model::CalculateEffectiveCmEnrollmentResponse;
2539    /// use google_cloud_cloudsecuritycompliance_v1::model::CmEnrollment;
2540    /// let x = CalculateEffectiveCmEnrollmentResponse::new().set_or_clear_cm_enrollment(Some(CmEnrollment::default()/* use setters */));
2541    /// let x = CalculateEffectiveCmEnrollmentResponse::new().set_or_clear_cm_enrollment(None::<CmEnrollment>);
2542    /// ```
2543    pub fn set_or_clear_cm_enrollment<T>(mut self, v: std::option::Option<T>) -> Self
2544    where
2545        T: std::convert::Into<crate::model::CmEnrollment>,
2546    {
2547        self.cm_enrollment = v.map(|x| x.into());
2548        self
2549    }
2550}
2551
2552impl wkt::message::Message for CalculateEffectiveCmEnrollmentResponse {
2553    fn typename() -> &'static str {
2554        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse"
2555    }
2556}
2557
2558/// The audit configuration for Compliance Manager.
2559#[derive(Clone, Default, PartialEq)]
2560#[non_exhaustive]
2561pub struct AuditConfig {
2562    /// Required. The list of destinations that can be selected for uploading audit
2563    /// reports to.
2564    pub destinations: std::vec::Vec<crate::model::audit_config::CmEligibleDestination>,
2565
2566    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2567}
2568
2569impl AuditConfig {
2570    /// Creates a new default instance.
2571    pub fn new() -> Self {
2572        std::default::Default::default()
2573    }
2574
2575    /// Sets the value of [destinations][crate::model::AuditConfig::destinations].
2576    ///
2577    /// # Example
2578    /// ```ignore,no_run
2579    /// # use google_cloud_cloudsecuritycompliance_v1::model::AuditConfig;
2580    /// use google_cloud_cloudsecuritycompliance_v1::model::audit_config::CmEligibleDestination;
2581    /// let x = AuditConfig::new()
2582    ///     .set_destinations([
2583    ///         CmEligibleDestination::default()/* use setters */,
2584    ///         CmEligibleDestination::default()/* use (different) setters */,
2585    ///     ]);
2586    /// ```
2587    pub fn set_destinations<T, V>(mut self, v: T) -> Self
2588    where
2589        T: std::iter::IntoIterator<Item = V>,
2590        V: std::convert::Into<crate::model::audit_config::CmEligibleDestination>,
2591    {
2592        use std::iter::Iterator;
2593        self.destinations = v.into_iter().map(|i| i.into()).collect();
2594        self
2595    }
2596}
2597
2598impl wkt::message::Message for AuditConfig {
2599    fn typename() -> &'static str {
2600        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AuditConfig"
2601    }
2602}
2603
2604/// Defines additional types related to [AuditConfig].
2605pub mod audit_config {
2606    #[allow(unused_imports)]
2607    use super::*;
2608
2609    /// The destination details where audit reports are
2610    /// uploaded.
2611    #[derive(Clone, Default, PartialEq)]
2612    #[non_exhaustive]
2613    pub struct CmEligibleDestination {
2614        /// Set of options for the report destination location.
2615        pub cm_eligible_destinations: std::option::Option<
2616            crate::model::audit_config::cm_eligible_destination::CmEligibleDestinations,
2617        >,
2618
2619        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2620    }
2621
2622    impl CmEligibleDestination {
2623        /// Creates a new default instance.
2624        pub fn new() -> Self {
2625            std::default::Default::default()
2626        }
2627
2628        /// Sets the value of [cm_eligible_destinations][crate::model::audit_config::CmEligibleDestination::cm_eligible_destinations].
2629        ///
2630        /// Note that all the setters affecting `cm_eligible_destinations` are mutually
2631        /// exclusive.
2632        ///
2633        /// # Example
2634        /// ```ignore,no_run
2635        /// # use google_cloud_cloudsecuritycompliance_v1::model::audit_config::CmEligibleDestination;
2636        /// use google_cloud_cloudsecuritycompliance_v1::model::audit_config::cm_eligible_destination::CmEligibleDestinations;
2637        /// let x = CmEligibleDestination::new().set_cm_eligible_destinations(Some(CmEligibleDestinations::GcsBucket("example".to_string())));
2638        /// ```
2639        pub fn set_cm_eligible_destinations<
2640            T: std::convert::Into<
2641                    std::option::Option<
2642                        crate::model::audit_config::cm_eligible_destination::CmEligibleDestinations,
2643                    >,
2644                >,
2645        >(
2646            mut self,
2647            v: T,
2648        ) -> Self {
2649            self.cm_eligible_destinations = v.into();
2650            self
2651        }
2652
2653        /// The value of [cm_eligible_destinations][crate::model::audit_config::CmEligibleDestination::cm_eligible_destinations]
2654        /// if it holds a `GcsBucket`, `None` if the field is not set or
2655        /// holds a different branch.
2656        pub fn gcs_bucket(&self) -> std::option::Option<&std::string::String> {
2657            #[allow(unreachable_patterns)]
2658            self.cm_eligible_destinations.as_ref().and_then(|v| match v {
2659                crate::model::audit_config::cm_eligible_destination::CmEligibleDestinations::GcsBucket(v) => std::option::Option::Some(v),
2660                _ => std::option::Option::None,
2661            })
2662        }
2663
2664        /// Sets the value of [cm_eligible_destinations][crate::model::audit_config::CmEligibleDestination::cm_eligible_destinations]
2665        /// to hold a `GcsBucket`.
2666        ///
2667        /// Note that all the setters affecting `cm_eligible_destinations` are
2668        /// mutually exclusive.
2669        ///
2670        /// # Example
2671        /// ```ignore,no_run
2672        /// # use google_cloud_cloudsecuritycompliance_v1::model::audit_config::CmEligibleDestination;
2673        /// let x = CmEligibleDestination::new().set_gcs_bucket("example");
2674        /// assert!(x.gcs_bucket().is_some());
2675        /// ```
2676        pub fn set_gcs_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2677            self.cm_eligible_destinations = std::option::Option::Some(
2678                crate::model::audit_config::cm_eligible_destination::CmEligibleDestinations::GcsBucket(
2679                    v.into()
2680                )
2681            );
2682            self
2683        }
2684    }
2685
2686    impl wkt::message::Message for CmEligibleDestination {
2687        fn typename() -> &'static str {
2688            "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination"
2689        }
2690    }
2691
2692    /// Defines additional types related to [CmEligibleDestination].
2693    pub mod cm_eligible_destination {
2694        #[allow(unused_imports)]
2695        use super::*;
2696
2697        /// Set of options for the report destination location.
2698        #[derive(Clone, Debug, PartialEq)]
2699        #[non_exhaustive]
2700        pub enum CmEligibleDestinations {
2701            /// The Cloud Storage bucket where audit reports and evidences can be
2702            /// uploaded. The format is `gs://{bucket_name}`.
2703            GcsBucket(std::string::String),
2704        }
2705    }
2706}
2707
2708/// A framework is a collection of cloud controls and regulatory controls
2709/// that represent security best practices or industry-defined standards such as
2710/// FedRAMP or NIST.
2711#[derive(Clone, Default, PartialEq)]
2712#[non_exhaustive]
2713pub struct Framework {
2714    /// Required. Identifier. The name of the framework, in one of the following
2715    /// formats:
2716    /// `organizations/{organization}/locations/{location}/frameworks/{framework}`
2717    /// or
2718    /// `projects/{project}/locations/{location}/frameworks/{framework}`.
2719    ///
2720    /// The only supported location is `global`.
2721    pub name: std::string::String,
2722
2723    /// Output only. The major version of the framework, which is incremented in
2724    /// ascending order.
2725    pub major_revision_id: i64,
2726
2727    /// Optional. The friendly name of the framework. The maximum length is 200
2728    /// characters.
2729    pub display_name: std::string::String,
2730
2731    /// Optional. The description of the framework. The maximum length is 2000
2732    /// characters.
2733    pub description: std::string::String,
2734
2735    /// Output only. The type of framework.
2736    pub r#type: crate::model::framework::FrameworkType,
2737
2738    /// Optional. The cloud control details that are directly added without any
2739    /// grouping in the framework.
2740    pub cloud_control_details: std::vec::Vec<crate::model::CloudControlDetails>,
2741
2742    /// Optional. The category of the framework.
2743    pub category: std::vec::Vec<crate::model::FrameworkCategory>,
2744
2745    /// Output only. The cloud providers that are supported by the framework.
2746    pub supported_cloud_providers: std::vec::Vec<crate::model::CloudProvider>,
2747
2748    /// Output only. The target resource types that are supported by the framework.
2749    pub supported_target_resource_types: std::vec::Vec<crate::model::TargetResourceType>,
2750
2751    /// Output only. The supported enforcement modes of the framework.
2752    pub supported_enforcement_modes: std::vec::Vec<crate::model::EnforcementMode>,
2753
2754    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2755}
2756
2757impl Framework {
2758    /// Creates a new default instance.
2759    pub fn new() -> Self {
2760        std::default::Default::default()
2761    }
2762
2763    /// Sets the value of [name][crate::model::Framework::name].
2764    ///
2765    /// # Example
2766    /// ```ignore,no_run
2767    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2768    /// let x = Framework::new().set_name("example");
2769    /// ```
2770    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2771        self.name = v.into();
2772        self
2773    }
2774
2775    /// Sets the value of [major_revision_id][crate::model::Framework::major_revision_id].
2776    ///
2777    /// # Example
2778    /// ```ignore,no_run
2779    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2780    /// let x = Framework::new().set_major_revision_id(42);
2781    /// ```
2782    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2783        self.major_revision_id = v.into();
2784        self
2785    }
2786
2787    /// Sets the value of [display_name][crate::model::Framework::display_name].
2788    ///
2789    /// # Example
2790    /// ```ignore,no_run
2791    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2792    /// let x = Framework::new().set_display_name("example");
2793    /// ```
2794    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2795        self.display_name = v.into();
2796        self
2797    }
2798
2799    /// Sets the value of [description][crate::model::Framework::description].
2800    ///
2801    /// # Example
2802    /// ```ignore,no_run
2803    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2804    /// let x = Framework::new().set_description("example");
2805    /// ```
2806    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2807        self.description = v.into();
2808        self
2809    }
2810
2811    /// Sets the value of [r#type][crate::model::Framework::type].
2812    ///
2813    /// # Example
2814    /// ```ignore,no_run
2815    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2816    /// use google_cloud_cloudsecuritycompliance_v1::model::framework::FrameworkType;
2817    /// let x0 = Framework::new().set_type(FrameworkType::BuiltIn);
2818    /// let x1 = Framework::new().set_type(FrameworkType::Custom);
2819    /// ```
2820    pub fn set_type<T: std::convert::Into<crate::model::framework::FrameworkType>>(
2821        mut self,
2822        v: T,
2823    ) -> Self {
2824        self.r#type = v.into();
2825        self
2826    }
2827
2828    /// Sets the value of [cloud_control_details][crate::model::Framework::cloud_control_details].
2829    ///
2830    /// # Example
2831    /// ```ignore,no_run
2832    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2833    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDetails;
2834    /// let x = Framework::new()
2835    ///     .set_cloud_control_details([
2836    ///         CloudControlDetails::default()/* use setters */,
2837    ///         CloudControlDetails::default()/* use (different) setters */,
2838    ///     ]);
2839    /// ```
2840    pub fn set_cloud_control_details<T, V>(mut self, v: T) -> Self
2841    where
2842        T: std::iter::IntoIterator<Item = V>,
2843        V: std::convert::Into<crate::model::CloudControlDetails>,
2844    {
2845        use std::iter::Iterator;
2846        self.cloud_control_details = v.into_iter().map(|i| i.into()).collect();
2847        self
2848    }
2849
2850    /// Sets the value of [category][crate::model::Framework::category].
2851    ///
2852    /// # Example
2853    /// ```ignore,no_run
2854    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2855    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkCategory;
2856    /// let x = Framework::new().set_category([
2857    ///     FrameworkCategory::IndustryDefinedStandard,
2858    ///     FrameworkCategory::AssuredWorkloads,
2859    ///     FrameworkCategory::DataSecurity,
2860    /// ]);
2861    /// ```
2862    pub fn set_category<T, V>(mut self, v: T) -> Self
2863    where
2864        T: std::iter::IntoIterator<Item = V>,
2865        V: std::convert::Into<crate::model::FrameworkCategory>,
2866    {
2867        use std::iter::Iterator;
2868        self.category = v.into_iter().map(|i| i.into()).collect();
2869        self
2870    }
2871
2872    /// Sets the value of [supported_cloud_providers][crate::model::Framework::supported_cloud_providers].
2873    ///
2874    /// # Example
2875    /// ```ignore,no_run
2876    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2877    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudProvider;
2878    /// let x = Framework::new().set_supported_cloud_providers([
2879    ///     CloudProvider::Aws,
2880    ///     CloudProvider::Azure,
2881    ///     CloudProvider::Gcp,
2882    /// ]);
2883    /// ```
2884    pub fn set_supported_cloud_providers<T, V>(mut self, v: T) -> Self
2885    where
2886        T: std::iter::IntoIterator<Item = V>,
2887        V: std::convert::Into<crate::model::CloudProvider>,
2888    {
2889        use std::iter::Iterator;
2890        self.supported_cloud_providers = v.into_iter().map(|i| i.into()).collect();
2891        self
2892    }
2893
2894    /// Sets the value of [supported_target_resource_types][crate::model::Framework::supported_target_resource_types].
2895    ///
2896    /// # Example
2897    /// ```ignore,no_run
2898    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2899    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceType;
2900    /// let x = Framework::new().set_supported_target_resource_types([
2901    ///     TargetResourceType::TargetResourceCrmTypeOrg,
2902    ///     TargetResourceType::TargetResourceCrmTypeFolder,
2903    ///     TargetResourceType::TargetResourceCrmTypeProject,
2904    /// ]);
2905    /// ```
2906    pub fn set_supported_target_resource_types<T, V>(mut self, v: T) -> Self
2907    where
2908        T: std::iter::IntoIterator<Item = V>,
2909        V: std::convert::Into<crate::model::TargetResourceType>,
2910    {
2911        use std::iter::Iterator;
2912        self.supported_target_resource_types = v.into_iter().map(|i| i.into()).collect();
2913        self
2914    }
2915
2916    /// Sets the value of [supported_enforcement_modes][crate::model::Framework::supported_enforcement_modes].
2917    ///
2918    /// # Example
2919    /// ```ignore,no_run
2920    /// # use google_cloud_cloudsecuritycompliance_v1::model::Framework;
2921    /// use google_cloud_cloudsecuritycompliance_v1::model::EnforcementMode;
2922    /// let x = Framework::new().set_supported_enforcement_modes([
2923    ///     EnforcementMode::Preventive,
2924    ///     EnforcementMode::Detective,
2925    ///     EnforcementMode::Audit,
2926    /// ]);
2927    /// ```
2928    pub fn set_supported_enforcement_modes<T, V>(mut self, v: T) -> Self
2929    where
2930        T: std::iter::IntoIterator<Item = V>,
2931        V: std::convert::Into<crate::model::EnforcementMode>,
2932    {
2933        use std::iter::Iterator;
2934        self.supported_enforcement_modes = v.into_iter().map(|i| i.into()).collect();
2935        self
2936    }
2937}
2938
2939impl wkt::message::Message for Framework {
2940    fn typename() -> &'static str {
2941        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.Framework"
2942    }
2943}
2944
2945/// Defines additional types related to [Framework].
2946pub mod framework {
2947    #[allow(unused_imports)]
2948    use super::*;
2949
2950    /// The type of framework.
2951    ///
2952    /// # Working with unknown values
2953    ///
2954    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2955    /// additional enum variants at any time. Adding new variants is not considered
2956    /// a breaking change. Applications should write their code in anticipation of:
2957    ///
2958    /// - New values appearing in future releases of the client library, **and**
2959    /// - New values received dynamically, without application changes.
2960    ///
2961    /// Please consult the [Working with enums] section in the user guide for some
2962    /// guidelines.
2963    ///
2964    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
2965    #[derive(Clone, Debug, PartialEq)]
2966    #[non_exhaustive]
2967    pub enum FrameworkType {
2968        /// Default value. This value is unused.
2969        Unspecified,
2970        /// A framework that's provided and managed by Google.
2971        BuiltIn,
2972        /// A framework that's created and managed by you.
2973        Custom,
2974        /// If set, the enum was initialized with an unknown value.
2975        ///
2976        /// Applications can examine the value using [FrameworkType::value] or
2977        /// [FrameworkType::name].
2978        UnknownValue(framework_type::UnknownValue),
2979    }
2980
2981    #[doc(hidden)]
2982    pub mod framework_type {
2983        #[allow(unused_imports)]
2984        use super::*;
2985        #[derive(Clone, Debug, PartialEq)]
2986        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2987    }
2988
2989    impl FrameworkType {
2990        /// Gets the enum value.
2991        ///
2992        /// Returns `None` if the enum contains an unknown value deserialized from
2993        /// the string representation of enums.
2994        pub fn value(&self) -> std::option::Option<i32> {
2995            match self {
2996                Self::Unspecified => std::option::Option::Some(0),
2997                Self::BuiltIn => std::option::Option::Some(1),
2998                Self::Custom => std::option::Option::Some(2),
2999                Self::UnknownValue(u) => u.0.value(),
3000            }
3001        }
3002
3003        /// Gets the enum value as a string.
3004        ///
3005        /// Returns `None` if the enum contains an unknown value deserialized from
3006        /// the integer representation of enums.
3007        pub fn name(&self) -> std::option::Option<&str> {
3008            match self {
3009                Self::Unspecified => std::option::Option::Some("FRAMEWORK_TYPE_UNSPECIFIED"),
3010                Self::BuiltIn => std::option::Option::Some("BUILT_IN"),
3011                Self::Custom => std::option::Option::Some("CUSTOM"),
3012                Self::UnknownValue(u) => u.0.name(),
3013            }
3014        }
3015    }
3016
3017    impl std::default::Default for FrameworkType {
3018        fn default() -> Self {
3019            use std::convert::From;
3020            Self::from(0)
3021        }
3022    }
3023
3024    impl std::fmt::Display for FrameworkType {
3025        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3026            wkt::internal::display_enum(f, self.name(), self.value())
3027        }
3028    }
3029
3030    impl std::convert::From<i32> for FrameworkType {
3031        fn from(value: i32) -> Self {
3032            match value {
3033                0 => Self::Unspecified,
3034                1 => Self::BuiltIn,
3035                2 => Self::Custom,
3036                _ => Self::UnknownValue(framework_type::UnknownValue(
3037                    wkt::internal::UnknownEnumValue::Integer(value),
3038                )),
3039            }
3040        }
3041    }
3042
3043    impl std::convert::From<&str> for FrameworkType {
3044        fn from(value: &str) -> Self {
3045            use std::string::ToString;
3046            match value {
3047                "FRAMEWORK_TYPE_UNSPECIFIED" => Self::Unspecified,
3048                "BUILT_IN" => Self::BuiltIn,
3049                "CUSTOM" => Self::Custom,
3050                _ => Self::UnknownValue(framework_type::UnknownValue(
3051                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3052                )),
3053            }
3054        }
3055    }
3056
3057    impl serde::ser::Serialize for FrameworkType {
3058        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3059        where
3060            S: serde::Serializer,
3061        {
3062            match self {
3063                Self::Unspecified => serializer.serialize_i32(0),
3064                Self::BuiltIn => serializer.serialize_i32(1),
3065                Self::Custom => serializer.serialize_i32(2),
3066                Self::UnknownValue(u) => u.0.serialize(serializer),
3067            }
3068        }
3069    }
3070
3071    impl<'de> serde::de::Deserialize<'de> for FrameworkType {
3072        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3073        where
3074            D: serde::Deserializer<'de>,
3075        {
3076            deserializer.deserialize_any(wkt::internal::EnumVisitor::<FrameworkType>::new(
3077                ".google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType",
3078            ))
3079        }
3080    }
3081}
3082
3083/// The details of a cloud control.
3084#[derive(Clone, Default, PartialEq)]
3085#[non_exhaustive]
3086pub struct CloudControlDetails {
3087    /// Required. The name of the cloud control, in one of the following formats:
3088    /// `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}`
3089    /// or
3090    /// `projects/{project}/locations/{location}/cloudControls/{cloud_control}`.
3091    ///
3092    /// The only supported location is `global`.
3093    pub name: std::string::String,
3094
3095    /// Required. The major version of the cloud control.
3096    pub major_revision_id: i64,
3097
3098    /// Optional. Parameters are key-value pairs that let you provide your custom
3099    /// location requirements, environment requirements, or other settings that are
3100    /// relevant to the cloud control. An example parameter is
3101    /// `{"name": "location","value": "us-west-1"}`.
3102    pub parameters: std::vec::Vec<crate::model::Parameter>,
3103
3104    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3105}
3106
3107impl CloudControlDetails {
3108    /// Creates a new default instance.
3109    pub fn new() -> Self {
3110        std::default::Default::default()
3111    }
3112
3113    /// Sets the value of [name][crate::model::CloudControlDetails::name].
3114    ///
3115    /// # Example
3116    /// ```ignore,no_run
3117    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDetails;
3118    /// let x = CloudControlDetails::new().set_name("example");
3119    /// ```
3120    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3121        self.name = v.into();
3122        self
3123    }
3124
3125    /// Sets the value of [major_revision_id][crate::model::CloudControlDetails::major_revision_id].
3126    ///
3127    /// # Example
3128    /// ```ignore,no_run
3129    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDetails;
3130    /// let x = CloudControlDetails::new().set_major_revision_id(42);
3131    /// ```
3132    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3133        self.major_revision_id = v.into();
3134        self
3135    }
3136
3137    /// Sets the value of [parameters][crate::model::CloudControlDetails::parameters].
3138    ///
3139    /// # Example
3140    /// ```ignore,no_run
3141    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDetails;
3142    /// use google_cloud_cloudsecuritycompliance_v1::model::Parameter;
3143    /// let x = CloudControlDetails::new()
3144    ///     .set_parameters([
3145    ///         Parameter::default()/* use setters */,
3146    ///         Parameter::default()/* use (different) setters */,
3147    ///     ]);
3148    /// ```
3149    pub fn set_parameters<T, V>(mut self, v: T) -> Self
3150    where
3151        T: std::iter::IntoIterator<Item = V>,
3152        V: std::convert::Into<crate::model::Parameter>,
3153    {
3154        use std::iter::Iterator;
3155        self.parameters = v.into_iter().map(|i| i.into()).collect();
3156        self
3157    }
3158}
3159
3160impl wkt::message::Message for CloudControlDetails {
3161    fn typename() -> &'static str {
3162        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlDetails"
3163    }
3164}
3165
3166/// The reference of a framework, in one of the following formats:
3167///
3168/// - `organizations/{organization}/locations/{location}/frameworks/{framework}`
3169/// - `projects/{project}/locations/{location}/frameworks/{framework}`.
3170///
3171/// The only supported location is `global`.
3172#[derive(Clone, Default, PartialEq)]
3173#[non_exhaustive]
3174pub struct FrameworkReference {
3175    /// Required. The major version of the framework. If not specified, the version
3176    /// corresponds to the latest version of the framework.
3177    pub framework: std::string::String,
3178
3179    /// Optional. The major version of the framework. If not specified, the version
3180    /// corresponds to the latest version of the framework.
3181    pub major_revision_id: std::option::Option<i64>,
3182
3183    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3184}
3185
3186impl FrameworkReference {
3187    /// Creates a new default instance.
3188    pub fn new() -> Self {
3189        std::default::Default::default()
3190    }
3191
3192    /// Sets the value of [framework][crate::model::FrameworkReference::framework].
3193    ///
3194    /// # Example
3195    /// ```ignore,no_run
3196    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
3197    /// let x = FrameworkReference::new().set_framework("example");
3198    /// ```
3199    pub fn set_framework<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3200        self.framework = v.into();
3201        self
3202    }
3203
3204    /// Sets the value of [major_revision_id][crate::model::FrameworkReference::major_revision_id].
3205    ///
3206    /// # Example
3207    /// ```ignore,no_run
3208    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
3209    /// let x = FrameworkReference::new().set_major_revision_id(42);
3210    /// ```
3211    pub fn set_major_revision_id<T>(mut self, v: T) -> Self
3212    where
3213        T: std::convert::Into<i64>,
3214    {
3215        self.major_revision_id = std::option::Option::Some(v.into());
3216        self
3217    }
3218
3219    /// Sets or clears the value of [major_revision_id][crate::model::FrameworkReference::major_revision_id].
3220    ///
3221    /// # Example
3222    /// ```ignore,no_run
3223    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
3224    /// let x = FrameworkReference::new().set_or_clear_major_revision_id(Some(42));
3225    /// let x = FrameworkReference::new().set_or_clear_major_revision_id(None::<i32>);
3226    /// ```
3227    pub fn set_or_clear_major_revision_id<T>(mut self, v: std::option::Option<T>) -> Self
3228    where
3229        T: std::convert::Into<i64>,
3230    {
3231        self.major_revision_id = v.map(|x| x.into());
3232        self
3233    }
3234}
3235
3236impl wkt::message::Message for FrameworkReference {
3237    fn typename() -> &'static str {
3238        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkReference"
3239    }
3240}
3241
3242/// Parameters are key-value pairs that let you provide your custom location
3243/// requirements, environment requirements, or other settings that are
3244/// relevant to the cloud control.
3245#[derive(Clone, Default, PartialEq)]
3246#[non_exhaustive]
3247pub struct Parameter {
3248    /// Required. The name or key of the parameter.
3249    pub name: std::string::String,
3250
3251    /// Required. The value of the parameter.
3252    pub parameter_value: std::option::Option<std::boxed::Box<crate::model::ParamValue>>,
3253
3254    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3255}
3256
3257impl Parameter {
3258    /// Creates a new default instance.
3259    pub fn new() -> Self {
3260        std::default::Default::default()
3261    }
3262
3263    /// Sets the value of [name][crate::model::Parameter::name].
3264    ///
3265    /// # Example
3266    /// ```ignore,no_run
3267    /// # use google_cloud_cloudsecuritycompliance_v1::model::Parameter;
3268    /// let x = Parameter::new().set_name("example");
3269    /// ```
3270    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3271        self.name = v.into();
3272        self
3273    }
3274
3275    /// Sets the value of [parameter_value][crate::model::Parameter::parameter_value].
3276    ///
3277    /// # Example
3278    /// ```ignore,no_run
3279    /// # use google_cloud_cloudsecuritycompliance_v1::model::Parameter;
3280    /// use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
3281    /// let x = Parameter::new().set_parameter_value(ParamValue::default()/* use setters */);
3282    /// ```
3283    pub fn set_parameter_value<T>(mut self, v: T) -> Self
3284    where
3285        T: std::convert::Into<crate::model::ParamValue>,
3286    {
3287        self.parameter_value = std::option::Option::Some(std::boxed::Box::new(v.into()));
3288        self
3289    }
3290
3291    /// Sets or clears the value of [parameter_value][crate::model::Parameter::parameter_value].
3292    ///
3293    /// # Example
3294    /// ```ignore,no_run
3295    /// # use google_cloud_cloudsecuritycompliance_v1::model::Parameter;
3296    /// use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
3297    /// let x = Parameter::new().set_or_clear_parameter_value(Some(ParamValue::default()/* use setters */));
3298    /// let x = Parameter::new().set_or_clear_parameter_value(None::<ParamValue>);
3299    /// ```
3300    pub fn set_or_clear_parameter_value<T>(mut self, v: std::option::Option<T>) -> Self
3301    where
3302        T: std::convert::Into<crate::model::ParamValue>,
3303    {
3304        self.parameter_value = v.map(|x| std::boxed::Box::new(x.into()));
3305        self
3306    }
3307}
3308
3309impl wkt::message::Message for Parameter {
3310    fn typename() -> &'static str {
3311        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.Parameter"
3312    }
3313}
3314
3315/// A cloud control is a set of rules and associated metadata that you can
3316/// use to define your organization's security or compliance intent.
3317#[derive(Clone, Default, PartialEq)]
3318#[non_exhaustive]
3319pub struct CloudControl {
3320    /// Required. Identifier. The name of the cloud control, in either of the
3321    /// formats:
3322    /// `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}`
3323    /// or
3324    /// `projects/{project}/locations/{location}/cloudControls/{cloud_control}`.
3325    ///
3326    /// The only supported location is `global`.
3327    pub name: std::string::String,
3328
3329    /// Output only. The major version of the cloud control, which is incremented
3330    /// in ascending order.
3331    pub major_revision_id: i64,
3332
3333    /// Optional. A description of the cloud control. The maximum length is 2000
3334    /// characters.
3335    pub description: std::string::String,
3336
3337    /// Optional. The friendly name of the cloud control. The maximum length is 200
3338    /// characters.
3339    pub display_name: std::string::String,
3340
3341    /// Output only. The supported enforcement modes for the cloud control.
3342    pub supported_enforcement_modes: std::vec::Vec<crate::model::EnforcementMode>,
3343
3344    /// Optional. The parameter specifications for the cloud control.
3345    pub parameter_spec: std::vec::Vec<crate::model::ParameterSpec>,
3346
3347    /// Optional. The rules that you can enforce to meet your security or
3348    /// compliance intent.
3349    pub rules: std::vec::Vec<crate::model::Rule>,
3350
3351    /// Optional. The severity of the findings that are generated by the cloud
3352    /// control.
3353    pub severity: crate::model::Severity,
3354
3355    /// Optional. The finding category for the cloud control findings. The maximum
3356    /// length is 255 characters.
3357    pub finding_category: std::string::String,
3358
3359    /// Optional. The supported cloud providers.
3360    pub supported_cloud_providers: std::vec::Vec<crate::model::CloudProvider>,
3361
3362    /// Output only. The frameworks that include this cloud control.
3363    pub related_frameworks: std::vec::Vec<std::string::String>,
3364
3365    /// Optional. The remediation steps for the cloud control findings. The
3366    /// maximum length is 400 characters.
3367    pub remediation_steps: std::string::String,
3368
3369    /// Optional. The categories for the cloud control.
3370    pub categories: std::vec::Vec<crate::model::CloudControlCategory>,
3371
3372    /// Output only. The time that the cloud control was last updated.
3373    /// `create_time` is used because a new cloud control is created
3374    /// whenever an existing cloud control is updated.
3375    pub create_time: std::option::Option<wkt::Timestamp>,
3376
3377    /// Optional. The target resource types that are supported by the cloud
3378    /// control.
3379    pub supported_target_resource_types: std::vec::Vec<crate::model::TargetResourceType>,
3380
3381    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3382}
3383
3384impl CloudControl {
3385    /// Creates a new default instance.
3386    pub fn new() -> Self {
3387        std::default::Default::default()
3388    }
3389
3390    /// Sets the value of [name][crate::model::CloudControl::name].
3391    ///
3392    /// # Example
3393    /// ```ignore,no_run
3394    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3395    /// let x = CloudControl::new().set_name("example");
3396    /// ```
3397    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3398        self.name = v.into();
3399        self
3400    }
3401
3402    /// Sets the value of [major_revision_id][crate::model::CloudControl::major_revision_id].
3403    ///
3404    /// # Example
3405    /// ```ignore,no_run
3406    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3407    /// let x = CloudControl::new().set_major_revision_id(42);
3408    /// ```
3409    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3410        self.major_revision_id = v.into();
3411        self
3412    }
3413
3414    /// Sets the value of [description][crate::model::CloudControl::description].
3415    ///
3416    /// # Example
3417    /// ```ignore,no_run
3418    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3419    /// let x = CloudControl::new().set_description("example");
3420    /// ```
3421    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3422        self.description = v.into();
3423        self
3424    }
3425
3426    /// Sets the value of [display_name][crate::model::CloudControl::display_name].
3427    ///
3428    /// # Example
3429    /// ```ignore,no_run
3430    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3431    /// let x = CloudControl::new().set_display_name("example");
3432    /// ```
3433    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3434        self.display_name = v.into();
3435        self
3436    }
3437
3438    /// Sets the value of [supported_enforcement_modes][crate::model::CloudControl::supported_enforcement_modes].
3439    ///
3440    /// # Example
3441    /// ```ignore,no_run
3442    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3443    /// use google_cloud_cloudsecuritycompliance_v1::model::EnforcementMode;
3444    /// let x = CloudControl::new().set_supported_enforcement_modes([
3445    ///     EnforcementMode::Preventive,
3446    ///     EnforcementMode::Detective,
3447    ///     EnforcementMode::Audit,
3448    /// ]);
3449    /// ```
3450    pub fn set_supported_enforcement_modes<T, V>(mut self, v: T) -> Self
3451    where
3452        T: std::iter::IntoIterator<Item = V>,
3453        V: std::convert::Into<crate::model::EnforcementMode>,
3454    {
3455        use std::iter::Iterator;
3456        self.supported_enforcement_modes = v.into_iter().map(|i| i.into()).collect();
3457        self
3458    }
3459
3460    /// Sets the value of [parameter_spec][crate::model::CloudControl::parameter_spec].
3461    ///
3462    /// # Example
3463    /// ```ignore,no_run
3464    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3465    /// use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3466    /// let x = CloudControl::new()
3467    ///     .set_parameter_spec([
3468    ///         ParameterSpec::default()/* use setters */,
3469    ///         ParameterSpec::default()/* use (different) setters */,
3470    ///     ]);
3471    /// ```
3472    pub fn set_parameter_spec<T, V>(mut self, v: T) -> Self
3473    where
3474        T: std::iter::IntoIterator<Item = V>,
3475        V: std::convert::Into<crate::model::ParameterSpec>,
3476    {
3477        use std::iter::Iterator;
3478        self.parameter_spec = v.into_iter().map(|i| i.into()).collect();
3479        self
3480    }
3481
3482    /// Sets the value of [rules][crate::model::CloudControl::rules].
3483    ///
3484    /// # Example
3485    /// ```ignore,no_run
3486    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3487    /// use google_cloud_cloudsecuritycompliance_v1::model::Rule;
3488    /// let x = CloudControl::new()
3489    ///     .set_rules([
3490    ///         Rule::default()/* use setters */,
3491    ///         Rule::default()/* use (different) setters */,
3492    ///     ]);
3493    /// ```
3494    pub fn set_rules<T, V>(mut self, v: T) -> Self
3495    where
3496        T: std::iter::IntoIterator<Item = V>,
3497        V: std::convert::Into<crate::model::Rule>,
3498    {
3499        use std::iter::Iterator;
3500        self.rules = v.into_iter().map(|i| i.into()).collect();
3501        self
3502    }
3503
3504    /// Sets the value of [severity][crate::model::CloudControl::severity].
3505    ///
3506    /// # Example
3507    /// ```ignore,no_run
3508    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3509    /// use google_cloud_cloudsecuritycompliance_v1::model::Severity;
3510    /// let x0 = CloudControl::new().set_severity(Severity::Critical);
3511    /// let x1 = CloudControl::new().set_severity(Severity::High);
3512    /// let x2 = CloudControl::new().set_severity(Severity::Medium);
3513    /// ```
3514    pub fn set_severity<T: std::convert::Into<crate::model::Severity>>(mut self, v: T) -> Self {
3515        self.severity = v.into();
3516        self
3517    }
3518
3519    /// Sets the value of [finding_category][crate::model::CloudControl::finding_category].
3520    ///
3521    /// # Example
3522    /// ```ignore,no_run
3523    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3524    /// let x = CloudControl::new().set_finding_category("example");
3525    /// ```
3526    pub fn set_finding_category<T: std::convert::Into<std::string::String>>(
3527        mut self,
3528        v: T,
3529    ) -> Self {
3530        self.finding_category = v.into();
3531        self
3532    }
3533
3534    /// Sets the value of [supported_cloud_providers][crate::model::CloudControl::supported_cloud_providers].
3535    ///
3536    /// # Example
3537    /// ```ignore,no_run
3538    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3539    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudProvider;
3540    /// let x = CloudControl::new().set_supported_cloud_providers([
3541    ///     CloudProvider::Aws,
3542    ///     CloudProvider::Azure,
3543    ///     CloudProvider::Gcp,
3544    /// ]);
3545    /// ```
3546    pub fn set_supported_cloud_providers<T, V>(mut self, v: T) -> Self
3547    where
3548        T: std::iter::IntoIterator<Item = V>,
3549        V: std::convert::Into<crate::model::CloudProvider>,
3550    {
3551        use std::iter::Iterator;
3552        self.supported_cloud_providers = v.into_iter().map(|i| i.into()).collect();
3553        self
3554    }
3555
3556    /// Sets the value of [related_frameworks][crate::model::CloudControl::related_frameworks].
3557    ///
3558    /// # Example
3559    /// ```ignore,no_run
3560    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3561    /// let x = CloudControl::new().set_related_frameworks(["a", "b", "c"]);
3562    /// ```
3563    pub fn set_related_frameworks<T, V>(mut self, v: T) -> Self
3564    where
3565        T: std::iter::IntoIterator<Item = V>,
3566        V: std::convert::Into<std::string::String>,
3567    {
3568        use std::iter::Iterator;
3569        self.related_frameworks = v.into_iter().map(|i| i.into()).collect();
3570        self
3571    }
3572
3573    /// Sets the value of [remediation_steps][crate::model::CloudControl::remediation_steps].
3574    ///
3575    /// # Example
3576    /// ```ignore,no_run
3577    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3578    /// let x = CloudControl::new().set_remediation_steps("example");
3579    /// ```
3580    pub fn set_remediation_steps<T: std::convert::Into<std::string::String>>(
3581        mut self,
3582        v: T,
3583    ) -> Self {
3584        self.remediation_steps = v.into();
3585        self
3586    }
3587
3588    /// Sets the value of [categories][crate::model::CloudControl::categories].
3589    ///
3590    /// # Example
3591    /// ```ignore,no_run
3592    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3593    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlCategory;
3594    /// let x = CloudControl::new().set_categories([
3595    ///     CloudControlCategory::CcCategoryInfrastructure,
3596    ///     CloudControlCategory::CcCategoryArtificialIntelligence,
3597    ///     CloudControlCategory::CcCategoryPhysicalSecurity,
3598    /// ]);
3599    /// ```
3600    pub fn set_categories<T, V>(mut self, v: T) -> Self
3601    where
3602        T: std::iter::IntoIterator<Item = V>,
3603        V: std::convert::Into<crate::model::CloudControlCategory>,
3604    {
3605        use std::iter::Iterator;
3606        self.categories = v.into_iter().map(|i| i.into()).collect();
3607        self
3608    }
3609
3610    /// Sets the value of [create_time][crate::model::CloudControl::create_time].
3611    ///
3612    /// # Example
3613    /// ```ignore,no_run
3614    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3615    /// use wkt::Timestamp;
3616    /// let x = CloudControl::new().set_create_time(Timestamp::default()/* use setters */);
3617    /// ```
3618    pub fn set_create_time<T>(mut self, v: T) -> Self
3619    where
3620        T: std::convert::Into<wkt::Timestamp>,
3621    {
3622        self.create_time = std::option::Option::Some(v.into());
3623        self
3624    }
3625
3626    /// Sets or clears the value of [create_time][crate::model::CloudControl::create_time].
3627    ///
3628    /// # Example
3629    /// ```ignore,no_run
3630    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3631    /// use wkt::Timestamp;
3632    /// let x = CloudControl::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
3633    /// let x = CloudControl::new().set_or_clear_create_time(None::<Timestamp>);
3634    /// ```
3635    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3636    where
3637        T: std::convert::Into<wkt::Timestamp>,
3638    {
3639        self.create_time = v.map(|x| x.into());
3640        self
3641    }
3642
3643    /// Sets the value of [supported_target_resource_types][crate::model::CloudControl::supported_target_resource_types].
3644    ///
3645    /// # Example
3646    /// ```ignore,no_run
3647    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
3648    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceType;
3649    /// let x = CloudControl::new().set_supported_target_resource_types([
3650    ///     TargetResourceType::TargetResourceCrmTypeOrg,
3651    ///     TargetResourceType::TargetResourceCrmTypeFolder,
3652    ///     TargetResourceType::TargetResourceCrmTypeProject,
3653    /// ]);
3654    /// ```
3655    pub fn set_supported_target_resource_types<T, V>(mut self, v: T) -> Self
3656    where
3657        T: std::iter::IntoIterator<Item = V>,
3658        V: std::convert::Into<crate::model::TargetResourceType>,
3659    {
3660        use std::iter::Iterator;
3661        self.supported_target_resource_types = v.into_iter().map(|i| i.into()).collect();
3662        self
3663    }
3664}
3665
3666impl wkt::message::Message for CloudControl {
3667    fn typename() -> &'static str {
3668        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControl"
3669    }
3670}
3671
3672/// Defines additional types related to [CloudControl].
3673pub mod cloud_control {
3674    #[allow(unused_imports)]
3675    use super::*;
3676
3677    /// The type of cloud control.
3678    ///
3679    /// # Working with unknown values
3680    ///
3681    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3682    /// additional enum variants at any time. Adding new variants is not considered
3683    /// a breaking change. Applications should write their code in anticipation of:
3684    ///
3685    /// - New values appearing in future releases of the client library, **and**
3686    /// - New values received dynamically, without application changes.
3687    ///
3688    /// Please consult the [Working with enums] section in the user guide for some
3689    /// guidelines.
3690    ///
3691    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
3692    #[derive(Clone, Debug, PartialEq)]
3693    #[non_exhaustive]
3694    pub enum Type {
3695        /// Default value. This value is unused.
3696        Unspecified,
3697        /// A cloud control that's created and managed by you.
3698        Custom,
3699        /// A cloud control that's provided and managed by Google.
3700        BuiltIn,
3701        /// If set, the enum was initialized with an unknown value.
3702        ///
3703        /// Applications can examine the value using [Type::value] or
3704        /// [Type::name].
3705        UnknownValue(r#type::UnknownValue),
3706    }
3707
3708    #[doc(hidden)]
3709    pub mod r#type {
3710        #[allow(unused_imports)]
3711        use super::*;
3712        #[derive(Clone, Debug, PartialEq)]
3713        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3714    }
3715
3716    impl Type {
3717        /// Gets the enum value.
3718        ///
3719        /// Returns `None` if the enum contains an unknown value deserialized from
3720        /// the string representation of enums.
3721        pub fn value(&self) -> std::option::Option<i32> {
3722            match self {
3723                Self::Unspecified => std::option::Option::Some(0),
3724                Self::Custom => std::option::Option::Some(1),
3725                Self::BuiltIn => std::option::Option::Some(2),
3726                Self::UnknownValue(u) => u.0.value(),
3727            }
3728        }
3729
3730        /// Gets the enum value as a string.
3731        ///
3732        /// Returns `None` if the enum contains an unknown value deserialized from
3733        /// the integer representation of enums.
3734        pub fn name(&self) -> std::option::Option<&str> {
3735            match self {
3736                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
3737                Self::Custom => std::option::Option::Some("CUSTOM"),
3738                Self::BuiltIn => std::option::Option::Some("BUILT_IN"),
3739                Self::UnknownValue(u) => u.0.name(),
3740            }
3741        }
3742    }
3743
3744    impl std::default::Default for Type {
3745        fn default() -> Self {
3746            use std::convert::From;
3747            Self::from(0)
3748        }
3749    }
3750
3751    impl std::fmt::Display for Type {
3752        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3753            wkt::internal::display_enum(f, self.name(), self.value())
3754        }
3755    }
3756
3757    impl std::convert::From<i32> for Type {
3758        fn from(value: i32) -> Self {
3759            match value {
3760                0 => Self::Unspecified,
3761                1 => Self::Custom,
3762                2 => Self::BuiltIn,
3763                _ => Self::UnknownValue(r#type::UnknownValue(
3764                    wkt::internal::UnknownEnumValue::Integer(value),
3765                )),
3766            }
3767        }
3768    }
3769
3770    impl std::convert::From<&str> for Type {
3771        fn from(value: &str) -> Self {
3772            use std::string::ToString;
3773            match value {
3774                "TYPE_UNSPECIFIED" => Self::Unspecified,
3775                "CUSTOM" => Self::Custom,
3776                "BUILT_IN" => Self::BuiltIn,
3777                _ => Self::UnknownValue(r#type::UnknownValue(
3778                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3779                )),
3780            }
3781        }
3782    }
3783
3784    impl serde::ser::Serialize for Type {
3785        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3786        where
3787            S: serde::Serializer,
3788        {
3789            match self {
3790                Self::Unspecified => serializer.serialize_i32(0),
3791                Self::Custom => serializer.serialize_i32(1),
3792                Self::BuiltIn => serializer.serialize_i32(2),
3793                Self::UnknownValue(u) => u.0.serialize(serializer),
3794            }
3795        }
3796    }
3797
3798    impl<'de> serde::de::Deserialize<'de> for Type {
3799        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3800        where
3801            D: serde::Deserializer<'de>,
3802        {
3803            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
3804                ".google.cloud.cloudsecuritycompliance.v1.CloudControl.Type",
3805            ))
3806        }
3807    }
3808}
3809
3810/// The parameter specification for the cloud control.
3811#[derive(Clone, Default, PartialEq)]
3812#[non_exhaustive]
3813pub struct ParameterSpec {
3814    /// Required. The name of the parameter.
3815    pub name: std::string::String,
3816
3817    /// Optional. The friendly name of the parameter. The maximum length is 200
3818    /// characters.
3819    pub display_name: std::string::String,
3820
3821    /// Optional. The description of the parameter. The maximum length is 2000
3822    /// characters.
3823    pub description: std::string::String,
3824
3825    /// Required. Whether the parameter is required.
3826    pub is_required: bool,
3827
3828    /// Required. The parameter value type.
3829    pub value_type: crate::model::parameter_spec::ValueType,
3830
3831    /// Optional. The default value of the parameter.
3832    pub default_value: std::option::Option<crate::model::ParamValue>,
3833
3834    /// Optional. The list of parameter substitutions.
3835    pub substitution_rules: std::vec::Vec<crate::model::ParameterSubstitutionRule>,
3836
3837    /// Optional. The parameter specification for `oneOf` attributes.
3838    pub sub_parameters: std::vec::Vec<crate::model::ParameterSpec>,
3839
3840    /// Optional. The permitted set of values for the parameter.
3841    pub validation: std::option::Option<crate::model::Validation>,
3842
3843    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3844}
3845
3846impl ParameterSpec {
3847    /// Creates a new default instance.
3848    pub fn new() -> Self {
3849        std::default::Default::default()
3850    }
3851
3852    /// Sets the value of [name][crate::model::ParameterSpec::name].
3853    ///
3854    /// # Example
3855    /// ```ignore,no_run
3856    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3857    /// let x = ParameterSpec::new().set_name("example");
3858    /// ```
3859    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3860        self.name = v.into();
3861        self
3862    }
3863
3864    /// Sets the value of [display_name][crate::model::ParameterSpec::display_name].
3865    ///
3866    /// # Example
3867    /// ```ignore,no_run
3868    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3869    /// let x = ParameterSpec::new().set_display_name("example");
3870    /// ```
3871    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3872        self.display_name = v.into();
3873        self
3874    }
3875
3876    /// Sets the value of [description][crate::model::ParameterSpec::description].
3877    ///
3878    /// # Example
3879    /// ```ignore,no_run
3880    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3881    /// let x = ParameterSpec::new().set_description("example");
3882    /// ```
3883    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3884        self.description = v.into();
3885        self
3886    }
3887
3888    /// Sets the value of [is_required][crate::model::ParameterSpec::is_required].
3889    ///
3890    /// # Example
3891    /// ```ignore,no_run
3892    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3893    /// let x = ParameterSpec::new().set_is_required(true);
3894    /// ```
3895    pub fn set_is_required<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3896        self.is_required = v.into();
3897        self
3898    }
3899
3900    /// Sets the value of [value_type][crate::model::ParameterSpec::value_type].
3901    ///
3902    /// # Example
3903    /// ```ignore,no_run
3904    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3905    /// use google_cloud_cloudsecuritycompliance_v1::model::parameter_spec::ValueType;
3906    /// let x0 = ParameterSpec::new().set_value_type(ValueType::String);
3907    /// let x1 = ParameterSpec::new().set_value_type(ValueType::Boolean);
3908    /// let x2 = ParameterSpec::new().set_value_type(ValueType::Stringlist);
3909    /// ```
3910    pub fn set_value_type<T: std::convert::Into<crate::model::parameter_spec::ValueType>>(
3911        mut self,
3912        v: T,
3913    ) -> Self {
3914        self.value_type = v.into();
3915        self
3916    }
3917
3918    /// Sets the value of [default_value][crate::model::ParameterSpec::default_value].
3919    ///
3920    /// # Example
3921    /// ```ignore,no_run
3922    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3923    /// use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
3924    /// let x = ParameterSpec::new().set_default_value(ParamValue::default()/* use setters */);
3925    /// ```
3926    pub fn set_default_value<T>(mut self, v: T) -> Self
3927    where
3928        T: std::convert::Into<crate::model::ParamValue>,
3929    {
3930        self.default_value = std::option::Option::Some(v.into());
3931        self
3932    }
3933
3934    /// Sets or clears the value of [default_value][crate::model::ParameterSpec::default_value].
3935    ///
3936    /// # Example
3937    /// ```ignore,no_run
3938    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3939    /// use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
3940    /// let x = ParameterSpec::new().set_or_clear_default_value(Some(ParamValue::default()/* use setters */));
3941    /// let x = ParameterSpec::new().set_or_clear_default_value(None::<ParamValue>);
3942    /// ```
3943    pub fn set_or_clear_default_value<T>(mut self, v: std::option::Option<T>) -> Self
3944    where
3945        T: std::convert::Into<crate::model::ParamValue>,
3946    {
3947        self.default_value = v.map(|x| x.into());
3948        self
3949    }
3950
3951    /// Sets the value of [substitution_rules][crate::model::ParameterSpec::substitution_rules].
3952    ///
3953    /// # Example
3954    /// ```ignore,no_run
3955    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3956    /// use google_cloud_cloudsecuritycompliance_v1::model::ParameterSubstitutionRule;
3957    /// let x = ParameterSpec::new()
3958    ///     .set_substitution_rules([
3959    ///         ParameterSubstitutionRule::default()/* use setters */,
3960    ///         ParameterSubstitutionRule::default()/* use (different) setters */,
3961    ///     ]);
3962    /// ```
3963    pub fn set_substitution_rules<T, V>(mut self, v: T) -> Self
3964    where
3965        T: std::iter::IntoIterator<Item = V>,
3966        V: std::convert::Into<crate::model::ParameterSubstitutionRule>,
3967    {
3968        use std::iter::Iterator;
3969        self.substitution_rules = v.into_iter().map(|i| i.into()).collect();
3970        self
3971    }
3972
3973    /// Sets the value of [sub_parameters][crate::model::ParameterSpec::sub_parameters].
3974    ///
3975    /// # Example
3976    /// ```ignore,no_run
3977    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3978    /// let x = ParameterSpec::new()
3979    ///     .set_sub_parameters([
3980    ///         ParameterSpec::default()/* use setters */,
3981    ///         ParameterSpec::default()/* use (different) setters */,
3982    ///     ]);
3983    /// ```
3984    pub fn set_sub_parameters<T, V>(mut self, v: T) -> Self
3985    where
3986        T: std::iter::IntoIterator<Item = V>,
3987        V: std::convert::Into<crate::model::ParameterSpec>,
3988    {
3989        use std::iter::Iterator;
3990        self.sub_parameters = v.into_iter().map(|i| i.into()).collect();
3991        self
3992    }
3993
3994    /// Sets the value of [validation][crate::model::ParameterSpec::validation].
3995    ///
3996    /// # Example
3997    /// ```ignore,no_run
3998    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
3999    /// use google_cloud_cloudsecuritycompliance_v1::model::Validation;
4000    /// let x = ParameterSpec::new().set_validation(Validation::default()/* use setters */);
4001    /// ```
4002    pub fn set_validation<T>(mut self, v: T) -> Self
4003    where
4004        T: std::convert::Into<crate::model::Validation>,
4005    {
4006        self.validation = std::option::Option::Some(v.into());
4007        self
4008    }
4009
4010    /// Sets or clears the value of [validation][crate::model::ParameterSpec::validation].
4011    ///
4012    /// # Example
4013    /// ```ignore,no_run
4014    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSpec;
4015    /// use google_cloud_cloudsecuritycompliance_v1::model::Validation;
4016    /// let x = ParameterSpec::new().set_or_clear_validation(Some(Validation::default()/* use setters */));
4017    /// let x = ParameterSpec::new().set_or_clear_validation(None::<Validation>);
4018    /// ```
4019    pub fn set_or_clear_validation<T>(mut self, v: std::option::Option<T>) -> Self
4020    where
4021        T: std::convert::Into<crate::model::Validation>,
4022    {
4023        self.validation = v.map(|x| x.into());
4024        self
4025    }
4026}
4027
4028impl wkt::message::Message for ParameterSpec {
4029    fn typename() -> &'static str {
4030        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ParameterSpec"
4031    }
4032}
4033
4034/// Defines additional types related to [ParameterSpec].
4035pub mod parameter_spec {
4036    #[allow(unused_imports)]
4037    use super::*;
4038
4039    /// The type of parameter value.
4040    ///
4041    /// # Working with unknown values
4042    ///
4043    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4044    /// additional enum variants at any time. Adding new variants is not considered
4045    /// a breaking change. Applications should write their code in anticipation of:
4046    ///
4047    /// - New values appearing in future releases of the client library, **and**
4048    /// - New values received dynamically, without application changes.
4049    ///
4050    /// Please consult the [Working with enums] section in the user guide for some
4051    /// guidelines.
4052    ///
4053    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
4054    #[derive(Clone, Debug, PartialEq)]
4055    #[non_exhaustive]
4056    pub enum ValueType {
4057        /// Default value. This value is unused.
4058        Unspecified,
4059        /// A string value.
4060        String,
4061        /// A boolean value.
4062        Boolean,
4063        /// A string list value.
4064        Stringlist,
4065        /// A numeric value.
4066        Number,
4067        /// A oneOf value.
4068        Oneof,
4069        /// If set, the enum was initialized with an unknown value.
4070        ///
4071        /// Applications can examine the value using [ValueType::value] or
4072        /// [ValueType::name].
4073        UnknownValue(value_type::UnknownValue),
4074    }
4075
4076    #[doc(hidden)]
4077    pub mod value_type {
4078        #[allow(unused_imports)]
4079        use super::*;
4080        #[derive(Clone, Debug, PartialEq)]
4081        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4082    }
4083
4084    impl ValueType {
4085        /// Gets the enum value.
4086        ///
4087        /// Returns `None` if the enum contains an unknown value deserialized from
4088        /// the string representation of enums.
4089        pub fn value(&self) -> std::option::Option<i32> {
4090            match self {
4091                Self::Unspecified => std::option::Option::Some(0),
4092                Self::String => std::option::Option::Some(3),
4093                Self::Boolean => std::option::Option::Some(4),
4094                Self::Stringlist => std::option::Option::Some(5),
4095                Self::Number => std::option::Option::Some(6),
4096                Self::Oneof => std::option::Option::Some(7),
4097                Self::UnknownValue(u) => u.0.value(),
4098            }
4099        }
4100
4101        /// Gets the enum value as a string.
4102        ///
4103        /// Returns `None` if the enum contains an unknown value deserialized from
4104        /// the integer representation of enums.
4105        pub fn name(&self) -> std::option::Option<&str> {
4106            match self {
4107                Self::Unspecified => std::option::Option::Some("VALUE_TYPE_UNSPECIFIED"),
4108                Self::String => std::option::Option::Some("STRING"),
4109                Self::Boolean => std::option::Option::Some("BOOLEAN"),
4110                Self::Stringlist => std::option::Option::Some("STRINGLIST"),
4111                Self::Number => std::option::Option::Some("NUMBER"),
4112                Self::Oneof => std::option::Option::Some("ONEOF"),
4113                Self::UnknownValue(u) => u.0.name(),
4114            }
4115        }
4116    }
4117
4118    impl std::default::Default for ValueType {
4119        fn default() -> Self {
4120            use std::convert::From;
4121            Self::from(0)
4122        }
4123    }
4124
4125    impl std::fmt::Display for ValueType {
4126        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4127            wkt::internal::display_enum(f, self.name(), self.value())
4128        }
4129    }
4130
4131    impl std::convert::From<i32> for ValueType {
4132        fn from(value: i32) -> Self {
4133            match value {
4134                0 => Self::Unspecified,
4135                3 => Self::String,
4136                4 => Self::Boolean,
4137                5 => Self::Stringlist,
4138                6 => Self::Number,
4139                7 => Self::Oneof,
4140                _ => Self::UnknownValue(value_type::UnknownValue(
4141                    wkt::internal::UnknownEnumValue::Integer(value),
4142                )),
4143            }
4144        }
4145    }
4146
4147    impl std::convert::From<&str> for ValueType {
4148        fn from(value: &str) -> Self {
4149            use std::string::ToString;
4150            match value {
4151                "VALUE_TYPE_UNSPECIFIED" => Self::Unspecified,
4152                "STRING" => Self::String,
4153                "BOOLEAN" => Self::Boolean,
4154                "STRINGLIST" => Self::Stringlist,
4155                "NUMBER" => Self::Number,
4156                "ONEOF" => Self::Oneof,
4157                _ => Self::UnknownValue(value_type::UnknownValue(
4158                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4159                )),
4160            }
4161        }
4162    }
4163
4164    impl serde::ser::Serialize for ValueType {
4165        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4166        where
4167            S: serde::Serializer,
4168        {
4169            match self {
4170                Self::Unspecified => serializer.serialize_i32(0),
4171                Self::String => serializer.serialize_i32(3),
4172                Self::Boolean => serializer.serialize_i32(4),
4173                Self::Stringlist => serializer.serialize_i32(5),
4174                Self::Number => serializer.serialize_i32(6),
4175                Self::Oneof => serializer.serialize_i32(7),
4176                Self::UnknownValue(u) => u.0.serialize(serializer),
4177            }
4178        }
4179    }
4180
4181    impl<'de> serde::de::Deserialize<'de> for ValueType {
4182        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4183        where
4184            D: serde::Deserializer<'de>,
4185        {
4186            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ValueType>::new(
4187                ".google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType",
4188            ))
4189        }
4190    }
4191}
4192
4193/// The validation of the parameter.
4194#[derive(Clone, Default, PartialEq)]
4195#[non_exhaustive]
4196pub struct Validation {
4197    /// Defines validators for parameter values.
4198    pub constraint: std::option::Option<crate::model::validation::Constraint>,
4199
4200    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4201}
4202
4203impl Validation {
4204    /// Creates a new default instance.
4205    pub fn new() -> Self {
4206        std::default::Default::default()
4207    }
4208
4209    /// Sets the value of [constraint][crate::model::Validation::constraint].
4210    ///
4211    /// Note that all the setters affecting `constraint` are mutually
4212    /// exclusive.
4213    ///
4214    /// # Example
4215    /// ```ignore,no_run
4216    /// # use google_cloud_cloudsecuritycompliance_v1::model::Validation;
4217    /// use google_cloud_cloudsecuritycompliance_v1::model::AllowedValues;
4218    /// let x = Validation::new().set_constraint(Some(
4219    ///     google_cloud_cloudsecuritycompliance_v1::model::validation::Constraint::AllowedValues(AllowedValues::default().into())));
4220    /// ```
4221    pub fn set_constraint<
4222        T: std::convert::Into<std::option::Option<crate::model::validation::Constraint>>,
4223    >(
4224        mut self,
4225        v: T,
4226    ) -> Self {
4227        self.constraint = v.into();
4228        self
4229    }
4230
4231    /// The value of [constraint][crate::model::Validation::constraint]
4232    /// if it holds a `AllowedValues`, `None` if the field is not set or
4233    /// holds a different branch.
4234    pub fn allowed_values(
4235        &self,
4236    ) -> std::option::Option<&std::boxed::Box<crate::model::AllowedValues>> {
4237        #[allow(unreachable_patterns)]
4238        self.constraint.as_ref().and_then(|v| match v {
4239            crate::model::validation::Constraint::AllowedValues(v) => std::option::Option::Some(v),
4240            _ => std::option::Option::None,
4241        })
4242    }
4243
4244    /// Sets the value of [constraint][crate::model::Validation::constraint]
4245    /// to hold a `AllowedValues`.
4246    ///
4247    /// Note that all the setters affecting `constraint` are
4248    /// mutually exclusive.
4249    ///
4250    /// # Example
4251    /// ```ignore,no_run
4252    /// # use google_cloud_cloudsecuritycompliance_v1::model::Validation;
4253    /// use google_cloud_cloudsecuritycompliance_v1::model::AllowedValues;
4254    /// let x = Validation::new().set_allowed_values(AllowedValues::default()/* use setters */);
4255    /// assert!(x.allowed_values().is_some());
4256    /// assert!(x.int_range().is_none());
4257    /// assert!(x.regexp_pattern().is_none());
4258    /// ```
4259    pub fn set_allowed_values<
4260        T: std::convert::Into<std::boxed::Box<crate::model::AllowedValues>>,
4261    >(
4262        mut self,
4263        v: T,
4264    ) -> Self {
4265        self.constraint = std::option::Option::Some(
4266            crate::model::validation::Constraint::AllowedValues(v.into()),
4267        );
4268        self
4269    }
4270
4271    /// The value of [constraint][crate::model::Validation::constraint]
4272    /// if it holds a `IntRange`, `None` if the field is not set or
4273    /// holds a different branch.
4274    pub fn int_range(&self) -> std::option::Option<&std::boxed::Box<crate::model::IntRange>> {
4275        #[allow(unreachable_patterns)]
4276        self.constraint.as_ref().and_then(|v| match v {
4277            crate::model::validation::Constraint::IntRange(v) => std::option::Option::Some(v),
4278            _ => std::option::Option::None,
4279        })
4280    }
4281
4282    /// Sets the value of [constraint][crate::model::Validation::constraint]
4283    /// to hold a `IntRange`.
4284    ///
4285    /// Note that all the setters affecting `constraint` are
4286    /// mutually exclusive.
4287    ///
4288    /// # Example
4289    /// ```ignore,no_run
4290    /// # use google_cloud_cloudsecuritycompliance_v1::model::Validation;
4291    /// use google_cloud_cloudsecuritycompliance_v1::model::IntRange;
4292    /// let x = Validation::new().set_int_range(IntRange::default()/* use setters */);
4293    /// assert!(x.int_range().is_some());
4294    /// assert!(x.allowed_values().is_none());
4295    /// assert!(x.regexp_pattern().is_none());
4296    /// ```
4297    pub fn set_int_range<T: std::convert::Into<std::boxed::Box<crate::model::IntRange>>>(
4298        mut self,
4299        v: T,
4300    ) -> Self {
4301        self.constraint =
4302            std::option::Option::Some(crate::model::validation::Constraint::IntRange(v.into()));
4303        self
4304    }
4305
4306    /// The value of [constraint][crate::model::Validation::constraint]
4307    /// if it holds a `RegexpPattern`, `None` if the field is not set or
4308    /// holds a different branch.
4309    pub fn regexp_pattern(
4310        &self,
4311    ) -> std::option::Option<&std::boxed::Box<crate::model::RegexpPattern>> {
4312        #[allow(unreachable_patterns)]
4313        self.constraint.as_ref().and_then(|v| match v {
4314            crate::model::validation::Constraint::RegexpPattern(v) => std::option::Option::Some(v),
4315            _ => std::option::Option::None,
4316        })
4317    }
4318
4319    /// Sets the value of [constraint][crate::model::Validation::constraint]
4320    /// to hold a `RegexpPattern`.
4321    ///
4322    /// Note that all the setters affecting `constraint` are
4323    /// mutually exclusive.
4324    ///
4325    /// # Example
4326    /// ```ignore,no_run
4327    /// # use google_cloud_cloudsecuritycompliance_v1::model::Validation;
4328    /// use google_cloud_cloudsecuritycompliance_v1::model::RegexpPattern;
4329    /// let x = Validation::new().set_regexp_pattern(RegexpPattern::default()/* use setters */);
4330    /// assert!(x.regexp_pattern().is_some());
4331    /// assert!(x.allowed_values().is_none());
4332    /// assert!(x.int_range().is_none());
4333    /// ```
4334    pub fn set_regexp_pattern<
4335        T: std::convert::Into<std::boxed::Box<crate::model::RegexpPattern>>,
4336    >(
4337        mut self,
4338        v: T,
4339    ) -> Self {
4340        self.constraint = std::option::Option::Some(
4341            crate::model::validation::Constraint::RegexpPattern(v.into()),
4342        );
4343        self
4344    }
4345}
4346
4347impl wkt::message::Message for Validation {
4348    fn typename() -> &'static str {
4349        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.Validation"
4350    }
4351}
4352
4353/// Defines additional types related to [Validation].
4354pub mod validation {
4355    #[allow(unused_imports)]
4356    use super::*;
4357
4358    /// Defines validators for parameter values.
4359    #[derive(Clone, Debug, PartialEq)]
4360    #[non_exhaustive]
4361    pub enum Constraint {
4362        /// The permitted set of values for the parameter.
4363        AllowedValues(std::boxed::Box<crate::model::AllowedValues>),
4364        /// The permitted range for numeric parameters.
4365        IntRange(std::boxed::Box<crate::model::IntRange>),
4366        /// The regular expression for string parameters.
4367        RegexpPattern(std::boxed::Box<crate::model::RegexpPattern>),
4368    }
4369}
4370
4371/// The allowed set of values for the parameter.
4372#[derive(Clone, Default, PartialEq)]
4373#[non_exhaustive]
4374pub struct AllowedValues {
4375    /// Required. The list of allowed values for the parameter.
4376    pub values: std::vec::Vec<crate::model::ParamValue>,
4377
4378    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4379}
4380
4381impl AllowedValues {
4382    /// Creates a new default instance.
4383    pub fn new() -> Self {
4384        std::default::Default::default()
4385    }
4386
4387    /// Sets the value of [values][crate::model::AllowedValues::values].
4388    ///
4389    /// # Example
4390    /// ```ignore,no_run
4391    /// # use google_cloud_cloudsecuritycompliance_v1::model::AllowedValues;
4392    /// use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4393    /// let x = AllowedValues::new()
4394    ///     .set_values([
4395    ///         ParamValue::default()/* use setters */,
4396    ///         ParamValue::default()/* use (different) setters */,
4397    ///     ]);
4398    /// ```
4399    pub fn set_values<T, V>(mut self, v: T) -> Self
4400    where
4401        T: std::iter::IntoIterator<Item = V>,
4402        V: std::convert::Into<crate::model::ParamValue>,
4403    {
4404        use std::iter::Iterator;
4405        self.values = v.into_iter().map(|i| i.into()).collect();
4406        self
4407    }
4408}
4409
4410impl wkt::message::Message for AllowedValues {
4411    fn typename() -> &'static str {
4412        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AllowedValues"
4413    }
4414}
4415
4416/// The regular expression (regex) validator for parameter values.
4417#[derive(Clone, Default, PartialEq)]
4418#[non_exhaustive]
4419pub struct RegexpPattern {
4420    /// Required. The regex pattern to match the values of the parameter with.
4421    pub pattern: std::string::String,
4422
4423    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4424}
4425
4426impl RegexpPattern {
4427    /// Creates a new default instance.
4428    pub fn new() -> Self {
4429        std::default::Default::default()
4430    }
4431
4432    /// Sets the value of [pattern][crate::model::RegexpPattern::pattern].
4433    ///
4434    /// # Example
4435    /// ```ignore,no_run
4436    /// # use google_cloud_cloudsecuritycompliance_v1::model::RegexpPattern;
4437    /// let x = RegexpPattern::new().set_pattern("example");
4438    /// ```
4439    pub fn set_pattern<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4440        self.pattern = v.into();
4441        self
4442    }
4443}
4444
4445impl wkt::message::Message for RegexpPattern {
4446    fn typename() -> &'static str {
4447        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.RegexpPattern"
4448    }
4449}
4450
4451/// The number range for number parameters.
4452#[derive(Clone, Default, PartialEq)]
4453#[non_exhaustive]
4454pub struct IntRange {
4455    /// Required. The minimum permitted value for the numeric parameter
4456    /// (inclusive).
4457    pub min: i64,
4458
4459    /// Required. The maximum permitted value for the numeric parameter
4460    /// (inclusive).
4461    pub max: i64,
4462
4463    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4464}
4465
4466impl IntRange {
4467    /// Creates a new default instance.
4468    pub fn new() -> Self {
4469        std::default::Default::default()
4470    }
4471
4472    /// Sets the value of [min][crate::model::IntRange::min].
4473    ///
4474    /// # Example
4475    /// ```ignore,no_run
4476    /// # use google_cloud_cloudsecuritycompliance_v1::model::IntRange;
4477    /// let x = IntRange::new().set_min(42);
4478    /// ```
4479    pub fn set_min<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
4480        self.min = v.into();
4481        self
4482    }
4483
4484    /// Sets the value of [max][crate::model::IntRange::max].
4485    ///
4486    /// # Example
4487    /// ```ignore,no_run
4488    /// # use google_cloud_cloudsecuritycompliance_v1::model::IntRange;
4489    /// let x = IntRange::new().set_max(42);
4490    /// ```
4491    pub fn set_max<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
4492        self.max = v.into();
4493        self
4494    }
4495}
4496
4497impl wkt::message::Message for IntRange {
4498    fn typename() -> &'static str {
4499        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.IntRange"
4500    }
4501}
4502
4503/// A list of strings for the parameter value.
4504#[derive(Clone, Default, PartialEq)]
4505#[non_exhaustive]
4506pub struct StringList {
4507    /// Required. The strings in the list.
4508    pub values: std::vec::Vec<std::string::String>,
4509
4510    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4511}
4512
4513impl StringList {
4514    /// Creates a new default instance.
4515    pub fn new() -> Self {
4516        std::default::Default::default()
4517    }
4518
4519    /// Sets the value of [values][crate::model::StringList::values].
4520    ///
4521    /// # Example
4522    /// ```ignore,no_run
4523    /// # use google_cloud_cloudsecuritycompliance_v1::model::StringList;
4524    /// let x = StringList::new().set_values(["a", "b", "c"]);
4525    /// ```
4526    pub fn set_values<T, V>(mut self, v: T) -> Self
4527    where
4528        T: std::iter::IntoIterator<Item = V>,
4529        V: std::convert::Into<std::string::String>,
4530    {
4531        use std::iter::Iterator;
4532        self.values = v.into_iter().map(|i| i.into()).collect();
4533        self
4534    }
4535}
4536
4537impl wkt::message::Message for StringList {
4538    fn typename() -> &'static str {
4539        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.StringList"
4540    }
4541}
4542
4543/// The possible parameter value types.
4544#[derive(Clone, Default, PartialEq)]
4545#[non_exhaustive]
4546pub struct ParamValue {
4547    /// The list of possible parameter value types.
4548    pub kind: std::option::Option<crate::model::param_value::Kind>,
4549
4550    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4551}
4552
4553impl ParamValue {
4554    /// Creates a new default instance.
4555    pub fn new() -> Self {
4556        std::default::Default::default()
4557    }
4558
4559    /// Sets the value of [kind][crate::model::ParamValue::kind].
4560    ///
4561    /// Note that all the setters affecting `kind` are mutually
4562    /// exclusive.
4563    ///
4564    /// # Example
4565    /// ```ignore,no_run
4566    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4567    /// use google_cloud_cloudsecuritycompliance_v1::model::param_value::Kind;
4568    /// let x = ParamValue::new().set_kind(Some(Kind::StringValue("example".to_string())));
4569    /// ```
4570    pub fn set_kind<T: std::convert::Into<std::option::Option<crate::model::param_value::Kind>>>(
4571        mut self,
4572        v: T,
4573    ) -> Self {
4574        self.kind = v.into();
4575        self
4576    }
4577
4578    /// The value of [kind][crate::model::ParamValue::kind]
4579    /// if it holds a `StringValue`, `None` if the field is not set or
4580    /// holds a different branch.
4581    pub fn string_value(&self) -> std::option::Option<&std::string::String> {
4582        #[allow(unreachable_patterns)]
4583        self.kind.as_ref().and_then(|v| match v {
4584            crate::model::param_value::Kind::StringValue(v) => std::option::Option::Some(v),
4585            _ => std::option::Option::None,
4586        })
4587    }
4588
4589    /// Sets the value of [kind][crate::model::ParamValue::kind]
4590    /// to hold a `StringValue`.
4591    ///
4592    /// Note that all the setters affecting `kind` are
4593    /// mutually exclusive.
4594    ///
4595    /// # Example
4596    /// ```ignore,no_run
4597    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4598    /// let x = ParamValue::new().set_string_value("example");
4599    /// assert!(x.string_value().is_some());
4600    /// assert!(x.bool_value().is_none());
4601    /// assert!(x.string_list_value().is_none());
4602    /// assert!(x.number_value().is_none());
4603    /// assert!(x.oneof_value().is_none());
4604    /// ```
4605    pub fn set_string_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4606        self.kind =
4607            std::option::Option::Some(crate::model::param_value::Kind::StringValue(v.into()));
4608        self
4609    }
4610
4611    /// The value of [kind][crate::model::ParamValue::kind]
4612    /// if it holds a `BoolValue`, `None` if the field is not set or
4613    /// holds a different branch.
4614    pub fn bool_value(&self) -> std::option::Option<&bool> {
4615        #[allow(unreachable_patterns)]
4616        self.kind.as_ref().and_then(|v| match v {
4617            crate::model::param_value::Kind::BoolValue(v) => std::option::Option::Some(v),
4618            _ => std::option::Option::None,
4619        })
4620    }
4621
4622    /// Sets the value of [kind][crate::model::ParamValue::kind]
4623    /// to hold a `BoolValue`.
4624    ///
4625    /// Note that all the setters affecting `kind` are
4626    /// mutually exclusive.
4627    ///
4628    /// # Example
4629    /// ```ignore,no_run
4630    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4631    /// let x = ParamValue::new().set_bool_value(true);
4632    /// assert!(x.bool_value().is_some());
4633    /// assert!(x.string_value().is_none());
4634    /// assert!(x.string_list_value().is_none());
4635    /// assert!(x.number_value().is_none());
4636    /// assert!(x.oneof_value().is_none());
4637    /// ```
4638    pub fn set_bool_value<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4639        self.kind = std::option::Option::Some(crate::model::param_value::Kind::BoolValue(v.into()));
4640        self
4641    }
4642
4643    /// The value of [kind][crate::model::ParamValue::kind]
4644    /// if it holds a `StringListValue`, `None` if the field is not set or
4645    /// holds a different branch.
4646    pub fn string_list_value(
4647        &self,
4648    ) -> std::option::Option<&std::boxed::Box<crate::model::StringList>> {
4649        #[allow(unreachable_patterns)]
4650        self.kind.as_ref().and_then(|v| match v {
4651            crate::model::param_value::Kind::StringListValue(v) => std::option::Option::Some(v),
4652            _ => std::option::Option::None,
4653        })
4654    }
4655
4656    /// Sets the value of [kind][crate::model::ParamValue::kind]
4657    /// to hold a `StringListValue`.
4658    ///
4659    /// Note that all the setters affecting `kind` are
4660    /// mutually exclusive.
4661    ///
4662    /// # Example
4663    /// ```ignore,no_run
4664    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4665    /// use google_cloud_cloudsecuritycompliance_v1::model::StringList;
4666    /// let x = ParamValue::new().set_string_list_value(StringList::default()/* use setters */);
4667    /// assert!(x.string_list_value().is_some());
4668    /// assert!(x.string_value().is_none());
4669    /// assert!(x.bool_value().is_none());
4670    /// assert!(x.number_value().is_none());
4671    /// assert!(x.oneof_value().is_none());
4672    /// ```
4673    pub fn set_string_list_value<
4674        T: std::convert::Into<std::boxed::Box<crate::model::StringList>>,
4675    >(
4676        mut self,
4677        v: T,
4678    ) -> Self {
4679        self.kind =
4680            std::option::Option::Some(crate::model::param_value::Kind::StringListValue(v.into()));
4681        self
4682    }
4683
4684    /// The value of [kind][crate::model::ParamValue::kind]
4685    /// if it holds a `NumberValue`, `None` if the field is not set or
4686    /// holds a different branch.
4687    pub fn number_value(&self) -> std::option::Option<&f64> {
4688        #[allow(unreachable_patterns)]
4689        self.kind.as_ref().and_then(|v| match v {
4690            crate::model::param_value::Kind::NumberValue(v) => std::option::Option::Some(v),
4691            _ => std::option::Option::None,
4692        })
4693    }
4694
4695    /// Sets the value of [kind][crate::model::ParamValue::kind]
4696    /// to hold a `NumberValue`.
4697    ///
4698    /// Note that all the setters affecting `kind` are
4699    /// mutually exclusive.
4700    ///
4701    /// # Example
4702    /// ```ignore,no_run
4703    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4704    /// let x = ParamValue::new().set_number_value(42.0);
4705    /// assert!(x.number_value().is_some());
4706    /// assert!(x.string_value().is_none());
4707    /// assert!(x.bool_value().is_none());
4708    /// assert!(x.string_list_value().is_none());
4709    /// assert!(x.oneof_value().is_none());
4710    /// ```
4711    pub fn set_number_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
4712        self.kind =
4713            std::option::Option::Some(crate::model::param_value::Kind::NumberValue(v.into()));
4714        self
4715    }
4716
4717    /// The value of [kind][crate::model::ParamValue::kind]
4718    /// if it holds a `OneofValue`, `None` if the field is not set or
4719    /// holds a different branch.
4720    pub fn oneof_value(&self) -> std::option::Option<&std::boxed::Box<crate::model::Parameter>> {
4721        #[allow(unreachable_patterns)]
4722        self.kind.as_ref().and_then(|v| match v {
4723            crate::model::param_value::Kind::OneofValue(v) => std::option::Option::Some(v),
4724            _ => std::option::Option::None,
4725        })
4726    }
4727
4728    /// Sets the value of [kind][crate::model::ParamValue::kind]
4729    /// to hold a `OneofValue`.
4730    ///
4731    /// Note that all the setters affecting `kind` are
4732    /// mutually exclusive.
4733    ///
4734    /// # Example
4735    /// ```ignore,no_run
4736    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
4737    /// use google_cloud_cloudsecuritycompliance_v1::model::Parameter;
4738    /// let x = ParamValue::new().set_oneof_value(Parameter::default()/* use setters */);
4739    /// assert!(x.oneof_value().is_some());
4740    /// assert!(x.string_value().is_none());
4741    /// assert!(x.bool_value().is_none());
4742    /// assert!(x.string_list_value().is_none());
4743    /// assert!(x.number_value().is_none());
4744    /// ```
4745    pub fn set_oneof_value<T: std::convert::Into<std::boxed::Box<crate::model::Parameter>>>(
4746        mut self,
4747        v: T,
4748    ) -> Self {
4749        self.kind =
4750            std::option::Option::Some(crate::model::param_value::Kind::OneofValue(v.into()));
4751        self
4752    }
4753}
4754
4755impl wkt::message::Message for ParamValue {
4756    fn typename() -> &'static str {
4757        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ParamValue"
4758    }
4759}
4760
4761/// Defines additional types related to [ParamValue].
4762pub mod param_value {
4763    #[allow(unused_imports)]
4764    use super::*;
4765
4766    /// The list of possible parameter value types.
4767    #[derive(Clone, Debug, PartialEq)]
4768    #[non_exhaustive]
4769    pub enum Kind {
4770        /// Optional. A string value.
4771        StringValue(std::string::String),
4772        /// Optional. A boolean value.
4773        BoolValue(bool),
4774        /// Optional. A repeated string.
4775        StringListValue(std::boxed::Box<crate::model::StringList>),
4776        /// Optional. A double value.
4777        NumberValue(f64),
4778        /// Optional. Sub-parameter values.
4779        OneofValue(std::boxed::Box<crate::model::Parameter>),
4780    }
4781}
4782
4783/// The parameter substitution rules.
4784#[derive(Clone, Default, PartialEq)]
4785#[non_exhaustive]
4786pub struct ParameterSubstitutionRule {
4787    /// The type of substitution.
4788    pub substitution_type:
4789        std::option::Option<crate::model::parameter_substitution_rule::SubstitutionType>,
4790
4791    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4792}
4793
4794impl ParameterSubstitutionRule {
4795    /// Creates a new default instance.
4796    pub fn new() -> Self {
4797        std::default::Default::default()
4798    }
4799
4800    /// Sets the value of [substitution_type][crate::model::ParameterSubstitutionRule::substitution_type].
4801    ///
4802    /// Note that all the setters affecting `substitution_type` are mutually
4803    /// exclusive.
4804    ///
4805    /// # Example
4806    /// ```ignore,no_run
4807    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSubstitutionRule;
4808    /// use google_cloud_cloudsecuritycompliance_v1::model::PlaceholderSubstitutionRule;
4809    /// let x = ParameterSubstitutionRule::new().set_substitution_type(Some(
4810    ///     google_cloud_cloudsecuritycompliance_v1::model::parameter_substitution_rule::SubstitutionType::PlaceholderSubstitutionRule(PlaceholderSubstitutionRule::default().into())));
4811    /// ```
4812    pub fn set_substitution_type<
4813        T: std::convert::Into<
4814                std::option::Option<crate::model::parameter_substitution_rule::SubstitutionType>,
4815            >,
4816    >(
4817        mut self,
4818        v: T,
4819    ) -> Self {
4820        self.substitution_type = v.into();
4821        self
4822    }
4823
4824    /// The value of [substitution_type][crate::model::ParameterSubstitutionRule::substitution_type]
4825    /// if it holds a `PlaceholderSubstitutionRule`, `None` if the field is not set or
4826    /// holds a different branch.
4827    pub fn placeholder_substitution_rule(
4828        &self,
4829    ) -> std::option::Option<&std::boxed::Box<crate::model::PlaceholderSubstitutionRule>> {
4830        #[allow(unreachable_patterns)]
4831        self.substitution_type.as_ref().and_then(|v| match v {
4832            crate::model::parameter_substitution_rule::SubstitutionType::PlaceholderSubstitutionRule(v) => std::option::Option::Some(v),
4833            _ => std::option::Option::None,
4834        })
4835    }
4836
4837    /// Sets the value of [substitution_type][crate::model::ParameterSubstitutionRule::substitution_type]
4838    /// to hold a `PlaceholderSubstitutionRule`.
4839    ///
4840    /// Note that all the setters affecting `substitution_type` are
4841    /// mutually exclusive.
4842    ///
4843    /// # Example
4844    /// ```ignore,no_run
4845    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSubstitutionRule;
4846    /// use google_cloud_cloudsecuritycompliance_v1::model::PlaceholderSubstitutionRule;
4847    /// let x = ParameterSubstitutionRule::new().set_placeholder_substitution_rule(PlaceholderSubstitutionRule::default()/* use setters */);
4848    /// assert!(x.placeholder_substitution_rule().is_some());
4849    /// assert!(x.attribute_substitution_rule().is_none());
4850    /// ```
4851    pub fn set_placeholder_substitution_rule<
4852        T: std::convert::Into<std::boxed::Box<crate::model::PlaceholderSubstitutionRule>>,
4853    >(
4854        mut self,
4855        v: T,
4856    ) -> Self {
4857        self.substitution_type = std::option::Option::Some(
4858            crate::model::parameter_substitution_rule::SubstitutionType::PlaceholderSubstitutionRule(
4859                v.into()
4860            )
4861        );
4862        self
4863    }
4864
4865    /// The value of [substitution_type][crate::model::ParameterSubstitutionRule::substitution_type]
4866    /// if it holds a `AttributeSubstitutionRule`, `None` if the field is not set or
4867    /// holds a different branch.
4868    pub fn attribute_substitution_rule(
4869        &self,
4870    ) -> std::option::Option<&std::boxed::Box<crate::model::AttributeSubstitutionRule>> {
4871        #[allow(unreachable_patterns)]
4872        self.substitution_type.as_ref().and_then(|v| match v {
4873            crate::model::parameter_substitution_rule::SubstitutionType::AttributeSubstitutionRule(v) => std::option::Option::Some(v),
4874            _ => std::option::Option::None,
4875        })
4876    }
4877
4878    /// Sets the value of [substitution_type][crate::model::ParameterSubstitutionRule::substitution_type]
4879    /// to hold a `AttributeSubstitutionRule`.
4880    ///
4881    /// Note that all the setters affecting `substitution_type` are
4882    /// mutually exclusive.
4883    ///
4884    /// # Example
4885    /// ```ignore,no_run
4886    /// # use google_cloud_cloudsecuritycompliance_v1::model::ParameterSubstitutionRule;
4887    /// use google_cloud_cloudsecuritycompliance_v1::model::AttributeSubstitutionRule;
4888    /// let x = ParameterSubstitutionRule::new().set_attribute_substitution_rule(AttributeSubstitutionRule::default()/* use setters */);
4889    /// assert!(x.attribute_substitution_rule().is_some());
4890    /// assert!(x.placeholder_substitution_rule().is_none());
4891    /// ```
4892    pub fn set_attribute_substitution_rule<
4893        T: std::convert::Into<std::boxed::Box<crate::model::AttributeSubstitutionRule>>,
4894    >(
4895        mut self,
4896        v: T,
4897    ) -> Self {
4898        self.substitution_type = std::option::Option::Some(
4899            crate::model::parameter_substitution_rule::SubstitutionType::AttributeSubstitutionRule(
4900                v.into(),
4901            ),
4902        );
4903        self
4904    }
4905}
4906
4907impl wkt::message::Message for ParameterSubstitutionRule {
4908    fn typename() -> &'static str {
4909        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule"
4910    }
4911}
4912
4913/// Defines additional types related to [ParameterSubstitutionRule].
4914pub mod parameter_substitution_rule {
4915    #[allow(unused_imports)]
4916    use super::*;
4917
4918    /// The type of substitution.
4919    #[derive(Clone, Debug, PartialEq)]
4920    #[non_exhaustive]
4921    pub enum SubstitutionType {
4922        /// The placeholder substitution rule.
4923        PlaceholderSubstitutionRule(std::boxed::Box<crate::model::PlaceholderSubstitutionRule>),
4924        /// The attribute substitution rule.
4925        AttributeSubstitutionRule(std::boxed::Box<crate::model::AttributeSubstitutionRule>),
4926    }
4927}
4928
4929/// The attribute at the given path that's substituted entirely.
4930#[derive(Clone, Default, PartialEq)]
4931#[non_exhaustive]
4932pub struct AttributeSubstitutionRule {
4933    /// The fully qualified proto attribute path, in dot notation.
4934    /// For example: `rules[0].cel_expression.resource_types_values`
4935    pub attribute: std::string::String,
4936
4937    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4938}
4939
4940impl AttributeSubstitutionRule {
4941    /// Creates a new default instance.
4942    pub fn new() -> Self {
4943        std::default::Default::default()
4944    }
4945
4946    /// Sets the value of [attribute][crate::model::AttributeSubstitutionRule::attribute].
4947    ///
4948    /// # Example
4949    /// ```ignore,no_run
4950    /// # use google_cloud_cloudsecuritycompliance_v1::model::AttributeSubstitutionRule;
4951    /// let x = AttributeSubstitutionRule::new().set_attribute("example");
4952    /// ```
4953    pub fn set_attribute<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4954        self.attribute = v.into();
4955        self
4956    }
4957}
4958
4959impl wkt::message::Message for AttributeSubstitutionRule {
4960    fn typename() -> &'static str {
4961        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule"
4962    }
4963}
4964
4965/// The placeholder that's substituted in the rendered string.
4966#[derive(Clone, Default, PartialEq)]
4967#[non_exhaustive]
4968pub struct PlaceholderSubstitutionRule {
4969    /// The fully qualified proto attribute path, in dot notation.
4970    pub attribute: std::string::String,
4971
4972    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4973}
4974
4975impl PlaceholderSubstitutionRule {
4976    /// Creates a new default instance.
4977    pub fn new() -> Self {
4978        std::default::Default::default()
4979    }
4980
4981    /// Sets the value of [attribute][crate::model::PlaceholderSubstitutionRule::attribute].
4982    ///
4983    /// # Example
4984    /// ```ignore,no_run
4985    /// # use google_cloud_cloudsecuritycompliance_v1::model::PlaceholderSubstitutionRule;
4986    /// let x = PlaceholderSubstitutionRule::new().set_attribute("example");
4987    /// ```
4988    pub fn set_attribute<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4989        self.attribute = v.into();
4990        self
4991    }
4992}
4993
4994impl wkt::message::Message for PlaceholderSubstitutionRule {
4995    fn typename() -> &'static str {
4996        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule"
4997    }
4998}
4999
5000/// A rule in the cloud control.
5001#[derive(Clone, Default, PartialEq)]
5002#[non_exhaustive]
5003pub struct Rule {
5004    /// Optional. The rule description. The maximum length is 2000 characters.
5005    pub description: std::string::String,
5006
5007    /// Required. The functionality that's enabled by the rule.
5008    pub rule_action_types: std::vec::Vec<crate::model::RuleActionType>,
5009
5010    /// The rule implementation.
5011    pub implementation: std::option::Option<crate::model::rule::Implementation>,
5012
5013    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5014}
5015
5016impl Rule {
5017    /// Creates a new default instance.
5018    pub fn new() -> Self {
5019        std::default::Default::default()
5020    }
5021
5022    /// Sets the value of [description][crate::model::Rule::description].
5023    ///
5024    /// # Example
5025    /// ```ignore,no_run
5026    /// # use google_cloud_cloudsecuritycompliance_v1::model::Rule;
5027    /// let x = Rule::new().set_description("example");
5028    /// ```
5029    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5030        self.description = v.into();
5031        self
5032    }
5033
5034    /// Sets the value of [rule_action_types][crate::model::Rule::rule_action_types].
5035    ///
5036    /// # Example
5037    /// ```ignore,no_run
5038    /// # use google_cloud_cloudsecuritycompliance_v1::model::Rule;
5039    /// use google_cloud_cloudsecuritycompliance_v1::model::RuleActionType;
5040    /// let x = Rule::new().set_rule_action_types([
5041    ///     RuleActionType::Preventive,
5042    ///     RuleActionType::Detective,
5043    ///     RuleActionType::Audit,
5044    /// ]);
5045    /// ```
5046    pub fn set_rule_action_types<T, V>(mut self, v: T) -> Self
5047    where
5048        T: std::iter::IntoIterator<Item = V>,
5049        V: std::convert::Into<crate::model::RuleActionType>,
5050    {
5051        use std::iter::Iterator;
5052        self.rule_action_types = v.into_iter().map(|i| i.into()).collect();
5053        self
5054    }
5055
5056    /// Sets the value of [implementation][crate::model::Rule::implementation].
5057    ///
5058    /// Note that all the setters affecting `implementation` are mutually
5059    /// exclusive.
5060    ///
5061    /// # Example
5062    /// ```ignore,no_run
5063    /// # use google_cloud_cloudsecuritycompliance_v1::model::Rule;
5064    /// use google_cloud_cloudsecuritycompliance_v1::model::CELExpression;
5065    /// let x = Rule::new().set_implementation(Some(
5066    ///     google_cloud_cloudsecuritycompliance_v1::model::rule::Implementation::CelExpression(CELExpression::default().into())));
5067    /// ```
5068    pub fn set_implementation<
5069        T: std::convert::Into<std::option::Option<crate::model::rule::Implementation>>,
5070    >(
5071        mut self,
5072        v: T,
5073    ) -> Self {
5074        self.implementation = v.into();
5075        self
5076    }
5077
5078    /// The value of [implementation][crate::model::Rule::implementation]
5079    /// if it holds a `CelExpression`, `None` if the field is not set or
5080    /// holds a different branch.
5081    pub fn cel_expression(
5082        &self,
5083    ) -> std::option::Option<&std::boxed::Box<crate::model::CELExpression>> {
5084        #[allow(unreachable_patterns)]
5085        self.implementation.as_ref().and_then(|v| match v {
5086            crate::model::rule::Implementation::CelExpression(v) => std::option::Option::Some(v),
5087            _ => std::option::Option::None,
5088        })
5089    }
5090
5091    /// Sets the value of [implementation][crate::model::Rule::implementation]
5092    /// to hold a `CelExpression`.
5093    ///
5094    /// Note that all the setters affecting `implementation` are
5095    /// mutually exclusive.
5096    ///
5097    /// # Example
5098    /// ```ignore,no_run
5099    /// # use google_cloud_cloudsecuritycompliance_v1::model::Rule;
5100    /// use google_cloud_cloudsecuritycompliance_v1::model::CELExpression;
5101    /// let x = Rule::new().set_cel_expression(CELExpression::default()/* use setters */);
5102    /// assert!(x.cel_expression().is_some());
5103    /// ```
5104    pub fn set_cel_expression<
5105        T: std::convert::Into<std::boxed::Box<crate::model::CELExpression>>,
5106    >(
5107        mut self,
5108        v: T,
5109    ) -> Self {
5110        self.implementation =
5111            std::option::Option::Some(crate::model::rule::Implementation::CelExpression(v.into()));
5112        self
5113    }
5114}
5115
5116impl wkt::message::Message for Rule {
5117    fn typename() -> &'static str {
5118        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.Rule"
5119    }
5120}
5121
5122/// Defines additional types related to [Rule].
5123pub mod rule {
5124    #[allow(unused_imports)]
5125    use super::*;
5126
5127    /// The rule implementation.
5128    #[derive(Clone, Debug, PartialEq)]
5129    #[non_exhaustive]
5130    pub enum Implementation {
5131        /// The rule's logic expression in Common Expression Language (CEL).
5132        CelExpression(std::boxed::Box<crate::model::CELExpression>),
5133    }
5134}
5135
5136/// A Common Expression Language (CEL) expression that's used to create a rule.
5137#[derive(Clone, Default, PartialEq)]
5138#[non_exhaustive]
5139pub struct CELExpression {
5140    /// Required. The logical expression in CEL. The maximum length of the
5141    /// condition is 1000 characters. For more information, see [CEL
5142    /// expression](https://cloud.google.com/security-command-center/docs/compliance-manager-write-cel-expressions).
5143    pub expression: std::string::String,
5144
5145    /// The criteria of the CEL expression.
5146    pub criteria: std::option::Option<crate::model::cel_expression::Criteria>,
5147
5148    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5149}
5150
5151impl CELExpression {
5152    /// Creates a new default instance.
5153    pub fn new() -> Self {
5154        std::default::Default::default()
5155    }
5156
5157    /// Sets the value of [expression][crate::model::CELExpression::expression].
5158    ///
5159    /// # Example
5160    /// ```ignore,no_run
5161    /// # use google_cloud_cloudsecuritycompliance_v1::model::CELExpression;
5162    /// let x = CELExpression::new().set_expression("example");
5163    /// ```
5164    pub fn set_expression<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5165        self.expression = v.into();
5166        self
5167    }
5168
5169    /// Sets the value of [criteria][crate::model::CELExpression::criteria].
5170    ///
5171    /// Note that all the setters affecting `criteria` are mutually
5172    /// exclusive.
5173    ///
5174    /// # Example
5175    /// ```ignore,no_run
5176    /// # use google_cloud_cloudsecuritycompliance_v1::model::CELExpression;
5177    /// use google_cloud_cloudsecuritycompliance_v1::model::StringList;
5178    /// let x = CELExpression::new().set_criteria(Some(
5179    ///     google_cloud_cloudsecuritycompliance_v1::model::cel_expression::Criteria::ResourceTypesValues(StringList::default().into())));
5180    /// ```
5181    pub fn set_criteria<
5182        T: std::convert::Into<std::option::Option<crate::model::cel_expression::Criteria>>,
5183    >(
5184        mut self,
5185        v: T,
5186    ) -> Self {
5187        self.criteria = v.into();
5188        self
5189    }
5190
5191    /// The value of [criteria][crate::model::CELExpression::criteria]
5192    /// if it holds a `ResourceTypesValues`, `None` if the field is not set or
5193    /// holds a different branch.
5194    pub fn resource_types_values(
5195        &self,
5196    ) -> std::option::Option<&std::boxed::Box<crate::model::StringList>> {
5197        #[allow(unreachable_patterns)]
5198        self.criteria.as_ref().and_then(|v| match v {
5199            crate::model::cel_expression::Criteria::ResourceTypesValues(v) => {
5200                std::option::Option::Some(v)
5201            }
5202            _ => std::option::Option::None,
5203        })
5204    }
5205
5206    /// Sets the value of [criteria][crate::model::CELExpression::criteria]
5207    /// to hold a `ResourceTypesValues`.
5208    ///
5209    /// Note that all the setters affecting `criteria` are
5210    /// mutually exclusive.
5211    ///
5212    /// # Example
5213    /// ```ignore,no_run
5214    /// # use google_cloud_cloudsecuritycompliance_v1::model::CELExpression;
5215    /// use google_cloud_cloudsecuritycompliance_v1::model::StringList;
5216    /// let x = CELExpression::new().set_resource_types_values(StringList::default()/* use setters */);
5217    /// assert!(x.resource_types_values().is_some());
5218    /// ```
5219    pub fn set_resource_types_values<
5220        T: std::convert::Into<std::boxed::Box<crate::model::StringList>>,
5221    >(
5222        mut self,
5223        v: T,
5224    ) -> Self {
5225        self.criteria = std::option::Option::Some(
5226            crate::model::cel_expression::Criteria::ResourceTypesValues(v.into()),
5227        );
5228        self
5229    }
5230}
5231
5232impl wkt::message::Message for CELExpression {
5233    fn typename() -> &'static str {
5234        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CELExpression"
5235    }
5236}
5237
5238/// Defines additional types related to [CELExpression].
5239pub mod cel_expression {
5240    #[allow(unused_imports)]
5241    use super::*;
5242
5243    /// The criteria of the CEL expression.
5244    #[derive(Clone, Debug, PartialEq)]
5245    #[non_exhaustive]
5246    pub enum Criteria {
5247        /// The resource instance types on which this expression is defined.
5248        /// The format is `<SERVICE_NAME>/<type>`.
5249        /// For example: `compute.googleapis.com/Instance`
5250        ResourceTypesValues(std::boxed::Box<crate::model::StringList>),
5251    }
5252}
5253
5254/// The metadata for the long-running operation.
5255#[derive(Clone, Default, PartialEq)]
5256#[non_exhaustive]
5257pub struct OperationMetadata {
5258    /// Output only. The time the operation was created.
5259    pub create_time: std::option::Option<wkt::Timestamp>,
5260
5261    /// Output only. The time the operation finished running.
5262    pub end_time: std::option::Option<wkt::Timestamp>,
5263
5264    /// Output only. The server-defined resource path for the target of the
5265    /// operation.
5266    pub target: std::string::String,
5267
5268    /// Output only. The name of the verb that was executed by the operation.
5269    pub verb: std::string::String,
5270
5271    /// Output only. The human-readable status of the operation, if any.
5272    pub status_message: std::string::String,
5273
5274    /// Output only. Identifies whether the user has requested that the operation
5275    /// be cancelled. If an operation was cancelled successfully, then the field
5276    /// [google.longrunning.Operation.error][google.longrunning.Operation.error]
5277    /// contains the value [google.rpc.Code.CANCELLED][google.rpc.Code.CANCELLED].
5278    ///
5279    /// [google.longrunning.Operation.error]: google_cloud_longrunning::model::Operation::result
5280    pub requested_cancellation: bool,
5281
5282    /// Output only. The API version that was used to start the operation.
5283    pub api_version: std::string::String,
5284
5285    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5286}
5287
5288impl OperationMetadata {
5289    /// Creates a new default instance.
5290    pub fn new() -> Self {
5291        std::default::Default::default()
5292    }
5293
5294    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
5295    ///
5296    /// # Example
5297    /// ```ignore,no_run
5298    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5299    /// use wkt::Timestamp;
5300    /// let x = OperationMetadata::new().set_create_time(Timestamp::default()/* use setters */);
5301    /// ```
5302    pub fn set_create_time<T>(mut self, v: T) -> Self
5303    where
5304        T: std::convert::Into<wkt::Timestamp>,
5305    {
5306        self.create_time = std::option::Option::Some(v.into());
5307        self
5308    }
5309
5310    /// Sets or clears the value of [create_time][crate::model::OperationMetadata::create_time].
5311    ///
5312    /// # Example
5313    /// ```ignore,no_run
5314    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5315    /// use wkt::Timestamp;
5316    /// let x = OperationMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
5317    /// let x = OperationMetadata::new().set_or_clear_create_time(None::<Timestamp>);
5318    /// ```
5319    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5320    where
5321        T: std::convert::Into<wkt::Timestamp>,
5322    {
5323        self.create_time = v.map(|x| x.into());
5324        self
5325    }
5326
5327    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
5328    ///
5329    /// # Example
5330    /// ```ignore,no_run
5331    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5332    /// use wkt::Timestamp;
5333    /// let x = OperationMetadata::new().set_end_time(Timestamp::default()/* use setters */);
5334    /// ```
5335    pub fn set_end_time<T>(mut self, v: T) -> Self
5336    where
5337        T: std::convert::Into<wkt::Timestamp>,
5338    {
5339        self.end_time = std::option::Option::Some(v.into());
5340        self
5341    }
5342
5343    /// Sets or clears the value of [end_time][crate::model::OperationMetadata::end_time].
5344    ///
5345    /// # Example
5346    /// ```ignore,no_run
5347    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5348    /// use wkt::Timestamp;
5349    /// let x = OperationMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
5350    /// let x = OperationMetadata::new().set_or_clear_end_time(None::<Timestamp>);
5351    /// ```
5352    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
5353    where
5354        T: std::convert::Into<wkt::Timestamp>,
5355    {
5356        self.end_time = v.map(|x| x.into());
5357        self
5358    }
5359
5360    /// Sets the value of [target][crate::model::OperationMetadata::target].
5361    ///
5362    /// # Example
5363    /// ```ignore,no_run
5364    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5365    /// let x = OperationMetadata::new().set_target("example");
5366    /// ```
5367    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5368        self.target = v.into();
5369        self
5370    }
5371
5372    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
5373    ///
5374    /// # Example
5375    /// ```ignore,no_run
5376    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5377    /// let x = OperationMetadata::new().set_verb("example");
5378    /// ```
5379    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5380        self.verb = v.into();
5381        self
5382    }
5383
5384    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
5385    ///
5386    /// # Example
5387    /// ```ignore,no_run
5388    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5389    /// let x = OperationMetadata::new().set_status_message("example");
5390    /// ```
5391    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5392        self.status_message = v.into();
5393        self
5394    }
5395
5396    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
5397    ///
5398    /// # Example
5399    /// ```ignore,no_run
5400    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5401    /// let x = OperationMetadata::new().set_requested_cancellation(true);
5402    /// ```
5403    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5404        self.requested_cancellation = v.into();
5405        self
5406    }
5407
5408    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
5409    ///
5410    /// # Example
5411    /// ```ignore,no_run
5412    /// # use google_cloud_cloudsecuritycompliance_v1::model::OperationMetadata;
5413    /// let x = OperationMetadata::new().set_api_version("example");
5414    /// ```
5415    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5416        self.api_version = v.into();
5417        self
5418    }
5419}
5420
5421impl wkt::message::Message for OperationMetadata {
5422    fn typename() -> &'static str {
5423        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.OperationMetadata"
5424    }
5425}
5426
5427/// The regulatory control.
5428#[derive(Clone, Default, PartialEq)]
5429#[non_exhaustive]
5430pub struct Control {
5431    /// Output only. The name of a regulatory control, in one of the following
5432    /// formats:
5433    ///
5434    /// - `organizations/{organization}/locations/{location}/controls/{control}`
5435    /// - `projects/{project}/locations/{location}/controls/{control}`.
5436    ///
5437    /// The only supported location is `global`.
5438    pub name: std::string::String,
5439
5440    /// Output only. The friendly name for the regulatory control.
5441    pub display_name: std::string::String,
5442
5443    /// Output only. The description of the regulatory control.
5444    pub description: std::string::String,
5445
5446    /// Output only. The regulatory group that the control belongs to.
5447    pub family: crate::model::control::Family,
5448
5449    /// Output only. The regulatory family that the control belongs to.
5450    pub control_family: std::option::Option<crate::model::ControlFamily>,
5451
5452    /// Output only. The entity that's responsible for the control, whether Google,
5453    /// you as the customer, or both.
5454    pub responsibility_type: crate::model::RegulatoryControlResponsibilityType,
5455
5456    /// Output only. A description of Google's responsibility for the regulatory
5457    /// control.
5458    pub google_responsibility_description: std::string::String,
5459
5460    /// Output only. A description of Google's responsibility for implementing the
5461    /// regulatory control.
5462    pub google_responsibility_implementation: std::string::String,
5463
5464    /// Output only. A description of your responsibility for the regulatory
5465    /// control.
5466    pub customer_responsibility_description: std::string::String,
5467
5468    /// Output only. A description of the your responsibility for implementing the
5469    /// regulatory control.
5470    pub customer_responsibility_implementation: std::string::String,
5471
5472    /// Output only. A description of the responsibility that's shared between
5473    /// Google and you in implementing this control.
5474    pub shared_responsibility_description: std::string::String,
5475
5476    /// Output only. A link to the documentation that's related to this control.
5477    pub additional_content_uri: std::string::String,
5478
5479    /// Output only. The frameworks that include this control.
5480    pub related_frameworks: std::vec::Vec<std::string::String>,
5481
5482    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5483}
5484
5485impl Control {
5486    /// Creates a new default instance.
5487    pub fn new() -> Self {
5488        std::default::Default::default()
5489    }
5490
5491    /// Sets the value of [name][crate::model::Control::name].
5492    ///
5493    /// # Example
5494    /// ```ignore,no_run
5495    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5496    /// let x = Control::new().set_name("example");
5497    /// ```
5498    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5499        self.name = v.into();
5500        self
5501    }
5502
5503    /// Sets the value of [display_name][crate::model::Control::display_name].
5504    ///
5505    /// # Example
5506    /// ```ignore,no_run
5507    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5508    /// let x = Control::new().set_display_name("example");
5509    /// ```
5510    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5511        self.display_name = v.into();
5512        self
5513    }
5514
5515    /// Sets the value of [description][crate::model::Control::description].
5516    ///
5517    /// # Example
5518    /// ```ignore,no_run
5519    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5520    /// let x = Control::new().set_description("example");
5521    /// ```
5522    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5523        self.description = v.into();
5524        self
5525    }
5526
5527    /// Sets the value of [family][crate::model::Control::family].
5528    ///
5529    /// # Example
5530    /// ```ignore,no_run
5531    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5532    /// use google_cloud_cloudsecuritycompliance_v1::model::control::Family;
5533    /// let x0 = Control::new().set_family(Family::Ac);
5534    /// let x1 = Control::new().set_family(Family::At);
5535    /// let x2 = Control::new().set_family(Family::Au);
5536    /// ```
5537    pub fn set_family<T: std::convert::Into<crate::model::control::Family>>(
5538        mut self,
5539        v: T,
5540    ) -> Self {
5541        self.family = v.into();
5542        self
5543    }
5544
5545    /// Sets the value of [control_family][crate::model::Control::control_family].
5546    ///
5547    /// # Example
5548    /// ```ignore,no_run
5549    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5550    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlFamily;
5551    /// let x = Control::new().set_control_family(ControlFamily::default()/* use setters */);
5552    /// ```
5553    pub fn set_control_family<T>(mut self, v: T) -> Self
5554    where
5555        T: std::convert::Into<crate::model::ControlFamily>,
5556    {
5557        self.control_family = std::option::Option::Some(v.into());
5558        self
5559    }
5560
5561    /// Sets or clears the value of [control_family][crate::model::Control::control_family].
5562    ///
5563    /// # Example
5564    /// ```ignore,no_run
5565    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5566    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlFamily;
5567    /// let x = Control::new().set_or_clear_control_family(Some(ControlFamily::default()/* use setters */));
5568    /// let x = Control::new().set_or_clear_control_family(None::<ControlFamily>);
5569    /// ```
5570    pub fn set_or_clear_control_family<T>(mut self, v: std::option::Option<T>) -> Self
5571    where
5572        T: std::convert::Into<crate::model::ControlFamily>,
5573    {
5574        self.control_family = v.map(|x| x.into());
5575        self
5576    }
5577
5578    /// Sets the value of [responsibility_type][crate::model::Control::responsibility_type].
5579    ///
5580    /// # Example
5581    /// ```ignore,no_run
5582    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5583    /// use google_cloud_cloudsecuritycompliance_v1::model::RegulatoryControlResponsibilityType;
5584    /// let x0 = Control::new().set_responsibility_type(RegulatoryControlResponsibilityType::Google);
5585    /// let x1 = Control::new().set_responsibility_type(RegulatoryControlResponsibilityType::Customer);
5586    /// let x2 = Control::new().set_responsibility_type(RegulatoryControlResponsibilityType::Shared);
5587    /// ```
5588    pub fn set_responsibility_type<
5589        T: std::convert::Into<crate::model::RegulatoryControlResponsibilityType>,
5590    >(
5591        mut self,
5592        v: T,
5593    ) -> Self {
5594        self.responsibility_type = v.into();
5595        self
5596    }
5597
5598    /// Sets the value of [google_responsibility_description][crate::model::Control::google_responsibility_description].
5599    ///
5600    /// # Example
5601    /// ```ignore,no_run
5602    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5603    /// let x = Control::new().set_google_responsibility_description("example");
5604    /// ```
5605    pub fn set_google_responsibility_description<T: std::convert::Into<std::string::String>>(
5606        mut self,
5607        v: T,
5608    ) -> Self {
5609        self.google_responsibility_description = v.into();
5610        self
5611    }
5612
5613    /// Sets the value of [google_responsibility_implementation][crate::model::Control::google_responsibility_implementation].
5614    ///
5615    /// # Example
5616    /// ```ignore,no_run
5617    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5618    /// let x = Control::new().set_google_responsibility_implementation("example");
5619    /// ```
5620    pub fn set_google_responsibility_implementation<T: std::convert::Into<std::string::String>>(
5621        mut self,
5622        v: T,
5623    ) -> Self {
5624        self.google_responsibility_implementation = v.into();
5625        self
5626    }
5627
5628    /// Sets the value of [customer_responsibility_description][crate::model::Control::customer_responsibility_description].
5629    ///
5630    /// # Example
5631    /// ```ignore,no_run
5632    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5633    /// let x = Control::new().set_customer_responsibility_description("example");
5634    /// ```
5635    pub fn set_customer_responsibility_description<T: std::convert::Into<std::string::String>>(
5636        mut self,
5637        v: T,
5638    ) -> Self {
5639        self.customer_responsibility_description = v.into();
5640        self
5641    }
5642
5643    /// Sets the value of [customer_responsibility_implementation][crate::model::Control::customer_responsibility_implementation].
5644    ///
5645    /// # Example
5646    /// ```ignore,no_run
5647    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5648    /// let x = Control::new().set_customer_responsibility_implementation("example");
5649    /// ```
5650    pub fn set_customer_responsibility_implementation<
5651        T: std::convert::Into<std::string::String>,
5652    >(
5653        mut self,
5654        v: T,
5655    ) -> Self {
5656        self.customer_responsibility_implementation = v.into();
5657        self
5658    }
5659
5660    /// Sets the value of [shared_responsibility_description][crate::model::Control::shared_responsibility_description].
5661    ///
5662    /// # Example
5663    /// ```ignore,no_run
5664    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5665    /// let x = Control::new().set_shared_responsibility_description("example");
5666    /// ```
5667    pub fn set_shared_responsibility_description<T: std::convert::Into<std::string::String>>(
5668        mut self,
5669        v: T,
5670    ) -> Self {
5671        self.shared_responsibility_description = v.into();
5672        self
5673    }
5674
5675    /// Sets the value of [additional_content_uri][crate::model::Control::additional_content_uri].
5676    ///
5677    /// # Example
5678    /// ```ignore,no_run
5679    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5680    /// let x = Control::new().set_additional_content_uri("example");
5681    /// ```
5682    pub fn set_additional_content_uri<T: std::convert::Into<std::string::String>>(
5683        mut self,
5684        v: T,
5685    ) -> Self {
5686        self.additional_content_uri = v.into();
5687        self
5688    }
5689
5690    /// Sets the value of [related_frameworks][crate::model::Control::related_frameworks].
5691    ///
5692    /// # Example
5693    /// ```ignore,no_run
5694    /// # use google_cloud_cloudsecuritycompliance_v1::model::Control;
5695    /// let x = Control::new().set_related_frameworks(["a", "b", "c"]);
5696    /// ```
5697    pub fn set_related_frameworks<T, V>(mut self, v: T) -> Self
5698    where
5699        T: std::iter::IntoIterator<Item = V>,
5700        V: std::convert::Into<std::string::String>,
5701    {
5702        use std::iter::Iterator;
5703        self.related_frameworks = v.into_iter().map(|i| i.into()).collect();
5704        self
5705    }
5706}
5707
5708impl wkt::message::Message for Control {
5709    fn typename() -> &'static str {
5710        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.Control"
5711    }
5712}
5713
5714/// Defines additional types related to [Control].
5715pub mod control {
5716    #[allow(unused_imports)]
5717    use super::*;
5718
5719    /// The regulatory control family.
5720    ///
5721    /// # Working with unknown values
5722    ///
5723    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5724    /// additional enum variants at any time. Adding new variants is not considered
5725    /// a breaking change. Applications should write their code in anticipation of:
5726    ///
5727    /// - New values appearing in future releases of the client library, **and**
5728    /// - New values received dynamically, without application changes.
5729    ///
5730    /// Please consult the [Working with enums] section in the user guide for some
5731    /// guidelines.
5732    ///
5733    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
5734    #[derive(Clone, Debug, PartialEq)]
5735    #[non_exhaustive]
5736    pub enum Family {
5737        /// Default value. This value is unused.
5738        Unspecified,
5739        /// Access control
5740        Ac,
5741        /// Awareness and araining
5742        At,
5743        /// Audit and accountability
5744        Au,
5745        /// Certification, accreditation, and security assessments
5746        Ca,
5747        /// Configuration management
5748        Cm,
5749        /// Contingency planning
5750        Cp,
5751        /// Identification and authentication
5752        Ia,
5753        /// Incident response
5754        Ir,
5755        /// Maintenance
5756        Ma,
5757        /// Media protection
5758        Mp,
5759        /// Physical and environmental protection
5760        Pe,
5761        /// Security planning
5762        Pl,
5763        /// Personnel aecurity
5764        Ps,
5765        /// Risk assessment
5766        Ra,
5767        /// System services and acquisition
5768        Sa,
5769        /// System and communications protection
5770        Sc,
5771        /// System and information integrity
5772        Si,
5773        /// Supply chain risk management
5774        Sr,
5775        /// If set, the enum was initialized with an unknown value.
5776        ///
5777        /// Applications can examine the value using [Family::value] or
5778        /// [Family::name].
5779        UnknownValue(family::UnknownValue),
5780    }
5781
5782    #[doc(hidden)]
5783    pub mod family {
5784        #[allow(unused_imports)]
5785        use super::*;
5786        #[derive(Clone, Debug, PartialEq)]
5787        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5788    }
5789
5790    impl Family {
5791        /// Gets the enum value.
5792        ///
5793        /// Returns `None` if the enum contains an unknown value deserialized from
5794        /// the string representation of enums.
5795        pub fn value(&self) -> std::option::Option<i32> {
5796            match self {
5797                Self::Unspecified => std::option::Option::Some(0),
5798                Self::Ac => std::option::Option::Some(1),
5799                Self::At => std::option::Option::Some(2),
5800                Self::Au => std::option::Option::Some(3),
5801                Self::Ca => std::option::Option::Some(4),
5802                Self::Cm => std::option::Option::Some(5),
5803                Self::Cp => std::option::Option::Some(6),
5804                Self::Ia => std::option::Option::Some(7),
5805                Self::Ir => std::option::Option::Some(8),
5806                Self::Ma => std::option::Option::Some(9),
5807                Self::Mp => std::option::Option::Some(10),
5808                Self::Pe => std::option::Option::Some(11),
5809                Self::Pl => std::option::Option::Some(12),
5810                Self::Ps => std::option::Option::Some(13),
5811                Self::Ra => std::option::Option::Some(14),
5812                Self::Sa => std::option::Option::Some(15),
5813                Self::Sc => std::option::Option::Some(16),
5814                Self::Si => std::option::Option::Some(17),
5815                Self::Sr => std::option::Option::Some(18),
5816                Self::UnknownValue(u) => u.0.value(),
5817            }
5818        }
5819
5820        /// Gets the enum value as a string.
5821        ///
5822        /// Returns `None` if the enum contains an unknown value deserialized from
5823        /// the integer representation of enums.
5824        pub fn name(&self) -> std::option::Option<&str> {
5825            match self {
5826                Self::Unspecified => std::option::Option::Some("FAMILY_UNSPECIFIED"),
5827                Self::Ac => std::option::Option::Some("AC"),
5828                Self::At => std::option::Option::Some("AT"),
5829                Self::Au => std::option::Option::Some("AU"),
5830                Self::Ca => std::option::Option::Some("CA"),
5831                Self::Cm => std::option::Option::Some("CM"),
5832                Self::Cp => std::option::Option::Some("CP"),
5833                Self::Ia => std::option::Option::Some("IA"),
5834                Self::Ir => std::option::Option::Some("IR"),
5835                Self::Ma => std::option::Option::Some("MA"),
5836                Self::Mp => std::option::Option::Some("MP"),
5837                Self::Pe => std::option::Option::Some("PE"),
5838                Self::Pl => std::option::Option::Some("PL"),
5839                Self::Ps => std::option::Option::Some("PS"),
5840                Self::Ra => std::option::Option::Some("RA"),
5841                Self::Sa => std::option::Option::Some("SA"),
5842                Self::Sc => std::option::Option::Some("SC"),
5843                Self::Si => std::option::Option::Some("SI"),
5844                Self::Sr => std::option::Option::Some("SR"),
5845                Self::UnknownValue(u) => u.0.name(),
5846            }
5847        }
5848    }
5849
5850    impl std::default::Default for Family {
5851        fn default() -> Self {
5852            use std::convert::From;
5853            Self::from(0)
5854        }
5855    }
5856
5857    impl std::fmt::Display for Family {
5858        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5859            wkt::internal::display_enum(f, self.name(), self.value())
5860        }
5861    }
5862
5863    impl std::convert::From<i32> for Family {
5864        fn from(value: i32) -> Self {
5865            match value {
5866                0 => Self::Unspecified,
5867                1 => Self::Ac,
5868                2 => Self::At,
5869                3 => Self::Au,
5870                4 => Self::Ca,
5871                5 => Self::Cm,
5872                6 => Self::Cp,
5873                7 => Self::Ia,
5874                8 => Self::Ir,
5875                9 => Self::Ma,
5876                10 => Self::Mp,
5877                11 => Self::Pe,
5878                12 => Self::Pl,
5879                13 => Self::Ps,
5880                14 => Self::Ra,
5881                15 => Self::Sa,
5882                16 => Self::Sc,
5883                17 => Self::Si,
5884                18 => Self::Sr,
5885                _ => Self::UnknownValue(family::UnknownValue(
5886                    wkt::internal::UnknownEnumValue::Integer(value),
5887                )),
5888            }
5889        }
5890    }
5891
5892    impl std::convert::From<&str> for Family {
5893        fn from(value: &str) -> Self {
5894            use std::string::ToString;
5895            match value {
5896                "FAMILY_UNSPECIFIED" => Self::Unspecified,
5897                "AC" => Self::Ac,
5898                "AT" => Self::At,
5899                "AU" => Self::Au,
5900                "CA" => Self::Ca,
5901                "CM" => Self::Cm,
5902                "CP" => Self::Cp,
5903                "IA" => Self::Ia,
5904                "IR" => Self::Ir,
5905                "MA" => Self::Ma,
5906                "MP" => Self::Mp,
5907                "PE" => Self::Pe,
5908                "PL" => Self::Pl,
5909                "PS" => Self::Ps,
5910                "RA" => Self::Ra,
5911                "SA" => Self::Sa,
5912                "SC" => Self::Sc,
5913                "SI" => Self::Si,
5914                "SR" => Self::Sr,
5915                _ => Self::UnknownValue(family::UnknownValue(
5916                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5917                )),
5918            }
5919        }
5920    }
5921
5922    impl serde::ser::Serialize for Family {
5923        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5924        where
5925            S: serde::Serializer,
5926        {
5927            match self {
5928                Self::Unspecified => serializer.serialize_i32(0),
5929                Self::Ac => serializer.serialize_i32(1),
5930                Self::At => serializer.serialize_i32(2),
5931                Self::Au => serializer.serialize_i32(3),
5932                Self::Ca => serializer.serialize_i32(4),
5933                Self::Cm => serializer.serialize_i32(5),
5934                Self::Cp => serializer.serialize_i32(6),
5935                Self::Ia => serializer.serialize_i32(7),
5936                Self::Ir => serializer.serialize_i32(8),
5937                Self::Ma => serializer.serialize_i32(9),
5938                Self::Mp => serializer.serialize_i32(10),
5939                Self::Pe => serializer.serialize_i32(11),
5940                Self::Pl => serializer.serialize_i32(12),
5941                Self::Ps => serializer.serialize_i32(13),
5942                Self::Ra => serializer.serialize_i32(14),
5943                Self::Sa => serializer.serialize_i32(15),
5944                Self::Sc => serializer.serialize_i32(16),
5945                Self::Si => serializer.serialize_i32(17),
5946                Self::Sr => serializer.serialize_i32(18),
5947                Self::UnknownValue(u) => u.0.serialize(serializer),
5948            }
5949        }
5950    }
5951
5952    impl<'de> serde::de::Deserialize<'de> for Family {
5953        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5954        where
5955            D: serde::Deserializer<'de>,
5956        {
5957            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Family>::new(
5958                ".google.cloud.cloudsecuritycompliance.v1.Control.Family",
5959            ))
5960        }
5961    }
5962}
5963
5964/// The regulatory family of the control.
5965#[derive(Clone, Default, PartialEq)]
5966#[non_exhaustive]
5967pub struct ControlFamily {
5968    /// The identifier for the regulatory control family.
5969    pub family_id: std::string::String,
5970
5971    /// The friendly name for the regulatory control family.
5972    pub display_name: std::string::String,
5973
5974    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5975}
5976
5977impl ControlFamily {
5978    /// Creates a new default instance.
5979    pub fn new() -> Self {
5980        std::default::Default::default()
5981    }
5982
5983    /// Sets the value of [family_id][crate::model::ControlFamily::family_id].
5984    ///
5985    /// # Example
5986    /// ```ignore,no_run
5987    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlFamily;
5988    /// let x = ControlFamily::new().set_family_id("example");
5989    /// ```
5990    pub fn set_family_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5991        self.family_id = v.into();
5992        self
5993    }
5994
5995    /// Sets the value of [display_name][crate::model::ControlFamily::display_name].
5996    ///
5997    /// # Example
5998    /// ```ignore,no_run
5999    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlFamily;
6000    /// let x = ControlFamily::new().set_display_name("example");
6001    /// ```
6002    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6003        self.display_name = v.into();
6004        self
6005    }
6006}
6007
6008impl wkt::message::Message for ControlFamily {
6009    fn typename() -> &'static str {
6010        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ControlFamily"
6011    }
6012}
6013
6014/// Request message for [ListFrameworks][].
6015#[derive(Clone, Default, PartialEq)]
6016#[non_exhaustive]
6017pub struct ListFrameworksRequest {
6018    /// Required. The parent resource name, in one of the following formats:
6019    ///
6020    /// - `organizations/{organization}/locations/{location}`
6021    /// - `projects/{project}/locations/{location}`.
6022    ///
6023    /// The only supported location is `global`.
6024    pub parent: std::string::String,
6025
6026    /// Optional. The maximum number of frameworks to return. The default value is
6027    /// `500`.
6028    ///
6029    /// If you exceed the maximum value of `1000`, then the service uses the
6030    /// maximum value.
6031    pub page_size: i32,
6032
6033    /// Optional. A pagination token returned from a previous request to list
6034    /// frameworks. Provide this token to retrieve the next page of results.
6035    pub page_token: std::string::String,
6036
6037    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6038}
6039
6040impl ListFrameworksRequest {
6041    /// Creates a new default instance.
6042    pub fn new() -> Self {
6043        std::default::Default::default()
6044    }
6045
6046    /// Sets the value of [parent][crate::model::ListFrameworksRequest::parent].
6047    ///
6048    /// # Example
6049    /// ```ignore,no_run
6050    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworksRequest;
6051    /// let x = ListFrameworksRequest::new().set_parent("example");
6052    /// ```
6053    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6054        self.parent = v.into();
6055        self
6056    }
6057
6058    /// Sets the value of [page_size][crate::model::ListFrameworksRequest::page_size].
6059    ///
6060    /// # Example
6061    /// ```ignore,no_run
6062    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworksRequest;
6063    /// let x = ListFrameworksRequest::new().set_page_size(42);
6064    /// ```
6065    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6066        self.page_size = v.into();
6067        self
6068    }
6069
6070    /// Sets the value of [page_token][crate::model::ListFrameworksRequest::page_token].
6071    ///
6072    /// # Example
6073    /// ```ignore,no_run
6074    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworksRequest;
6075    /// let x = ListFrameworksRequest::new().set_page_token("example");
6076    /// ```
6077    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6078        self.page_token = v.into();
6079        self
6080    }
6081}
6082
6083impl wkt::message::Message for ListFrameworksRequest {
6084    fn typename() -> &'static str {
6085        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest"
6086    }
6087}
6088
6089/// The response message for [ListFrameworks][].
6090/// Returns a paginated list of Framework resources.
6091#[derive(Clone, Default, PartialEq)]
6092#[non_exhaustive]
6093pub struct ListFrameworksResponse {
6094    /// The list of framework resources.
6095    pub frameworks: std::vec::Vec<crate::model::Framework>,
6096
6097    /// A pagination token. To retrieve the next page of results, call the method
6098    /// again with this token.
6099    pub next_page_token: std::string::String,
6100
6101    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6102}
6103
6104impl ListFrameworksResponse {
6105    /// Creates a new default instance.
6106    pub fn new() -> Self {
6107        std::default::Default::default()
6108    }
6109
6110    /// Sets the value of [frameworks][crate::model::ListFrameworksResponse::frameworks].
6111    ///
6112    /// # Example
6113    /// ```ignore,no_run
6114    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworksResponse;
6115    /// use google_cloud_cloudsecuritycompliance_v1::model::Framework;
6116    /// let x = ListFrameworksResponse::new()
6117    ///     .set_frameworks([
6118    ///         Framework::default()/* use setters */,
6119    ///         Framework::default()/* use (different) setters */,
6120    ///     ]);
6121    /// ```
6122    pub fn set_frameworks<T, V>(mut self, v: T) -> Self
6123    where
6124        T: std::iter::IntoIterator<Item = V>,
6125        V: std::convert::Into<crate::model::Framework>,
6126    {
6127        use std::iter::Iterator;
6128        self.frameworks = v.into_iter().map(|i| i.into()).collect();
6129        self
6130    }
6131
6132    /// Sets the value of [next_page_token][crate::model::ListFrameworksResponse::next_page_token].
6133    ///
6134    /// # Example
6135    /// ```ignore,no_run
6136    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworksResponse;
6137    /// let x = ListFrameworksResponse::new().set_next_page_token("example");
6138    /// ```
6139    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6140        self.next_page_token = v.into();
6141        self
6142    }
6143}
6144
6145impl wkt::message::Message for ListFrameworksResponse {
6146    fn typename() -> &'static str {
6147        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse"
6148    }
6149}
6150
6151#[doc(hidden)]
6152impl google_cloud_gax::paginator::internal::PageableResponse for ListFrameworksResponse {
6153    type PageItem = crate::model::Framework;
6154
6155    fn items(self) -> std::vec::Vec<Self::PageItem> {
6156        self.frameworks
6157    }
6158
6159    fn next_page_token(&self) -> std::string::String {
6160        use std::clone::Clone;
6161        self.next_page_token.clone()
6162    }
6163}
6164
6165/// The request message for [GetFramework][].
6166#[derive(Clone, Default, PartialEq)]
6167#[non_exhaustive]
6168pub struct GetFrameworkRequest {
6169    /// Required. The name of the framework to retrieve, in one of the following
6170    /// formats:
6171    /// `organizations/{organization}/locations/{location}/frameworks/{framework}`
6172    /// or
6173    /// `projects/{project}/locations/{location}/frameworks/{framework}`.
6174    ///
6175    /// The only supported location is `global`.
6176    pub name: std::string::String,
6177
6178    /// Optional. The framework major version to retrieve. If not specified, the
6179    /// most recently updated `revision_id` is retrieved.
6180    pub major_revision_id: i64,
6181
6182    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6183}
6184
6185impl GetFrameworkRequest {
6186    /// Creates a new default instance.
6187    pub fn new() -> Self {
6188        std::default::Default::default()
6189    }
6190
6191    /// Sets the value of [name][crate::model::GetFrameworkRequest::name].
6192    ///
6193    /// # Example
6194    /// ```ignore,no_run
6195    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetFrameworkRequest;
6196    /// let x = GetFrameworkRequest::new().set_name("example");
6197    /// ```
6198    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6199        self.name = v.into();
6200        self
6201    }
6202
6203    /// Sets the value of [major_revision_id][crate::model::GetFrameworkRequest::major_revision_id].
6204    ///
6205    /// # Example
6206    /// ```ignore,no_run
6207    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetFrameworkRequest;
6208    /// let x = GetFrameworkRequest::new().set_major_revision_id(42);
6209    /// ```
6210    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
6211        self.major_revision_id = v.into();
6212        self
6213    }
6214}
6215
6216impl wkt::message::Message for GetFrameworkRequest {
6217    fn typename() -> &'static str {
6218        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest"
6219    }
6220}
6221
6222/// The request message for [CreateFramework][].
6223#[derive(Clone, Default, PartialEq)]
6224#[non_exhaustive]
6225pub struct CreateFrameworkRequest {
6226    /// Required. The parent resource name, in one of the following formats:
6227    ///
6228    /// - `organizations/{organization}/locations/{location}`
6229    /// - `projects/{project}/locations/{location}`.
6230    ///
6231    /// The only supported location is `global`.
6232    pub parent: std::string::String,
6233
6234    /// Required. The identifier (ID) of the framework. The ID is not the full name
6235    /// of the framework; it's the last part of the full name of the framework.
6236    pub framework_id: std::string::String,
6237
6238    /// Required. The resource being created.
6239    pub framework: std::option::Option<crate::model::Framework>,
6240
6241    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6242}
6243
6244impl CreateFrameworkRequest {
6245    /// Creates a new default instance.
6246    pub fn new() -> Self {
6247        std::default::Default::default()
6248    }
6249
6250    /// Sets the value of [parent][crate::model::CreateFrameworkRequest::parent].
6251    ///
6252    /// # Example
6253    /// ```ignore,no_run
6254    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkRequest;
6255    /// let x = CreateFrameworkRequest::new().set_parent("example");
6256    /// ```
6257    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6258        self.parent = v.into();
6259        self
6260    }
6261
6262    /// Sets the value of [framework_id][crate::model::CreateFrameworkRequest::framework_id].
6263    ///
6264    /// # Example
6265    /// ```ignore,no_run
6266    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkRequest;
6267    /// let x = CreateFrameworkRequest::new().set_framework_id("example");
6268    /// ```
6269    pub fn set_framework_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6270        self.framework_id = v.into();
6271        self
6272    }
6273
6274    /// Sets the value of [framework][crate::model::CreateFrameworkRequest::framework].
6275    ///
6276    /// # Example
6277    /// ```ignore,no_run
6278    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkRequest;
6279    /// use google_cloud_cloudsecuritycompliance_v1::model::Framework;
6280    /// let x = CreateFrameworkRequest::new().set_framework(Framework::default()/* use setters */);
6281    /// ```
6282    pub fn set_framework<T>(mut self, v: T) -> Self
6283    where
6284        T: std::convert::Into<crate::model::Framework>,
6285    {
6286        self.framework = std::option::Option::Some(v.into());
6287        self
6288    }
6289
6290    /// Sets or clears the value of [framework][crate::model::CreateFrameworkRequest::framework].
6291    ///
6292    /// # Example
6293    /// ```ignore,no_run
6294    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkRequest;
6295    /// use google_cloud_cloudsecuritycompliance_v1::model::Framework;
6296    /// let x = CreateFrameworkRequest::new().set_or_clear_framework(Some(Framework::default()/* use setters */));
6297    /// let x = CreateFrameworkRequest::new().set_or_clear_framework(None::<Framework>);
6298    /// ```
6299    pub fn set_or_clear_framework<T>(mut self, v: std::option::Option<T>) -> Self
6300    where
6301        T: std::convert::Into<crate::model::Framework>,
6302    {
6303        self.framework = v.map(|x| x.into());
6304        self
6305    }
6306}
6307
6308impl wkt::message::Message for CreateFrameworkRequest {
6309    fn typename() -> &'static str {
6310        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest"
6311    }
6312}
6313
6314/// The request message for [UpdateFramework][].
6315#[derive(Clone, Default, PartialEq)]
6316#[non_exhaustive]
6317pub struct UpdateFrameworkRequest {
6318    /// Optional. A field mask is used to specify the fields to be overwritten in
6319    /// the framework resource by the update. The fields specified in the
6320    /// `update_mask` are relative to the resource, not the full request. A field
6321    /// is overwritten if it is in the mask. If you don't provide a mask then all
6322    /// fields present in the request will be overwritten.
6323    pub update_mask: std::option::Option<wkt::FieldMask>,
6324
6325    /// Required. The resource that is being updated.
6326    pub framework: std::option::Option<crate::model::Framework>,
6327
6328    /// Optional. The major version ID of the framework to update.
6329    pub major_revision_id: i64,
6330
6331    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6332}
6333
6334impl UpdateFrameworkRequest {
6335    /// Creates a new default instance.
6336    pub fn new() -> Self {
6337        std::default::Default::default()
6338    }
6339
6340    /// Sets the value of [update_mask][crate::model::UpdateFrameworkRequest::update_mask].
6341    ///
6342    /// # Example
6343    /// ```ignore,no_run
6344    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateFrameworkRequest;
6345    /// use wkt::FieldMask;
6346    /// let x = UpdateFrameworkRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6347    /// ```
6348    pub fn set_update_mask<T>(mut self, v: T) -> Self
6349    where
6350        T: std::convert::Into<wkt::FieldMask>,
6351    {
6352        self.update_mask = std::option::Option::Some(v.into());
6353        self
6354    }
6355
6356    /// Sets or clears the value of [update_mask][crate::model::UpdateFrameworkRequest::update_mask].
6357    ///
6358    /// # Example
6359    /// ```ignore,no_run
6360    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateFrameworkRequest;
6361    /// use wkt::FieldMask;
6362    /// let x = UpdateFrameworkRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6363    /// let x = UpdateFrameworkRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6364    /// ```
6365    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6366    where
6367        T: std::convert::Into<wkt::FieldMask>,
6368    {
6369        self.update_mask = v.map(|x| x.into());
6370        self
6371    }
6372
6373    /// Sets the value of [framework][crate::model::UpdateFrameworkRequest::framework].
6374    ///
6375    /// # Example
6376    /// ```ignore,no_run
6377    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateFrameworkRequest;
6378    /// use google_cloud_cloudsecuritycompliance_v1::model::Framework;
6379    /// let x = UpdateFrameworkRequest::new().set_framework(Framework::default()/* use setters */);
6380    /// ```
6381    pub fn set_framework<T>(mut self, v: T) -> Self
6382    where
6383        T: std::convert::Into<crate::model::Framework>,
6384    {
6385        self.framework = std::option::Option::Some(v.into());
6386        self
6387    }
6388
6389    /// Sets or clears the value of [framework][crate::model::UpdateFrameworkRequest::framework].
6390    ///
6391    /// # Example
6392    /// ```ignore,no_run
6393    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateFrameworkRequest;
6394    /// use google_cloud_cloudsecuritycompliance_v1::model::Framework;
6395    /// let x = UpdateFrameworkRequest::new().set_or_clear_framework(Some(Framework::default()/* use setters */));
6396    /// let x = UpdateFrameworkRequest::new().set_or_clear_framework(None::<Framework>);
6397    /// ```
6398    pub fn set_or_clear_framework<T>(mut self, v: std::option::Option<T>) -> Self
6399    where
6400        T: std::convert::Into<crate::model::Framework>,
6401    {
6402        self.framework = v.map(|x| x.into());
6403        self
6404    }
6405
6406    /// Sets the value of [major_revision_id][crate::model::UpdateFrameworkRequest::major_revision_id].
6407    ///
6408    /// # Example
6409    /// ```ignore,no_run
6410    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateFrameworkRequest;
6411    /// let x = UpdateFrameworkRequest::new().set_major_revision_id(42);
6412    /// ```
6413    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
6414        self.major_revision_id = v.into();
6415        self
6416    }
6417}
6418
6419impl wkt::message::Message for UpdateFrameworkRequest {
6420    fn typename() -> &'static str {
6421        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest"
6422    }
6423}
6424
6425/// Request message for [DeleteFramework][].
6426#[derive(Clone, Default, PartialEq)]
6427#[non_exhaustive]
6428pub struct DeleteFrameworkRequest {
6429    /// Required. The name of the resource, in one of the following formats:
6430    /// `organizations/{organization}/locations/{location}/frameworks/{framework}`
6431    /// or
6432    /// `projects/{project}/locations/{location}/frameworks/{framework}`.
6433    ///
6434    /// The only supported location is `global`.
6435    pub name: std::string::String,
6436
6437    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6438}
6439
6440impl DeleteFrameworkRequest {
6441    /// Creates a new default instance.
6442    pub fn new() -> Self {
6443        std::default::Default::default()
6444    }
6445
6446    /// Sets the value of [name][crate::model::DeleteFrameworkRequest::name].
6447    ///
6448    /// # Example
6449    /// ```ignore,no_run
6450    /// # use google_cloud_cloudsecuritycompliance_v1::model::DeleteFrameworkRequest;
6451    /// let x = DeleteFrameworkRequest::new().set_name("example");
6452    /// ```
6453    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6454        self.name = v.into();
6455        self
6456    }
6457}
6458
6459impl wkt::message::Message for DeleteFrameworkRequest {
6460    fn typename() -> &'static str {
6461        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest"
6462    }
6463}
6464
6465/// Request message for [ListCloudControls][].
6466#[derive(Clone, Default, PartialEq)]
6467#[non_exhaustive]
6468pub struct ListCloudControlsRequest {
6469    /// Required. The parent resource name, in one of the following formats:
6470    ///
6471    /// - `organizations/{organization}/locations/{location}`
6472    /// - `projects/{project}/locations/{location}`.
6473    ///
6474    /// The only supported location is `global`.
6475    pub parent: std::string::String,
6476
6477    /// Optional. The maximum number of cloud controls to return. The default value
6478    /// is `500`.
6479    ///
6480    /// If you exceed the maximum value of `1000`, then the service uses the
6481    /// maximum value.
6482    pub page_size: i32,
6483
6484    /// Optional. A pagination token that's returned from a previous request to
6485    /// list cloud controls. Provide this token to retrieve the next page of
6486    /// results.
6487    ///
6488    /// When paginating, the parent that you provide to the
6489    /// [ListCloudControls][google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls]
6490    /// request must match the call that provided the page token.
6491    ///
6492    /// [google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls]: crate::client::Config::list_cloud_controls
6493    pub page_token: std::string::String,
6494
6495    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6496}
6497
6498impl ListCloudControlsRequest {
6499    /// Creates a new default instance.
6500    pub fn new() -> Self {
6501        std::default::Default::default()
6502    }
6503
6504    /// Sets the value of [parent][crate::model::ListCloudControlsRequest::parent].
6505    ///
6506    /// # Example
6507    /// ```ignore,no_run
6508    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlsRequest;
6509    /// let x = ListCloudControlsRequest::new().set_parent("example");
6510    /// ```
6511    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6512        self.parent = v.into();
6513        self
6514    }
6515
6516    /// Sets the value of [page_size][crate::model::ListCloudControlsRequest::page_size].
6517    ///
6518    /// # Example
6519    /// ```ignore,no_run
6520    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlsRequest;
6521    /// let x = ListCloudControlsRequest::new().set_page_size(42);
6522    /// ```
6523    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6524        self.page_size = v.into();
6525        self
6526    }
6527
6528    /// Sets the value of [page_token][crate::model::ListCloudControlsRequest::page_token].
6529    ///
6530    /// # Example
6531    /// ```ignore,no_run
6532    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlsRequest;
6533    /// let x = ListCloudControlsRequest::new().set_page_token("example");
6534    /// ```
6535    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6536        self.page_token = v.into();
6537        self
6538    }
6539}
6540
6541impl wkt::message::Message for ListCloudControlsRequest {
6542    fn typename() -> &'static str {
6543        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest"
6544    }
6545}
6546
6547/// The response message for [ListCloudControls][].
6548#[derive(Clone, Default, PartialEq)]
6549#[non_exhaustive]
6550pub struct ListCloudControlsResponse {
6551    /// The list of CloudControl resources.
6552    pub cloud_controls: std::vec::Vec<crate::model::CloudControl>,
6553
6554    /// A pagination token. To retrieve the next page of results, call the method
6555    /// again with this token.
6556    pub next_page_token: std::string::String,
6557
6558    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6559}
6560
6561impl ListCloudControlsResponse {
6562    /// Creates a new default instance.
6563    pub fn new() -> Self {
6564        std::default::Default::default()
6565    }
6566
6567    /// Sets the value of [cloud_controls][crate::model::ListCloudControlsResponse::cloud_controls].
6568    ///
6569    /// # Example
6570    /// ```ignore,no_run
6571    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlsResponse;
6572    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
6573    /// let x = ListCloudControlsResponse::new()
6574    ///     .set_cloud_controls([
6575    ///         CloudControl::default()/* use setters */,
6576    ///         CloudControl::default()/* use (different) setters */,
6577    ///     ]);
6578    /// ```
6579    pub fn set_cloud_controls<T, V>(mut self, v: T) -> Self
6580    where
6581        T: std::iter::IntoIterator<Item = V>,
6582        V: std::convert::Into<crate::model::CloudControl>,
6583    {
6584        use std::iter::Iterator;
6585        self.cloud_controls = v.into_iter().map(|i| i.into()).collect();
6586        self
6587    }
6588
6589    /// Sets the value of [next_page_token][crate::model::ListCloudControlsResponse::next_page_token].
6590    ///
6591    /// # Example
6592    /// ```ignore,no_run
6593    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlsResponse;
6594    /// let x = ListCloudControlsResponse::new().set_next_page_token("example");
6595    /// ```
6596    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6597        self.next_page_token = v.into();
6598        self
6599    }
6600}
6601
6602impl wkt::message::Message for ListCloudControlsResponse {
6603    fn typename() -> &'static str {
6604        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse"
6605    }
6606}
6607
6608#[doc(hidden)]
6609impl google_cloud_gax::paginator::internal::PageableResponse for ListCloudControlsResponse {
6610    type PageItem = crate::model::CloudControl;
6611
6612    fn items(self) -> std::vec::Vec<Self::PageItem> {
6613        self.cloud_controls
6614    }
6615
6616    fn next_page_token(&self) -> std::string::String {
6617        use std::clone::Clone;
6618        self.next_page_token.clone()
6619    }
6620}
6621
6622/// The request message for [GetCloudControl][].
6623#[derive(Clone, Default, PartialEq)]
6624#[non_exhaustive]
6625pub struct GetCloudControlRequest {
6626    /// Required. The name of the cloud control to retrieve, in one of the
6627    /// following formats:
6628    /// `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}`
6629    /// or
6630    /// `projects/{project}/locations/{location}/cloudControls/{cloud_control}`.
6631    ///
6632    /// The only supported location is `global`.
6633    pub name: std::string::String,
6634
6635    /// Optional. The major version of the cloud control to retrieve. If not
6636    /// specified, the most recently updated `revision_id` is retrieved.
6637    pub major_revision_id: i64,
6638
6639    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6640}
6641
6642impl GetCloudControlRequest {
6643    /// Creates a new default instance.
6644    pub fn new() -> Self {
6645        std::default::Default::default()
6646    }
6647
6648    /// Sets the value of [name][crate::model::GetCloudControlRequest::name].
6649    ///
6650    /// # Example
6651    /// ```ignore,no_run
6652    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetCloudControlRequest;
6653    /// let x = GetCloudControlRequest::new().set_name("example");
6654    /// ```
6655    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6656        self.name = v.into();
6657        self
6658    }
6659
6660    /// Sets the value of [major_revision_id][crate::model::GetCloudControlRequest::major_revision_id].
6661    ///
6662    /// # Example
6663    /// ```ignore,no_run
6664    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetCloudControlRequest;
6665    /// let x = GetCloudControlRequest::new().set_major_revision_id(42);
6666    /// ```
6667    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
6668        self.major_revision_id = v.into();
6669        self
6670    }
6671}
6672
6673impl wkt::message::Message for GetCloudControlRequest {
6674    fn typename() -> &'static str {
6675        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest"
6676    }
6677}
6678
6679/// The request message for [CreateCloudControl][].
6680#[derive(Clone, Default, PartialEq)]
6681#[non_exhaustive]
6682pub struct CreateCloudControlRequest {
6683    /// Required. The parent resource name, in one of the following formats:
6684    ///
6685    /// - `organizations/{organization}/locations/{location}`.
6686    /// - `projects/{project}/locations/{location}`.
6687    ///
6688    /// The only supported location is `global`.
6689    pub parent: std::string::String,
6690
6691    /// Required. The identifier for the cloud control, which is the last segment
6692    /// of the cloud control name. The format is
6693    /// `^[a-zA-Z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$`.
6694    pub cloud_control_id: std::string::String,
6695
6696    /// Required. The cloud control that's being created.
6697    pub cloud_control: std::option::Option<crate::model::CloudControl>,
6698
6699    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6700}
6701
6702impl CreateCloudControlRequest {
6703    /// Creates a new default instance.
6704    pub fn new() -> Self {
6705        std::default::Default::default()
6706    }
6707
6708    /// Sets the value of [parent][crate::model::CreateCloudControlRequest::parent].
6709    ///
6710    /// # Example
6711    /// ```ignore,no_run
6712    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateCloudControlRequest;
6713    /// let x = CreateCloudControlRequest::new().set_parent("example");
6714    /// ```
6715    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6716        self.parent = v.into();
6717        self
6718    }
6719
6720    /// Sets the value of [cloud_control_id][crate::model::CreateCloudControlRequest::cloud_control_id].
6721    ///
6722    /// # Example
6723    /// ```ignore,no_run
6724    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateCloudControlRequest;
6725    /// let x = CreateCloudControlRequest::new().set_cloud_control_id("example");
6726    /// ```
6727    pub fn set_cloud_control_id<T: std::convert::Into<std::string::String>>(
6728        mut self,
6729        v: T,
6730    ) -> Self {
6731        self.cloud_control_id = v.into();
6732        self
6733    }
6734
6735    /// Sets the value of [cloud_control][crate::model::CreateCloudControlRequest::cloud_control].
6736    ///
6737    /// # Example
6738    /// ```ignore,no_run
6739    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateCloudControlRequest;
6740    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
6741    /// let x = CreateCloudControlRequest::new().set_cloud_control(CloudControl::default()/* use setters */);
6742    /// ```
6743    pub fn set_cloud_control<T>(mut self, v: T) -> Self
6744    where
6745        T: std::convert::Into<crate::model::CloudControl>,
6746    {
6747        self.cloud_control = std::option::Option::Some(v.into());
6748        self
6749    }
6750
6751    /// Sets or clears the value of [cloud_control][crate::model::CreateCloudControlRequest::cloud_control].
6752    ///
6753    /// # Example
6754    /// ```ignore,no_run
6755    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateCloudControlRequest;
6756    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
6757    /// let x = CreateCloudControlRequest::new().set_or_clear_cloud_control(Some(CloudControl::default()/* use setters */));
6758    /// let x = CreateCloudControlRequest::new().set_or_clear_cloud_control(None::<CloudControl>);
6759    /// ```
6760    pub fn set_or_clear_cloud_control<T>(mut self, v: std::option::Option<T>) -> Self
6761    where
6762        T: std::convert::Into<crate::model::CloudControl>,
6763    {
6764        self.cloud_control = v.map(|x| x.into());
6765        self
6766    }
6767}
6768
6769impl wkt::message::Message for CreateCloudControlRequest {
6770    fn typename() -> &'static str {
6771        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest"
6772    }
6773}
6774
6775/// The request message for [UpdateCloudControl][].
6776#[derive(Clone, Default, PartialEq)]
6777#[non_exhaustive]
6778pub struct UpdateCloudControlRequest {
6779    /// Optional. Use a field mask to specify the fields to be overwritten in the
6780    /// cloud control during the update.
6781    /// The fields that you specify in the `update_mask` are relative to the
6782    /// cloud control, not the full request. A field is overwritten if it is in
6783    /// the mask. If you don't provide a mask, all fields in the request
6784    /// are updated.
6785    ///
6786    /// You can update the following fields:
6787    ///
6788    /// - Display name
6789    /// - Description
6790    /// - Parameters
6791    /// - Rules
6792    /// - Parameter specification
6793    pub update_mask: std::option::Option<wkt::FieldMask>,
6794
6795    /// Required. The cloud control that you're updating.
6796    pub cloud_control: std::option::Option<crate::model::CloudControl>,
6797
6798    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6799}
6800
6801impl UpdateCloudControlRequest {
6802    /// Creates a new default instance.
6803    pub fn new() -> Self {
6804        std::default::Default::default()
6805    }
6806
6807    /// Sets the value of [update_mask][crate::model::UpdateCloudControlRequest::update_mask].
6808    ///
6809    /// # Example
6810    /// ```ignore,no_run
6811    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCloudControlRequest;
6812    /// use wkt::FieldMask;
6813    /// let x = UpdateCloudControlRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6814    /// ```
6815    pub fn set_update_mask<T>(mut self, v: T) -> Self
6816    where
6817        T: std::convert::Into<wkt::FieldMask>,
6818    {
6819        self.update_mask = std::option::Option::Some(v.into());
6820        self
6821    }
6822
6823    /// Sets or clears the value of [update_mask][crate::model::UpdateCloudControlRequest::update_mask].
6824    ///
6825    /// # Example
6826    /// ```ignore,no_run
6827    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCloudControlRequest;
6828    /// use wkt::FieldMask;
6829    /// let x = UpdateCloudControlRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6830    /// let x = UpdateCloudControlRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6831    /// ```
6832    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6833    where
6834        T: std::convert::Into<wkt::FieldMask>,
6835    {
6836        self.update_mask = v.map(|x| x.into());
6837        self
6838    }
6839
6840    /// Sets the value of [cloud_control][crate::model::UpdateCloudControlRequest::cloud_control].
6841    ///
6842    /// # Example
6843    /// ```ignore,no_run
6844    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCloudControlRequest;
6845    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
6846    /// let x = UpdateCloudControlRequest::new().set_cloud_control(CloudControl::default()/* use setters */);
6847    /// ```
6848    pub fn set_cloud_control<T>(mut self, v: T) -> Self
6849    where
6850        T: std::convert::Into<crate::model::CloudControl>,
6851    {
6852        self.cloud_control = std::option::Option::Some(v.into());
6853        self
6854    }
6855
6856    /// Sets or clears the value of [cloud_control][crate::model::UpdateCloudControlRequest::cloud_control].
6857    ///
6858    /// # Example
6859    /// ```ignore,no_run
6860    /// # use google_cloud_cloudsecuritycompliance_v1::model::UpdateCloudControlRequest;
6861    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
6862    /// let x = UpdateCloudControlRequest::new().set_or_clear_cloud_control(Some(CloudControl::default()/* use setters */));
6863    /// let x = UpdateCloudControlRequest::new().set_or_clear_cloud_control(None::<CloudControl>);
6864    /// ```
6865    pub fn set_or_clear_cloud_control<T>(mut self, v: std::option::Option<T>) -> Self
6866    where
6867        T: std::convert::Into<crate::model::CloudControl>,
6868    {
6869        self.cloud_control = v.map(|x| x.into());
6870        self
6871    }
6872}
6873
6874impl wkt::message::Message for UpdateCloudControlRequest {
6875    fn typename() -> &'static str {
6876        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest"
6877    }
6878}
6879
6880/// The request message for [DeleteCloudControl][].
6881#[derive(Clone, Default, PartialEq)]
6882#[non_exhaustive]
6883pub struct DeleteCloudControlRequest {
6884    /// Required. The name of the cloud control to delete, in one of the following
6885    /// formats:
6886    /// `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}`
6887    /// or
6888    /// `projects/{project}/locations/{location}/CloudControls/{CloudControl}`.
6889    ///
6890    /// The only supported location is `global`.
6891    pub name: std::string::String,
6892
6893    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6894}
6895
6896impl DeleteCloudControlRequest {
6897    /// Creates a new default instance.
6898    pub fn new() -> Self {
6899        std::default::Default::default()
6900    }
6901
6902    /// Sets the value of [name][crate::model::DeleteCloudControlRequest::name].
6903    ///
6904    /// # Example
6905    /// ```ignore,no_run
6906    /// # use google_cloud_cloudsecuritycompliance_v1::model::DeleteCloudControlRequest;
6907    /// let x = DeleteCloudControlRequest::new().set_name("example");
6908    /// ```
6909    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6910        self.name = v.into();
6911        self
6912    }
6913}
6914
6915impl wkt::message::Message for DeleteCloudControlRequest {
6916    fn typename() -> &'static str {
6917        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest"
6918    }
6919}
6920
6921/// Framework deployments represent the assignment of a framework to a target
6922/// resource. Supported target resources are organizations, folders, and
6923/// projects.
6924#[derive(Clone, Default, PartialEq)]
6925#[non_exhaustive]
6926pub struct FrameworkDeployment {
6927    /// Identifier. The name of the framework deployment, in the format
6928    /// `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}`
6929    /// or
6930    /// `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`.
6931    /// The only supported location is `global`.
6932    pub name: std::string::String,
6933
6934    /// Required. The details of the target resource that you want to deploy the
6935    /// framework to. You can specify an existing resource, or create a new one.
6936    pub target_resource_config: std::option::Option<crate::model::TargetResourceConfig>,
6937
6938    /// Output only. The target resource to deploy the framework to, in one  the
6939    /// following formats:
6940    ///
6941    /// - `organizations/{organizationID}`
6942    /// - `folders/{folderID}`
6943    /// - `projects/{projectID}`
6944    pub computed_target_resource: std::string::String,
6945
6946    /// Required. A reference to the framework that you're deploying.
6947    pub framework: std::option::Option<crate::model::FrameworkReference>,
6948
6949    /// Optional. A user-provided description of the framework deployment.
6950    pub description: std::string::String,
6951
6952    /// Required. The deployment mode and parameters for each of the cloud controls
6953    /// in the framework. Every cloud control in the framework includes metadata.
6954    pub cloud_control_metadata: std::vec::Vec<crate::model::CloudControlMetadata>,
6955
6956    /// Output only. The state for the framework deployment.
6957    pub deployment_state: crate::model::DeploymentState,
6958
6959    /// Output only. The time at which the resource was created.
6960    pub create_time: std::option::Option<wkt::Timestamp>,
6961
6962    /// Output only. The time at which the resource last updated.
6963    pub update_time: std::option::Option<wkt::Timestamp>,
6964
6965    /// Optional. To prevent concurrent updates from overwriting each other, always
6966    /// provide the `etag` when you update a framework deployment. You can also
6967    /// provide the `etag` when you delete a framework deployment, to help
6968    /// ensure that you're deleting the intended version of the
6969    /// framework deployment.
6970    pub etag: std::string::String,
6971
6972    /// Output only. The display name of the target resource.
6973    pub target_resource_display_name: std::string::String,
6974
6975    /// Output only. The references to the cloud control deployments. The reference
6976    /// includes all the cloud control deployments that are in the framework or in
6977    /// a cloud control group.
6978    ///
6979    /// For example, if a framework deployment deploys two
6980    /// cloud controls, `cc-deployment-1` and `cc-deployment-2`, then the
6981    /// references are:
6982    ///
6983    /// ```norust
6984    /// {
6985    ///  cloud_control_deployment_reference: {
6986    ///    cloud_control_deployment:
6987    ///    "organizations/{organization}/locations/{location}/cloudControlDeployments/cc-deployment-1"
6988    ///  },
6989    ///  cloud_control_deployment_reference: {
6990    ///   cloud_control_deployment:
6991    ///   "organizations/{organization}/locations/{location}/cloudControlDeployments/cc-deployment-2"
6992    ///  }
6993    /// ```
6994    pub cloud_control_deployment_references:
6995        std::vec::Vec<crate::model::CloudControlDeploymentReference>,
6996
6997    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6998}
6999
7000impl FrameworkDeployment {
7001    /// Creates a new default instance.
7002    pub fn new() -> Self {
7003        std::default::Default::default()
7004    }
7005
7006    /// Sets the value of [name][crate::model::FrameworkDeployment::name].
7007    ///
7008    /// # Example
7009    /// ```ignore,no_run
7010    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7011    /// let x = FrameworkDeployment::new().set_name("example");
7012    /// ```
7013    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7014        self.name = v.into();
7015        self
7016    }
7017
7018    /// Sets the value of [target_resource_config][crate::model::FrameworkDeployment::target_resource_config].
7019    ///
7020    /// # Example
7021    /// ```ignore,no_run
7022    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7023    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
7024    /// let x = FrameworkDeployment::new().set_target_resource_config(TargetResourceConfig::default()/* use setters */);
7025    /// ```
7026    pub fn set_target_resource_config<T>(mut self, v: T) -> Self
7027    where
7028        T: std::convert::Into<crate::model::TargetResourceConfig>,
7029    {
7030        self.target_resource_config = std::option::Option::Some(v.into());
7031        self
7032    }
7033
7034    /// Sets or clears the value of [target_resource_config][crate::model::FrameworkDeployment::target_resource_config].
7035    ///
7036    /// # Example
7037    /// ```ignore,no_run
7038    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7039    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
7040    /// let x = FrameworkDeployment::new().set_or_clear_target_resource_config(Some(TargetResourceConfig::default()/* use setters */));
7041    /// let x = FrameworkDeployment::new().set_or_clear_target_resource_config(None::<TargetResourceConfig>);
7042    /// ```
7043    pub fn set_or_clear_target_resource_config<T>(mut self, v: std::option::Option<T>) -> Self
7044    where
7045        T: std::convert::Into<crate::model::TargetResourceConfig>,
7046    {
7047        self.target_resource_config = v.map(|x| x.into());
7048        self
7049    }
7050
7051    /// Sets the value of [computed_target_resource][crate::model::FrameworkDeployment::computed_target_resource].
7052    ///
7053    /// # Example
7054    /// ```ignore,no_run
7055    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7056    /// let x = FrameworkDeployment::new().set_computed_target_resource("example");
7057    /// ```
7058    pub fn set_computed_target_resource<T: std::convert::Into<std::string::String>>(
7059        mut self,
7060        v: T,
7061    ) -> Self {
7062        self.computed_target_resource = v.into();
7063        self
7064    }
7065
7066    /// Sets the value of [framework][crate::model::FrameworkDeployment::framework].
7067    ///
7068    /// # Example
7069    /// ```ignore,no_run
7070    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7071    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
7072    /// let x = FrameworkDeployment::new().set_framework(FrameworkReference::default()/* use setters */);
7073    /// ```
7074    pub fn set_framework<T>(mut self, v: T) -> Self
7075    where
7076        T: std::convert::Into<crate::model::FrameworkReference>,
7077    {
7078        self.framework = std::option::Option::Some(v.into());
7079        self
7080    }
7081
7082    /// Sets or clears the value of [framework][crate::model::FrameworkDeployment::framework].
7083    ///
7084    /// # Example
7085    /// ```ignore,no_run
7086    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7087    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
7088    /// let x = FrameworkDeployment::new().set_or_clear_framework(Some(FrameworkReference::default()/* use setters */));
7089    /// let x = FrameworkDeployment::new().set_or_clear_framework(None::<FrameworkReference>);
7090    /// ```
7091    pub fn set_or_clear_framework<T>(mut self, v: std::option::Option<T>) -> Self
7092    where
7093        T: std::convert::Into<crate::model::FrameworkReference>,
7094    {
7095        self.framework = v.map(|x| x.into());
7096        self
7097    }
7098
7099    /// Sets the value of [description][crate::model::FrameworkDeployment::description].
7100    ///
7101    /// # Example
7102    /// ```ignore,no_run
7103    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7104    /// let x = FrameworkDeployment::new().set_description("example");
7105    /// ```
7106    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7107        self.description = v.into();
7108        self
7109    }
7110
7111    /// Sets the value of [cloud_control_metadata][crate::model::FrameworkDeployment::cloud_control_metadata].
7112    ///
7113    /// # Example
7114    /// ```ignore,no_run
7115    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7116    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlMetadata;
7117    /// let x = FrameworkDeployment::new()
7118    ///     .set_cloud_control_metadata([
7119    ///         CloudControlMetadata::default()/* use setters */,
7120    ///         CloudControlMetadata::default()/* use (different) setters */,
7121    ///     ]);
7122    /// ```
7123    pub fn set_cloud_control_metadata<T, V>(mut self, v: T) -> Self
7124    where
7125        T: std::iter::IntoIterator<Item = V>,
7126        V: std::convert::Into<crate::model::CloudControlMetadata>,
7127    {
7128        use std::iter::Iterator;
7129        self.cloud_control_metadata = v.into_iter().map(|i| i.into()).collect();
7130        self
7131    }
7132
7133    /// Sets the value of [deployment_state][crate::model::FrameworkDeployment::deployment_state].
7134    ///
7135    /// # Example
7136    /// ```ignore,no_run
7137    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7138    /// use google_cloud_cloudsecuritycompliance_v1::model::DeploymentState;
7139    /// let x0 = FrameworkDeployment::new().set_deployment_state(DeploymentState::Validating);
7140    /// let x1 = FrameworkDeployment::new().set_deployment_state(DeploymentState::Creating);
7141    /// let x2 = FrameworkDeployment::new().set_deployment_state(DeploymentState::Deleting);
7142    /// ```
7143    pub fn set_deployment_state<T: std::convert::Into<crate::model::DeploymentState>>(
7144        mut self,
7145        v: T,
7146    ) -> Self {
7147        self.deployment_state = v.into();
7148        self
7149    }
7150
7151    /// Sets the value of [create_time][crate::model::FrameworkDeployment::create_time].
7152    ///
7153    /// # Example
7154    /// ```ignore,no_run
7155    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7156    /// use wkt::Timestamp;
7157    /// let x = FrameworkDeployment::new().set_create_time(Timestamp::default()/* use setters */);
7158    /// ```
7159    pub fn set_create_time<T>(mut self, v: T) -> Self
7160    where
7161        T: std::convert::Into<wkt::Timestamp>,
7162    {
7163        self.create_time = std::option::Option::Some(v.into());
7164        self
7165    }
7166
7167    /// Sets or clears the value of [create_time][crate::model::FrameworkDeployment::create_time].
7168    ///
7169    /// # Example
7170    /// ```ignore,no_run
7171    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7172    /// use wkt::Timestamp;
7173    /// let x = FrameworkDeployment::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
7174    /// let x = FrameworkDeployment::new().set_or_clear_create_time(None::<Timestamp>);
7175    /// ```
7176    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7177    where
7178        T: std::convert::Into<wkt::Timestamp>,
7179    {
7180        self.create_time = v.map(|x| x.into());
7181        self
7182    }
7183
7184    /// Sets the value of [update_time][crate::model::FrameworkDeployment::update_time].
7185    ///
7186    /// # Example
7187    /// ```ignore,no_run
7188    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7189    /// use wkt::Timestamp;
7190    /// let x = FrameworkDeployment::new().set_update_time(Timestamp::default()/* use setters */);
7191    /// ```
7192    pub fn set_update_time<T>(mut self, v: T) -> Self
7193    where
7194        T: std::convert::Into<wkt::Timestamp>,
7195    {
7196        self.update_time = std::option::Option::Some(v.into());
7197        self
7198    }
7199
7200    /// Sets or clears the value of [update_time][crate::model::FrameworkDeployment::update_time].
7201    ///
7202    /// # Example
7203    /// ```ignore,no_run
7204    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7205    /// use wkt::Timestamp;
7206    /// let x = FrameworkDeployment::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
7207    /// let x = FrameworkDeployment::new().set_or_clear_update_time(None::<Timestamp>);
7208    /// ```
7209    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
7210    where
7211        T: std::convert::Into<wkt::Timestamp>,
7212    {
7213        self.update_time = v.map(|x| x.into());
7214        self
7215    }
7216
7217    /// Sets the value of [etag][crate::model::FrameworkDeployment::etag].
7218    ///
7219    /// # Example
7220    /// ```ignore,no_run
7221    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7222    /// let x = FrameworkDeployment::new().set_etag("example");
7223    /// ```
7224    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7225        self.etag = v.into();
7226        self
7227    }
7228
7229    /// Sets the value of [target_resource_display_name][crate::model::FrameworkDeployment::target_resource_display_name].
7230    ///
7231    /// # Example
7232    /// ```ignore,no_run
7233    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7234    /// let x = FrameworkDeployment::new().set_target_resource_display_name("example");
7235    /// ```
7236    pub fn set_target_resource_display_name<T: std::convert::Into<std::string::String>>(
7237        mut self,
7238        v: T,
7239    ) -> Self {
7240        self.target_resource_display_name = v.into();
7241        self
7242    }
7243
7244    /// Sets the value of [cloud_control_deployment_references][crate::model::FrameworkDeployment::cloud_control_deployment_references].
7245    ///
7246    /// # Example
7247    /// ```ignore,no_run
7248    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
7249    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeploymentReference;
7250    /// let x = FrameworkDeployment::new()
7251    ///     .set_cloud_control_deployment_references([
7252    ///         CloudControlDeploymentReference::default()/* use setters */,
7253    ///         CloudControlDeploymentReference::default()/* use (different) setters */,
7254    ///     ]);
7255    /// ```
7256    pub fn set_cloud_control_deployment_references<T, V>(mut self, v: T) -> Self
7257    where
7258        T: std::iter::IntoIterator<Item = V>,
7259        V: std::convert::Into<crate::model::CloudControlDeploymentReference>,
7260    {
7261        use std::iter::Iterator;
7262        self.cloud_control_deployment_references = v.into_iter().map(|i| i.into()).collect();
7263        self
7264    }
7265}
7266
7267impl wkt::message::Message for FrameworkDeployment {
7268    fn typename() -> &'static str {
7269        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment"
7270    }
7271}
7272
7273/// A cloud control deployment represents the deployment of a particular cloud
7274/// control on a target resource. Supported target resources are
7275/// `organizations/{organizationID}`, `folders/{folderID}`, and
7276/// `projects/{projectID}`.
7277#[derive(Clone, Default, PartialEq)]
7278#[non_exhaustive]
7279pub struct CloudControlDeployment {
7280    /// Identifier. The name for the cloud control deployment, in the format
7281    /// `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`
7282    /// or
7283    /// `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`.
7284    /// The only supported location is `global`.
7285    pub name: std::string::String,
7286
7287    /// Required. The details of the target resource that the cloud control is
7288    /// deployed You can use an existing target resource or create a new target.
7289    pub target_resource_config: std::option::Option<crate::model::TargetResourceConfig>,
7290
7291    /// Output only. The resource that the cloud control is deployed on, in one of
7292    /// the following formats:
7293    ///
7294    /// - `organizations/{organizationID}`
7295    /// - `folders/{folderID}`
7296    /// - `projects/{projectID}`
7297    pub target_resource: std::string::String,
7298
7299    /// Required. The deployment mode and parameters for the cloud control.
7300    pub cloud_control_metadata: std::option::Option<crate::model::CloudControlMetadata>,
7301
7302    /// Optional. A friendly description for the cloud control deployment.
7303    pub description: std::string::String,
7304
7305    /// Output only. The state of the cloud control deployment.
7306    pub deployment_state: crate::model::DeploymentState,
7307
7308    /// Output only. The time when the resource was created.
7309    pub create_time: std::option::Option<wkt::Timestamp>,
7310
7311    /// Output only. The time when the resource was last updated.
7312    pub update_time: std::option::Option<wkt::Timestamp>,
7313
7314    /// Optional. To prevent concurrent updates from overwriting each other,
7315    /// provide the `etag` when you update a cloud control deployment. You can also
7316    /// provide the `etag` when you delete a cloud control deployment to help
7317    /// ensure that you're deleting the intended version of the
7318    /// deployment.
7319    pub etag: std::string::String,
7320
7321    /// Output only. The cloud control after the given parameters are substituted.
7322    pub parameter_substituted_cloud_control: std::option::Option<crate::model::CloudControl>,
7323
7324    /// Output only. The references to the framework deployments that this cloud
7325    /// control deployment is part of. A cloud control deployment can be part of
7326    /// multiple framework deployments.
7327    pub framework_deployment_references: std::vec::Vec<crate::model::FrameworkDeploymentReference>,
7328
7329    /// Output only. The display name of the target resource.
7330    pub target_resource_display_name: std::string::String,
7331
7332    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7333}
7334
7335impl CloudControlDeployment {
7336    /// Creates a new default instance.
7337    pub fn new() -> Self {
7338        std::default::Default::default()
7339    }
7340
7341    /// Sets the value of [name][crate::model::CloudControlDeployment::name].
7342    ///
7343    /// # Example
7344    /// ```ignore,no_run
7345    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7346    /// let x = CloudControlDeployment::new().set_name("example");
7347    /// ```
7348    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7349        self.name = v.into();
7350        self
7351    }
7352
7353    /// Sets the value of [target_resource_config][crate::model::CloudControlDeployment::target_resource_config].
7354    ///
7355    /// # Example
7356    /// ```ignore,no_run
7357    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7358    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
7359    /// let x = CloudControlDeployment::new().set_target_resource_config(TargetResourceConfig::default()/* use setters */);
7360    /// ```
7361    pub fn set_target_resource_config<T>(mut self, v: T) -> Self
7362    where
7363        T: std::convert::Into<crate::model::TargetResourceConfig>,
7364    {
7365        self.target_resource_config = std::option::Option::Some(v.into());
7366        self
7367    }
7368
7369    /// Sets or clears the value of [target_resource_config][crate::model::CloudControlDeployment::target_resource_config].
7370    ///
7371    /// # Example
7372    /// ```ignore,no_run
7373    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7374    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
7375    /// let x = CloudControlDeployment::new().set_or_clear_target_resource_config(Some(TargetResourceConfig::default()/* use setters */));
7376    /// let x = CloudControlDeployment::new().set_or_clear_target_resource_config(None::<TargetResourceConfig>);
7377    /// ```
7378    pub fn set_or_clear_target_resource_config<T>(mut self, v: std::option::Option<T>) -> Self
7379    where
7380        T: std::convert::Into<crate::model::TargetResourceConfig>,
7381    {
7382        self.target_resource_config = v.map(|x| x.into());
7383        self
7384    }
7385
7386    /// Sets the value of [target_resource][crate::model::CloudControlDeployment::target_resource].
7387    ///
7388    /// # Example
7389    /// ```ignore,no_run
7390    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7391    /// let x = CloudControlDeployment::new().set_target_resource("example");
7392    /// ```
7393    pub fn set_target_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7394        self.target_resource = v.into();
7395        self
7396    }
7397
7398    /// Sets the value of [cloud_control_metadata][crate::model::CloudControlDeployment::cloud_control_metadata].
7399    ///
7400    /// # Example
7401    /// ```ignore,no_run
7402    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7403    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlMetadata;
7404    /// let x = CloudControlDeployment::new().set_cloud_control_metadata(CloudControlMetadata::default()/* use setters */);
7405    /// ```
7406    pub fn set_cloud_control_metadata<T>(mut self, v: T) -> Self
7407    where
7408        T: std::convert::Into<crate::model::CloudControlMetadata>,
7409    {
7410        self.cloud_control_metadata = std::option::Option::Some(v.into());
7411        self
7412    }
7413
7414    /// Sets or clears the value of [cloud_control_metadata][crate::model::CloudControlDeployment::cloud_control_metadata].
7415    ///
7416    /// # Example
7417    /// ```ignore,no_run
7418    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7419    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlMetadata;
7420    /// let x = CloudControlDeployment::new().set_or_clear_cloud_control_metadata(Some(CloudControlMetadata::default()/* use setters */));
7421    /// let x = CloudControlDeployment::new().set_or_clear_cloud_control_metadata(None::<CloudControlMetadata>);
7422    /// ```
7423    pub fn set_or_clear_cloud_control_metadata<T>(mut self, v: std::option::Option<T>) -> Self
7424    where
7425        T: std::convert::Into<crate::model::CloudControlMetadata>,
7426    {
7427        self.cloud_control_metadata = v.map(|x| x.into());
7428        self
7429    }
7430
7431    /// Sets the value of [description][crate::model::CloudControlDeployment::description].
7432    ///
7433    /// # Example
7434    /// ```ignore,no_run
7435    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7436    /// let x = CloudControlDeployment::new().set_description("example");
7437    /// ```
7438    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7439        self.description = v.into();
7440        self
7441    }
7442
7443    /// Sets the value of [deployment_state][crate::model::CloudControlDeployment::deployment_state].
7444    ///
7445    /// # Example
7446    /// ```ignore,no_run
7447    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7448    /// use google_cloud_cloudsecuritycompliance_v1::model::DeploymentState;
7449    /// let x0 = CloudControlDeployment::new().set_deployment_state(DeploymentState::Validating);
7450    /// let x1 = CloudControlDeployment::new().set_deployment_state(DeploymentState::Creating);
7451    /// let x2 = CloudControlDeployment::new().set_deployment_state(DeploymentState::Deleting);
7452    /// ```
7453    pub fn set_deployment_state<T: std::convert::Into<crate::model::DeploymentState>>(
7454        mut self,
7455        v: T,
7456    ) -> Self {
7457        self.deployment_state = v.into();
7458        self
7459    }
7460
7461    /// Sets the value of [create_time][crate::model::CloudControlDeployment::create_time].
7462    ///
7463    /// # Example
7464    /// ```ignore,no_run
7465    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7466    /// use wkt::Timestamp;
7467    /// let x = CloudControlDeployment::new().set_create_time(Timestamp::default()/* use setters */);
7468    /// ```
7469    pub fn set_create_time<T>(mut self, v: T) -> Self
7470    where
7471        T: std::convert::Into<wkt::Timestamp>,
7472    {
7473        self.create_time = std::option::Option::Some(v.into());
7474        self
7475    }
7476
7477    /// Sets or clears the value of [create_time][crate::model::CloudControlDeployment::create_time].
7478    ///
7479    /// # Example
7480    /// ```ignore,no_run
7481    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7482    /// use wkt::Timestamp;
7483    /// let x = CloudControlDeployment::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
7484    /// let x = CloudControlDeployment::new().set_or_clear_create_time(None::<Timestamp>);
7485    /// ```
7486    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7487    where
7488        T: std::convert::Into<wkt::Timestamp>,
7489    {
7490        self.create_time = v.map(|x| x.into());
7491        self
7492    }
7493
7494    /// Sets the value of [update_time][crate::model::CloudControlDeployment::update_time].
7495    ///
7496    /// # Example
7497    /// ```ignore,no_run
7498    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7499    /// use wkt::Timestamp;
7500    /// let x = CloudControlDeployment::new().set_update_time(Timestamp::default()/* use setters */);
7501    /// ```
7502    pub fn set_update_time<T>(mut self, v: T) -> Self
7503    where
7504        T: std::convert::Into<wkt::Timestamp>,
7505    {
7506        self.update_time = std::option::Option::Some(v.into());
7507        self
7508    }
7509
7510    /// Sets or clears the value of [update_time][crate::model::CloudControlDeployment::update_time].
7511    ///
7512    /// # Example
7513    /// ```ignore,no_run
7514    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7515    /// use wkt::Timestamp;
7516    /// let x = CloudControlDeployment::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
7517    /// let x = CloudControlDeployment::new().set_or_clear_update_time(None::<Timestamp>);
7518    /// ```
7519    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
7520    where
7521        T: std::convert::Into<wkt::Timestamp>,
7522    {
7523        self.update_time = v.map(|x| x.into());
7524        self
7525    }
7526
7527    /// Sets the value of [etag][crate::model::CloudControlDeployment::etag].
7528    ///
7529    /// # Example
7530    /// ```ignore,no_run
7531    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7532    /// let x = CloudControlDeployment::new().set_etag("example");
7533    /// ```
7534    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7535        self.etag = v.into();
7536        self
7537    }
7538
7539    /// Sets the value of [parameter_substituted_cloud_control][crate::model::CloudControlDeployment::parameter_substituted_cloud_control].
7540    ///
7541    /// # Example
7542    /// ```ignore,no_run
7543    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7544    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
7545    /// let x = CloudControlDeployment::new().set_parameter_substituted_cloud_control(CloudControl::default()/* use setters */);
7546    /// ```
7547    pub fn set_parameter_substituted_cloud_control<T>(mut self, v: T) -> Self
7548    where
7549        T: std::convert::Into<crate::model::CloudControl>,
7550    {
7551        self.parameter_substituted_cloud_control = std::option::Option::Some(v.into());
7552        self
7553    }
7554
7555    /// Sets or clears the value of [parameter_substituted_cloud_control][crate::model::CloudControlDeployment::parameter_substituted_cloud_control].
7556    ///
7557    /// # Example
7558    /// ```ignore,no_run
7559    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7560    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControl;
7561    /// let x = CloudControlDeployment::new().set_or_clear_parameter_substituted_cloud_control(Some(CloudControl::default()/* use setters */));
7562    /// let x = CloudControlDeployment::new().set_or_clear_parameter_substituted_cloud_control(None::<CloudControl>);
7563    /// ```
7564    pub fn set_or_clear_parameter_substituted_cloud_control<T>(
7565        mut self,
7566        v: std::option::Option<T>,
7567    ) -> Self
7568    where
7569        T: std::convert::Into<crate::model::CloudControl>,
7570    {
7571        self.parameter_substituted_cloud_control = v.map(|x| x.into());
7572        self
7573    }
7574
7575    /// Sets the value of [framework_deployment_references][crate::model::CloudControlDeployment::framework_deployment_references].
7576    ///
7577    /// # Example
7578    /// ```ignore,no_run
7579    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7580    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeploymentReference;
7581    /// let x = CloudControlDeployment::new()
7582    ///     .set_framework_deployment_references([
7583    ///         FrameworkDeploymentReference::default()/* use setters */,
7584    ///         FrameworkDeploymentReference::default()/* use (different) setters */,
7585    ///     ]);
7586    /// ```
7587    pub fn set_framework_deployment_references<T, V>(mut self, v: T) -> Self
7588    where
7589        T: std::iter::IntoIterator<Item = V>,
7590        V: std::convert::Into<crate::model::FrameworkDeploymentReference>,
7591    {
7592        use std::iter::Iterator;
7593        self.framework_deployment_references = v.into_iter().map(|i| i.into()).collect();
7594        self
7595    }
7596
7597    /// Sets the value of [target_resource_display_name][crate::model::CloudControlDeployment::target_resource_display_name].
7598    ///
7599    /// # Example
7600    /// ```ignore,no_run
7601    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
7602    /// let x = CloudControlDeployment::new().set_target_resource_display_name("example");
7603    /// ```
7604    pub fn set_target_resource_display_name<T: std::convert::Into<std::string::String>>(
7605        mut self,
7606        v: T,
7607    ) -> Self {
7608        self.target_resource_display_name = v.into();
7609        self
7610    }
7611}
7612
7613impl wkt::message::Message for CloudControlDeployment {
7614    fn typename() -> &'static str {
7615        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment"
7616    }
7617}
7618
7619/// The name of the target resource or the configuration that's required to
7620/// create a new target resource.
7621#[derive(Clone, Default, PartialEq)]
7622#[non_exhaustive]
7623pub struct TargetResourceConfig {
7624    /// The resource configuration for the target resource.
7625    pub resource_config: std::option::Option<crate::model::target_resource_config::ResourceConfig>,
7626
7627    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7628}
7629
7630impl TargetResourceConfig {
7631    /// Creates a new default instance.
7632    pub fn new() -> Self {
7633        std::default::Default::default()
7634    }
7635
7636    /// Sets the value of [resource_config][crate::model::TargetResourceConfig::resource_config].
7637    ///
7638    /// Note that all the setters affecting `resource_config` are mutually
7639    /// exclusive.
7640    ///
7641    /// # Example
7642    /// ```ignore,no_run
7643    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
7644    /// use google_cloud_cloudsecuritycompliance_v1::model::target_resource_config::ResourceConfig;
7645    /// let x = TargetResourceConfig::new().set_resource_config(Some(ResourceConfig::ExistingTargetResource("example".to_string())));
7646    /// ```
7647    pub fn set_resource_config<
7648        T: std::convert::Into<
7649                std::option::Option<crate::model::target_resource_config::ResourceConfig>,
7650            >,
7651    >(
7652        mut self,
7653        v: T,
7654    ) -> Self {
7655        self.resource_config = v.into();
7656        self
7657    }
7658
7659    /// The value of [resource_config][crate::model::TargetResourceConfig::resource_config]
7660    /// if it holds a `ExistingTargetResource`, `None` if the field is not set or
7661    /// holds a different branch.
7662    pub fn existing_target_resource(&self) -> std::option::Option<&std::string::String> {
7663        #[allow(unreachable_patterns)]
7664        self.resource_config.as_ref().and_then(|v| match v {
7665            crate::model::target_resource_config::ResourceConfig::ExistingTargetResource(v) => {
7666                std::option::Option::Some(v)
7667            }
7668            _ => std::option::Option::None,
7669        })
7670    }
7671
7672    /// Sets the value of [resource_config][crate::model::TargetResourceConfig::resource_config]
7673    /// to hold a `ExistingTargetResource`.
7674    ///
7675    /// Note that all the setters affecting `resource_config` are
7676    /// mutually exclusive.
7677    ///
7678    /// # Example
7679    /// ```ignore,no_run
7680    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
7681    /// let x = TargetResourceConfig::new().set_existing_target_resource("example");
7682    /// assert!(x.existing_target_resource().is_some());
7683    /// assert!(x.target_resource_creation_config().is_none());
7684    /// ```
7685    pub fn set_existing_target_resource<T: std::convert::Into<std::string::String>>(
7686        mut self,
7687        v: T,
7688    ) -> Self {
7689        self.resource_config = std::option::Option::Some(
7690            crate::model::target_resource_config::ResourceConfig::ExistingTargetResource(v.into()),
7691        );
7692        self
7693    }
7694
7695    /// The value of [resource_config][crate::model::TargetResourceConfig::resource_config]
7696    /// if it holds a `TargetResourceCreationConfig`, `None` if the field is not set or
7697    /// holds a different branch.
7698    pub fn target_resource_creation_config(
7699        &self,
7700    ) -> std::option::Option<&std::boxed::Box<crate::model::TargetResourceCreationConfig>> {
7701        #[allow(unreachable_patterns)]
7702        self.resource_config.as_ref().and_then(|v| match v {
7703            crate::model::target_resource_config::ResourceConfig::TargetResourceCreationConfig(
7704                v,
7705            ) => std::option::Option::Some(v),
7706            _ => std::option::Option::None,
7707        })
7708    }
7709
7710    /// Sets the value of [resource_config][crate::model::TargetResourceConfig::resource_config]
7711    /// to hold a `TargetResourceCreationConfig`.
7712    ///
7713    /// Note that all the setters affecting `resource_config` are
7714    /// mutually exclusive.
7715    ///
7716    /// # Example
7717    /// ```ignore,no_run
7718    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceConfig;
7719    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceCreationConfig;
7720    /// let x = TargetResourceConfig::new().set_target_resource_creation_config(TargetResourceCreationConfig::default()/* use setters */);
7721    /// assert!(x.target_resource_creation_config().is_some());
7722    /// assert!(x.existing_target_resource().is_none());
7723    /// ```
7724    pub fn set_target_resource_creation_config<
7725        T: std::convert::Into<std::boxed::Box<crate::model::TargetResourceCreationConfig>>,
7726    >(
7727        mut self,
7728        v: T,
7729    ) -> Self {
7730        self.resource_config = std::option::Option::Some(
7731            crate::model::target_resource_config::ResourceConfig::TargetResourceCreationConfig(
7732                v.into(),
7733            ),
7734        );
7735        self
7736    }
7737}
7738
7739impl wkt::message::Message for TargetResourceConfig {
7740    fn typename() -> &'static str {
7741        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig"
7742    }
7743}
7744
7745/// Defines additional types related to [TargetResourceConfig].
7746pub mod target_resource_config {
7747    #[allow(unused_imports)]
7748    use super::*;
7749
7750    /// The resource configuration for the target resource.
7751    #[derive(Clone, Debug, PartialEq)]
7752    #[non_exhaustive]
7753    pub enum ResourceConfig {
7754        /// Optional. The resource hierarchy node, in one of the following formats:
7755        ///
7756        /// - `organizations/{organizationID}`
7757        /// - `folders/{folderID}`
7758        /// - `projects/{projectID}`
7759        ExistingTargetResource(std::string::String),
7760        /// Optional. The details that are required to create a resource and use
7761        /// that resource as the target resource for deployment.
7762        TargetResourceCreationConfig(std::boxed::Box<crate::model::TargetResourceCreationConfig>),
7763    }
7764}
7765
7766/// The configuration that's required to create a target resource.
7767#[derive(Clone, Default, PartialEq)]
7768#[non_exhaustive]
7769pub struct TargetResourceCreationConfig {
7770    /// The configuration that's required to create the target resource.
7771    pub resource_creation_config:
7772        std::option::Option<crate::model::target_resource_creation_config::ResourceCreationConfig>,
7773
7774    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7775}
7776
7777impl TargetResourceCreationConfig {
7778    /// Creates a new default instance.
7779    pub fn new() -> Self {
7780        std::default::Default::default()
7781    }
7782
7783    /// Sets the value of [resource_creation_config][crate::model::TargetResourceCreationConfig::resource_creation_config].
7784    ///
7785    /// Note that all the setters affecting `resource_creation_config` are mutually
7786    /// exclusive.
7787    ///
7788    /// # Example
7789    /// ```ignore,no_run
7790    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceCreationConfig;
7791    /// use google_cloud_cloudsecuritycompliance_v1::model::FolderCreationConfig;
7792    /// let x = TargetResourceCreationConfig::new().set_resource_creation_config(Some(
7793    ///     google_cloud_cloudsecuritycompliance_v1::model::target_resource_creation_config::ResourceCreationConfig::FolderCreationConfig(FolderCreationConfig::default().into())));
7794    /// ```
7795    pub fn set_resource_creation_config<
7796        T: std::convert::Into<
7797                std::option::Option<
7798                    crate::model::target_resource_creation_config::ResourceCreationConfig,
7799                >,
7800            >,
7801    >(
7802        mut self,
7803        v: T,
7804    ) -> Self {
7805        self.resource_creation_config = v.into();
7806        self
7807    }
7808
7809    /// The value of [resource_creation_config][crate::model::TargetResourceCreationConfig::resource_creation_config]
7810    /// if it holds a `FolderCreationConfig`, `None` if the field is not set or
7811    /// holds a different branch.
7812    pub fn folder_creation_config(
7813        &self,
7814    ) -> std::option::Option<&std::boxed::Box<crate::model::FolderCreationConfig>> {
7815        #[allow(unreachable_patterns)]
7816        self.resource_creation_config.as_ref().and_then(|v| match v {
7817            crate::model::target_resource_creation_config::ResourceCreationConfig::FolderCreationConfig(v) => std::option::Option::Some(v),
7818            _ => std::option::Option::None,
7819        })
7820    }
7821
7822    /// Sets the value of [resource_creation_config][crate::model::TargetResourceCreationConfig::resource_creation_config]
7823    /// to hold a `FolderCreationConfig`.
7824    ///
7825    /// Note that all the setters affecting `resource_creation_config` are
7826    /// mutually exclusive.
7827    ///
7828    /// # Example
7829    /// ```ignore,no_run
7830    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceCreationConfig;
7831    /// use google_cloud_cloudsecuritycompliance_v1::model::FolderCreationConfig;
7832    /// let x = TargetResourceCreationConfig::new().set_folder_creation_config(FolderCreationConfig::default()/* use setters */);
7833    /// assert!(x.folder_creation_config().is_some());
7834    /// assert!(x.project_creation_config().is_none());
7835    /// ```
7836    pub fn set_folder_creation_config<
7837        T: std::convert::Into<std::boxed::Box<crate::model::FolderCreationConfig>>,
7838    >(
7839        mut self,
7840        v: T,
7841    ) -> Self {
7842        self.resource_creation_config = std::option::Option::Some(
7843            crate::model::target_resource_creation_config::ResourceCreationConfig::FolderCreationConfig(
7844                v.into()
7845            )
7846        );
7847        self
7848    }
7849
7850    /// The value of [resource_creation_config][crate::model::TargetResourceCreationConfig::resource_creation_config]
7851    /// if it holds a `ProjectCreationConfig`, `None` if the field is not set or
7852    /// holds a different branch.
7853    pub fn project_creation_config(
7854        &self,
7855    ) -> std::option::Option<&std::boxed::Box<crate::model::ProjectCreationConfig>> {
7856        #[allow(unreachable_patterns)]
7857        self.resource_creation_config.as_ref().and_then(|v| match v {
7858            crate::model::target_resource_creation_config::ResourceCreationConfig::ProjectCreationConfig(v) => std::option::Option::Some(v),
7859            _ => std::option::Option::None,
7860        })
7861    }
7862
7863    /// Sets the value of [resource_creation_config][crate::model::TargetResourceCreationConfig::resource_creation_config]
7864    /// to hold a `ProjectCreationConfig`.
7865    ///
7866    /// Note that all the setters affecting `resource_creation_config` are
7867    /// mutually exclusive.
7868    ///
7869    /// # Example
7870    /// ```ignore,no_run
7871    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceCreationConfig;
7872    /// use google_cloud_cloudsecuritycompliance_v1::model::ProjectCreationConfig;
7873    /// let x = TargetResourceCreationConfig::new().set_project_creation_config(ProjectCreationConfig::default()/* use setters */);
7874    /// assert!(x.project_creation_config().is_some());
7875    /// assert!(x.folder_creation_config().is_none());
7876    /// ```
7877    pub fn set_project_creation_config<
7878        T: std::convert::Into<std::boxed::Box<crate::model::ProjectCreationConfig>>,
7879    >(
7880        mut self,
7881        v: T,
7882    ) -> Self {
7883        self.resource_creation_config = std::option::Option::Some(
7884            crate::model::target_resource_creation_config::ResourceCreationConfig::ProjectCreationConfig(
7885                v.into()
7886            )
7887        );
7888        self
7889    }
7890}
7891
7892impl wkt::message::Message for TargetResourceCreationConfig {
7893    fn typename() -> &'static str {
7894        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig"
7895    }
7896}
7897
7898/// Defines additional types related to [TargetResourceCreationConfig].
7899pub mod target_resource_creation_config {
7900    #[allow(unused_imports)]
7901    use super::*;
7902
7903    /// The configuration that's required to create the target resource.
7904    #[derive(Clone, Debug, PartialEq)]
7905    #[non_exhaustive]
7906    pub enum ResourceCreationConfig {
7907        /// Optional. The configuration that's required to create a folder.
7908        FolderCreationConfig(std::boxed::Box<crate::model::FolderCreationConfig>),
7909        /// Optional. The configuration that's required to create a project.
7910        ProjectCreationConfig(std::boxed::Box<crate::model::ProjectCreationConfig>),
7911    }
7912}
7913
7914/// The configuration that's required to create a folder to be used
7915/// as the target resource for a deployment.
7916#[derive(Clone, Default, PartialEq)]
7917#[non_exhaustive]
7918pub struct FolderCreationConfig {
7919    /// Required. The parent of the folder, in the format
7920    /// `organizations/{organizationID}` or `folders/{folderID}`.
7921    pub parent: std::string::String,
7922
7923    /// Required. The display name of the folder.
7924    pub folder_display_name: std::string::String,
7925
7926    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7927}
7928
7929impl FolderCreationConfig {
7930    /// Creates a new default instance.
7931    pub fn new() -> Self {
7932        std::default::Default::default()
7933    }
7934
7935    /// Sets the value of [parent][crate::model::FolderCreationConfig::parent].
7936    ///
7937    /// # Example
7938    /// ```ignore,no_run
7939    /// # use google_cloud_cloudsecuritycompliance_v1::model::FolderCreationConfig;
7940    /// let x = FolderCreationConfig::new().set_parent("example");
7941    /// ```
7942    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7943        self.parent = v.into();
7944        self
7945    }
7946
7947    /// Sets the value of [folder_display_name][crate::model::FolderCreationConfig::folder_display_name].
7948    ///
7949    /// # Example
7950    /// ```ignore,no_run
7951    /// # use google_cloud_cloudsecuritycompliance_v1::model::FolderCreationConfig;
7952    /// let x = FolderCreationConfig::new().set_folder_display_name("example");
7953    /// ```
7954    pub fn set_folder_display_name<T: std::convert::Into<std::string::String>>(
7955        mut self,
7956        v: T,
7957    ) -> Self {
7958        self.folder_display_name = v.into();
7959        self
7960    }
7961}
7962
7963impl wkt::message::Message for FolderCreationConfig {
7964    fn typename() -> &'static str {
7965        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig"
7966    }
7967}
7968
7969/// The configuration that's required to create a project to be used
7970/// as the target resource of a deployment.
7971#[derive(Clone, Default, PartialEq)]
7972#[non_exhaustive]
7973pub struct ProjectCreationConfig {
7974    /// Required. The parent of the project, in the format
7975    /// `organizations/{organizationID}` or `folders/{folderID}`.
7976    pub parent: std::string::String,
7977
7978    /// Required. The display name of the project.
7979    pub project_display_name: std::string::String,
7980
7981    /// Required. The billing account ID for the project.
7982    pub billing_account_id: std::string::String,
7983
7984    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7985}
7986
7987impl ProjectCreationConfig {
7988    /// Creates a new default instance.
7989    pub fn new() -> Self {
7990        std::default::Default::default()
7991    }
7992
7993    /// Sets the value of [parent][crate::model::ProjectCreationConfig::parent].
7994    ///
7995    /// # Example
7996    /// ```ignore,no_run
7997    /// # use google_cloud_cloudsecuritycompliance_v1::model::ProjectCreationConfig;
7998    /// let x = ProjectCreationConfig::new().set_parent("example");
7999    /// ```
8000    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8001        self.parent = v.into();
8002        self
8003    }
8004
8005    /// Sets the value of [project_display_name][crate::model::ProjectCreationConfig::project_display_name].
8006    ///
8007    /// # Example
8008    /// ```ignore,no_run
8009    /// # use google_cloud_cloudsecuritycompliance_v1::model::ProjectCreationConfig;
8010    /// let x = ProjectCreationConfig::new().set_project_display_name("example");
8011    /// ```
8012    pub fn set_project_display_name<T: std::convert::Into<std::string::String>>(
8013        mut self,
8014        v: T,
8015    ) -> Self {
8016        self.project_display_name = v.into();
8017        self
8018    }
8019
8020    /// Sets the value of [billing_account_id][crate::model::ProjectCreationConfig::billing_account_id].
8021    ///
8022    /// # Example
8023    /// ```ignore,no_run
8024    /// # use google_cloud_cloudsecuritycompliance_v1::model::ProjectCreationConfig;
8025    /// let x = ProjectCreationConfig::new().set_billing_account_id("example");
8026    /// ```
8027    pub fn set_billing_account_id<T: std::convert::Into<std::string::String>>(
8028        mut self,
8029        v: T,
8030    ) -> Self {
8031        self.billing_account_id = v.into();
8032        self
8033    }
8034}
8035
8036impl wkt::message::Message for ProjectCreationConfig {
8037    fn typename() -> &'static str {
8038        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig"
8039    }
8040}
8041
8042/// The enforcement mode and parameters of a cloud
8043/// control deployment.
8044#[derive(Clone, Default, PartialEq)]
8045#[non_exhaustive]
8046pub struct CloudControlMetadata {
8047    /// Required. The cloud control name and parameters.
8048    pub cloud_control_details: std::option::Option<crate::model::CloudControlDetails>,
8049
8050    /// Required. The enforcement mode of the cloud control.
8051    pub enforcement_mode: crate::model::EnforcementMode,
8052
8053    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8054}
8055
8056impl CloudControlMetadata {
8057    /// Creates a new default instance.
8058    pub fn new() -> Self {
8059        std::default::Default::default()
8060    }
8061
8062    /// Sets the value of [cloud_control_details][crate::model::CloudControlMetadata::cloud_control_details].
8063    ///
8064    /// # Example
8065    /// ```ignore,no_run
8066    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlMetadata;
8067    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDetails;
8068    /// let x = CloudControlMetadata::new().set_cloud_control_details(CloudControlDetails::default()/* use setters */);
8069    /// ```
8070    pub fn set_cloud_control_details<T>(mut self, v: T) -> Self
8071    where
8072        T: std::convert::Into<crate::model::CloudControlDetails>,
8073    {
8074        self.cloud_control_details = std::option::Option::Some(v.into());
8075        self
8076    }
8077
8078    /// Sets or clears the value of [cloud_control_details][crate::model::CloudControlMetadata::cloud_control_details].
8079    ///
8080    /// # Example
8081    /// ```ignore,no_run
8082    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlMetadata;
8083    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDetails;
8084    /// let x = CloudControlMetadata::new().set_or_clear_cloud_control_details(Some(CloudControlDetails::default()/* use setters */));
8085    /// let x = CloudControlMetadata::new().set_or_clear_cloud_control_details(None::<CloudControlDetails>);
8086    /// ```
8087    pub fn set_or_clear_cloud_control_details<T>(mut self, v: std::option::Option<T>) -> Self
8088    where
8089        T: std::convert::Into<crate::model::CloudControlDetails>,
8090    {
8091        self.cloud_control_details = v.map(|x| x.into());
8092        self
8093    }
8094
8095    /// Sets the value of [enforcement_mode][crate::model::CloudControlMetadata::enforcement_mode].
8096    ///
8097    /// # Example
8098    /// ```ignore,no_run
8099    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlMetadata;
8100    /// use google_cloud_cloudsecuritycompliance_v1::model::EnforcementMode;
8101    /// let x0 = CloudControlMetadata::new().set_enforcement_mode(EnforcementMode::Preventive);
8102    /// let x1 = CloudControlMetadata::new().set_enforcement_mode(EnforcementMode::Detective);
8103    /// let x2 = CloudControlMetadata::new().set_enforcement_mode(EnforcementMode::Audit);
8104    /// ```
8105    pub fn set_enforcement_mode<T: std::convert::Into<crate::model::EnforcementMode>>(
8106        mut self,
8107        v: T,
8108    ) -> Self {
8109        self.enforcement_mode = v.into();
8110        self
8111    }
8112}
8113
8114impl wkt::message::Message for CloudControlMetadata {
8115    fn typename() -> &'static str {
8116        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata"
8117    }
8118}
8119
8120/// The request message for [CreateFrameworkDeployment][].
8121#[derive(Clone, Default, PartialEq)]
8122#[non_exhaustive]
8123pub struct CreateFrameworkDeploymentRequest {
8124    /// Required. The parent resource of the framework deployment in the format
8125    /// `organizations/{organization}/locations/{location}`
8126    /// or
8127    /// `projects/{project}/locations/{location}`.
8128    /// Only the global location is supported.
8129    pub parent: std::string::String,
8130
8131    /// Optional. An identifier for the framework deployment that's unique in scope
8132    /// of the parent. If you don't specify a value, then a random UUID is
8133    /// generated.
8134    pub framework_deployment_id: std::string::String,
8135
8136    /// Required. The framework deployment that you're creating.
8137    pub framework_deployment: std::option::Option<crate::model::FrameworkDeployment>,
8138
8139    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8140}
8141
8142impl CreateFrameworkDeploymentRequest {
8143    /// Creates a new default instance.
8144    pub fn new() -> Self {
8145        std::default::Default::default()
8146    }
8147
8148    /// Sets the value of [parent][crate::model::CreateFrameworkDeploymentRequest::parent].
8149    ///
8150    /// # Example
8151    /// ```ignore,no_run
8152    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkDeploymentRequest;
8153    /// let x = CreateFrameworkDeploymentRequest::new().set_parent("example");
8154    /// ```
8155    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8156        self.parent = v.into();
8157        self
8158    }
8159
8160    /// Sets the value of [framework_deployment_id][crate::model::CreateFrameworkDeploymentRequest::framework_deployment_id].
8161    ///
8162    /// # Example
8163    /// ```ignore,no_run
8164    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkDeploymentRequest;
8165    /// let x = CreateFrameworkDeploymentRequest::new().set_framework_deployment_id("example");
8166    /// ```
8167    pub fn set_framework_deployment_id<T: std::convert::Into<std::string::String>>(
8168        mut self,
8169        v: T,
8170    ) -> Self {
8171        self.framework_deployment_id = v.into();
8172        self
8173    }
8174
8175    /// Sets the value of [framework_deployment][crate::model::CreateFrameworkDeploymentRequest::framework_deployment].
8176    ///
8177    /// # Example
8178    /// ```ignore,no_run
8179    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkDeploymentRequest;
8180    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
8181    /// let x = CreateFrameworkDeploymentRequest::new().set_framework_deployment(FrameworkDeployment::default()/* use setters */);
8182    /// ```
8183    pub fn set_framework_deployment<T>(mut self, v: T) -> Self
8184    where
8185        T: std::convert::Into<crate::model::FrameworkDeployment>,
8186    {
8187        self.framework_deployment = std::option::Option::Some(v.into());
8188        self
8189    }
8190
8191    /// Sets or clears the value of [framework_deployment][crate::model::CreateFrameworkDeploymentRequest::framework_deployment].
8192    ///
8193    /// # Example
8194    /// ```ignore,no_run
8195    /// # use google_cloud_cloudsecuritycompliance_v1::model::CreateFrameworkDeploymentRequest;
8196    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
8197    /// let x = CreateFrameworkDeploymentRequest::new().set_or_clear_framework_deployment(Some(FrameworkDeployment::default()/* use setters */));
8198    /// let x = CreateFrameworkDeploymentRequest::new().set_or_clear_framework_deployment(None::<FrameworkDeployment>);
8199    /// ```
8200    pub fn set_or_clear_framework_deployment<T>(mut self, v: std::option::Option<T>) -> Self
8201    where
8202        T: std::convert::Into<crate::model::FrameworkDeployment>,
8203    {
8204        self.framework_deployment = v.map(|x| x.into());
8205        self
8206    }
8207}
8208
8209impl wkt::message::Message for CreateFrameworkDeploymentRequest {
8210    fn typename() -> &'static str {
8211        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest"
8212    }
8213}
8214
8215/// The request message for [DeleteFrameworkDeployment][].
8216#[derive(Clone, Default, PartialEq)]
8217#[non_exhaustive]
8218pub struct DeleteFrameworkDeploymentRequest {
8219    /// Required. The name of the framework deployment that you want to delete,
8220    /// in the format
8221    /// `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}`
8222    /// or
8223    /// `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`.
8224    /// The only supported location is `global`.
8225    pub name: std::string::String,
8226
8227    /// Optional. An opaque identifier for the current version of the resource.
8228    ///
8229    /// If you provide this value, then it must match the existing value. If the
8230    /// values don't match, then the request fails with an
8231    /// [`ABORTED`][google.rpc.Code.ABORTED] error.
8232    ///
8233    /// If you omit this value, then the resource is deleted regardless of its
8234    /// current `etag` value.
8235    pub etag: std::string::String,
8236
8237    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8238}
8239
8240impl DeleteFrameworkDeploymentRequest {
8241    /// Creates a new default instance.
8242    pub fn new() -> Self {
8243        std::default::Default::default()
8244    }
8245
8246    /// Sets the value of [name][crate::model::DeleteFrameworkDeploymentRequest::name].
8247    ///
8248    /// # Example
8249    /// ```ignore,no_run
8250    /// # use google_cloud_cloudsecuritycompliance_v1::model::DeleteFrameworkDeploymentRequest;
8251    /// let x = DeleteFrameworkDeploymentRequest::new().set_name("example");
8252    /// ```
8253    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8254        self.name = v.into();
8255        self
8256    }
8257
8258    /// Sets the value of [etag][crate::model::DeleteFrameworkDeploymentRequest::etag].
8259    ///
8260    /// # Example
8261    /// ```ignore,no_run
8262    /// # use google_cloud_cloudsecuritycompliance_v1::model::DeleteFrameworkDeploymentRequest;
8263    /// let x = DeleteFrameworkDeploymentRequest::new().set_etag("example");
8264    /// ```
8265    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8266        self.etag = v.into();
8267        self
8268    }
8269}
8270
8271impl wkt::message::Message for DeleteFrameworkDeploymentRequest {
8272    fn typename() -> &'static str {
8273        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest"
8274    }
8275}
8276
8277/// The request message for [GetFrameworkDeployment][].
8278#[derive(Clone, Default, PartialEq)]
8279#[non_exhaustive]
8280pub struct GetFrameworkDeploymentRequest {
8281    /// Required. The name of the framework deployment, in the format
8282    /// `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}`
8283    /// or
8284    /// `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`.
8285    /// The only supported location is `global`.
8286    pub name: std::string::String,
8287
8288    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8289}
8290
8291impl GetFrameworkDeploymentRequest {
8292    /// Creates a new default instance.
8293    pub fn new() -> Self {
8294        std::default::Default::default()
8295    }
8296
8297    /// Sets the value of [name][crate::model::GetFrameworkDeploymentRequest::name].
8298    ///
8299    /// # Example
8300    /// ```ignore,no_run
8301    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetFrameworkDeploymentRequest;
8302    /// let x = GetFrameworkDeploymentRequest::new().set_name("example");
8303    /// ```
8304    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8305        self.name = v.into();
8306        self
8307    }
8308}
8309
8310impl wkt::message::Message for GetFrameworkDeploymentRequest {
8311    fn typename() -> &'static str {
8312        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest"
8313    }
8314}
8315
8316/// The request message for [ListFrameworkDeployments][].
8317#[derive(Clone, Default, PartialEq)]
8318#[non_exhaustive]
8319pub struct ListFrameworkDeploymentsRequest {
8320    /// Required. The parent resource of the framework deployment, in the format
8321    /// `organizations/{organization}/locations/{location}`
8322    /// or
8323    /// `projects/{project}/locations/{location}`.
8324    /// The only supported location is `global`.
8325    pub parent: std::string::String,
8326
8327    /// Optional. The requested page size. The server might return fewer items than
8328    /// requested.
8329    /// If unspecified, the server picks an appropriate default.
8330    pub page_size: i32,
8331
8332    /// Optional. A token that identifies a page of results the server should
8333    /// return.
8334    pub page_token: std::string::String,
8335
8336    /// Optional. The filter to be applied on the resource, as defined by
8337    /// [AIP-160: Filtering](https://google.aip.dev/160).
8338    pub filter: std::string::String,
8339
8340    /// Optional. The sort order for the results. The following values are
8341    /// supported:
8342    ///
8343    /// * `name`
8344    /// * `name desc`
8345    ///
8346    /// If you do not specify a value, then the results are not sorted.
8347    pub order_by: std::string::String,
8348
8349    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8350}
8351
8352impl ListFrameworkDeploymentsRequest {
8353    /// Creates a new default instance.
8354    pub fn new() -> Self {
8355        std::default::Default::default()
8356    }
8357
8358    /// Sets the value of [parent][crate::model::ListFrameworkDeploymentsRequest::parent].
8359    ///
8360    /// # Example
8361    /// ```ignore,no_run
8362    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsRequest;
8363    /// let x = ListFrameworkDeploymentsRequest::new().set_parent("example");
8364    /// ```
8365    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8366        self.parent = v.into();
8367        self
8368    }
8369
8370    /// Sets the value of [page_size][crate::model::ListFrameworkDeploymentsRequest::page_size].
8371    ///
8372    /// # Example
8373    /// ```ignore,no_run
8374    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsRequest;
8375    /// let x = ListFrameworkDeploymentsRequest::new().set_page_size(42);
8376    /// ```
8377    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8378        self.page_size = v.into();
8379        self
8380    }
8381
8382    /// Sets the value of [page_token][crate::model::ListFrameworkDeploymentsRequest::page_token].
8383    ///
8384    /// # Example
8385    /// ```ignore,no_run
8386    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsRequest;
8387    /// let x = ListFrameworkDeploymentsRequest::new().set_page_token("example");
8388    /// ```
8389    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8390        self.page_token = v.into();
8391        self
8392    }
8393
8394    /// Sets the value of [filter][crate::model::ListFrameworkDeploymentsRequest::filter].
8395    ///
8396    /// # Example
8397    /// ```ignore,no_run
8398    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsRequest;
8399    /// let x = ListFrameworkDeploymentsRequest::new().set_filter("example");
8400    /// ```
8401    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8402        self.filter = v.into();
8403        self
8404    }
8405
8406    /// Sets the value of [order_by][crate::model::ListFrameworkDeploymentsRequest::order_by].
8407    ///
8408    /// # Example
8409    /// ```ignore,no_run
8410    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsRequest;
8411    /// let x = ListFrameworkDeploymentsRequest::new().set_order_by("example");
8412    /// ```
8413    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8414        self.order_by = v.into();
8415        self
8416    }
8417}
8418
8419impl wkt::message::Message for ListFrameworkDeploymentsRequest {
8420    fn typename() -> &'static str {
8421        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest"
8422    }
8423}
8424
8425/// The response message for [ListFrameworkDeployments][].
8426#[derive(Clone, Default, PartialEq)]
8427#[non_exhaustive]
8428pub struct ListFrameworkDeploymentsResponse {
8429    /// The list of framework deployments.
8430    pub framework_deployments: std::vec::Vec<crate::model::FrameworkDeployment>,
8431
8432    /// A token that identifies the next page of results that the server
8433    /// should return.
8434    pub next_page_token: std::string::String,
8435
8436    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8437}
8438
8439impl ListFrameworkDeploymentsResponse {
8440    /// Creates a new default instance.
8441    pub fn new() -> Self {
8442        std::default::Default::default()
8443    }
8444
8445    /// Sets the value of [framework_deployments][crate::model::ListFrameworkDeploymentsResponse::framework_deployments].
8446    ///
8447    /// # Example
8448    /// ```ignore,no_run
8449    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsResponse;
8450    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeployment;
8451    /// let x = ListFrameworkDeploymentsResponse::new()
8452    ///     .set_framework_deployments([
8453    ///         FrameworkDeployment::default()/* use setters */,
8454    ///         FrameworkDeployment::default()/* use (different) setters */,
8455    ///     ]);
8456    /// ```
8457    pub fn set_framework_deployments<T, V>(mut self, v: T) -> Self
8458    where
8459        T: std::iter::IntoIterator<Item = V>,
8460        V: std::convert::Into<crate::model::FrameworkDeployment>,
8461    {
8462        use std::iter::Iterator;
8463        self.framework_deployments = v.into_iter().map(|i| i.into()).collect();
8464        self
8465    }
8466
8467    /// Sets the value of [next_page_token][crate::model::ListFrameworkDeploymentsResponse::next_page_token].
8468    ///
8469    /// # Example
8470    /// ```ignore,no_run
8471    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkDeploymentsResponse;
8472    /// let x = ListFrameworkDeploymentsResponse::new().set_next_page_token("example");
8473    /// ```
8474    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8475        self.next_page_token = v.into();
8476        self
8477    }
8478}
8479
8480impl wkt::message::Message for ListFrameworkDeploymentsResponse {
8481    fn typename() -> &'static str {
8482        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse"
8483    }
8484}
8485
8486#[doc(hidden)]
8487impl google_cloud_gax::paginator::internal::PageableResponse for ListFrameworkDeploymentsResponse {
8488    type PageItem = crate::model::FrameworkDeployment;
8489
8490    fn items(self) -> std::vec::Vec<Self::PageItem> {
8491        self.framework_deployments
8492    }
8493
8494    fn next_page_token(&self) -> std::string::String {
8495        use std::clone::Clone;
8496        self.next_page_token.clone()
8497    }
8498}
8499
8500/// The request message for [GetCloudControlDeployment][].
8501#[derive(Clone, Default, PartialEq)]
8502#[non_exhaustive]
8503pub struct GetCloudControlDeploymentRequest {
8504    /// Required. The name for the cloud control deployment, in the format
8505    /// `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`
8506    /// or
8507    /// `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`.
8508    /// The only supported location is `global`.
8509    pub name: std::string::String,
8510
8511    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8512}
8513
8514impl GetCloudControlDeploymentRequest {
8515    /// Creates a new default instance.
8516    pub fn new() -> Self {
8517        std::default::Default::default()
8518    }
8519
8520    /// Sets the value of [name][crate::model::GetCloudControlDeploymentRequest::name].
8521    ///
8522    /// # Example
8523    /// ```ignore,no_run
8524    /// # use google_cloud_cloudsecuritycompliance_v1::model::GetCloudControlDeploymentRequest;
8525    /// let x = GetCloudControlDeploymentRequest::new().set_name("example");
8526    /// ```
8527    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8528        self.name = v.into();
8529        self
8530    }
8531}
8532
8533impl wkt::message::Message for GetCloudControlDeploymentRequest {
8534    fn typename() -> &'static str {
8535        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest"
8536    }
8537}
8538
8539/// The request message for [ListCloudControlDeployments][].
8540#[derive(Clone, Default, PartialEq)]
8541#[non_exhaustive]
8542pub struct ListCloudControlDeploymentsRequest {
8543    /// Required. The parent resource for the cloud control deployment, in the
8544    /// format `organizations/{organization}/locations/{location}` or
8545    /// `projects/{project}/locations/{location}`.
8546    /// The only supported location is `global`.
8547    pub parent: std::string::String,
8548
8549    /// Optional. The requested page size. The server might return fewer items than
8550    /// you requested.
8551    /// If unspecified, the server picks an appropriate default.
8552    pub page_size: i32,
8553
8554    /// Optional. A token that identifies the page of results that the server
8555    /// should return.
8556    pub page_token: std::string::String,
8557
8558    /// Optional. The filter to apply on the resource, as defined by
8559    /// [AIP-160: Filtering](https://google.aip.dev/160).
8560    pub filter: std::string::String,
8561
8562    /// Optional. The sort order for the results. The following values are
8563    /// supported:
8564    ///
8565    /// * `name`
8566    /// * `name desc`
8567    ///
8568    /// If you do not specify a value, then the results are not sorted.
8569    pub order_by: std::string::String,
8570
8571    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8572}
8573
8574impl ListCloudControlDeploymentsRequest {
8575    /// Creates a new default instance.
8576    pub fn new() -> Self {
8577        std::default::Default::default()
8578    }
8579
8580    /// Sets the value of [parent][crate::model::ListCloudControlDeploymentsRequest::parent].
8581    ///
8582    /// # Example
8583    /// ```ignore,no_run
8584    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsRequest;
8585    /// let x = ListCloudControlDeploymentsRequest::new().set_parent("example");
8586    /// ```
8587    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8588        self.parent = v.into();
8589        self
8590    }
8591
8592    /// Sets the value of [page_size][crate::model::ListCloudControlDeploymentsRequest::page_size].
8593    ///
8594    /// # Example
8595    /// ```ignore,no_run
8596    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsRequest;
8597    /// let x = ListCloudControlDeploymentsRequest::new().set_page_size(42);
8598    /// ```
8599    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8600        self.page_size = v.into();
8601        self
8602    }
8603
8604    /// Sets the value of [page_token][crate::model::ListCloudControlDeploymentsRequest::page_token].
8605    ///
8606    /// # Example
8607    /// ```ignore,no_run
8608    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsRequest;
8609    /// let x = ListCloudControlDeploymentsRequest::new().set_page_token("example");
8610    /// ```
8611    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8612        self.page_token = v.into();
8613        self
8614    }
8615
8616    /// Sets the value of [filter][crate::model::ListCloudControlDeploymentsRequest::filter].
8617    ///
8618    /// # Example
8619    /// ```ignore,no_run
8620    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsRequest;
8621    /// let x = ListCloudControlDeploymentsRequest::new().set_filter("example");
8622    /// ```
8623    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8624        self.filter = v.into();
8625        self
8626    }
8627
8628    /// Sets the value of [order_by][crate::model::ListCloudControlDeploymentsRequest::order_by].
8629    ///
8630    /// # Example
8631    /// ```ignore,no_run
8632    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsRequest;
8633    /// let x = ListCloudControlDeploymentsRequest::new().set_order_by("example");
8634    /// ```
8635    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8636        self.order_by = v.into();
8637        self
8638    }
8639}
8640
8641impl wkt::message::Message for ListCloudControlDeploymentsRequest {
8642    fn typename() -> &'static str {
8643        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest"
8644    }
8645}
8646
8647/// The response message for [ListCloudControlDeployments][].
8648#[derive(Clone, Default, PartialEq)]
8649#[non_exhaustive]
8650pub struct ListCloudControlDeploymentsResponse {
8651    /// The list of cloud control deployments.
8652    pub cloud_control_deployments: std::vec::Vec<crate::model::CloudControlDeployment>,
8653
8654    /// A token that identifies the next page of results that the server
8655    /// should return.
8656    pub next_page_token: std::string::String,
8657
8658    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8659}
8660
8661impl ListCloudControlDeploymentsResponse {
8662    /// Creates a new default instance.
8663    pub fn new() -> Self {
8664        std::default::Default::default()
8665    }
8666
8667    /// Sets the value of [cloud_control_deployments][crate::model::ListCloudControlDeploymentsResponse::cloud_control_deployments].
8668    ///
8669    /// # Example
8670    /// ```ignore,no_run
8671    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsResponse;
8672    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeployment;
8673    /// let x = ListCloudControlDeploymentsResponse::new()
8674    ///     .set_cloud_control_deployments([
8675    ///         CloudControlDeployment::default()/* use setters */,
8676    ///         CloudControlDeployment::default()/* use (different) setters */,
8677    ///     ]);
8678    /// ```
8679    pub fn set_cloud_control_deployments<T, V>(mut self, v: T) -> Self
8680    where
8681        T: std::iter::IntoIterator<Item = V>,
8682        V: std::convert::Into<crate::model::CloudControlDeployment>,
8683    {
8684        use std::iter::Iterator;
8685        self.cloud_control_deployments = v.into_iter().map(|i| i.into()).collect();
8686        self
8687    }
8688
8689    /// Sets the value of [next_page_token][crate::model::ListCloudControlDeploymentsResponse::next_page_token].
8690    ///
8691    /// # Example
8692    /// ```ignore,no_run
8693    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListCloudControlDeploymentsResponse;
8694    /// let x = ListCloudControlDeploymentsResponse::new().set_next_page_token("example");
8695    /// ```
8696    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8697        self.next_page_token = v.into();
8698        self
8699    }
8700}
8701
8702impl wkt::message::Message for ListCloudControlDeploymentsResponse {
8703    fn typename() -> &'static str {
8704        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse"
8705    }
8706}
8707
8708#[doc(hidden)]
8709impl google_cloud_gax::paginator::internal::PageableResponse
8710    for ListCloudControlDeploymentsResponse
8711{
8712    type PageItem = crate::model::CloudControlDeployment;
8713
8714    fn items(self) -> std::vec::Vec<Self::PageItem> {
8715        self.cloud_control_deployments
8716    }
8717
8718    fn next_page_token(&self) -> std::string::String {
8719        use std::clone::Clone;
8720        self.next_page_token.clone()
8721    }
8722}
8723
8724/// The reference to a cloud control deployment.
8725#[derive(Clone, Default, PartialEq)]
8726#[non_exhaustive]
8727pub struct CloudControlDeploymentReference {
8728    /// Output only. The name of the CloudControlDeployment. The format is
8729    /// `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`
8730    /// or
8731    /// `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`.
8732    /// The only supported location is `global`.
8733    pub cloud_control_deployment: std::string::String,
8734
8735    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8736}
8737
8738impl CloudControlDeploymentReference {
8739    /// Creates a new default instance.
8740    pub fn new() -> Self {
8741        std::default::Default::default()
8742    }
8743
8744    /// Sets the value of [cloud_control_deployment][crate::model::CloudControlDeploymentReference::cloud_control_deployment].
8745    ///
8746    /// # Example
8747    /// ```ignore,no_run
8748    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlDeploymentReference;
8749    /// let x = CloudControlDeploymentReference::new().set_cloud_control_deployment("example");
8750    /// ```
8751    pub fn set_cloud_control_deployment<T: std::convert::Into<std::string::String>>(
8752        mut self,
8753        v: T,
8754    ) -> Self {
8755        self.cloud_control_deployment = v.into();
8756        self
8757    }
8758}
8759
8760impl wkt::message::Message for CloudControlDeploymentReference {
8761    fn typename() -> &'static str {
8762        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference"
8763    }
8764}
8765
8766/// The reference to a framework deployment.
8767#[derive(Clone, Default, PartialEq)]
8768#[non_exhaustive]
8769pub struct FrameworkDeploymentReference {
8770    /// Output only. The name of the framework deployment, in the format
8771    /// `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}`
8772    /// or
8773    /// `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`.
8774    /// The only supported location is `global`.
8775    pub framework_deployment: std::string::String,
8776
8777    /// Optional. The reference to the framework that this deployment is for.
8778    /// For example:
8779    ///
8780    /// ```norust
8781    /// {
8782    ///   framework:
8783    ///   "organizations/{organization}/locations/{location}/frameworks/{framework}",
8784    ///   major_revision_id: 1
8785    /// }
8786    /// ```
8787    ///
8788    /// The only supported location is `global`.
8789    pub framework_reference: std::option::Option<crate::model::FrameworkReference>,
8790
8791    /// Optional. The display name of the framework that this framework deployment
8792    /// is for.
8793    pub framework_display_name: std::string::String,
8794
8795    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8796}
8797
8798impl FrameworkDeploymentReference {
8799    /// Creates a new default instance.
8800    pub fn new() -> Self {
8801        std::default::Default::default()
8802    }
8803
8804    /// Sets the value of [framework_deployment][crate::model::FrameworkDeploymentReference::framework_deployment].
8805    ///
8806    /// # Example
8807    /// ```ignore,no_run
8808    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeploymentReference;
8809    /// let x = FrameworkDeploymentReference::new().set_framework_deployment("example");
8810    /// ```
8811    pub fn set_framework_deployment<T: std::convert::Into<std::string::String>>(
8812        mut self,
8813        v: T,
8814    ) -> Self {
8815        self.framework_deployment = v.into();
8816        self
8817    }
8818
8819    /// Sets the value of [framework_reference][crate::model::FrameworkDeploymentReference::framework_reference].
8820    ///
8821    /// # Example
8822    /// ```ignore,no_run
8823    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeploymentReference;
8824    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
8825    /// let x = FrameworkDeploymentReference::new().set_framework_reference(FrameworkReference::default()/* use setters */);
8826    /// ```
8827    pub fn set_framework_reference<T>(mut self, v: T) -> Self
8828    where
8829        T: std::convert::Into<crate::model::FrameworkReference>,
8830    {
8831        self.framework_reference = std::option::Option::Some(v.into());
8832        self
8833    }
8834
8835    /// Sets or clears the value of [framework_reference][crate::model::FrameworkDeploymentReference::framework_reference].
8836    ///
8837    /// # Example
8838    /// ```ignore,no_run
8839    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeploymentReference;
8840    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkReference;
8841    /// let x = FrameworkDeploymentReference::new().set_or_clear_framework_reference(Some(FrameworkReference::default()/* use setters */));
8842    /// let x = FrameworkDeploymentReference::new().set_or_clear_framework_reference(None::<FrameworkReference>);
8843    /// ```
8844    pub fn set_or_clear_framework_reference<T>(mut self, v: std::option::Option<T>) -> Self
8845    where
8846        T: std::convert::Into<crate::model::FrameworkReference>,
8847    {
8848        self.framework_reference = v.map(|x| x.into());
8849        self
8850    }
8851
8852    /// Sets the value of [framework_display_name][crate::model::FrameworkDeploymentReference::framework_display_name].
8853    ///
8854    /// # Example
8855    /// ```ignore,no_run
8856    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkDeploymentReference;
8857    /// let x = FrameworkDeploymentReference::new().set_framework_display_name("example");
8858    /// ```
8859    pub fn set_framework_display_name<T: std::convert::Into<std::string::String>>(
8860        mut self,
8861        v: T,
8862    ) -> Self {
8863        self.framework_display_name = v.into();
8864        self
8865    }
8866}
8867
8868impl wkt::message::Message for FrameworkDeploymentReference {
8869    fn typename() -> &'static str {
8870        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference"
8871    }
8872}
8873
8874/// The request message for
8875/// [ListFrameworkComplianceSummariesRequest][google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest].
8876///
8877/// [google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest]: crate::model::ListFrameworkComplianceSummariesRequest
8878#[derive(Clone, Default, PartialEq)]
8879#[non_exhaustive]
8880pub struct ListFrameworkComplianceSummariesRequest {
8881    /// Required. The parent scope for the framework compliance summary.
8882    pub parent: std::string::String,
8883
8884    /// Optional. The requested page size. The server might return fewer items than
8885    /// requested. If unspecified, the server picks an appropriate default.
8886    pub page_size: i32,
8887
8888    /// Optional. A token that identifies the page of results that the server
8889    /// should return.
8890    pub page_token: std::string::String,
8891
8892    /// Optional. The filtering results.
8893    pub filter: std::string::String,
8894
8895    /// Optional. Specifies the level of detail to return in the response.
8896    pub view: crate::model::FrameworkComplianceSummaryView,
8897
8898    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8899}
8900
8901impl ListFrameworkComplianceSummariesRequest {
8902    /// Creates a new default instance.
8903    pub fn new() -> Self {
8904        std::default::Default::default()
8905    }
8906
8907    /// Sets the value of [parent][crate::model::ListFrameworkComplianceSummariesRequest::parent].
8908    ///
8909    /// # Example
8910    /// ```ignore,no_run
8911    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesRequest;
8912    /// let x = ListFrameworkComplianceSummariesRequest::new().set_parent("example");
8913    /// ```
8914    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8915        self.parent = v.into();
8916        self
8917    }
8918
8919    /// Sets the value of [page_size][crate::model::ListFrameworkComplianceSummariesRequest::page_size].
8920    ///
8921    /// # Example
8922    /// ```ignore,no_run
8923    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesRequest;
8924    /// let x = ListFrameworkComplianceSummariesRequest::new().set_page_size(42);
8925    /// ```
8926    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8927        self.page_size = v.into();
8928        self
8929    }
8930
8931    /// Sets the value of [page_token][crate::model::ListFrameworkComplianceSummariesRequest::page_token].
8932    ///
8933    /// # Example
8934    /// ```ignore,no_run
8935    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesRequest;
8936    /// let x = ListFrameworkComplianceSummariesRequest::new().set_page_token("example");
8937    /// ```
8938    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8939        self.page_token = v.into();
8940        self
8941    }
8942
8943    /// Sets the value of [filter][crate::model::ListFrameworkComplianceSummariesRequest::filter].
8944    ///
8945    /// # Example
8946    /// ```ignore,no_run
8947    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesRequest;
8948    /// let x = ListFrameworkComplianceSummariesRequest::new().set_filter("example");
8949    /// ```
8950    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8951        self.filter = v.into();
8952        self
8953    }
8954
8955    /// Sets the value of [view][crate::model::ListFrameworkComplianceSummariesRequest::view].
8956    ///
8957    /// # Example
8958    /// ```ignore,no_run
8959    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesRequest;
8960    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummaryView;
8961    /// let x0 = ListFrameworkComplianceSummariesRequest::new().set_view(FrameworkComplianceSummaryView::Basic);
8962    /// let x1 = ListFrameworkComplianceSummariesRequest::new().set_view(FrameworkComplianceSummaryView::Full);
8963    /// ```
8964    pub fn set_view<T: std::convert::Into<crate::model::FrameworkComplianceSummaryView>>(
8965        mut self,
8966        v: T,
8967    ) -> Self {
8968        self.view = v.into();
8969        self
8970    }
8971}
8972
8973impl wkt::message::Message for ListFrameworkComplianceSummariesRequest {
8974    fn typename() -> &'static str {
8975        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest"
8976    }
8977}
8978
8979/// The response message for
8980/// [ListFrameworkComplianceSummariesResponse][google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse].
8981///
8982/// [google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse]: crate::model::ListFrameworkComplianceSummariesResponse
8983#[derive(Clone, Default, PartialEq)]
8984#[non_exhaustive]
8985pub struct ListFrameworkComplianceSummariesResponse {
8986    /// The list of framework compliance summaries.
8987    pub framework_compliance_summaries: std::vec::Vec<crate::model::FrameworkComplianceSummary>,
8988
8989    /// Output only. The token to retrieve the next page of results.
8990    pub next_page_token: std::string::String,
8991
8992    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8993}
8994
8995impl ListFrameworkComplianceSummariesResponse {
8996    /// Creates a new default instance.
8997    pub fn new() -> Self {
8998        std::default::Default::default()
8999    }
9000
9001    /// Sets the value of [framework_compliance_summaries][crate::model::ListFrameworkComplianceSummariesResponse::framework_compliance_summaries].
9002    ///
9003    /// # Example
9004    /// ```ignore,no_run
9005    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesResponse;
9006    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
9007    /// let x = ListFrameworkComplianceSummariesResponse::new()
9008    ///     .set_framework_compliance_summaries([
9009    ///         FrameworkComplianceSummary::default()/* use setters */,
9010    ///         FrameworkComplianceSummary::default()/* use (different) setters */,
9011    ///     ]);
9012    /// ```
9013    pub fn set_framework_compliance_summaries<T, V>(mut self, v: T) -> Self
9014    where
9015        T: std::iter::IntoIterator<Item = V>,
9016        V: std::convert::Into<crate::model::FrameworkComplianceSummary>,
9017    {
9018        use std::iter::Iterator;
9019        self.framework_compliance_summaries = v.into_iter().map(|i| i.into()).collect();
9020        self
9021    }
9022
9023    /// Sets the value of [next_page_token][crate::model::ListFrameworkComplianceSummariesResponse::next_page_token].
9024    ///
9025    /// # Example
9026    /// ```ignore,no_run
9027    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFrameworkComplianceSummariesResponse;
9028    /// let x = ListFrameworkComplianceSummariesResponse::new().set_next_page_token("example");
9029    /// ```
9030    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9031        self.next_page_token = v.into();
9032        self
9033    }
9034}
9035
9036impl wkt::message::Message for ListFrameworkComplianceSummariesResponse {
9037    fn typename() -> &'static str {
9038        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse"
9039    }
9040}
9041
9042#[doc(hidden)]
9043impl google_cloud_gax::paginator::internal::PageableResponse
9044    for ListFrameworkComplianceSummariesResponse
9045{
9046    type PageItem = crate::model::FrameworkComplianceSummary;
9047
9048    fn items(self) -> std::vec::Vec<Self::PageItem> {
9049        self.framework_compliance_summaries
9050    }
9051
9052    fn next_page_token(&self) -> std::string::String {
9053        use std::clone::Clone;
9054        self.next_page_token.clone()
9055    }
9056}
9057
9058/// The response message for [GetFrameworkComplianceReport][].
9059#[derive(Clone, Default, PartialEq)]
9060#[non_exhaustive]
9061pub struct FrameworkComplianceReport {
9062    /// The name of the framework.
9063    pub framework: std::string::String,
9064
9065    /// The description of the framework.
9066    pub framework_description: std::string::String,
9067
9068    /// Output only. The last updated time of the report.
9069    pub update_time: std::option::Option<wkt::Timestamp>,
9070
9071    /// The control assessment details of the framework.
9072    pub control_assessment_details: std::option::Option<crate::model::ControlAssessmentDetails>,
9073
9074    /// The type of framework.
9075    pub framework_type: crate::model::framework::FrameworkType,
9076
9077    /// The list of cloud providers supported by the framework.
9078    pub supported_cloud_providers: std::vec::Vec<crate::model::CloudProvider>,
9079
9080    /// The list of framework categories supported.
9081    pub framework_categories: std::vec::Vec<crate::model::FrameworkCategory>,
9082
9083    /// Optional. The display name for the framework.
9084    pub framework_display_name: std::string::String,
9085
9086    /// Identifier. The name of the framework compliance report.
9087    pub name: std::string::String,
9088
9089    /// The latest major revision ID of the framework.
9090    pub major_revision_id: i64,
9091
9092    /// The latest minor revision ID of the latest major revision of the framework.
9093    pub minor_revision_id: i64,
9094
9095    /// The target resource details of the framework.
9096    pub target_resource_details: std::vec::Vec<crate::model::TargetResourceDetails>,
9097
9098    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9099}
9100
9101impl FrameworkComplianceReport {
9102    /// Creates a new default instance.
9103    pub fn new() -> Self {
9104        std::default::Default::default()
9105    }
9106
9107    /// Sets the value of [framework][crate::model::FrameworkComplianceReport::framework].
9108    ///
9109    /// # Example
9110    /// ```ignore,no_run
9111    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9112    /// let x = FrameworkComplianceReport::new().set_framework("example");
9113    /// ```
9114    pub fn set_framework<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9115        self.framework = v.into();
9116        self
9117    }
9118
9119    /// Sets the value of [framework_description][crate::model::FrameworkComplianceReport::framework_description].
9120    ///
9121    /// # Example
9122    /// ```ignore,no_run
9123    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9124    /// let x = FrameworkComplianceReport::new().set_framework_description("example");
9125    /// ```
9126    pub fn set_framework_description<T: std::convert::Into<std::string::String>>(
9127        mut self,
9128        v: T,
9129    ) -> Self {
9130        self.framework_description = v.into();
9131        self
9132    }
9133
9134    /// Sets the value of [update_time][crate::model::FrameworkComplianceReport::update_time].
9135    ///
9136    /// # Example
9137    /// ```ignore,no_run
9138    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9139    /// use wkt::Timestamp;
9140    /// let x = FrameworkComplianceReport::new().set_update_time(Timestamp::default()/* use setters */);
9141    /// ```
9142    pub fn set_update_time<T>(mut self, v: T) -> Self
9143    where
9144        T: std::convert::Into<wkt::Timestamp>,
9145    {
9146        self.update_time = std::option::Option::Some(v.into());
9147        self
9148    }
9149
9150    /// Sets or clears the value of [update_time][crate::model::FrameworkComplianceReport::update_time].
9151    ///
9152    /// # Example
9153    /// ```ignore,no_run
9154    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9155    /// use wkt::Timestamp;
9156    /// let x = FrameworkComplianceReport::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
9157    /// let x = FrameworkComplianceReport::new().set_or_clear_update_time(None::<Timestamp>);
9158    /// ```
9159    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
9160    where
9161        T: std::convert::Into<wkt::Timestamp>,
9162    {
9163        self.update_time = v.map(|x| x.into());
9164        self
9165    }
9166
9167    /// Sets the value of [control_assessment_details][crate::model::FrameworkComplianceReport::control_assessment_details].
9168    ///
9169    /// # Example
9170    /// ```ignore,no_run
9171    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9172    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
9173    /// let x = FrameworkComplianceReport::new().set_control_assessment_details(ControlAssessmentDetails::default()/* use setters */);
9174    /// ```
9175    pub fn set_control_assessment_details<T>(mut self, v: T) -> Self
9176    where
9177        T: std::convert::Into<crate::model::ControlAssessmentDetails>,
9178    {
9179        self.control_assessment_details = std::option::Option::Some(v.into());
9180        self
9181    }
9182
9183    /// Sets or clears the value of [control_assessment_details][crate::model::FrameworkComplianceReport::control_assessment_details].
9184    ///
9185    /// # Example
9186    /// ```ignore,no_run
9187    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9188    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
9189    /// let x = FrameworkComplianceReport::new().set_or_clear_control_assessment_details(Some(ControlAssessmentDetails::default()/* use setters */));
9190    /// let x = FrameworkComplianceReport::new().set_or_clear_control_assessment_details(None::<ControlAssessmentDetails>);
9191    /// ```
9192    pub fn set_or_clear_control_assessment_details<T>(mut self, v: std::option::Option<T>) -> Self
9193    where
9194        T: std::convert::Into<crate::model::ControlAssessmentDetails>,
9195    {
9196        self.control_assessment_details = v.map(|x| x.into());
9197        self
9198    }
9199
9200    /// Sets the value of [framework_type][crate::model::FrameworkComplianceReport::framework_type].
9201    ///
9202    /// # Example
9203    /// ```ignore,no_run
9204    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9205    /// use google_cloud_cloudsecuritycompliance_v1::model::framework::FrameworkType;
9206    /// let x0 = FrameworkComplianceReport::new().set_framework_type(FrameworkType::BuiltIn);
9207    /// let x1 = FrameworkComplianceReport::new().set_framework_type(FrameworkType::Custom);
9208    /// ```
9209    pub fn set_framework_type<T: std::convert::Into<crate::model::framework::FrameworkType>>(
9210        mut self,
9211        v: T,
9212    ) -> Self {
9213        self.framework_type = v.into();
9214        self
9215    }
9216
9217    /// Sets the value of [supported_cloud_providers][crate::model::FrameworkComplianceReport::supported_cloud_providers].
9218    ///
9219    /// # Example
9220    /// ```ignore,no_run
9221    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9222    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudProvider;
9223    /// let x = FrameworkComplianceReport::new().set_supported_cloud_providers([
9224    ///     CloudProvider::Aws,
9225    ///     CloudProvider::Azure,
9226    ///     CloudProvider::Gcp,
9227    /// ]);
9228    /// ```
9229    pub fn set_supported_cloud_providers<T, V>(mut self, v: T) -> Self
9230    where
9231        T: std::iter::IntoIterator<Item = V>,
9232        V: std::convert::Into<crate::model::CloudProvider>,
9233    {
9234        use std::iter::Iterator;
9235        self.supported_cloud_providers = v.into_iter().map(|i| i.into()).collect();
9236        self
9237    }
9238
9239    /// Sets the value of [framework_categories][crate::model::FrameworkComplianceReport::framework_categories].
9240    ///
9241    /// # Example
9242    /// ```ignore,no_run
9243    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9244    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkCategory;
9245    /// let x = FrameworkComplianceReport::new().set_framework_categories([
9246    ///     FrameworkCategory::IndustryDefinedStandard,
9247    ///     FrameworkCategory::AssuredWorkloads,
9248    ///     FrameworkCategory::DataSecurity,
9249    /// ]);
9250    /// ```
9251    pub fn set_framework_categories<T, V>(mut self, v: T) -> Self
9252    where
9253        T: std::iter::IntoIterator<Item = V>,
9254        V: std::convert::Into<crate::model::FrameworkCategory>,
9255    {
9256        use std::iter::Iterator;
9257        self.framework_categories = v.into_iter().map(|i| i.into()).collect();
9258        self
9259    }
9260
9261    /// Sets the value of [framework_display_name][crate::model::FrameworkComplianceReport::framework_display_name].
9262    ///
9263    /// # Example
9264    /// ```ignore,no_run
9265    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9266    /// let x = FrameworkComplianceReport::new().set_framework_display_name("example");
9267    /// ```
9268    pub fn set_framework_display_name<T: std::convert::Into<std::string::String>>(
9269        mut self,
9270        v: T,
9271    ) -> Self {
9272        self.framework_display_name = v.into();
9273        self
9274    }
9275
9276    /// Sets the value of [name][crate::model::FrameworkComplianceReport::name].
9277    ///
9278    /// # Example
9279    /// ```ignore,no_run
9280    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9281    /// let x = FrameworkComplianceReport::new().set_name("example");
9282    /// ```
9283    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9284        self.name = v.into();
9285        self
9286    }
9287
9288    /// Sets the value of [major_revision_id][crate::model::FrameworkComplianceReport::major_revision_id].
9289    ///
9290    /// # Example
9291    /// ```ignore,no_run
9292    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9293    /// let x = FrameworkComplianceReport::new().set_major_revision_id(42);
9294    /// ```
9295    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9296        self.major_revision_id = v.into();
9297        self
9298    }
9299
9300    /// Sets the value of [minor_revision_id][crate::model::FrameworkComplianceReport::minor_revision_id].
9301    ///
9302    /// # Example
9303    /// ```ignore,no_run
9304    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9305    /// let x = FrameworkComplianceReport::new().set_minor_revision_id(42);
9306    /// ```
9307    pub fn set_minor_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9308        self.minor_revision_id = v.into();
9309        self
9310    }
9311
9312    /// Sets the value of [target_resource_details][crate::model::FrameworkComplianceReport::target_resource_details].
9313    ///
9314    /// # Example
9315    /// ```ignore,no_run
9316    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceReport;
9317    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
9318    /// let x = FrameworkComplianceReport::new()
9319    ///     .set_target_resource_details([
9320    ///         TargetResourceDetails::default()/* use setters */,
9321    ///         TargetResourceDetails::default()/* use (different) setters */,
9322    ///     ]);
9323    /// ```
9324    pub fn set_target_resource_details<T, V>(mut self, v: T) -> Self
9325    where
9326        T: std::iter::IntoIterator<Item = V>,
9327        V: std::convert::Into<crate::model::TargetResourceDetails>,
9328    {
9329        use std::iter::Iterator;
9330        self.target_resource_details = v.into_iter().map(|i| i.into()).collect();
9331        self
9332    }
9333}
9334
9335impl wkt::message::Message for FrameworkComplianceReport {
9336    fn typename() -> &'static str {
9337        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport"
9338    }
9339}
9340
9341/// The request message for [FetchFrameworkComplianceReport][].
9342#[derive(Clone, Default, PartialEq)]
9343#[non_exhaustive]
9344pub struct FetchFrameworkComplianceReportRequest {
9345    /// Required. The name of the framework compliance report to retrieve.
9346    pub name: std::string::String,
9347
9348    /// Optional. The end time of the report.
9349    pub end_time: std::option::Option<wkt::Timestamp>,
9350
9351    /// Optional. The filtering results.
9352    pub filter: std::string::String,
9353
9354    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9355}
9356
9357impl FetchFrameworkComplianceReportRequest {
9358    /// Creates a new default instance.
9359    pub fn new() -> Self {
9360        std::default::Default::default()
9361    }
9362
9363    /// Sets the value of [name][crate::model::FetchFrameworkComplianceReportRequest::name].
9364    ///
9365    /// # Example
9366    /// ```ignore,no_run
9367    /// # use google_cloud_cloudsecuritycompliance_v1::model::FetchFrameworkComplianceReportRequest;
9368    /// let x = FetchFrameworkComplianceReportRequest::new().set_name("example");
9369    /// ```
9370    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9371        self.name = v.into();
9372        self
9373    }
9374
9375    /// Sets the value of [end_time][crate::model::FetchFrameworkComplianceReportRequest::end_time].
9376    ///
9377    /// # Example
9378    /// ```ignore,no_run
9379    /// # use google_cloud_cloudsecuritycompliance_v1::model::FetchFrameworkComplianceReportRequest;
9380    /// use wkt::Timestamp;
9381    /// let x = FetchFrameworkComplianceReportRequest::new().set_end_time(Timestamp::default()/* use setters */);
9382    /// ```
9383    pub fn set_end_time<T>(mut self, v: T) -> Self
9384    where
9385        T: std::convert::Into<wkt::Timestamp>,
9386    {
9387        self.end_time = std::option::Option::Some(v.into());
9388        self
9389    }
9390
9391    /// Sets or clears the value of [end_time][crate::model::FetchFrameworkComplianceReportRequest::end_time].
9392    ///
9393    /// # Example
9394    /// ```ignore,no_run
9395    /// # use google_cloud_cloudsecuritycompliance_v1::model::FetchFrameworkComplianceReportRequest;
9396    /// use wkt::Timestamp;
9397    /// let x = FetchFrameworkComplianceReportRequest::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
9398    /// let x = FetchFrameworkComplianceReportRequest::new().set_or_clear_end_time(None::<Timestamp>);
9399    /// ```
9400    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
9401    where
9402        T: std::convert::Into<wkt::Timestamp>,
9403    {
9404        self.end_time = v.map(|x| x.into());
9405        self
9406    }
9407
9408    /// Sets the value of [filter][crate::model::FetchFrameworkComplianceReportRequest::filter].
9409    ///
9410    /// # Example
9411    /// ```ignore,no_run
9412    /// # use google_cloud_cloudsecuritycompliance_v1::model::FetchFrameworkComplianceReportRequest;
9413    /// let x = FetchFrameworkComplianceReportRequest::new().set_filter("example");
9414    /// ```
9415    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9416        self.filter = v.into();
9417        self
9418    }
9419}
9420
9421impl wkt::message::Message for FetchFrameworkComplianceReportRequest {
9422    fn typename() -> &'static str {
9423        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest"
9424    }
9425}
9426
9427/// The request message for [ListFindingSummaries][].
9428#[derive(Clone, Default, PartialEq)]
9429#[non_exhaustive]
9430pub struct ListFindingSummariesRequest {
9431    /// Required. The parent scope for the framework overview page.
9432    pub parent: std::string::String,
9433
9434    /// Optional. The requested page size. The server might return fewer items than
9435    /// requested. If unspecified, the server picks an appropriate default.
9436    pub page_size: i32,
9437
9438    /// Optional. A token that identifies the page of results that the server
9439    /// should return.
9440    pub page_token: std::string::String,
9441
9442    /// Optional. The filtering results.
9443    pub filter: std::string::String,
9444
9445    /// Optional. The end time of the finding summary.
9446    #[deprecated]
9447    pub end_time: std::option::Option<wkt::Timestamp>,
9448
9449    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9450}
9451
9452impl ListFindingSummariesRequest {
9453    /// Creates a new default instance.
9454    pub fn new() -> Self {
9455        std::default::Default::default()
9456    }
9457
9458    /// Sets the value of [parent][crate::model::ListFindingSummariesRequest::parent].
9459    ///
9460    /// # Example
9461    /// ```ignore,no_run
9462    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesRequest;
9463    /// let x = ListFindingSummariesRequest::new().set_parent("example");
9464    /// ```
9465    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9466        self.parent = v.into();
9467        self
9468    }
9469
9470    /// Sets the value of [page_size][crate::model::ListFindingSummariesRequest::page_size].
9471    ///
9472    /// # Example
9473    /// ```ignore,no_run
9474    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesRequest;
9475    /// let x = ListFindingSummariesRequest::new().set_page_size(42);
9476    /// ```
9477    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9478        self.page_size = v.into();
9479        self
9480    }
9481
9482    /// Sets the value of [page_token][crate::model::ListFindingSummariesRequest::page_token].
9483    ///
9484    /// # Example
9485    /// ```ignore,no_run
9486    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesRequest;
9487    /// let x = ListFindingSummariesRequest::new().set_page_token("example");
9488    /// ```
9489    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9490        self.page_token = v.into();
9491        self
9492    }
9493
9494    /// Sets the value of [filter][crate::model::ListFindingSummariesRequest::filter].
9495    ///
9496    /// # Example
9497    /// ```ignore,no_run
9498    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesRequest;
9499    /// let x = ListFindingSummariesRequest::new().set_filter("example");
9500    /// ```
9501    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9502        self.filter = v.into();
9503        self
9504    }
9505
9506    /// Sets the value of [end_time][crate::model::ListFindingSummariesRequest::end_time].
9507    ///
9508    /// # Example
9509    /// ```ignore,no_run
9510    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesRequest;
9511    /// use wkt::Timestamp;
9512    /// let x = ListFindingSummariesRequest::new().set_end_time(Timestamp::default()/* use setters */);
9513    /// ```
9514    #[deprecated]
9515    pub fn set_end_time<T>(mut self, v: T) -> Self
9516    where
9517        T: std::convert::Into<wkt::Timestamp>,
9518    {
9519        self.end_time = std::option::Option::Some(v.into());
9520        self
9521    }
9522
9523    /// Sets or clears the value of [end_time][crate::model::ListFindingSummariesRequest::end_time].
9524    ///
9525    /// # Example
9526    /// ```ignore,no_run
9527    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesRequest;
9528    /// use wkt::Timestamp;
9529    /// let x = ListFindingSummariesRequest::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
9530    /// let x = ListFindingSummariesRequest::new().set_or_clear_end_time(None::<Timestamp>);
9531    /// ```
9532    #[deprecated]
9533    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
9534    where
9535        T: std::convert::Into<wkt::Timestamp>,
9536    {
9537        self.end_time = v.map(|x| x.into());
9538        self
9539    }
9540}
9541
9542impl wkt::message::Message for ListFindingSummariesRequest {
9543    fn typename() -> &'static str {
9544        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest"
9545    }
9546}
9547
9548/// The response message for [ListFindingSummaries][].
9549#[derive(Clone, Default, PartialEq)]
9550#[non_exhaustive]
9551pub struct ListFindingSummariesResponse {
9552    /// List of finding summary by category.
9553    pub finding_summaries: std::vec::Vec<crate::model::FindingSummary>,
9554
9555    /// Output only. The token to retrieve the next page of results.
9556    pub next_page_token: std::string::String,
9557
9558    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9559}
9560
9561impl ListFindingSummariesResponse {
9562    /// Creates a new default instance.
9563    pub fn new() -> Self {
9564        std::default::Default::default()
9565    }
9566
9567    /// Sets the value of [finding_summaries][crate::model::ListFindingSummariesResponse::finding_summaries].
9568    ///
9569    /// # Example
9570    /// ```ignore,no_run
9571    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesResponse;
9572    /// use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
9573    /// let x = ListFindingSummariesResponse::new()
9574    ///     .set_finding_summaries([
9575    ///         FindingSummary::default()/* use setters */,
9576    ///         FindingSummary::default()/* use (different) setters */,
9577    ///     ]);
9578    /// ```
9579    pub fn set_finding_summaries<T, V>(mut self, v: T) -> Self
9580    where
9581        T: std::iter::IntoIterator<Item = V>,
9582        V: std::convert::Into<crate::model::FindingSummary>,
9583    {
9584        use std::iter::Iterator;
9585        self.finding_summaries = v.into_iter().map(|i| i.into()).collect();
9586        self
9587    }
9588
9589    /// Sets the value of [next_page_token][crate::model::ListFindingSummariesResponse::next_page_token].
9590    ///
9591    /// # Example
9592    /// ```ignore,no_run
9593    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListFindingSummariesResponse;
9594    /// let x = ListFindingSummariesResponse::new().set_next_page_token("example");
9595    /// ```
9596    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9597        self.next_page_token = v.into();
9598        self
9599    }
9600}
9601
9602impl wkt::message::Message for ListFindingSummariesResponse {
9603    fn typename() -> &'static str {
9604        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse"
9605    }
9606}
9607
9608#[doc(hidden)]
9609impl google_cloud_gax::paginator::internal::PageableResponse for ListFindingSummariesResponse {
9610    type PageItem = crate::model::FindingSummary;
9611
9612    fn items(self) -> std::vec::Vec<Self::PageItem> {
9613        self.finding_summaries
9614    }
9615
9616    fn next_page_token(&self) -> std::string::String {
9617        use std::clone::Clone;
9618        self.next_page_token.clone()
9619    }
9620}
9621
9622/// The request message for [ListControlComplianceSummaries][].
9623#[derive(Clone, Default, PartialEq)]
9624#[non_exhaustive]
9625pub struct ListControlComplianceSummariesRequest {
9626    /// Required. The parent scope for the framework overview page.
9627    pub parent: std::string::String,
9628
9629    /// Optional. The end time of the control compliance summary.
9630    #[deprecated]
9631    pub end_time: std::option::Option<wkt::Timestamp>,
9632
9633    /// Optional. The requested page size. The server might return fewer items than
9634    /// requested. If unspecified, the server picks an appropriate default.
9635    pub page_size: i32,
9636
9637    /// Optional. A token that identifies the page of results that the server
9638    /// should return.
9639    pub page_token: std::string::String,
9640
9641    /// Optional. The filtering results.
9642    pub filter: std::string::String,
9643
9644    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9645}
9646
9647impl ListControlComplianceSummariesRequest {
9648    /// Creates a new default instance.
9649    pub fn new() -> Self {
9650        std::default::Default::default()
9651    }
9652
9653    /// Sets the value of [parent][crate::model::ListControlComplianceSummariesRequest::parent].
9654    ///
9655    /// # Example
9656    /// ```ignore,no_run
9657    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesRequest;
9658    /// let x = ListControlComplianceSummariesRequest::new().set_parent("example");
9659    /// ```
9660    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9661        self.parent = v.into();
9662        self
9663    }
9664
9665    /// Sets the value of [end_time][crate::model::ListControlComplianceSummariesRequest::end_time].
9666    ///
9667    /// # Example
9668    /// ```ignore,no_run
9669    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesRequest;
9670    /// use wkt::Timestamp;
9671    /// let x = ListControlComplianceSummariesRequest::new().set_end_time(Timestamp::default()/* use setters */);
9672    /// ```
9673    #[deprecated]
9674    pub fn set_end_time<T>(mut self, v: T) -> Self
9675    where
9676        T: std::convert::Into<wkt::Timestamp>,
9677    {
9678        self.end_time = std::option::Option::Some(v.into());
9679        self
9680    }
9681
9682    /// Sets or clears the value of [end_time][crate::model::ListControlComplianceSummariesRequest::end_time].
9683    ///
9684    /// # Example
9685    /// ```ignore,no_run
9686    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesRequest;
9687    /// use wkt::Timestamp;
9688    /// let x = ListControlComplianceSummariesRequest::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
9689    /// let x = ListControlComplianceSummariesRequest::new().set_or_clear_end_time(None::<Timestamp>);
9690    /// ```
9691    #[deprecated]
9692    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
9693    where
9694        T: std::convert::Into<wkt::Timestamp>,
9695    {
9696        self.end_time = v.map(|x| x.into());
9697        self
9698    }
9699
9700    /// Sets the value of [page_size][crate::model::ListControlComplianceSummariesRequest::page_size].
9701    ///
9702    /// # Example
9703    /// ```ignore,no_run
9704    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesRequest;
9705    /// let x = ListControlComplianceSummariesRequest::new().set_page_size(42);
9706    /// ```
9707    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9708        self.page_size = v.into();
9709        self
9710    }
9711
9712    /// Sets the value of [page_token][crate::model::ListControlComplianceSummariesRequest::page_token].
9713    ///
9714    /// # Example
9715    /// ```ignore,no_run
9716    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesRequest;
9717    /// let x = ListControlComplianceSummariesRequest::new().set_page_token("example");
9718    /// ```
9719    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9720        self.page_token = v.into();
9721        self
9722    }
9723
9724    /// Sets the value of [filter][crate::model::ListControlComplianceSummariesRequest::filter].
9725    ///
9726    /// # Example
9727    /// ```ignore,no_run
9728    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesRequest;
9729    /// let x = ListControlComplianceSummariesRequest::new().set_filter("example");
9730    /// ```
9731    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9732        self.filter = v.into();
9733        self
9734    }
9735}
9736
9737impl wkt::message::Message for ListControlComplianceSummariesRequest {
9738    fn typename() -> &'static str {
9739        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest"
9740    }
9741}
9742
9743/// The response message for [ListControlComplianceSummaries][].
9744#[derive(Clone, Default, PartialEq)]
9745#[non_exhaustive]
9746pub struct ListControlComplianceSummariesResponse {
9747    /// The list of control compliance details.
9748    pub control_compliance_summaries: std::vec::Vec<crate::model::ControlComplianceSummary>,
9749
9750    /// Output only. The token to retrieve the next page of results.
9751    pub next_page_token: std::string::String,
9752
9753    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9754}
9755
9756impl ListControlComplianceSummariesResponse {
9757    /// Creates a new default instance.
9758    pub fn new() -> Self {
9759        std::default::Default::default()
9760    }
9761
9762    /// Sets the value of [control_compliance_summaries][crate::model::ListControlComplianceSummariesResponse::control_compliance_summaries].
9763    ///
9764    /// # Example
9765    /// ```ignore,no_run
9766    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesResponse;
9767    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
9768    /// let x = ListControlComplianceSummariesResponse::new()
9769    ///     .set_control_compliance_summaries([
9770    ///         ControlComplianceSummary::default()/* use setters */,
9771    ///         ControlComplianceSummary::default()/* use (different) setters */,
9772    ///     ]);
9773    /// ```
9774    pub fn set_control_compliance_summaries<T, V>(mut self, v: T) -> Self
9775    where
9776        T: std::iter::IntoIterator<Item = V>,
9777        V: std::convert::Into<crate::model::ControlComplianceSummary>,
9778    {
9779        use std::iter::Iterator;
9780        self.control_compliance_summaries = v.into_iter().map(|i| i.into()).collect();
9781        self
9782    }
9783
9784    /// Sets the value of [next_page_token][crate::model::ListControlComplianceSummariesResponse::next_page_token].
9785    ///
9786    /// # Example
9787    /// ```ignore,no_run
9788    /// # use google_cloud_cloudsecuritycompliance_v1::model::ListControlComplianceSummariesResponse;
9789    /// let x = ListControlComplianceSummariesResponse::new().set_next_page_token("example");
9790    /// ```
9791    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9792        self.next_page_token = v.into();
9793        self
9794    }
9795}
9796
9797impl wkt::message::Message for ListControlComplianceSummariesResponse {
9798    fn typename() -> &'static str {
9799        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse"
9800    }
9801}
9802
9803#[doc(hidden)]
9804impl google_cloud_gax::paginator::internal::PageableResponse
9805    for ListControlComplianceSummariesResponse
9806{
9807    type PageItem = crate::model::ControlComplianceSummary;
9808
9809    fn items(self) -> std::vec::Vec<Self::PageItem> {
9810        self.control_compliance_summaries
9811    }
9812
9813    fn next_page_token(&self) -> std::string::String {
9814        use std::clone::Clone;
9815        self.next_page_token.clone()
9816    }
9817}
9818
9819/// The request message for [AggregateFrameworkComplianceReport][].
9820#[derive(Clone, Default, PartialEq)]
9821#[non_exhaustive]
9822pub struct AggregateFrameworkComplianceReportRequest {
9823    /// Required. The name of the aggregated compliance report over time to
9824    /// retrieve.
9825    ///
9826    /// The supported format is:
9827    /// `organizations/{organization_id}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}`
9828    pub name: std::string::String,
9829
9830    /// Optional. The start and end time range for the aggregated compliance
9831    /// report.
9832    pub interval: std::option::Option<google_cloud_type::model::Interval>,
9833
9834    /// Optional. The filtering results.
9835    pub filter: std::string::String,
9836
9837    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9838}
9839
9840impl AggregateFrameworkComplianceReportRequest {
9841    /// Creates a new default instance.
9842    pub fn new() -> Self {
9843        std::default::Default::default()
9844    }
9845
9846    /// Sets the value of [name][crate::model::AggregateFrameworkComplianceReportRequest::name].
9847    ///
9848    /// # Example
9849    /// ```ignore,no_run
9850    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregateFrameworkComplianceReportRequest;
9851    /// let x = AggregateFrameworkComplianceReportRequest::new().set_name("example");
9852    /// ```
9853    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9854        self.name = v.into();
9855        self
9856    }
9857
9858    /// Sets the value of [interval][crate::model::AggregateFrameworkComplianceReportRequest::interval].
9859    ///
9860    /// # Example
9861    /// ```ignore,no_run
9862    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregateFrameworkComplianceReportRequest;
9863    /// use google_cloud_type::model::Interval;
9864    /// let x = AggregateFrameworkComplianceReportRequest::new().set_interval(Interval::default()/* use setters */);
9865    /// ```
9866    pub fn set_interval<T>(mut self, v: T) -> Self
9867    where
9868        T: std::convert::Into<google_cloud_type::model::Interval>,
9869    {
9870        self.interval = std::option::Option::Some(v.into());
9871        self
9872    }
9873
9874    /// Sets or clears the value of [interval][crate::model::AggregateFrameworkComplianceReportRequest::interval].
9875    ///
9876    /// # Example
9877    /// ```ignore,no_run
9878    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregateFrameworkComplianceReportRequest;
9879    /// use google_cloud_type::model::Interval;
9880    /// let x = AggregateFrameworkComplianceReportRequest::new().set_or_clear_interval(Some(Interval::default()/* use setters */));
9881    /// let x = AggregateFrameworkComplianceReportRequest::new().set_or_clear_interval(None::<Interval>);
9882    /// ```
9883    pub fn set_or_clear_interval<T>(mut self, v: std::option::Option<T>) -> Self
9884    where
9885        T: std::convert::Into<google_cloud_type::model::Interval>,
9886    {
9887        self.interval = v.map(|x| x.into());
9888        self
9889    }
9890
9891    /// Sets the value of [filter][crate::model::AggregateFrameworkComplianceReportRequest::filter].
9892    ///
9893    /// # Example
9894    /// ```ignore,no_run
9895    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregateFrameworkComplianceReportRequest;
9896    /// let x = AggregateFrameworkComplianceReportRequest::new().set_filter("example");
9897    /// ```
9898    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9899        self.filter = v.into();
9900        self
9901    }
9902}
9903
9904impl wkt::message::Message for AggregateFrameworkComplianceReportRequest {
9905    fn typename() -> &'static str {
9906        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest"
9907    }
9908}
9909
9910/// The response message for [AggregateFrameworkComplianceReport][].
9911#[derive(Clone, Default, PartialEq)]
9912#[non_exhaustive]
9913pub struct AggregateFrameworkComplianceReportResponse {
9914    /// The list of aggregated compliance reports.
9915    pub aggregated_compliance_reports: std::vec::Vec<crate::model::AggregatedComplianceReport>,
9916
9917    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9918}
9919
9920impl AggregateFrameworkComplianceReportResponse {
9921    /// Creates a new default instance.
9922    pub fn new() -> Self {
9923        std::default::Default::default()
9924    }
9925
9926    /// Sets the value of [aggregated_compliance_reports][crate::model::AggregateFrameworkComplianceReportResponse::aggregated_compliance_reports].
9927    ///
9928    /// # Example
9929    /// ```ignore,no_run
9930    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregateFrameworkComplianceReportResponse;
9931    /// use google_cloud_cloudsecuritycompliance_v1::model::AggregatedComplianceReport;
9932    /// let x = AggregateFrameworkComplianceReportResponse::new()
9933    ///     .set_aggregated_compliance_reports([
9934    ///         AggregatedComplianceReport::default()/* use setters */,
9935    ///         AggregatedComplianceReport::default()/* use (different) setters */,
9936    ///     ]);
9937    /// ```
9938    pub fn set_aggregated_compliance_reports<T, V>(mut self, v: T) -> Self
9939    where
9940        T: std::iter::IntoIterator<Item = V>,
9941        V: std::convert::Into<crate::model::AggregatedComplianceReport>,
9942    {
9943        use std::iter::Iterator;
9944        self.aggregated_compliance_reports = v.into_iter().map(|i| i.into()).collect();
9945        self
9946    }
9947}
9948
9949impl wkt::message::Message for AggregateFrameworkComplianceReportResponse {
9950    fn typename() -> &'static str {
9951        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse"
9952    }
9953}
9954
9955/// The details for a control assessment.
9956#[derive(Clone, Default, PartialEq)]
9957#[non_exhaustive]
9958pub struct ControlAssessmentDetails {
9959    /// The number of controls that are passing or not assessed.
9960    pub passing_controls: i32,
9961
9962    /// The number of controls that are failing.
9963    pub failing_controls: i32,
9964
9965    /// The number of controls that were assessed and are passing.
9966    pub assessed_passing_controls: i32,
9967
9968    /// The number of controls that aren't assessed because they require manual
9969    /// review.
9970    pub not_assessed_controls: i32,
9971
9972    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9973}
9974
9975impl ControlAssessmentDetails {
9976    /// Creates a new default instance.
9977    pub fn new() -> Self {
9978        std::default::Default::default()
9979    }
9980
9981    /// Sets the value of [passing_controls][crate::model::ControlAssessmentDetails::passing_controls].
9982    ///
9983    /// # Example
9984    /// ```ignore,no_run
9985    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
9986    /// let x = ControlAssessmentDetails::new().set_passing_controls(42);
9987    /// ```
9988    pub fn set_passing_controls<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9989        self.passing_controls = v.into();
9990        self
9991    }
9992
9993    /// Sets the value of [failing_controls][crate::model::ControlAssessmentDetails::failing_controls].
9994    ///
9995    /// # Example
9996    /// ```ignore,no_run
9997    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
9998    /// let x = ControlAssessmentDetails::new().set_failing_controls(42);
9999    /// ```
10000    pub fn set_failing_controls<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10001        self.failing_controls = v.into();
10002        self
10003    }
10004
10005    /// Sets the value of [assessed_passing_controls][crate::model::ControlAssessmentDetails::assessed_passing_controls].
10006    ///
10007    /// # Example
10008    /// ```ignore,no_run
10009    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
10010    /// let x = ControlAssessmentDetails::new().set_assessed_passing_controls(42);
10011    /// ```
10012    pub fn set_assessed_passing_controls<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10013        self.assessed_passing_controls = v.into();
10014        self
10015    }
10016
10017    /// Sets the value of [not_assessed_controls][crate::model::ControlAssessmentDetails::not_assessed_controls].
10018    ///
10019    /// # Example
10020    /// ```ignore,no_run
10021    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
10022    /// let x = ControlAssessmentDetails::new().set_not_assessed_controls(42);
10023    /// ```
10024    pub fn set_not_assessed_controls<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10025        self.not_assessed_controls = v.into();
10026        self
10027    }
10028}
10029
10030impl wkt::message::Message for ControlAssessmentDetails {
10031    fn typename() -> &'static str {
10032        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails"
10033    }
10034}
10035
10036/// The details for a framework compliance summary.
10037#[derive(Clone, Default, PartialEq)]
10038#[non_exhaustive]
10039pub struct FrameworkComplianceSummary {
10040    /// The name of the framework.
10041    pub framework: std::string::String,
10042
10043    /// The control assessment details of the framework.
10044    pub control_assessment_details: std::option::Option<crate::model::ControlAssessmentDetails>,
10045
10046    /// The type of framework.
10047    pub framework_type: crate::model::framework::FrameworkType,
10048
10049    /// The list of cloud providers supported by the framework.
10050    pub supported_cloud_providers: std::vec::Vec<crate::model::CloudProvider>,
10051
10052    /// The list of framework categories supported by the framework.
10053    pub framework_categories: std::vec::Vec<crate::model::FrameworkCategory>,
10054
10055    /// Optional. The display name for the framework.
10056    pub framework_display_name: std::string::String,
10057
10058    /// Identifier. The name of the framework compliance summary.
10059    pub name: std::string::String,
10060
10061    /// The major revision ID of the framework.
10062    pub major_revision_id: i64,
10063
10064    /// The minor revision ID of the framework.
10065    pub minor_revision_id: i64,
10066
10067    /// The target resource details for the framework.
10068    pub target_resource_details: std::vec::Vec<crate::model::TargetResourceDetails>,
10069
10070    /// Output only. The count of the findings generated against the framework.
10071    pub finding_count: i64,
10072
10073    /// Output only. The trend of controls that are passing for the given duration.
10074    pub controls_passing_trend: std::option::Option<crate::model::Trend>,
10075
10076    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10077}
10078
10079impl FrameworkComplianceSummary {
10080    /// Creates a new default instance.
10081    pub fn new() -> Self {
10082        std::default::Default::default()
10083    }
10084
10085    /// Sets the value of [framework][crate::model::FrameworkComplianceSummary::framework].
10086    ///
10087    /// # Example
10088    /// ```ignore,no_run
10089    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10090    /// let x = FrameworkComplianceSummary::new().set_framework("example");
10091    /// ```
10092    pub fn set_framework<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10093        self.framework = v.into();
10094        self
10095    }
10096
10097    /// Sets the value of [control_assessment_details][crate::model::FrameworkComplianceSummary::control_assessment_details].
10098    ///
10099    /// # Example
10100    /// ```ignore,no_run
10101    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10102    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
10103    /// let x = FrameworkComplianceSummary::new().set_control_assessment_details(ControlAssessmentDetails::default()/* use setters */);
10104    /// ```
10105    pub fn set_control_assessment_details<T>(mut self, v: T) -> Self
10106    where
10107        T: std::convert::Into<crate::model::ControlAssessmentDetails>,
10108    {
10109        self.control_assessment_details = std::option::Option::Some(v.into());
10110        self
10111    }
10112
10113    /// Sets or clears the value of [control_assessment_details][crate::model::FrameworkComplianceSummary::control_assessment_details].
10114    ///
10115    /// # Example
10116    /// ```ignore,no_run
10117    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10118    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
10119    /// let x = FrameworkComplianceSummary::new().set_or_clear_control_assessment_details(Some(ControlAssessmentDetails::default()/* use setters */));
10120    /// let x = FrameworkComplianceSummary::new().set_or_clear_control_assessment_details(None::<ControlAssessmentDetails>);
10121    /// ```
10122    pub fn set_or_clear_control_assessment_details<T>(mut self, v: std::option::Option<T>) -> Self
10123    where
10124        T: std::convert::Into<crate::model::ControlAssessmentDetails>,
10125    {
10126        self.control_assessment_details = v.map(|x| x.into());
10127        self
10128    }
10129
10130    /// Sets the value of [framework_type][crate::model::FrameworkComplianceSummary::framework_type].
10131    ///
10132    /// # Example
10133    /// ```ignore,no_run
10134    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10135    /// use google_cloud_cloudsecuritycompliance_v1::model::framework::FrameworkType;
10136    /// let x0 = FrameworkComplianceSummary::new().set_framework_type(FrameworkType::BuiltIn);
10137    /// let x1 = FrameworkComplianceSummary::new().set_framework_type(FrameworkType::Custom);
10138    /// ```
10139    pub fn set_framework_type<T: std::convert::Into<crate::model::framework::FrameworkType>>(
10140        mut self,
10141        v: T,
10142    ) -> Self {
10143        self.framework_type = v.into();
10144        self
10145    }
10146
10147    /// Sets the value of [supported_cloud_providers][crate::model::FrameworkComplianceSummary::supported_cloud_providers].
10148    ///
10149    /// # Example
10150    /// ```ignore,no_run
10151    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10152    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudProvider;
10153    /// let x = FrameworkComplianceSummary::new().set_supported_cloud_providers([
10154    ///     CloudProvider::Aws,
10155    ///     CloudProvider::Azure,
10156    ///     CloudProvider::Gcp,
10157    /// ]);
10158    /// ```
10159    pub fn set_supported_cloud_providers<T, V>(mut self, v: T) -> Self
10160    where
10161        T: std::iter::IntoIterator<Item = V>,
10162        V: std::convert::Into<crate::model::CloudProvider>,
10163    {
10164        use std::iter::Iterator;
10165        self.supported_cloud_providers = v.into_iter().map(|i| i.into()).collect();
10166        self
10167    }
10168
10169    /// Sets the value of [framework_categories][crate::model::FrameworkComplianceSummary::framework_categories].
10170    ///
10171    /// # Example
10172    /// ```ignore,no_run
10173    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10174    /// use google_cloud_cloudsecuritycompliance_v1::model::FrameworkCategory;
10175    /// let x = FrameworkComplianceSummary::new().set_framework_categories([
10176    ///     FrameworkCategory::IndustryDefinedStandard,
10177    ///     FrameworkCategory::AssuredWorkloads,
10178    ///     FrameworkCategory::DataSecurity,
10179    /// ]);
10180    /// ```
10181    pub fn set_framework_categories<T, V>(mut self, v: T) -> Self
10182    where
10183        T: std::iter::IntoIterator<Item = V>,
10184        V: std::convert::Into<crate::model::FrameworkCategory>,
10185    {
10186        use std::iter::Iterator;
10187        self.framework_categories = v.into_iter().map(|i| i.into()).collect();
10188        self
10189    }
10190
10191    /// Sets the value of [framework_display_name][crate::model::FrameworkComplianceSummary::framework_display_name].
10192    ///
10193    /// # Example
10194    /// ```ignore,no_run
10195    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10196    /// let x = FrameworkComplianceSummary::new().set_framework_display_name("example");
10197    /// ```
10198    pub fn set_framework_display_name<T: std::convert::Into<std::string::String>>(
10199        mut self,
10200        v: T,
10201    ) -> Self {
10202        self.framework_display_name = v.into();
10203        self
10204    }
10205
10206    /// Sets the value of [name][crate::model::FrameworkComplianceSummary::name].
10207    ///
10208    /// # Example
10209    /// ```ignore,no_run
10210    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10211    /// let x = FrameworkComplianceSummary::new().set_name("example");
10212    /// ```
10213    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10214        self.name = v.into();
10215        self
10216    }
10217
10218    /// Sets the value of [major_revision_id][crate::model::FrameworkComplianceSummary::major_revision_id].
10219    ///
10220    /// # Example
10221    /// ```ignore,no_run
10222    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10223    /// let x = FrameworkComplianceSummary::new().set_major_revision_id(42);
10224    /// ```
10225    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10226        self.major_revision_id = v.into();
10227        self
10228    }
10229
10230    /// Sets the value of [minor_revision_id][crate::model::FrameworkComplianceSummary::minor_revision_id].
10231    ///
10232    /// # Example
10233    /// ```ignore,no_run
10234    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10235    /// let x = FrameworkComplianceSummary::new().set_minor_revision_id(42);
10236    /// ```
10237    pub fn set_minor_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10238        self.minor_revision_id = v.into();
10239        self
10240    }
10241
10242    /// Sets the value of [target_resource_details][crate::model::FrameworkComplianceSummary::target_resource_details].
10243    ///
10244    /// # Example
10245    /// ```ignore,no_run
10246    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10247    /// use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
10248    /// let x = FrameworkComplianceSummary::new()
10249    ///     .set_target_resource_details([
10250    ///         TargetResourceDetails::default()/* use setters */,
10251    ///         TargetResourceDetails::default()/* use (different) setters */,
10252    ///     ]);
10253    /// ```
10254    pub fn set_target_resource_details<T, V>(mut self, v: T) -> Self
10255    where
10256        T: std::iter::IntoIterator<Item = V>,
10257        V: std::convert::Into<crate::model::TargetResourceDetails>,
10258    {
10259        use std::iter::Iterator;
10260        self.target_resource_details = v.into_iter().map(|i| i.into()).collect();
10261        self
10262    }
10263
10264    /// Sets the value of [finding_count][crate::model::FrameworkComplianceSummary::finding_count].
10265    ///
10266    /// # Example
10267    /// ```ignore,no_run
10268    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10269    /// let x = FrameworkComplianceSummary::new().set_finding_count(42);
10270    /// ```
10271    pub fn set_finding_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10272        self.finding_count = v.into();
10273        self
10274    }
10275
10276    /// Sets the value of [controls_passing_trend][crate::model::FrameworkComplianceSummary::controls_passing_trend].
10277    ///
10278    /// # Example
10279    /// ```ignore,no_run
10280    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10281    /// use google_cloud_cloudsecuritycompliance_v1::model::Trend;
10282    /// let x = FrameworkComplianceSummary::new().set_controls_passing_trend(Trend::default()/* use setters */);
10283    /// ```
10284    pub fn set_controls_passing_trend<T>(mut self, v: T) -> Self
10285    where
10286        T: std::convert::Into<crate::model::Trend>,
10287    {
10288        self.controls_passing_trend = std::option::Option::Some(v.into());
10289        self
10290    }
10291
10292    /// Sets or clears the value of [controls_passing_trend][crate::model::FrameworkComplianceSummary::controls_passing_trend].
10293    ///
10294    /// # Example
10295    /// ```ignore,no_run
10296    /// # use google_cloud_cloudsecuritycompliance_v1::model::FrameworkComplianceSummary;
10297    /// use google_cloud_cloudsecuritycompliance_v1::model::Trend;
10298    /// let x = FrameworkComplianceSummary::new().set_or_clear_controls_passing_trend(Some(Trend::default()/* use setters */));
10299    /// let x = FrameworkComplianceSummary::new().set_or_clear_controls_passing_trend(None::<Trend>);
10300    /// ```
10301    pub fn set_or_clear_controls_passing_trend<T>(mut self, v: std::option::Option<T>) -> Self
10302    where
10303        T: std::convert::Into<crate::model::Trend>,
10304    {
10305        self.controls_passing_trend = v.map(|x| x.into());
10306        self
10307    }
10308}
10309
10310impl wkt::message::Message for FrameworkComplianceSummary {
10311    fn typename() -> &'static str {
10312        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary"
10313    }
10314}
10315
10316/// The details for a finding.
10317#[derive(Clone, Default, PartialEq)]
10318#[non_exhaustive]
10319pub struct FindingSummary {
10320    /// The category of the finding.
10321    pub finding_category: std::string::String,
10322
10323    /// The class of the finding.
10324    pub finding_class: crate::model::FindingClass,
10325
10326    /// The severity of the finding.
10327    pub severity: crate::model::Severity,
10328
10329    /// The count of the finding.
10330    pub finding_count: i64,
10331
10332    /// Output only. The last updated time of the finding.
10333    pub update_time: std::option::Option<wkt::Timestamp>,
10334
10335    /// Optional. The list of compliance frameworks that the finding belongs to.
10336    pub related_frameworks: std::vec::Vec<std::string::String>,
10337
10338    /// Identifier. The name of the finding summary.
10339    pub name: std::string::String,
10340
10341    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10342}
10343
10344impl FindingSummary {
10345    /// Creates a new default instance.
10346    pub fn new() -> Self {
10347        std::default::Default::default()
10348    }
10349
10350    /// Sets the value of [finding_category][crate::model::FindingSummary::finding_category].
10351    ///
10352    /// # Example
10353    /// ```ignore,no_run
10354    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
10355    /// let x = FindingSummary::new().set_finding_category("example");
10356    /// ```
10357    pub fn set_finding_category<T: std::convert::Into<std::string::String>>(
10358        mut self,
10359        v: T,
10360    ) -> Self {
10361        self.finding_category = v.into();
10362        self
10363    }
10364
10365    /// Sets the value of [finding_class][crate::model::FindingSummary::finding_class].
10366    ///
10367    /// # Example
10368    /// ```ignore,no_run
10369    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
10370    /// use google_cloud_cloudsecuritycompliance_v1::model::FindingClass;
10371    /// let x0 = FindingSummary::new().set_finding_class(FindingClass::Threat);
10372    /// let x1 = FindingSummary::new().set_finding_class(FindingClass::Vulnerability);
10373    /// let x2 = FindingSummary::new().set_finding_class(FindingClass::Misconfiguration);
10374    /// ```
10375    pub fn set_finding_class<T: std::convert::Into<crate::model::FindingClass>>(
10376        mut self,
10377        v: T,
10378    ) -> Self {
10379        self.finding_class = v.into();
10380        self
10381    }
10382
10383    /// Sets the value of [severity][crate::model::FindingSummary::severity].
10384    ///
10385    /// # Example
10386    /// ```ignore,no_run
10387    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
10388    /// use google_cloud_cloudsecuritycompliance_v1::model::Severity;
10389    /// let x0 = FindingSummary::new().set_severity(Severity::Critical);
10390    /// let x1 = FindingSummary::new().set_severity(Severity::High);
10391    /// let x2 = FindingSummary::new().set_severity(Severity::Medium);
10392    /// ```
10393    pub fn set_severity<T: std::convert::Into<crate::model::Severity>>(mut self, v: T) -> Self {
10394        self.severity = v.into();
10395        self
10396    }
10397
10398    /// Sets the value of [finding_count][crate::model::FindingSummary::finding_count].
10399    ///
10400    /// # Example
10401    /// ```ignore,no_run
10402    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
10403    /// let x = FindingSummary::new().set_finding_count(42);
10404    /// ```
10405    pub fn set_finding_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10406        self.finding_count = v.into();
10407        self
10408    }
10409
10410    /// Sets the value of [update_time][crate::model::FindingSummary::update_time].
10411    ///
10412    /// # Example
10413    /// ```ignore,no_run
10414    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
10415    /// use wkt::Timestamp;
10416    /// let x = FindingSummary::new().set_update_time(Timestamp::default()/* use setters */);
10417    /// ```
10418    pub fn set_update_time<T>(mut self, v: T) -> Self
10419    where
10420        T: std::convert::Into<wkt::Timestamp>,
10421    {
10422        self.update_time = std::option::Option::Some(v.into());
10423        self
10424    }
10425
10426    /// Sets or clears the value of [update_time][crate::model::FindingSummary::update_time].
10427    ///
10428    /// # Example
10429    /// ```ignore,no_run
10430    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
10431    /// use wkt::Timestamp;
10432    /// let x = FindingSummary::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
10433    /// let x = FindingSummary::new().set_or_clear_update_time(None::<Timestamp>);
10434    /// ```
10435    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
10436    where
10437        T: std::convert::Into<wkt::Timestamp>,
10438    {
10439        self.update_time = v.map(|x| x.into());
10440        self
10441    }
10442
10443    /// Sets the value of [related_frameworks][crate::model::FindingSummary::related_frameworks].
10444    ///
10445    /// # Example
10446    /// ```ignore,no_run
10447    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
10448    /// let x = FindingSummary::new().set_related_frameworks(["a", "b", "c"]);
10449    /// ```
10450    pub fn set_related_frameworks<T, V>(mut self, v: T) -> Self
10451    where
10452        T: std::iter::IntoIterator<Item = V>,
10453        V: std::convert::Into<std::string::String>,
10454    {
10455        use std::iter::Iterator;
10456        self.related_frameworks = v.into_iter().map(|i| i.into()).collect();
10457        self
10458    }
10459
10460    /// Sets the value of [name][crate::model::FindingSummary::name].
10461    ///
10462    /// # Example
10463    /// ```ignore,no_run
10464    /// # use google_cloud_cloudsecuritycompliance_v1::model::FindingSummary;
10465    /// let x = FindingSummary::new().set_name("example");
10466    /// ```
10467    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10468        self.name = v.into();
10469        self
10470    }
10471}
10472
10473impl wkt::message::Message for FindingSummary {
10474    fn typename() -> &'static str {
10475        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.FindingSummary"
10476    }
10477}
10478
10479/// The details for control compliance.
10480#[derive(Clone, Default, PartialEq)]
10481#[non_exhaustive]
10482pub struct ControlComplianceSummary {
10483    /// The name of the control.
10484    pub control: std::string::String,
10485
10486    /// The display name of the control.
10487    pub display_name: std::string::String,
10488
10489    /// The description of the control.
10490    pub description: std::string::String,
10491
10492    /// Output only. The overall evaluation status of the control.
10493    pub overall_evaluation_state: crate::model::EvaluationState,
10494
10495    /// The total number of findings for the control.
10496    pub total_findings_count: i32,
10497
10498    /// The list of compliance frameworks that the control belongs to.
10499    pub compliance_frameworks: std::vec::Vec<std::string::String>,
10500
10501    /// The list of similar controls.
10502    pub similar_controls: std::vec::Vec<crate::model::SimilarControls>,
10503
10504    /// The list of cloud control reports.
10505    pub cloud_control_reports: std::vec::Vec<crate::model::CloudControlReport>,
10506
10507    /// The responsibility type for the control.
10508    pub control_responsibility_type: crate::model::RegulatoryControlResponsibilityType,
10509
10510    /// Whether the control is a fake control. Fake controls are created
10511    /// and mapped to cloud controls that don't belong to a control group.
10512    pub is_fake_control: bool,
10513
10514    /// Identifier. The name of the control compliance summary.
10515    pub name: std::string::String,
10516
10517    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10518}
10519
10520impl ControlComplianceSummary {
10521    /// Creates a new default instance.
10522    pub fn new() -> Self {
10523        std::default::Default::default()
10524    }
10525
10526    /// Sets the value of [control][crate::model::ControlComplianceSummary::control].
10527    ///
10528    /// # Example
10529    /// ```ignore,no_run
10530    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10531    /// let x = ControlComplianceSummary::new().set_control("example");
10532    /// ```
10533    pub fn set_control<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10534        self.control = v.into();
10535        self
10536    }
10537
10538    /// Sets the value of [display_name][crate::model::ControlComplianceSummary::display_name].
10539    ///
10540    /// # Example
10541    /// ```ignore,no_run
10542    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10543    /// let x = ControlComplianceSummary::new().set_display_name("example");
10544    /// ```
10545    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10546        self.display_name = v.into();
10547        self
10548    }
10549
10550    /// Sets the value of [description][crate::model::ControlComplianceSummary::description].
10551    ///
10552    /// # Example
10553    /// ```ignore,no_run
10554    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10555    /// let x = ControlComplianceSummary::new().set_description("example");
10556    /// ```
10557    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10558        self.description = v.into();
10559        self
10560    }
10561
10562    /// Sets the value of [overall_evaluation_state][crate::model::ControlComplianceSummary::overall_evaluation_state].
10563    ///
10564    /// # Example
10565    /// ```ignore,no_run
10566    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10567    /// use google_cloud_cloudsecuritycompliance_v1::model::EvaluationState;
10568    /// let x0 = ControlComplianceSummary::new().set_overall_evaluation_state(EvaluationState::Passed);
10569    /// let x1 = ControlComplianceSummary::new().set_overall_evaluation_state(EvaluationState::Failed);
10570    /// let x2 = ControlComplianceSummary::new().set_overall_evaluation_state(EvaluationState::NotAssessed);
10571    /// ```
10572    pub fn set_overall_evaluation_state<T: std::convert::Into<crate::model::EvaluationState>>(
10573        mut self,
10574        v: T,
10575    ) -> Self {
10576        self.overall_evaluation_state = v.into();
10577        self
10578    }
10579
10580    /// Sets the value of [total_findings_count][crate::model::ControlComplianceSummary::total_findings_count].
10581    ///
10582    /// # Example
10583    /// ```ignore,no_run
10584    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10585    /// let x = ControlComplianceSummary::new().set_total_findings_count(42);
10586    /// ```
10587    pub fn set_total_findings_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10588        self.total_findings_count = v.into();
10589        self
10590    }
10591
10592    /// Sets the value of [compliance_frameworks][crate::model::ControlComplianceSummary::compliance_frameworks].
10593    ///
10594    /// # Example
10595    /// ```ignore,no_run
10596    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10597    /// let x = ControlComplianceSummary::new().set_compliance_frameworks(["a", "b", "c"]);
10598    /// ```
10599    pub fn set_compliance_frameworks<T, V>(mut self, v: T) -> Self
10600    where
10601        T: std::iter::IntoIterator<Item = V>,
10602        V: std::convert::Into<std::string::String>,
10603    {
10604        use std::iter::Iterator;
10605        self.compliance_frameworks = v.into_iter().map(|i| i.into()).collect();
10606        self
10607    }
10608
10609    /// Sets the value of [similar_controls][crate::model::ControlComplianceSummary::similar_controls].
10610    ///
10611    /// # Example
10612    /// ```ignore,no_run
10613    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10614    /// use google_cloud_cloudsecuritycompliance_v1::model::SimilarControls;
10615    /// let x = ControlComplianceSummary::new()
10616    ///     .set_similar_controls([
10617    ///         SimilarControls::default()/* use setters */,
10618    ///         SimilarControls::default()/* use (different) setters */,
10619    ///     ]);
10620    /// ```
10621    pub fn set_similar_controls<T, V>(mut self, v: T) -> Self
10622    where
10623        T: std::iter::IntoIterator<Item = V>,
10624        V: std::convert::Into<crate::model::SimilarControls>,
10625    {
10626        use std::iter::Iterator;
10627        self.similar_controls = v.into_iter().map(|i| i.into()).collect();
10628        self
10629    }
10630
10631    /// Sets the value of [cloud_control_reports][crate::model::ControlComplianceSummary::cloud_control_reports].
10632    ///
10633    /// # Example
10634    /// ```ignore,no_run
10635    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10636    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10637    /// let x = ControlComplianceSummary::new()
10638    ///     .set_cloud_control_reports([
10639    ///         CloudControlReport::default()/* use setters */,
10640    ///         CloudControlReport::default()/* use (different) setters */,
10641    ///     ]);
10642    /// ```
10643    pub fn set_cloud_control_reports<T, V>(mut self, v: T) -> Self
10644    where
10645        T: std::iter::IntoIterator<Item = V>,
10646        V: std::convert::Into<crate::model::CloudControlReport>,
10647    {
10648        use std::iter::Iterator;
10649        self.cloud_control_reports = v.into_iter().map(|i| i.into()).collect();
10650        self
10651    }
10652
10653    /// Sets the value of [control_responsibility_type][crate::model::ControlComplianceSummary::control_responsibility_type].
10654    ///
10655    /// # Example
10656    /// ```ignore,no_run
10657    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10658    /// use google_cloud_cloudsecuritycompliance_v1::model::RegulatoryControlResponsibilityType;
10659    /// let x0 = ControlComplianceSummary::new().set_control_responsibility_type(RegulatoryControlResponsibilityType::Google);
10660    /// let x1 = ControlComplianceSummary::new().set_control_responsibility_type(RegulatoryControlResponsibilityType::Customer);
10661    /// let x2 = ControlComplianceSummary::new().set_control_responsibility_type(RegulatoryControlResponsibilityType::Shared);
10662    /// ```
10663    pub fn set_control_responsibility_type<
10664        T: std::convert::Into<crate::model::RegulatoryControlResponsibilityType>,
10665    >(
10666        mut self,
10667        v: T,
10668    ) -> Self {
10669        self.control_responsibility_type = v.into();
10670        self
10671    }
10672
10673    /// Sets the value of [is_fake_control][crate::model::ControlComplianceSummary::is_fake_control].
10674    ///
10675    /// # Example
10676    /// ```ignore,no_run
10677    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10678    /// let x = ControlComplianceSummary::new().set_is_fake_control(true);
10679    /// ```
10680    pub fn set_is_fake_control<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10681        self.is_fake_control = v.into();
10682        self
10683    }
10684
10685    /// Sets the value of [name][crate::model::ControlComplianceSummary::name].
10686    ///
10687    /// # Example
10688    /// ```ignore,no_run
10689    /// # use google_cloud_cloudsecuritycompliance_v1::model::ControlComplianceSummary;
10690    /// let x = ControlComplianceSummary::new().set_name("example");
10691    /// ```
10692    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10693        self.name = v.into();
10694        self
10695    }
10696}
10697
10698impl wkt::message::Message for ControlComplianceSummary {
10699    fn typename() -> &'static str {
10700        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary"
10701    }
10702}
10703
10704/// The cloud control report.
10705#[derive(Clone, Default, PartialEq)]
10706#[non_exhaustive]
10707pub struct CloudControlReport {
10708    /// The name of the cloud control.
10709    pub cloud_control: std::string::String,
10710
10711    /// The display name of the cloud control.
10712    pub display_name: std::string::String,
10713
10714    /// The description of the cloud control.
10715    pub description: std::string::String,
10716
10717    /// The list of categories for the cloud control.
10718    pub categories: std::vec::Vec<std::string::String>,
10719
10720    /// The list of similar controls.
10721    pub similar_controls: std::vec::Vec<crate::model::SimilarControls>,
10722
10723    /// The type of the cloud control.
10724    pub cloud_control_type: crate::model::cloud_control::Type,
10725
10726    /// The category of the finding.
10727    pub finding_category: std::string::String,
10728
10729    /// The list of rules that correspond to the cloud control.
10730    pub rules: std::vec::Vec<crate::model::Rule>,
10731
10732    /// The severity of the finding.
10733    pub finding_severity: crate::model::Severity,
10734
10735    /// The enforcement mode of the cloud control.
10736    pub enforcement_mode: crate::model::EnforcementMode,
10737
10738    /// The name of the cloud control deployment.
10739    pub cloud_control_deployment: std::string::String,
10740
10741    /// The major revision ID of the cloud control.
10742    pub major_revision_id: i64,
10743
10744    /// The minor revision ID of the cloud control.
10745    pub minor_revision_id: i64,
10746
10747    /// The major revision IDs of the frameworks that the cloud control belongs to.
10748    pub framework_major_revision_ids: std::vec::Vec<i64>,
10749
10750    /// The assessment details of the cloud control.
10751    pub assessment_details:
10752        std::option::Option<crate::model::cloud_control_report::AssessmentDetails>,
10753
10754    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10755}
10756
10757impl CloudControlReport {
10758    /// Creates a new default instance.
10759    pub fn new() -> Self {
10760        std::default::Default::default()
10761    }
10762
10763    /// Sets the value of [cloud_control][crate::model::CloudControlReport::cloud_control].
10764    ///
10765    /// # Example
10766    /// ```ignore,no_run
10767    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10768    /// let x = CloudControlReport::new().set_cloud_control("example");
10769    /// ```
10770    pub fn set_cloud_control<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10771        self.cloud_control = v.into();
10772        self
10773    }
10774
10775    /// Sets the value of [display_name][crate::model::CloudControlReport::display_name].
10776    ///
10777    /// # Example
10778    /// ```ignore,no_run
10779    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10780    /// let x = CloudControlReport::new().set_display_name("example");
10781    /// ```
10782    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10783        self.display_name = v.into();
10784        self
10785    }
10786
10787    /// Sets the value of [description][crate::model::CloudControlReport::description].
10788    ///
10789    /// # Example
10790    /// ```ignore,no_run
10791    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10792    /// let x = CloudControlReport::new().set_description("example");
10793    /// ```
10794    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10795        self.description = v.into();
10796        self
10797    }
10798
10799    /// Sets the value of [categories][crate::model::CloudControlReport::categories].
10800    ///
10801    /// # Example
10802    /// ```ignore,no_run
10803    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10804    /// let x = CloudControlReport::new().set_categories(["a", "b", "c"]);
10805    /// ```
10806    pub fn set_categories<T, V>(mut self, v: T) -> Self
10807    where
10808        T: std::iter::IntoIterator<Item = V>,
10809        V: std::convert::Into<std::string::String>,
10810    {
10811        use std::iter::Iterator;
10812        self.categories = v.into_iter().map(|i| i.into()).collect();
10813        self
10814    }
10815
10816    /// Sets the value of [similar_controls][crate::model::CloudControlReport::similar_controls].
10817    ///
10818    /// # Example
10819    /// ```ignore,no_run
10820    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10821    /// use google_cloud_cloudsecuritycompliance_v1::model::SimilarControls;
10822    /// let x = CloudControlReport::new()
10823    ///     .set_similar_controls([
10824    ///         SimilarControls::default()/* use setters */,
10825    ///         SimilarControls::default()/* use (different) setters */,
10826    ///     ]);
10827    /// ```
10828    pub fn set_similar_controls<T, V>(mut self, v: T) -> Self
10829    where
10830        T: std::iter::IntoIterator<Item = V>,
10831        V: std::convert::Into<crate::model::SimilarControls>,
10832    {
10833        use std::iter::Iterator;
10834        self.similar_controls = v.into_iter().map(|i| i.into()).collect();
10835        self
10836    }
10837
10838    /// Sets the value of [cloud_control_type][crate::model::CloudControlReport::cloud_control_type].
10839    ///
10840    /// # Example
10841    /// ```ignore,no_run
10842    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10843    /// use google_cloud_cloudsecuritycompliance_v1::model::cloud_control::Type;
10844    /// let x0 = CloudControlReport::new().set_cloud_control_type(Type::Custom);
10845    /// let x1 = CloudControlReport::new().set_cloud_control_type(Type::BuiltIn);
10846    /// ```
10847    pub fn set_cloud_control_type<T: std::convert::Into<crate::model::cloud_control::Type>>(
10848        mut self,
10849        v: T,
10850    ) -> Self {
10851        self.cloud_control_type = v.into();
10852        self
10853    }
10854
10855    /// Sets the value of [finding_category][crate::model::CloudControlReport::finding_category].
10856    ///
10857    /// # Example
10858    /// ```ignore,no_run
10859    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10860    /// let x = CloudControlReport::new().set_finding_category("example");
10861    /// ```
10862    pub fn set_finding_category<T: std::convert::Into<std::string::String>>(
10863        mut self,
10864        v: T,
10865    ) -> Self {
10866        self.finding_category = v.into();
10867        self
10868    }
10869
10870    /// Sets the value of [rules][crate::model::CloudControlReport::rules].
10871    ///
10872    /// # Example
10873    /// ```ignore,no_run
10874    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10875    /// use google_cloud_cloudsecuritycompliance_v1::model::Rule;
10876    /// let x = CloudControlReport::new()
10877    ///     .set_rules([
10878    ///         Rule::default()/* use setters */,
10879    ///         Rule::default()/* use (different) setters */,
10880    ///     ]);
10881    /// ```
10882    pub fn set_rules<T, V>(mut self, v: T) -> Self
10883    where
10884        T: std::iter::IntoIterator<Item = V>,
10885        V: std::convert::Into<crate::model::Rule>,
10886    {
10887        use std::iter::Iterator;
10888        self.rules = v.into_iter().map(|i| i.into()).collect();
10889        self
10890    }
10891
10892    /// Sets the value of [finding_severity][crate::model::CloudControlReport::finding_severity].
10893    ///
10894    /// # Example
10895    /// ```ignore,no_run
10896    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10897    /// use google_cloud_cloudsecuritycompliance_v1::model::Severity;
10898    /// let x0 = CloudControlReport::new().set_finding_severity(Severity::Critical);
10899    /// let x1 = CloudControlReport::new().set_finding_severity(Severity::High);
10900    /// let x2 = CloudControlReport::new().set_finding_severity(Severity::Medium);
10901    /// ```
10902    pub fn set_finding_severity<T: std::convert::Into<crate::model::Severity>>(
10903        mut self,
10904        v: T,
10905    ) -> Self {
10906        self.finding_severity = v.into();
10907        self
10908    }
10909
10910    /// Sets the value of [enforcement_mode][crate::model::CloudControlReport::enforcement_mode].
10911    ///
10912    /// # Example
10913    /// ```ignore,no_run
10914    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10915    /// use google_cloud_cloudsecuritycompliance_v1::model::EnforcementMode;
10916    /// let x0 = CloudControlReport::new().set_enforcement_mode(EnforcementMode::Preventive);
10917    /// let x1 = CloudControlReport::new().set_enforcement_mode(EnforcementMode::Detective);
10918    /// let x2 = CloudControlReport::new().set_enforcement_mode(EnforcementMode::Audit);
10919    /// ```
10920    pub fn set_enforcement_mode<T: std::convert::Into<crate::model::EnforcementMode>>(
10921        mut self,
10922        v: T,
10923    ) -> Self {
10924        self.enforcement_mode = v.into();
10925        self
10926    }
10927
10928    /// Sets the value of [cloud_control_deployment][crate::model::CloudControlReport::cloud_control_deployment].
10929    ///
10930    /// # Example
10931    /// ```ignore,no_run
10932    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10933    /// let x = CloudControlReport::new().set_cloud_control_deployment("example");
10934    /// ```
10935    pub fn set_cloud_control_deployment<T: std::convert::Into<std::string::String>>(
10936        mut self,
10937        v: T,
10938    ) -> Self {
10939        self.cloud_control_deployment = v.into();
10940        self
10941    }
10942
10943    /// Sets the value of [major_revision_id][crate::model::CloudControlReport::major_revision_id].
10944    ///
10945    /// # Example
10946    /// ```ignore,no_run
10947    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10948    /// let x = CloudControlReport::new().set_major_revision_id(42);
10949    /// ```
10950    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10951        self.major_revision_id = v.into();
10952        self
10953    }
10954
10955    /// Sets the value of [minor_revision_id][crate::model::CloudControlReport::minor_revision_id].
10956    ///
10957    /// # Example
10958    /// ```ignore,no_run
10959    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10960    /// let x = CloudControlReport::new().set_minor_revision_id(42);
10961    /// ```
10962    pub fn set_minor_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10963        self.minor_revision_id = v.into();
10964        self
10965    }
10966
10967    /// Sets the value of [framework_major_revision_ids][crate::model::CloudControlReport::framework_major_revision_ids].
10968    ///
10969    /// # Example
10970    /// ```ignore,no_run
10971    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10972    /// let x = CloudControlReport::new().set_framework_major_revision_ids([1, 2, 3]);
10973    /// ```
10974    pub fn set_framework_major_revision_ids<T, V>(mut self, v: T) -> Self
10975    where
10976        T: std::iter::IntoIterator<Item = V>,
10977        V: std::convert::Into<i64>,
10978    {
10979        use std::iter::Iterator;
10980        self.framework_major_revision_ids = v.into_iter().map(|i| i.into()).collect();
10981        self
10982    }
10983
10984    /// Sets the value of [assessment_details][crate::model::CloudControlReport::assessment_details].
10985    ///
10986    /// Note that all the setters affecting `assessment_details` are mutually
10987    /// exclusive.
10988    ///
10989    /// # Example
10990    /// ```ignore,no_run
10991    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
10992    /// use google_cloud_cloudsecuritycompliance_v1::model::ManualCloudControlAssessmentDetails;
10993    /// let x = CloudControlReport::new().set_assessment_details(Some(
10994    ///     google_cloud_cloudsecuritycompliance_v1::model::cloud_control_report::AssessmentDetails::ManualCloudControlAssessmentDetails(ManualCloudControlAssessmentDetails::default().into())));
10995    /// ```
10996    pub fn set_assessment_details<
10997        T: std::convert::Into<
10998                std::option::Option<crate::model::cloud_control_report::AssessmentDetails>,
10999            >,
11000    >(
11001        mut self,
11002        v: T,
11003    ) -> Self {
11004        self.assessment_details = v.into();
11005        self
11006    }
11007
11008    /// The value of [assessment_details][crate::model::CloudControlReport::assessment_details]
11009    /// if it holds a `ManualCloudControlAssessmentDetails`, `None` if the field is not set or
11010    /// holds a different branch.
11011    pub fn manual_cloud_control_assessment_details(
11012        &self,
11013    ) -> std::option::Option<&std::boxed::Box<crate::model::ManualCloudControlAssessmentDetails>>
11014    {
11015        #[allow(unreachable_patterns)]
11016        self.assessment_details.as_ref().and_then(|v| match v {
11017            crate::model::cloud_control_report::AssessmentDetails::ManualCloudControlAssessmentDetails(v) => std::option::Option::Some(v),
11018            _ => std::option::Option::None,
11019        })
11020    }
11021
11022    /// Sets the value of [assessment_details][crate::model::CloudControlReport::assessment_details]
11023    /// to hold a `ManualCloudControlAssessmentDetails`.
11024    ///
11025    /// Note that all the setters affecting `assessment_details` are
11026    /// mutually exclusive.
11027    ///
11028    /// # Example
11029    /// ```ignore,no_run
11030    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
11031    /// use google_cloud_cloudsecuritycompliance_v1::model::ManualCloudControlAssessmentDetails;
11032    /// let x = CloudControlReport::new().set_manual_cloud_control_assessment_details(ManualCloudControlAssessmentDetails::default()/* use setters */);
11033    /// assert!(x.manual_cloud_control_assessment_details().is_some());
11034    /// assert!(x.cloud_control_assessment_details().is_none());
11035    /// ```
11036    pub fn set_manual_cloud_control_assessment_details<
11037        T: std::convert::Into<std::boxed::Box<crate::model::ManualCloudControlAssessmentDetails>>,
11038    >(
11039        mut self,
11040        v: T,
11041    ) -> Self {
11042        self.assessment_details = std::option::Option::Some(
11043            crate::model::cloud_control_report::AssessmentDetails::ManualCloudControlAssessmentDetails(
11044                v.into()
11045            )
11046        );
11047        self
11048    }
11049
11050    /// The value of [assessment_details][crate::model::CloudControlReport::assessment_details]
11051    /// if it holds a `CloudControlAssessmentDetails`, `None` if the field is not set or
11052    /// holds a different branch.
11053    pub fn cloud_control_assessment_details(
11054        &self,
11055    ) -> std::option::Option<&std::boxed::Box<crate::model::CloudControlAssessmentDetails>> {
11056        #[allow(unreachable_patterns)]
11057        self.assessment_details.as_ref().and_then(|v| match v {
11058            crate::model::cloud_control_report::AssessmentDetails::CloudControlAssessmentDetails(v) => std::option::Option::Some(v),
11059            _ => std::option::Option::None,
11060        })
11061    }
11062
11063    /// Sets the value of [assessment_details][crate::model::CloudControlReport::assessment_details]
11064    /// to hold a `CloudControlAssessmentDetails`.
11065    ///
11066    /// Note that all the setters affecting `assessment_details` are
11067    /// mutually exclusive.
11068    ///
11069    /// # Example
11070    /// ```ignore,no_run
11071    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlReport;
11072    /// use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAssessmentDetails;
11073    /// let x = CloudControlReport::new().set_cloud_control_assessment_details(CloudControlAssessmentDetails::default()/* use setters */);
11074    /// assert!(x.cloud_control_assessment_details().is_some());
11075    /// assert!(x.manual_cloud_control_assessment_details().is_none());
11076    /// ```
11077    pub fn set_cloud_control_assessment_details<
11078        T: std::convert::Into<std::boxed::Box<crate::model::CloudControlAssessmentDetails>>,
11079    >(
11080        mut self,
11081        v: T,
11082    ) -> Self {
11083        self.assessment_details = std::option::Option::Some(
11084            crate::model::cloud_control_report::AssessmentDetails::CloudControlAssessmentDetails(
11085                v.into(),
11086            ),
11087        );
11088        self
11089    }
11090}
11091
11092impl wkt::message::Message for CloudControlReport {
11093    fn typename() -> &'static str {
11094        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlReport"
11095    }
11096}
11097
11098/// Defines additional types related to [CloudControlReport].
11099pub mod cloud_control_report {
11100    #[allow(unused_imports)]
11101    use super::*;
11102
11103    /// The assessment details of the cloud control.
11104    #[derive(Clone, Debug, PartialEq)]
11105    #[non_exhaustive]
11106    pub enum AssessmentDetails {
11107        /// The details of a manual cloud control assessment.
11108        ManualCloudControlAssessmentDetails(
11109            std::boxed::Box<crate::model::ManualCloudControlAssessmentDetails>,
11110        ),
11111        /// The details of a cloud control assessment.
11112        CloudControlAssessmentDetails(std::boxed::Box<crate::model::CloudControlAssessmentDetails>),
11113    }
11114}
11115
11116/// The details for a manual cloud control assessment.
11117#[derive(Clone, Default, PartialEq)]
11118#[non_exhaustive]
11119pub struct ManualCloudControlAssessmentDetails {
11120    /// The guide for assessing a cloud control manually.
11121    pub manual_cloud_control_guide: std::vec::Vec<std::string::String>,
11122
11123    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11124}
11125
11126impl ManualCloudControlAssessmentDetails {
11127    /// Creates a new default instance.
11128    pub fn new() -> Self {
11129        std::default::Default::default()
11130    }
11131
11132    /// Sets the value of [manual_cloud_control_guide][crate::model::ManualCloudControlAssessmentDetails::manual_cloud_control_guide].
11133    ///
11134    /// # Example
11135    /// ```ignore,no_run
11136    /// # use google_cloud_cloudsecuritycompliance_v1::model::ManualCloudControlAssessmentDetails;
11137    /// let x = ManualCloudControlAssessmentDetails::new().set_manual_cloud_control_guide(["a", "b", "c"]);
11138    /// ```
11139    pub fn set_manual_cloud_control_guide<T, V>(mut self, v: T) -> Self
11140    where
11141        T: std::iter::IntoIterator<Item = V>,
11142        V: std::convert::Into<std::string::String>,
11143    {
11144        use std::iter::Iterator;
11145        self.manual_cloud_control_guide = v.into_iter().map(|i| i.into()).collect();
11146        self
11147    }
11148}
11149
11150impl wkt::message::Message for ManualCloudControlAssessmentDetails {
11151    fn typename() -> &'static str {
11152        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails"
11153    }
11154}
11155
11156/// The cloud control assessment details for non-manual cloud controls.
11157#[derive(Clone, Default, PartialEq)]
11158#[non_exhaustive]
11159pub struct CloudControlAssessmentDetails {
11160    /// The number of findings for the cloud control.
11161    pub findings_count: i32,
11162
11163    /// Output only. The evaluation status of the cloud control.
11164    pub evaluation_state: crate::model::EvaluationState,
11165
11166    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11167}
11168
11169impl CloudControlAssessmentDetails {
11170    /// Creates a new default instance.
11171    pub fn new() -> Self {
11172        std::default::Default::default()
11173    }
11174
11175    /// Sets the value of [findings_count][crate::model::CloudControlAssessmentDetails::findings_count].
11176    ///
11177    /// # Example
11178    /// ```ignore,no_run
11179    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAssessmentDetails;
11180    /// let x = CloudControlAssessmentDetails::new().set_findings_count(42);
11181    /// ```
11182    pub fn set_findings_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11183        self.findings_count = v.into();
11184        self
11185    }
11186
11187    /// Sets the value of [evaluation_state][crate::model::CloudControlAssessmentDetails::evaluation_state].
11188    ///
11189    /// # Example
11190    /// ```ignore,no_run
11191    /// # use google_cloud_cloudsecuritycompliance_v1::model::CloudControlAssessmentDetails;
11192    /// use google_cloud_cloudsecuritycompliance_v1::model::EvaluationState;
11193    /// let x0 = CloudControlAssessmentDetails::new().set_evaluation_state(EvaluationState::Passed);
11194    /// let x1 = CloudControlAssessmentDetails::new().set_evaluation_state(EvaluationState::Failed);
11195    /// let x2 = CloudControlAssessmentDetails::new().set_evaluation_state(EvaluationState::NotAssessed);
11196    /// ```
11197    pub fn set_evaluation_state<T: std::convert::Into<crate::model::EvaluationState>>(
11198        mut self,
11199        v: T,
11200    ) -> Self {
11201        self.evaluation_state = v.into();
11202        self
11203    }
11204}
11205
11206impl wkt::message::Message for CloudControlAssessmentDetails {
11207    fn typename() -> &'static str {
11208        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails"
11209    }
11210}
11211
11212/// The similar controls.
11213#[derive(Clone, Default, PartialEq)]
11214#[non_exhaustive]
11215pub struct SimilarControls {
11216    /// The name of the framework.
11217    pub framework: std::string::String,
11218
11219    /// The ID of the control.
11220    pub control_id: std::string::String,
11221
11222    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11223}
11224
11225impl SimilarControls {
11226    /// Creates a new default instance.
11227    pub fn new() -> Self {
11228        std::default::Default::default()
11229    }
11230
11231    /// Sets the value of [framework][crate::model::SimilarControls::framework].
11232    ///
11233    /// # Example
11234    /// ```ignore,no_run
11235    /// # use google_cloud_cloudsecuritycompliance_v1::model::SimilarControls;
11236    /// let x = SimilarControls::new().set_framework("example");
11237    /// ```
11238    pub fn set_framework<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11239        self.framework = v.into();
11240        self
11241    }
11242
11243    /// Sets the value of [control_id][crate::model::SimilarControls::control_id].
11244    ///
11245    /// # Example
11246    /// ```ignore,no_run
11247    /// # use google_cloud_cloudsecuritycompliance_v1::model::SimilarControls;
11248    /// let x = SimilarControls::new().set_control_id("example");
11249    /// ```
11250    pub fn set_control_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11251        self.control_id = v.into();
11252        self
11253    }
11254}
11255
11256impl wkt::message::Message for SimilarControls {
11257    fn typename() -> &'static str {
11258        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.SimilarControls"
11259    }
11260}
11261
11262/// The aggregated compliance report.
11263#[derive(Clone, Default, PartialEq)]
11264#[non_exhaustive]
11265pub struct AggregatedComplianceReport {
11266    /// The control assessment details of the framework.
11267    pub control_assessment_details: std::option::Option<crate::model::ControlAssessmentDetails>,
11268
11269    /// The report time of the aggregated compliance report.
11270    pub report_time: std::option::Option<wkt::Timestamp>,
11271
11272    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11273}
11274
11275impl AggregatedComplianceReport {
11276    /// Creates a new default instance.
11277    pub fn new() -> Self {
11278        std::default::Default::default()
11279    }
11280
11281    /// Sets the value of [control_assessment_details][crate::model::AggregatedComplianceReport::control_assessment_details].
11282    ///
11283    /// # Example
11284    /// ```ignore,no_run
11285    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregatedComplianceReport;
11286    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
11287    /// let x = AggregatedComplianceReport::new().set_control_assessment_details(ControlAssessmentDetails::default()/* use setters */);
11288    /// ```
11289    pub fn set_control_assessment_details<T>(mut self, v: T) -> Self
11290    where
11291        T: std::convert::Into<crate::model::ControlAssessmentDetails>,
11292    {
11293        self.control_assessment_details = std::option::Option::Some(v.into());
11294        self
11295    }
11296
11297    /// Sets or clears the value of [control_assessment_details][crate::model::AggregatedComplianceReport::control_assessment_details].
11298    ///
11299    /// # Example
11300    /// ```ignore,no_run
11301    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregatedComplianceReport;
11302    /// use google_cloud_cloudsecuritycompliance_v1::model::ControlAssessmentDetails;
11303    /// let x = AggregatedComplianceReport::new().set_or_clear_control_assessment_details(Some(ControlAssessmentDetails::default()/* use setters */));
11304    /// let x = AggregatedComplianceReport::new().set_or_clear_control_assessment_details(None::<ControlAssessmentDetails>);
11305    /// ```
11306    pub fn set_or_clear_control_assessment_details<T>(mut self, v: std::option::Option<T>) -> Self
11307    where
11308        T: std::convert::Into<crate::model::ControlAssessmentDetails>,
11309    {
11310        self.control_assessment_details = v.map(|x| x.into());
11311        self
11312    }
11313
11314    /// Sets the value of [report_time][crate::model::AggregatedComplianceReport::report_time].
11315    ///
11316    /// # Example
11317    /// ```ignore,no_run
11318    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregatedComplianceReport;
11319    /// use wkt::Timestamp;
11320    /// let x = AggregatedComplianceReport::new().set_report_time(Timestamp::default()/* use setters */);
11321    /// ```
11322    pub fn set_report_time<T>(mut self, v: T) -> Self
11323    where
11324        T: std::convert::Into<wkt::Timestamp>,
11325    {
11326        self.report_time = std::option::Option::Some(v.into());
11327        self
11328    }
11329
11330    /// Sets or clears the value of [report_time][crate::model::AggregatedComplianceReport::report_time].
11331    ///
11332    /// # Example
11333    /// ```ignore,no_run
11334    /// # use google_cloud_cloudsecuritycompliance_v1::model::AggregatedComplianceReport;
11335    /// use wkt::Timestamp;
11336    /// let x = AggregatedComplianceReport::new().set_or_clear_report_time(Some(Timestamp::default()/* use setters */));
11337    /// let x = AggregatedComplianceReport::new().set_or_clear_report_time(None::<Timestamp>);
11338    /// ```
11339    pub fn set_or_clear_report_time<T>(mut self, v: std::option::Option<T>) -> Self
11340    where
11341        T: std::convert::Into<wkt::Timestamp>,
11342    {
11343        self.report_time = v.map(|x| x.into());
11344        self
11345    }
11346}
11347
11348impl wkt::message::Message for AggregatedComplianceReport {
11349    fn typename() -> &'static str {
11350        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport"
11351    }
11352}
11353
11354/// The details for a target resource.
11355#[derive(Clone, Default, PartialEq)]
11356#[non_exhaustive]
11357pub struct TargetResourceDetails {
11358    /// The framework deployment name for the target resource.
11359    ///
11360    /// For example,
11361    /// `organizations/{organization_id}/locations/{location}/frameworkDeployments/{framework_deployment_id}`
11362    pub framework_deployment: std::string::String,
11363
11364    /// The display name of the target resource. For example, `google.com`,
11365    /// `staging-project`, or `development-folder`.
11366    pub target_resource_display_name: std::string::String,
11367
11368    /// The target resource. For example, `organizations/1234567890`,
11369    /// `projects/1234567890`, or `folders/1234567890`.
11370    pub target_resource: std::string::String,
11371
11372    /// The create time of the target resource.
11373    pub create_time: std::option::Option<wkt::Timestamp>,
11374
11375    /// The update time of the target resource.
11376    pub update_time: std::option::Option<wkt::Timestamp>,
11377
11378    /// The major revision ID of the framework for the target resource.
11379    pub major_revision_id: i64,
11380
11381    /// The minor revision ID of the framework for the target resource.
11382    pub minor_revision_id: i64,
11383
11384    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11385}
11386
11387impl TargetResourceDetails {
11388    /// Creates a new default instance.
11389    pub fn new() -> Self {
11390        std::default::Default::default()
11391    }
11392
11393    /// Sets the value of [framework_deployment][crate::model::TargetResourceDetails::framework_deployment].
11394    ///
11395    /// # Example
11396    /// ```ignore,no_run
11397    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
11398    /// let x = TargetResourceDetails::new().set_framework_deployment("example");
11399    /// ```
11400    pub fn set_framework_deployment<T: std::convert::Into<std::string::String>>(
11401        mut self,
11402        v: T,
11403    ) -> Self {
11404        self.framework_deployment = v.into();
11405        self
11406    }
11407
11408    /// Sets the value of [target_resource_display_name][crate::model::TargetResourceDetails::target_resource_display_name].
11409    ///
11410    /// # Example
11411    /// ```ignore,no_run
11412    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
11413    /// let x = TargetResourceDetails::new().set_target_resource_display_name("example");
11414    /// ```
11415    pub fn set_target_resource_display_name<T: std::convert::Into<std::string::String>>(
11416        mut self,
11417        v: T,
11418    ) -> Self {
11419        self.target_resource_display_name = v.into();
11420        self
11421    }
11422
11423    /// Sets the value of [target_resource][crate::model::TargetResourceDetails::target_resource].
11424    ///
11425    /// # Example
11426    /// ```ignore,no_run
11427    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
11428    /// let x = TargetResourceDetails::new().set_target_resource("example");
11429    /// ```
11430    pub fn set_target_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11431        self.target_resource = v.into();
11432        self
11433    }
11434
11435    /// Sets the value of [create_time][crate::model::TargetResourceDetails::create_time].
11436    ///
11437    /// # Example
11438    /// ```ignore,no_run
11439    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
11440    /// use wkt::Timestamp;
11441    /// let x = TargetResourceDetails::new().set_create_time(Timestamp::default()/* use setters */);
11442    /// ```
11443    pub fn set_create_time<T>(mut self, v: T) -> Self
11444    where
11445        T: std::convert::Into<wkt::Timestamp>,
11446    {
11447        self.create_time = std::option::Option::Some(v.into());
11448        self
11449    }
11450
11451    /// Sets or clears the value of [create_time][crate::model::TargetResourceDetails::create_time].
11452    ///
11453    /// # Example
11454    /// ```ignore,no_run
11455    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
11456    /// use wkt::Timestamp;
11457    /// let x = TargetResourceDetails::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
11458    /// let x = TargetResourceDetails::new().set_or_clear_create_time(None::<Timestamp>);
11459    /// ```
11460    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
11461    where
11462        T: std::convert::Into<wkt::Timestamp>,
11463    {
11464        self.create_time = v.map(|x| x.into());
11465        self
11466    }
11467
11468    /// Sets the value of [update_time][crate::model::TargetResourceDetails::update_time].
11469    ///
11470    /// # Example
11471    /// ```ignore,no_run
11472    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
11473    /// use wkt::Timestamp;
11474    /// let x = TargetResourceDetails::new().set_update_time(Timestamp::default()/* use setters */);
11475    /// ```
11476    pub fn set_update_time<T>(mut self, v: T) -> Self
11477    where
11478        T: std::convert::Into<wkt::Timestamp>,
11479    {
11480        self.update_time = std::option::Option::Some(v.into());
11481        self
11482    }
11483
11484    /// Sets or clears the value of [update_time][crate::model::TargetResourceDetails::update_time].
11485    ///
11486    /// # Example
11487    /// ```ignore,no_run
11488    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
11489    /// use wkt::Timestamp;
11490    /// let x = TargetResourceDetails::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
11491    /// let x = TargetResourceDetails::new().set_or_clear_update_time(None::<Timestamp>);
11492    /// ```
11493    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
11494    where
11495        T: std::convert::Into<wkt::Timestamp>,
11496    {
11497        self.update_time = v.map(|x| x.into());
11498        self
11499    }
11500
11501    /// Sets the value of [major_revision_id][crate::model::TargetResourceDetails::major_revision_id].
11502    ///
11503    /// # Example
11504    /// ```ignore,no_run
11505    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
11506    /// let x = TargetResourceDetails::new().set_major_revision_id(42);
11507    /// ```
11508    pub fn set_major_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11509        self.major_revision_id = v.into();
11510        self
11511    }
11512
11513    /// Sets the value of [minor_revision_id][crate::model::TargetResourceDetails::minor_revision_id].
11514    ///
11515    /// # Example
11516    /// ```ignore,no_run
11517    /// # use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceDetails;
11518    /// let x = TargetResourceDetails::new().set_minor_revision_id(42);
11519    /// ```
11520    pub fn set_minor_revision_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11521        self.minor_revision_id = v.into();
11522        self
11523    }
11524}
11525
11526impl wkt::message::Message for TargetResourceDetails {
11527    fn typename() -> &'static str {
11528        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails"
11529    }
11530}
11531
11532/// The trend of a compliance metric.
11533#[derive(Clone, Default, PartialEq)]
11534#[non_exhaustive]
11535pub struct Trend {
11536    /// Output only. The duration for the trend.
11537    pub duration: std::option::Option<wkt::Duration>,
11538
11539    /// Output only. The trend value as a percentage. The value can be positive or
11540    /// negative.
11541    pub value_percent: f64,
11542
11543    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11544}
11545
11546impl Trend {
11547    /// Creates a new default instance.
11548    pub fn new() -> Self {
11549        std::default::Default::default()
11550    }
11551
11552    /// Sets the value of [duration][crate::model::Trend::duration].
11553    ///
11554    /// # Example
11555    /// ```ignore,no_run
11556    /// # use google_cloud_cloudsecuritycompliance_v1::model::Trend;
11557    /// use wkt::Duration;
11558    /// let x = Trend::new().set_duration(Duration::default()/* use setters */);
11559    /// ```
11560    pub fn set_duration<T>(mut self, v: T) -> Self
11561    where
11562        T: std::convert::Into<wkt::Duration>,
11563    {
11564        self.duration = std::option::Option::Some(v.into());
11565        self
11566    }
11567
11568    /// Sets or clears the value of [duration][crate::model::Trend::duration].
11569    ///
11570    /// # Example
11571    /// ```ignore,no_run
11572    /// # use google_cloud_cloudsecuritycompliance_v1::model::Trend;
11573    /// use wkt::Duration;
11574    /// let x = Trend::new().set_or_clear_duration(Some(Duration::default()/* use setters */));
11575    /// let x = Trend::new().set_or_clear_duration(None::<Duration>);
11576    /// ```
11577    pub fn set_or_clear_duration<T>(mut self, v: std::option::Option<T>) -> Self
11578    where
11579        T: std::convert::Into<wkt::Duration>,
11580    {
11581        self.duration = v.map(|x| x.into());
11582        self
11583    }
11584
11585    /// Sets the value of [value_percent][crate::model::Trend::value_percent].
11586    ///
11587    /// # Example
11588    /// ```ignore,no_run
11589    /// # use google_cloud_cloudsecuritycompliance_v1::model::Trend;
11590    /// let x = Trend::new().set_value_percent(42.0);
11591    /// ```
11592    pub fn set_value_percent<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11593        self.value_percent = v.into();
11594        self
11595    }
11596}
11597
11598impl wkt::message::Message for Trend {
11599    fn typename() -> &'static str {
11600        "type.googleapis.com/google.cloud.cloudsecuritycompliance.v1.Trend"
11601    }
11602}
11603
11604/// The state of compliance after evaluation is complete.
11605///
11606/// # Working with unknown values
11607///
11608/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11609/// additional enum variants at any time. Adding new variants is not considered
11610/// a breaking change. Applications should write their code in anticipation of:
11611///
11612/// - New values appearing in future releases of the client library, **and**
11613/// - New values received dynamically, without application changes.
11614///
11615/// Please consult the [Working with enums] section in the user guide for some
11616/// guidelines.
11617///
11618/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11619#[derive(Clone, Debug, PartialEq)]
11620#[non_exhaustive]
11621pub enum ComplianceState {
11622    /// Default value. This value is unused.
11623    Unspecified,
11624    /// The resource is compliant.
11625    Compliant,
11626    /// The resource has a violation.
11627    Violation,
11628    /// The resource requires manual review from you.
11629    ManualReviewNeeded,
11630    /// An error occurred while computing the resource status.
11631    Error,
11632    /// The resource can't be audited.
11633    AuditNotSupported,
11634    /// If set, the enum was initialized with an unknown value.
11635    ///
11636    /// Applications can examine the value using [ComplianceState::value] or
11637    /// [ComplianceState::name].
11638    UnknownValue(compliance_state::UnknownValue),
11639}
11640
11641#[doc(hidden)]
11642pub mod compliance_state {
11643    #[allow(unused_imports)]
11644    use super::*;
11645    #[derive(Clone, Debug, PartialEq)]
11646    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11647}
11648
11649impl ComplianceState {
11650    /// Gets the enum value.
11651    ///
11652    /// Returns `None` if the enum contains an unknown value deserialized from
11653    /// the string representation of enums.
11654    pub fn value(&self) -> std::option::Option<i32> {
11655        match self {
11656            Self::Unspecified => std::option::Option::Some(0),
11657            Self::Compliant => std::option::Option::Some(1),
11658            Self::Violation => std::option::Option::Some(2),
11659            Self::ManualReviewNeeded => std::option::Option::Some(3),
11660            Self::Error => std::option::Option::Some(4),
11661            Self::AuditNotSupported => std::option::Option::Some(5),
11662            Self::UnknownValue(u) => u.0.value(),
11663        }
11664    }
11665
11666    /// Gets the enum value as a string.
11667    ///
11668    /// Returns `None` if the enum contains an unknown value deserialized from
11669    /// the integer representation of enums.
11670    pub fn name(&self) -> std::option::Option<&str> {
11671        match self {
11672            Self::Unspecified => std::option::Option::Some("COMPLIANCE_STATE_UNSPECIFIED"),
11673            Self::Compliant => std::option::Option::Some("COMPLIANT"),
11674            Self::Violation => std::option::Option::Some("VIOLATION"),
11675            Self::ManualReviewNeeded => std::option::Option::Some("MANUAL_REVIEW_NEEDED"),
11676            Self::Error => std::option::Option::Some("ERROR"),
11677            Self::AuditNotSupported => std::option::Option::Some("AUDIT_NOT_SUPPORTED"),
11678            Self::UnknownValue(u) => u.0.name(),
11679        }
11680    }
11681}
11682
11683impl std::default::Default for ComplianceState {
11684    fn default() -> Self {
11685        use std::convert::From;
11686        Self::from(0)
11687    }
11688}
11689
11690impl std::fmt::Display for ComplianceState {
11691    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11692        wkt::internal::display_enum(f, self.name(), self.value())
11693    }
11694}
11695
11696impl std::convert::From<i32> for ComplianceState {
11697    fn from(value: i32) -> Self {
11698        match value {
11699            0 => Self::Unspecified,
11700            1 => Self::Compliant,
11701            2 => Self::Violation,
11702            3 => Self::ManualReviewNeeded,
11703            4 => Self::Error,
11704            5 => Self::AuditNotSupported,
11705            _ => Self::UnknownValue(compliance_state::UnknownValue(
11706                wkt::internal::UnknownEnumValue::Integer(value),
11707            )),
11708        }
11709    }
11710}
11711
11712impl std::convert::From<&str> for ComplianceState {
11713    fn from(value: &str) -> Self {
11714        use std::string::ToString;
11715        match value {
11716            "COMPLIANCE_STATE_UNSPECIFIED" => Self::Unspecified,
11717            "COMPLIANT" => Self::Compliant,
11718            "VIOLATION" => Self::Violation,
11719            "MANUAL_REVIEW_NEEDED" => Self::ManualReviewNeeded,
11720            "ERROR" => Self::Error,
11721            "AUDIT_NOT_SUPPORTED" => Self::AuditNotSupported,
11722            _ => Self::UnknownValue(compliance_state::UnknownValue(
11723                wkt::internal::UnknownEnumValue::String(value.to_string()),
11724            )),
11725        }
11726    }
11727}
11728
11729impl serde::ser::Serialize for ComplianceState {
11730    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11731    where
11732        S: serde::Serializer,
11733    {
11734        match self {
11735            Self::Unspecified => serializer.serialize_i32(0),
11736            Self::Compliant => serializer.serialize_i32(1),
11737            Self::Violation => serializer.serialize_i32(2),
11738            Self::ManualReviewNeeded => serializer.serialize_i32(3),
11739            Self::Error => serializer.serialize_i32(4),
11740            Self::AuditNotSupported => serializer.serialize_i32(5),
11741            Self::UnknownValue(u) => u.0.serialize(serializer),
11742        }
11743    }
11744}
11745
11746impl<'de> serde::de::Deserialize<'de> for ComplianceState {
11747    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11748    where
11749        D: serde::Deserializer<'de>,
11750    {
11751        deserializer.deserialize_any(wkt::internal::EnumVisitor::<ComplianceState>::new(
11752            ".google.cloud.cloudsecuritycompliance.v1.ComplianceState",
11753        ))
11754    }
11755}
11756
11757/// The responsibility type for the regulatory control.
11758///
11759/// # Working with unknown values
11760///
11761/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11762/// additional enum variants at any time. Adding new variants is not considered
11763/// a breaking change. Applications should write their code in anticipation of:
11764///
11765/// - New values appearing in future releases of the client library, **and**
11766/// - New values received dynamically, without application changes.
11767///
11768/// Please consult the [Working with enums] section in the user guide for some
11769/// guidelines.
11770///
11771/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11772#[derive(Clone, Debug, PartialEq)]
11773#[non_exhaustive]
11774pub enum RegulatoryControlResponsibilityType {
11775    /// Default value. This value is unused.
11776    Unspecified,
11777    /// Google's responsibility.
11778    Google,
11779    /// Your responsibility.
11780    Customer,
11781    /// Shared responsibility.
11782    Shared,
11783    /// If set, the enum was initialized with an unknown value.
11784    ///
11785    /// Applications can examine the value using [RegulatoryControlResponsibilityType::value] or
11786    /// [RegulatoryControlResponsibilityType::name].
11787    UnknownValue(regulatory_control_responsibility_type::UnknownValue),
11788}
11789
11790#[doc(hidden)]
11791pub mod regulatory_control_responsibility_type {
11792    #[allow(unused_imports)]
11793    use super::*;
11794    #[derive(Clone, Debug, PartialEq)]
11795    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11796}
11797
11798impl RegulatoryControlResponsibilityType {
11799    /// Gets the enum value.
11800    ///
11801    /// Returns `None` if the enum contains an unknown value deserialized from
11802    /// the string representation of enums.
11803    pub fn value(&self) -> std::option::Option<i32> {
11804        match self {
11805            Self::Unspecified => std::option::Option::Some(0),
11806            Self::Google => std::option::Option::Some(1),
11807            Self::Customer => std::option::Option::Some(2),
11808            Self::Shared => std::option::Option::Some(3),
11809            Self::UnknownValue(u) => u.0.value(),
11810        }
11811    }
11812
11813    /// Gets the enum value as a string.
11814    ///
11815    /// Returns `None` if the enum contains an unknown value deserialized from
11816    /// the integer representation of enums.
11817    pub fn name(&self) -> std::option::Option<&str> {
11818        match self {
11819            Self::Unspecified => {
11820                std::option::Option::Some("REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED")
11821            }
11822            Self::Google => std::option::Option::Some("GOOGLE"),
11823            Self::Customer => std::option::Option::Some("CUSTOMER"),
11824            Self::Shared => std::option::Option::Some("SHARED"),
11825            Self::UnknownValue(u) => u.0.name(),
11826        }
11827    }
11828}
11829
11830impl std::default::Default for RegulatoryControlResponsibilityType {
11831    fn default() -> Self {
11832        use std::convert::From;
11833        Self::from(0)
11834    }
11835}
11836
11837impl std::fmt::Display for RegulatoryControlResponsibilityType {
11838    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11839        wkt::internal::display_enum(f, self.name(), self.value())
11840    }
11841}
11842
11843impl std::convert::From<i32> for RegulatoryControlResponsibilityType {
11844    fn from(value: i32) -> Self {
11845        match value {
11846            0 => Self::Unspecified,
11847            1 => Self::Google,
11848            2 => Self::Customer,
11849            3 => Self::Shared,
11850            _ => Self::UnknownValue(regulatory_control_responsibility_type::UnknownValue(
11851                wkt::internal::UnknownEnumValue::Integer(value),
11852            )),
11853        }
11854    }
11855}
11856
11857impl std::convert::From<&str> for RegulatoryControlResponsibilityType {
11858    fn from(value: &str) -> Self {
11859        use std::string::ToString;
11860        match value {
11861            "REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED" => Self::Unspecified,
11862            "GOOGLE" => Self::Google,
11863            "CUSTOMER" => Self::Customer,
11864            "SHARED" => Self::Shared,
11865            _ => Self::UnknownValue(regulatory_control_responsibility_type::UnknownValue(
11866                wkt::internal::UnknownEnumValue::String(value.to_string()),
11867            )),
11868        }
11869    }
11870}
11871
11872impl serde::ser::Serialize for RegulatoryControlResponsibilityType {
11873    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11874    where
11875        S: serde::Serializer,
11876    {
11877        match self {
11878            Self::Unspecified => serializer.serialize_i32(0),
11879            Self::Google => serializer.serialize_i32(1),
11880            Self::Customer => serializer.serialize_i32(2),
11881            Self::Shared => serializer.serialize_i32(3),
11882            Self::UnknownValue(u) => u.0.serialize(serializer),
11883        }
11884    }
11885}
11886
11887impl<'de> serde::de::Deserialize<'de> for RegulatoryControlResponsibilityType {
11888    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11889    where
11890        D: serde::Deserializer<'de>,
11891    {
11892        deserializer.deserialize_any(wkt::internal::EnumVisitor::<
11893            RegulatoryControlResponsibilityType,
11894        >::new(
11895            ".google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType",
11896        ))
11897    }
11898}
11899
11900/// The enforcement mode for the cloud control.
11901///
11902/// # Working with unknown values
11903///
11904/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11905/// additional enum variants at any time. Adding new variants is not considered
11906/// a breaking change. Applications should write their code in anticipation of:
11907///
11908/// - New values appearing in future releases of the client library, **and**
11909/// - New values received dynamically, without application changes.
11910///
11911/// Please consult the [Working with enums] section in the user guide for some
11912/// guidelines.
11913///
11914/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11915#[derive(Clone, Debug, PartialEq)]
11916#[non_exhaustive]
11917pub enum EnforcementMode {
11918    /// Default value. This value is unused.
11919    Unspecified,
11920    /// The cloud control is enforced to prevent non-compliance.
11921    Preventive,
11922    /// The cloud control is enforced to detect non-compliance.
11923    Detective,
11924    /// The cloud control is enforced to audit for non-compliance.
11925    Audit,
11926    /// If set, the enum was initialized with an unknown value.
11927    ///
11928    /// Applications can examine the value using [EnforcementMode::value] or
11929    /// [EnforcementMode::name].
11930    UnknownValue(enforcement_mode::UnknownValue),
11931}
11932
11933#[doc(hidden)]
11934pub mod enforcement_mode {
11935    #[allow(unused_imports)]
11936    use super::*;
11937    #[derive(Clone, Debug, PartialEq)]
11938    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11939}
11940
11941impl EnforcementMode {
11942    /// Gets the enum value.
11943    ///
11944    /// Returns `None` if the enum contains an unknown value deserialized from
11945    /// the string representation of enums.
11946    pub fn value(&self) -> std::option::Option<i32> {
11947        match self {
11948            Self::Unspecified => std::option::Option::Some(0),
11949            Self::Preventive => std::option::Option::Some(1),
11950            Self::Detective => std::option::Option::Some(2),
11951            Self::Audit => std::option::Option::Some(3),
11952            Self::UnknownValue(u) => u.0.value(),
11953        }
11954    }
11955
11956    /// Gets the enum value as a string.
11957    ///
11958    /// Returns `None` if the enum contains an unknown value deserialized from
11959    /// the integer representation of enums.
11960    pub fn name(&self) -> std::option::Option<&str> {
11961        match self {
11962            Self::Unspecified => std::option::Option::Some("ENFORCEMENT_MODE_UNSPECIFIED"),
11963            Self::Preventive => std::option::Option::Some("PREVENTIVE"),
11964            Self::Detective => std::option::Option::Some("DETECTIVE"),
11965            Self::Audit => std::option::Option::Some("AUDIT"),
11966            Self::UnknownValue(u) => u.0.name(),
11967        }
11968    }
11969}
11970
11971impl std::default::Default for EnforcementMode {
11972    fn default() -> Self {
11973        use std::convert::From;
11974        Self::from(0)
11975    }
11976}
11977
11978impl std::fmt::Display for EnforcementMode {
11979    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11980        wkt::internal::display_enum(f, self.name(), self.value())
11981    }
11982}
11983
11984impl std::convert::From<i32> for EnforcementMode {
11985    fn from(value: i32) -> Self {
11986        match value {
11987            0 => Self::Unspecified,
11988            1 => Self::Preventive,
11989            2 => Self::Detective,
11990            3 => Self::Audit,
11991            _ => Self::UnknownValue(enforcement_mode::UnknownValue(
11992                wkt::internal::UnknownEnumValue::Integer(value),
11993            )),
11994        }
11995    }
11996}
11997
11998impl std::convert::From<&str> for EnforcementMode {
11999    fn from(value: &str) -> Self {
12000        use std::string::ToString;
12001        match value {
12002            "ENFORCEMENT_MODE_UNSPECIFIED" => Self::Unspecified,
12003            "PREVENTIVE" => Self::Preventive,
12004            "DETECTIVE" => Self::Detective,
12005            "AUDIT" => Self::Audit,
12006            _ => Self::UnknownValue(enforcement_mode::UnknownValue(
12007                wkt::internal::UnknownEnumValue::String(value.to_string()),
12008            )),
12009        }
12010    }
12011}
12012
12013impl serde::ser::Serialize for EnforcementMode {
12014    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12015    where
12016        S: serde::Serializer,
12017    {
12018        match self {
12019            Self::Unspecified => serializer.serialize_i32(0),
12020            Self::Preventive => serializer.serialize_i32(1),
12021            Self::Detective => serializer.serialize_i32(2),
12022            Self::Audit => serializer.serialize_i32(3),
12023            Self::UnknownValue(u) => u.0.serialize(serializer),
12024        }
12025    }
12026}
12027
12028impl<'de> serde::de::Deserialize<'de> for EnforcementMode {
12029    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12030    where
12031        D: serde::Deserializer<'de>,
12032    {
12033        deserializer.deserialize_any(wkt::internal::EnumVisitor::<EnforcementMode>::new(
12034            ".google.cloud.cloudsecuritycompliance.v1.EnforcementMode",
12035        ))
12036    }
12037}
12038
12039/// The category for the framework.
12040///
12041/// # Working with unknown values
12042///
12043/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12044/// additional enum variants at any time. Adding new variants is not considered
12045/// a breaking change. Applications should write their code in anticipation of:
12046///
12047/// - New values appearing in future releases of the client library, **and**
12048/// - New values received dynamically, without application changes.
12049///
12050/// Please consult the [Working with enums] section in the user guide for some
12051/// guidelines.
12052///
12053/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12054#[derive(Clone, Debug, PartialEq)]
12055#[non_exhaustive]
12056pub enum FrameworkCategory {
12057    /// Default value. This value is unused.
12058    Unspecified,
12059    /// An industry-defined framework.
12060    IndustryDefinedStandard,
12061    /// An Assured Workloads framework.
12062    AssuredWorkloads,
12063    /// A data security posture framework.
12064    DataSecurity,
12065    /// A Google's best practices framework.
12066    GoogleBestPractices,
12067    /// A user-created framework.
12068    CustomFramework,
12069    /// If set, the enum was initialized with an unknown value.
12070    ///
12071    /// Applications can examine the value using [FrameworkCategory::value] or
12072    /// [FrameworkCategory::name].
12073    UnknownValue(framework_category::UnknownValue),
12074}
12075
12076#[doc(hidden)]
12077pub mod framework_category {
12078    #[allow(unused_imports)]
12079    use super::*;
12080    #[derive(Clone, Debug, PartialEq)]
12081    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12082}
12083
12084impl FrameworkCategory {
12085    /// Gets the enum value.
12086    ///
12087    /// Returns `None` if the enum contains an unknown value deserialized from
12088    /// the string representation of enums.
12089    pub fn value(&self) -> std::option::Option<i32> {
12090        match self {
12091            Self::Unspecified => std::option::Option::Some(0),
12092            Self::IndustryDefinedStandard => std::option::Option::Some(1),
12093            Self::AssuredWorkloads => std::option::Option::Some(2),
12094            Self::DataSecurity => std::option::Option::Some(3),
12095            Self::GoogleBestPractices => std::option::Option::Some(4),
12096            Self::CustomFramework => std::option::Option::Some(5),
12097            Self::UnknownValue(u) => u.0.value(),
12098        }
12099    }
12100
12101    /// Gets the enum value as a string.
12102    ///
12103    /// Returns `None` if the enum contains an unknown value deserialized from
12104    /// the integer representation of enums.
12105    pub fn name(&self) -> std::option::Option<&str> {
12106        match self {
12107            Self::Unspecified => std::option::Option::Some("FRAMEWORK_CATEGORY_UNSPECIFIED"),
12108            Self::IndustryDefinedStandard => std::option::Option::Some("INDUSTRY_DEFINED_STANDARD"),
12109            Self::AssuredWorkloads => std::option::Option::Some("ASSURED_WORKLOADS"),
12110            Self::DataSecurity => std::option::Option::Some("DATA_SECURITY"),
12111            Self::GoogleBestPractices => std::option::Option::Some("GOOGLE_BEST_PRACTICES"),
12112            Self::CustomFramework => std::option::Option::Some("CUSTOM_FRAMEWORK"),
12113            Self::UnknownValue(u) => u.0.name(),
12114        }
12115    }
12116}
12117
12118impl std::default::Default for FrameworkCategory {
12119    fn default() -> Self {
12120        use std::convert::From;
12121        Self::from(0)
12122    }
12123}
12124
12125impl std::fmt::Display for FrameworkCategory {
12126    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12127        wkt::internal::display_enum(f, self.name(), self.value())
12128    }
12129}
12130
12131impl std::convert::From<i32> for FrameworkCategory {
12132    fn from(value: i32) -> Self {
12133        match value {
12134            0 => Self::Unspecified,
12135            1 => Self::IndustryDefinedStandard,
12136            2 => Self::AssuredWorkloads,
12137            3 => Self::DataSecurity,
12138            4 => Self::GoogleBestPractices,
12139            5 => Self::CustomFramework,
12140            _ => Self::UnknownValue(framework_category::UnknownValue(
12141                wkt::internal::UnknownEnumValue::Integer(value),
12142            )),
12143        }
12144    }
12145}
12146
12147impl std::convert::From<&str> for FrameworkCategory {
12148    fn from(value: &str) -> Self {
12149        use std::string::ToString;
12150        match value {
12151            "FRAMEWORK_CATEGORY_UNSPECIFIED" => Self::Unspecified,
12152            "INDUSTRY_DEFINED_STANDARD" => Self::IndustryDefinedStandard,
12153            "ASSURED_WORKLOADS" => Self::AssuredWorkloads,
12154            "DATA_SECURITY" => Self::DataSecurity,
12155            "GOOGLE_BEST_PRACTICES" => Self::GoogleBestPractices,
12156            "CUSTOM_FRAMEWORK" => Self::CustomFramework,
12157            _ => Self::UnknownValue(framework_category::UnknownValue(
12158                wkt::internal::UnknownEnumValue::String(value.to_string()),
12159            )),
12160        }
12161    }
12162}
12163
12164impl serde::ser::Serialize for FrameworkCategory {
12165    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12166    where
12167        S: serde::Serializer,
12168    {
12169        match self {
12170            Self::Unspecified => serializer.serialize_i32(0),
12171            Self::IndustryDefinedStandard => serializer.serialize_i32(1),
12172            Self::AssuredWorkloads => serializer.serialize_i32(2),
12173            Self::DataSecurity => serializer.serialize_i32(3),
12174            Self::GoogleBestPractices => serializer.serialize_i32(4),
12175            Self::CustomFramework => serializer.serialize_i32(5),
12176            Self::UnknownValue(u) => u.0.serialize(serializer),
12177        }
12178    }
12179}
12180
12181impl<'de> serde::de::Deserialize<'de> for FrameworkCategory {
12182    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12183    where
12184        D: serde::Deserializer<'de>,
12185    {
12186        deserializer.deserialize_any(wkt::internal::EnumVisitor::<FrameworkCategory>::new(
12187            ".google.cloud.cloudsecuritycompliance.v1.FrameworkCategory",
12188        ))
12189    }
12190}
12191
12192/// The category for the cloud control.
12193///
12194/// # Working with unknown values
12195///
12196/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12197/// additional enum variants at any time. Adding new variants is not considered
12198/// a breaking change. Applications should write their code in anticipation of:
12199///
12200/// - New values appearing in future releases of the client library, **and**
12201/// - New values received dynamically, without application changes.
12202///
12203/// Please consult the [Working with enums] section in the user guide for some
12204/// guidelines.
12205///
12206/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12207#[derive(Clone, Debug, PartialEq)]
12208#[non_exhaustive]
12209pub enum CloudControlCategory {
12210    /// Default value. This value is unused.
12211    Unspecified,
12212    /// The infrastructure security category.
12213    CcCategoryInfrastructure,
12214    /// The artificial intelligence category.
12215    CcCategoryArtificialIntelligence,
12216    /// The physical security category.
12217    CcCategoryPhysicalSecurity,
12218    /// The data security category.
12219    CcCategoryDataSecurity,
12220    /// The network security category.
12221    CcCategoryNetworkSecurity,
12222    /// The incident management category.
12223    CcCategoryIncidentManagement,
12224    /// The identity and access management category.
12225    CcCategoryIdentityAndAccessManagement,
12226    /// The encryption category.
12227    CcCategoryEncryption,
12228    /// The logs management and infrastructure category.
12229    CcCategoryLogsManagementAndInfrastructure,
12230    /// The HR, admin, and processes category.
12231    CcCategoryHrAdminAndProcesses,
12232    /// The third-party and sub-processor management category.
12233    CcCategoryThirdPartyAndSubProcessorManagement,
12234    /// The legal and disclosures category.
12235    CcCategoryLegalAndDisclosures,
12236    /// The vulnerability management category.
12237    CcCategoryVulnerabilityManagement,
12238    /// The privacy category.
12239    CcCategoryPrivacy,
12240    /// The business continuity and disaster recovery (BCDR) category.
12241    CcCategoryBcdr,
12242    /// The admin access category.
12243    CcCategoryAdminAccess,
12244    /// DRZ (Data Residency).
12245    CcCategoryDataResidency,
12246    /// RUR (Resource Usage Restriction).
12247    CcCategoryResourceUsageRestriction,
12248    /// SERVICE SPECIFIC
12249    CcCategoryServiceSpecific,
12250    /// If set, the enum was initialized with an unknown value.
12251    ///
12252    /// Applications can examine the value using [CloudControlCategory::value] or
12253    /// [CloudControlCategory::name].
12254    UnknownValue(cloud_control_category::UnknownValue),
12255}
12256
12257#[doc(hidden)]
12258pub mod cloud_control_category {
12259    #[allow(unused_imports)]
12260    use super::*;
12261    #[derive(Clone, Debug, PartialEq)]
12262    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12263}
12264
12265impl CloudControlCategory {
12266    /// Gets the enum value.
12267    ///
12268    /// Returns `None` if the enum contains an unknown value deserialized from
12269    /// the string representation of enums.
12270    pub fn value(&self) -> std::option::Option<i32> {
12271        match self {
12272            Self::Unspecified => std::option::Option::Some(0),
12273            Self::CcCategoryInfrastructure => std::option::Option::Some(1),
12274            Self::CcCategoryArtificialIntelligence => std::option::Option::Some(2),
12275            Self::CcCategoryPhysicalSecurity => std::option::Option::Some(3),
12276            Self::CcCategoryDataSecurity => std::option::Option::Some(4),
12277            Self::CcCategoryNetworkSecurity => std::option::Option::Some(5),
12278            Self::CcCategoryIncidentManagement => std::option::Option::Some(6),
12279            Self::CcCategoryIdentityAndAccessManagement => std::option::Option::Some(7),
12280            Self::CcCategoryEncryption => std::option::Option::Some(8),
12281            Self::CcCategoryLogsManagementAndInfrastructure => std::option::Option::Some(9),
12282            Self::CcCategoryHrAdminAndProcesses => std::option::Option::Some(10),
12283            Self::CcCategoryThirdPartyAndSubProcessorManagement => std::option::Option::Some(11),
12284            Self::CcCategoryLegalAndDisclosures => std::option::Option::Some(12),
12285            Self::CcCategoryVulnerabilityManagement => std::option::Option::Some(13),
12286            Self::CcCategoryPrivacy => std::option::Option::Some(14),
12287            Self::CcCategoryBcdr => std::option::Option::Some(15),
12288            Self::CcCategoryAdminAccess => std::option::Option::Some(16),
12289            Self::CcCategoryDataResidency => std::option::Option::Some(17),
12290            Self::CcCategoryResourceUsageRestriction => std::option::Option::Some(18),
12291            Self::CcCategoryServiceSpecific => std::option::Option::Some(19),
12292            Self::UnknownValue(u) => u.0.value(),
12293        }
12294    }
12295
12296    /// Gets the enum value as a string.
12297    ///
12298    /// Returns `None` if the enum contains an unknown value deserialized from
12299    /// the integer representation of enums.
12300    pub fn name(&self) -> std::option::Option<&str> {
12301        match self {
12302            Self::Unspecified => std::option::Option::Some("CLOUD_CONTROL_CATEGORY_UNSPECIFIED"),
12303            Self::CcCategoryInfrastructure => {
12304                std::option::Option::Some("CC_CATEGORY_INFRASTRUCTURE")
12305            }
12306            Self::CcCategoryArtificialIntelligence => {
12307                std::option::Option::Some("CC_CATEGORY_ARTIFICIAL_INTELLIGENCE")
12308            }
12309            Self::CcCategoryPhysicalSecurity => {
12310                std::option::Option::Some("CC_CATEGORY_PHYSICAL_SECURITY")
12311            }
12312            Self::CcCategoryDataSecurity => std::option::Option::Some("CC_CATEGORY_DATA_SECURITY"),
12313            Self::CcCategoryNetworkSecurity => {
12314                std::option::Option::Some("CC_CATEGORY_NETWORK_SECURITY")
12315            }
12316            Self::CcCategoryIncidentManagement => {
12317                std::option::Option::Some("CC_CATEGORY_INCIDENT_MANAGEMENT")
12318            }
12319            Self::CcCategoryIdentityAndAccessManagement => {
12320                std::option::Option::Some("CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT")
12321            }
12322            Self::CcCategoryEncryption => std::option::Option::Some("CC_CATEGORY_ENCRYPTION"),
12323            Self::CcCategoryLogsManagementAndInfrastructure => {
12324                std::option::Option::Some("CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE")
12325            }
12326            Self::CcCategoryHrAdminAndProcesses => {
12327                std::option::Option::Some("CC_CATEGORY_HR_ADMIN_AND_PROCESSES")
12328            }
12329            Self::CcCategoryThirdPartyAndSubProcessorManagement => {
12330                std::option::Option::Some("CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT")
12331            }
12332            Self::CcCategoryLegalAndDisclosures => {
12333                std::option::Option::Some("CC_CATEGORY_LEGAL_AND_DISCLOSURES")
12334            }
12335            Self::CcCategoryVulnerabilityManagement => {
12336                std::option::Option::Some("CC_CATEGORY_VULNERABILITY_MANAGEMENT")
12337            }
12338            Self::CcCategoryPrivacy => std::option::Option::Some("CC_CATEGORY_PRIVACY"),
12339            Self::CcCategoryBcdr => std::option::Option::Some("CC_CATEGORY_BCDR"),
12340            Self::CcCategoryAdminAccess => std::option::Option::Some("CC_CATEGORY_ADMIN_ACCESS"),
12341            Self::CcCategoryDataResidency => {
12342                std::option::Option::Some("CC_CATEGORY_DATA_RESIDENCY")
12343            }
12344            Self::CcCategoryResourceUsageRestriction => {
12345                std::option::Option::Some("CC_CATEGORY_RESOURCE_USAGE_RESTRICTION")
12346            }
12347            Self::CcCategoryServiceSpecific => {
12348                std::option::Option::Some("CC_CATEGORY_SERVICE_SPECIFIC")
12349            }
12350            Self::UnknownValue(u) => u.0.name(),
12351        }
12352    }
12353}
12354
12355impl std::default::Default for CloudControlCategory {
12356    fn default() -> Self {
12357        use std::convert::From;
12358        Self::from(0)
12359    }
12360}
12361
12362impl std::fmt::Display for CloudControlCategory {
12363    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12364        wkt::internal::display_enum(f, self.name(), self.value())
12365    }
12366}
12367
12368impl std::convert::From<i32> for CloudControlCategory {
12369    fn from(value: i32) -> Self {
12370        match value {
12371            0 => Self::Unspecified,
12372            1 => Self::CcCategoryInfrastructure,
12373            2 => Self::CcCategoryArtificialIntelligence,
12374            3 => Self::CcCategoryPhysicalSecurity,
12375            4 => Self::CcCategoryDataSecurity,
12376            5 => Self::CcCategoryNetworkSecurity,
12377            6 => Self::CcCategoryIncidentManagement,
12378            7 => Self::CcCategoryIdentityAndAccessManagement,
12379            8 => Self::CcCategoryEncryption,
12380            9 => Self::CcCategoryLogsManagementAndInfrastructure,
12381            10 => Self::CcCategoryHrAdminAndProcesses,
12382            11 => Self::CcCategoryThirdPartyAndSubProcessorManagement,
12383            12 => Self::CcCategoryLegalAndDisclosures,
12384            13 => Self::CcCategoryVulnerabilityManagement,
12385            14 => Self::CcCategoryPrivacy,
12386            15 => Self::CcCategoryBcdr,
12387            16 => Self::CcCategoryAdminAccess,
12388            17 => Self::CcCategoryDataResidency,
12389            18 => Self::CcCategoryResourceUsageRestriction,
12390            19 => Self::CcCategoryServiceSpecific,
12391            _ => Self::UnknownValue(cloud_control_category::UnknownValue(
12392                wkt::internal::UnknownEnumValue::Integer(value),
12393            )),
12394        }
12395    }
12396}
12397
12398impl std::convert::From<&str> for CloudControlCategory {
12399    fn from(value: &str) -> Self {
12400        use std::string::ToString;
12401        match value {
12402            "CLOUD_CONTROL_CATEGORY_UNSPECIFIED" => Self::Unspecified,
12403            "CC_CATEGORY_INFRASTRUCTURE" => Self::CcCategoryInfrastructure,
12404            "CC_CATEGORY_ARTIFICIAL_INTELLIGENCE" => Self::CcCategoryArtificialIntelligence,
12405            "CC_CATEGORY_PHYSICAL_SECURITY" => Self::CcCategoryPhysicalSecurity,
12406            "CC_CATEGORY_DATA_SECURITY" => Self::CcCategoryDataSecurity,
12407            "CC_CATEGORY_NETWORK_SECURITY" => Self::CcCategoryNetworkSecurity,
12408            "CC_CATEGORY_INCIDENT_MANAGEMENT" => Self::CcCategoryIncidentManagement,
12409            "CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT" => {
12410                Self::CcCategoryIdentityAndAccessManagement
12411            }
12412            "CC_CATEGORY_ENCRYPTION" => Self::CcCategoryEncryption,
12413            "CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE" => {
12414                Self::CcCategoryLogsManagementAndInfrastructure
12415            }
12416            "CC_CATEGORY_HR_ADMIN_AND_PROCESSES" => Self::CcCategoryHrAdminAndProcesses,
12417            "CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT" => {
12418                Self::CcCategoryThirdPartyAndSubProcessorManagement
12419            }
12420            "CC_CATEGORY_LEGAL_AND_DISCLOSURES" => Self::CcCategoryLegalAndDisclosures,
12421            "CC_CATEGORY_VULNERABILITY_MANAGEMENT" => Self::CcCategoryVulnerabilityManagement,
12422            "CC_CATEGORY_PRIVACY" => Self::CcCategoryPrivacy,
12423            "CC_CATEGORY_BCDR" => Self::CcCategoryBcdr,
12424            "CC_CATEGORY_ADMIN_ACCESS" => Self::CcCategoryAdminAccess,
12425            "CC_CATEGORY_DATA_RESIDENCY" => Self::CcCategoryDataResidency,
12426            "CC_CATEGORY_RESOURCE_USAGE_RESTRICTION" => Self::CcCategoryResourceUsageRestriction,
12427            "CC_CATEGORY_SERVICE_SPECIFIC" => Self::CcCategoryServiceSpecific,
12428            _ => Self::UnknownValue(cloud_control_category::UnknownValue(
12429                wkt::internal::UnknownEnumValue::String(value.to_string()),
12430            )),
12431        }
12432    }
12433}
12434
12435impl serde::ser::Serialize for CloudControlCategory {
12436    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12437    where
12438        S: serde::Serializer,
12439    {
12440        match self {
12441            Self::Unspecified => serializer.serialize_i32(0),
12442            Self::CcCategoryInfrastructure => serializer.serialize_i32(1),
12443            Self::CcCategoryArtificialIntelligence => serializer.serialize_i32(2),
12444            Self::CcCategoryPhysicalSecurity => serializer.serialize_i32(3),
12445            Self::CcCategoryDataSecurity => serializer.serialize_i32(4),
12446            Self::CcCategoryNetworkSecurity => serializer.serialize_i32(5),
12447            Self::CcCategoryIncidentManagement => serializer.serialize_i32(6),
12448            Self::CcCategoryIdentityAndAccessManagement => serializer.serialize_i32(7),
12449            Self::CcCategoryEncryption => serializer.serialize_i32(8),
12450            Self::CcCategoryLogsManagementAndInfrastructure => serializer.serialize_i32(9),
12451            Self::CcCategoryHrAdminAndProcesses => serializer.serialize_i32(10),
12452            Self::CcCategoryThirdPartyAndSubProcessorManagement => serializer.serialize_i32(11),
12453            Self::CcCategoryLegalAndDisclosures => serializer.serialize_i32(12),
12454            Self::CcCategoryVulnerabilityManagement => serializer.serialize_i32(13),
12455            Self::CcCategoryPrivacy => serializer.serialize_i32(14),
12456            Self::CcCategoryBcdr => serializer.serialize_i32(15),
12457            Self::CcCategoryAdminAccess => serializer.serialize_i32(16),
12458            Self::CcCategoryDataResidency => serializer.serialize_i32(17),
12459            Self::CcCategoryResourceUsageRestriction => serializer.serialize_i32(18),
12460            Self::CcCategoryServiceSpecific => serializer.serialize_i32(19),
12461            Self::UnknownValue(u) => u.0.serialize(serializer),
12462        }
12463    }
12464}
12465
12466impl<'de> serde::de::Deserialize<'de> for CloudControlCategory {
12467    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12468    where
12469        D: serde::Deserializer<'de>,
12470    {
12471        deserializer.deserialize_any(wkt::internal::EnumVisitor::<CloudControlCategory>::new(
12472            ".google.cloud.cloudsecuritycompliance.v1.CloudControlCategory",
12473        ))
12474    }
12475}
12476
12477/// The cloud provider that's associated with the cloud control.
12478///
12479/// # Working with unknown values
12480///
12481/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12482/// additional enum variants at any time. Adding new variants is not considered
12483/// a breaking change. Applications should write their code in anticipation of:
12484///
12485/// - New values appearing in future releases of the client library, **and**
12486/// - New values received dynamically, without application changes.
12487///
12488/// Please consult the [Working with enums] section in the user guide for some
12489/// guidelines.
12490///
12491/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12492#[derive(Clone, Debug, PartialEq)]
12493#[non_exhaustive]
12494pub enum CloudProvider {
12495    /// Default value. This value is unused.
12496    Unspecified,
12497    /// Amazon Web Services (AWS).
12498    Aws,
12499    /// Microsoft Azure.
12500    Azure,
12501    /// Google Cloud.
12502    Gcp,
12503    /// If set, the enum was initialized with an unknown value.
12504    ///
12505    /// Applications can examine the value using [CloudProvider::value] or
12506    /// [CloudProvider::name].
12507    UnknownValue(cloud_provider::UnknownValue),
12508}
12509
12510#[doc(hidden)]
12511pub mod cloud_provider {
12512    #[allow(unused_imports)]
12513    use super::*;
12514    #[derive(Clone, Debug, PartialEq)]
12515    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12516}
12517
12518impl CloudProvider {
12519    /// Gets the enum value.
12520    ///
12521    /// Returns `None` if the enum contains an unknown value deserialized from
12522    /// the string representation of enums.
12523    pub fn value(&self) -> std::option::Option<i32> {
12524        match self {
12525            Self::Unspecified => std::option::Option::Some(0),
12526            Self::Aws => std::option::Option::Some(1),
12527            Self::Azure => std::option::Option::Some(2),
12528            Self::Gcp => std::option::Option::Some(3),
12529            Self::UnknownValue(u) => u.0.value(),
12530        }
12531    }
12532
12533    /// Gets the enum value as a string.
12534    ///
12535    /// Returns `None` if the enum contains an unknown value deserialized from
12536    /// the integer representation of enums.
12537    pub fn name(&self) -> std::option::Option<&str> {
12538        match self {
12539            Self::Unspecified => std::option::Option::Some("CLOUD_PROVIDER_UNSPECIFIED"),
12540            Self::Aws => std::option::Option::Some("AWS"),
12541            Self::Azure => std::option::Option::Some("AZURE"),
12542            Self::Gcp => std::option::Option::Some("GCP"),
12543            Self::UnknownValue(u) => u.0.name(),
12544        }
12545    }
12546}
12547
12548impl std::default::Default for CloudProvider {
12549    fn default() -> Self {
12550        use std::convert::From;
12551        Self::from(0)
12552    }
12553}
12554
12555impl std::fmt::Display for CloudProvider {
12556    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12557        wkt::internal::display_enum(f, self.name(), self.value())
12558    }
12559}
12560
12561impl std::convert::From<i32> for CloudProvider {
12562    fn from(value: i32) -> Self {
12563        match value {
12564            0 => Self::Unspecified,
12565            1 => Self::Aws,
12566            2 => Self::Azure,
12567            3 => Self::Gcp,
12568            _ => Self::UnknownValue(cloud_provider::UnknownValue(
12569                wkt::internal::UnknownEnumValue::Integer(value),
12570            )),
12571        }
12572    }
12573}
12574
12575impl std::convert::From<&str> for CloudProvider {
12576    fn from(value: &str) -> Self {
12577        use std::string::ToString;
12578        match value {
12579            "CLOUD_PROVIDER_UNSPECIFIED" => Self::Unspecified,
12580            "AWS" => Self::Aws,
12581            "AZURE" => Self::Azure,
12582            "GCP" => Self::Gcp,
12583            _ => Self::UnknownValue(cloud_provider::UnknownValue(
12584                wkt::internal::UnknownEnumValue::String(value.to_string()),
12585            )),
12586        }
12587    }
12588}
12589
12590impl serde::ser::Serialize for CloudProvider {
12591    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12592    where
12593        S: serde::Serializer,
12594    {
12595        match self {
12596            Self::Unspecified => serializer.serialize_i32(0),
12597            Self::Aws => serializer.serialize_i32(1),
12598            Self::Azure => serializer.serialize_i32(2),
12599            Self::Gcp => serializer.serialize_i32(3),
12600            Self::UnknownValue(u) => u.0.serialize(serializer),
12601        }
12602    }
12603}
12604
12605impl<'de> serde::de::Deserialize<'de> for CloudProvider {
12606    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12607    where
12608        D: serde::Deserializer<'de>,
12609    {
12610        deserializer.deserialize_any(wkt::internal::EnumVisitor::<CloudProvider>::new(
12611            ".google.cloud.cloudsecuritycompliance.v1.CloudProvider",
12612        ))
12613    }
12614}
12615
12616/// The severity of the finding.
12617///
12618/// # Working with unknown values
12619///
12620/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12621/// additional enum variants at any time. Adding new variants is not considered
12622/// a breaking change. Applications should write their code in anticipation of:
12623///
12624/// - New values appearing in future releases of the client library, **and**
12625/// - New values received dynamically, without application changes.
12626///
12627/// Please consult the [Working with enums] section in the user guide for some
12628/// guidelines.
12629///
12630/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12631#[derive(Clone, Debug, PartialEq)]
12632#[non_exhaustive]
12633pub enum Severity {
12634    /// Default value. This value is unused.
12635    Unspecified,
12636    /// A critical vulnerability is easily discoverable by an external actor,
12637    /// exploitable, and results in the direct ability to execute arbitrary code,
12638    /// exfiltrate data, and otherwise gain additional access and privileges to
12639    /// cloud resources and workloads. Examples include publicly accessible
12640    /// unprotected user data and public SSH access with weak or no
12641    /// passwords.
12642    ///
12643    /// A critical threat is a threat that can access, modify, or delete data or
12644    /// execute unauthorized code within existing resources.
12645    Critical,
12646    /// A high-risk vulnerability can be easily discovered and exploited in
12647    /// combination with other vulnerabilities to gain direct access and
12648    /// the ability to execute arbitrary code, exfiltrate data, and otherwise
12649    /// gain additional access and privileges to cloud resources and workloads.
12650    /// An example is a database with weak or no passwords that is only
12651    /// accessible internally. This database could easily be compromised by an
12652    /// actor that had access to the internal network.
12653    ///
12654    /// A high-risk threat is a threat that can create new computational
12655    /// resources in an environment but can't access data or execute code in
12656    /// existing resources.
12657    High,
12658    /// A medium-risk vulnerability can be used by an actor to gain access to
12659    /// resources or privileges that enable them to eventually (through multiple
12660    /// steps or a complex exploit) gain access and the ability to execute
12661    /// arbitrary code or exfiltrate data. An example is a service account with
12662    /// access to more projects than it should have. If an actor gains access to
12663    /// the service account, they could potentially use that access to manipulate
12664    /// a project the service account was not intended to.
12665    ///
12666    /// A medium-risk threat can cause operational impact but might not
12667    /// access data or execute unauthorized code.
12668    Medium,
12669    /// A low-risk vulnerability hampers a security organization's ability to
12670    /// detect vulnerabilities or active threats in their deployment, or prevents
12671    /// the root cause investigation of security issues. An example is monitoring
12672    /// and logs being disabled for resource configurations and access.
12673    ///
12674    /// A low-risk threat is a threat that has obtained minimal access to an
12675    /// environment but can't access data, execute code, or create resources.
12676    Low,
12677    /// If set, the enum was initialized with an unknown value.
12678    ///
12679    /// Applications can examine the value using [Severity::value] or
12680    /// [Severity::name].
12681    UnknownValue(severity::UnknownValue),
12682}
12683
12684#[doc(hidden)]
12685pub mod severity {
12686    #[allow(unused_imports)]
12687    use super::*;
12688    #[derive(Clone, Debug, PartialEq)]
12689    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12690}
12691
12692impl Severity {
12693    /// Gets the enum value.
12694    ///
12695    /// Returns `None` if the enum contains an unknown value deserialized from
12696    /// the string representation of enums.
12697    pub fn value(&self) -> std::option::Option<i32> {
12698        match self {
12699            Self::Unspecified => std::option::Option::Some(0),
12700            Self::Critical => std::option::Option::Some(1),
12701            Self::High => std::option::Option::Some(2),
12702            Self::Medium => std::option::Option::Some(3),
12703            Self::Low => std::option::Option::Some(4),
12704            Self::UnknownValue(u) => u.0.value(),
12705        }
12706    }
12707
12708    /// Gets the enum value as a string.
12709    ///
12710    /// Returns `None` if the enum contains an unknown value deserialized from
12711    /// the integer representation of enums.
12712    pub fn name(&self) -> std::option::Option<&str> {
12713        match self {
12714            Self::Unspecified => std::option::Option::Some("SEVERITY_UNSPECIFIED"),
12715            Self::Critical => std::option::Option::Some("CRITICAL"),
12716            Self::High => std::option::Option::Some("HIGH"),
12717            Self::Medium => std::option::Option::Some("MEDIUM"),
12718            Self::Low => std::option::Option::Some("LOW"),
12719            Self::UnknownValue(u) => u.0.name(),
12720        }
12721    }
12722}
12723
12724impl std::default::Default for Severity {
12725    fn default() -> Self {
12726        use std::convert::From;
12727        Self::from(0)
12728    }
12729}
12730
12731impl std::fmt::Display for Severity {
12732    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12733        wkt::internal::display_enum(f, self.name(), self.value())
12734    }
12735}
12736
12737impl std::convert::From<i32> for Severity {
12738    fn from(value: i32) -> Self {
12739        match value {
12740            0 => Self::Unspecified,
12741            1 => Self::Critical,
12742            2 => Self::High,
12743            3 => Self::Medium,
12744            4 => Self::Low,
12745            _ => Self::UnknownValue(severity::UnknownValue(
12746                wkt::internal::UnknownEnumValue::Integer(value),
12747            )),
12748        }
12749    }
12750}
12751
12752impl std::convert::From<&str> for Severity {
12753    fn from(value: &str) -> Self {
12754        use std::string::ToString;
12755        match value {
12756            "SEVERITY_UNSPECIFIED" => Self::Unspecified,
12757            "CRITICAL" => Self::Critical,
12758            "HIGH" => Self::High,
12759            "MEDIUM" => Self::Medium,
12760            "LOW" => Self::Low,
12761            _ => Self::UnknownValue(severity::UnknownValue(
12762                wkt::internal::UnknownEnumValue::String(value.to_string()),
12763            )),
12764        }
12765    }
12766}
12767
12768impl serde::ser::Serialize for Severity {
12769    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12770    where
12771        S: serde::Serializer,
12772    {
12773        match self {
12774            Self::Unspecified => serializer.serialize_i32(0),
12775            Self::Critical => serializer.serialize_i32(1),
12776            Self::High => serializer.serialize_i32(2),
12777            Self::Medium => serializer.serialize_i32(3),
12778            Self::Low => serializer.serialize_i32(4),
12779            Self::UnknownValue(u) => u.0.serialize(serializer),
12780        }
12781    }
12782}
12783
12784impl<'de> serde::de::Deserialize<'de> for Severity {
12785    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12786    where
12787        D: serde::Deserializer<'de>,
12788    {
12789        deserializer.deserialize_any(wkt::internal::EnumVisitor::<Severity>::new(
12790            ".google.cloud.cloudsecuritycompliance.v1.Severity",
12791        ))
12792    }
12793}
12794
12795/// The action type of the rule.
12796///
12797/// # Working with unknown values
12798///
12799/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12800/// additional enum variants at any time. Adding new variants is not considered
12801/// a breaking change. Applications should write their code in anticipation of:
12802///
12803/// - New values appearing in future releases of the client library, **and**
12804/// - New values received dynamically, without application changes.
12805///
12806/// Please consult the [Working with enums] section in the user guide for some
12807/// guidelines.
12808///
12809/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12810#[derive(Clone, Debug, PartialEq)]
12811#[non_exhaustive]
12812pub enum RuleActionType {
12813    /// Default value. This value is unused.
12814    Unspecified,
12815    /// The rule is intended to prevent non-compliance.
12816    Preventive,
12817    /// The rule is intended to detect non-compliance.
12818    Detective,
12819    /// The rule is intended to audit non-compliance.
12820    Audit,
12821    /// If set, the enum was initialized with an unknown value.
12822    ///
12823    /// Applications can examine the value using [RuleActionType::value] or
12824    /// [RuleActionType::name].
12825    UnknownValue(rule_action_type::UnknownValue),
12826}
12827
12828#[doc(hidden)]
12829pub mod rule_action_type {
12830    #[allow(unused_imports)]
12831    use super::*;
12832    #[derive(Clone, Debug, PartialEq)]
12833    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12834}
12835
12836impl RuleActionType {
12837    /// Gets the enum value.
12838    ///
12839    /// Returns `None` if the enum contains an unknown value deserialized from
12840    /// the string representation of enums.
12841    pub fn value(&self) -> std::option::Option<i32> {
12842        match self {
12843            Self::Unspecified => std::option::Option::Some(0),
12844            Self::Preventive => std::option::Option::Some(1),
12845            Self::Detective => std::option::Option::Some(2),
12846            Self::Audit => std::option::Option::Some(3),
12847            Self::UnknownValue(u) => u.0.value(),
12848        }
12849    }
12850
12851    /// Gets the enum value as a string.
12852    ///
12853    /// Returns `None` if the enum contains an unknown value deserialized from
12854    /// the integer representation of enums.
12855    pub fn name(&self) -> std::option::Option<&str> {
12856        match self {
12857            Self::Unspecified => std::option::Option::Some("RULE_ACTION_TYPE_UNSPECIFIED"),
12858            Self::Preventive => std::option::Option::Some("RULE_ACTION_TYPE_PREVENTIVE"),
12859            Self::Detective => std::option::Option::Some("RULE_ACTION_TYPE_DETECTIVE"),
12860            Self::Audit => std::option::Option::Some("RULE_ACTION_TYPE_AUDIT"),
12861            Self::UnknownValue(u) => u.0.name(),
12862        }
12863    }
12864}
12865
12866impl std::default::Default for RuleActionType {
12867    fn default() -> Self {
12868        use std::convert::From;
12869        Self::from(0)
12870    }
12871}
12872
12873impl std::fmt::Display for RuleActionType {
12874    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12875        wkt::internal::display_enum(f, self.name(), self.value())
12876    }
12877}
12878
12879impl std::convert::From<i32> for RuleActionType {
12880    fn from(value: i32) -> Self {
12881        match value {
12882            0 => Self::Unspecified,
12883            1 => Self::Preventive,
12884            2 => Self::Detective,
12885            3 => Self::Audit,
12886            _ => Self::UnknownValue(rule_action_type::UnknownValue(
12887                wkt::internal::UnknownEnumValue::Integer(value),
12888            )),
12889        }
12890    }
12891}
12892
12893impl std::convert::From<&str> for RuleActionType {
12894    fn from(value: &str) -> Self {
12895        use std::string::ToString;
12896        match value {
12897            "RULE_ACTION_TYPE_UNSPECIFIED" => Self::Unspecified,
12898            "RULE_ACTION_TYPE_PREVENTIVE" => Self::Preventive,
12899            "RULE_ACTION_TYPE_DETECTIVE" => Self::Detective,
12900            "RULE_ACTION_TYPE_AUDIT" => Self::Audit,
12901            _ => Self::UnknownValue(rule_action_type::UnknownValue(
12902                wkt::internal::UnknownEnumValue::String(value.to_string()),
12903            )),
12904        }
12905    }
12906}
12907
12908impl serde::ser::Serialize for RuleActionType {
12909    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12910    where
12911        S: serde::Serializer,
12912    {
12913        match self {
12914            Self::Unspecified => serializer.serialize_i32(0),
12915            Self::Preventive => serializer.serialize_i32(1),
12916            Self::Detective => serializer.serialize_i32(2),
12917            Self::Audit => serializer.serialize_i32(3),
12918            Self::UnknownValue(u) => u.0.serialize(serializer),
12919        }
12920    }
12921}
12922
12923impl<'de> serde::de::Deserialize<'de> for RuleActionType {
12924    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12925    where
12926        D: serde::Deserializer<'de>,
12927    {
12928        deserializer.deserialize_any(wkt::internal::EnumVisitor::<RuleActionType>::new(
12929            ".google.cloud.cloudsecuritycompliance.v1.RuleActionType",
12930        ))
12931    }
12932}
12933
12934/// The type of resource that a control or framework can be applied to.
12935///
12936/// # Working with unknown values
12937///
12938/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12939/// additional enum variants at any time. Adding new variants is not considered
12940/// a breaking change. Applications should write their code in anticipation of:
12941///
12942/// - New values appearing in future releases of the client library, **and**
12943/// - New values received dynamically, without application changes.
12944///
12945/// Please consult the [Working with enums] section in the user guide for some
12946/// guidelines.
12947///
12948/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12949#[derive(Clone, Debug, PartialEq)]
12950#[non_exhaustive]
12951pub enum TargetResourceType {
12952    /// Default value. This value is unused.
12953    Unspecified,
12954    /// The target resource is a Google Cloud organization.
12955    TargetResourceCrmTypeOrg,
12956    /// The target resource is a folder.
12957    TargetResourceCrmTypeFolder,
12958    /// The target resource is a project.
12959    TargetResourceCrmTypeProject,
12960    /// The target resource is an application in App Hub.
12961    Application,
12962    /// If set, the enum was initialized with an unknown value.
12963    ///
12964    /// Applications can examine the value using [TargetResourceType::value] or
12965    /// [TargetResourceType::name].
12966    UnknownValue(target_resource_type::UnknownValue),
12967}
12968
12969#[doc(hidden)]
12970pub mod target_resource_type {
12971    #[allow(unused_imports)]
12972    use super::*;
12973    #[derive(Clone, Debug, PartialEq)]
12974    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12975}
12976
12977impl TargetResourceType {
12978    /// Gets the enum value.
12979    ///
12980    /// Returns `None` if the enum contains an unknown value deserialized from
12981    /// the string representation of enums.
12982    pub fn value(&self) -> std::option::Option<i32> {
12983        match self {
12984            Self::Unspecified => std::option::Option::Some(0),
12985            Self::TargetResourceCrmTypeOrg => std::option::Option::Some(1),
12986            Self::TargetResourceCrmTypeFolder => std::option::Option::Some(2),
12987            Self::TargetResourceCrmTypeProject => std::option::Option::Some(3),
12988            Self::Application => std::option::Option::Some(4),
12989            Self::UnknownValue(u) => u.0.value(),
12990        }
12991    }
12992
12993    /// Gets the enum value as a string.
12994    ///
12995    /// Returns `None` if the enum contains an unknown value deserialized from
12996    /// the integer representation of enums.
12997    pub fn name(&self) -> std::option::Option<&str> {
12998        match self {
12999            Self::Unspecified => std::option::Option::Some("TARGET_RESOURCE_TYPE_UNSPECIFIED"),
13000            Self::TargetResourceCrmTypeOrg => {
13001                std::option::Option::Some("TARGET_RESOURCE_CRM_TYPE_ORG")
13002            }
13003            Self::TargetResourceCrmTypeFolder => {
13004                std::option::Option::Some("TARGET_RESOURCE_CRM_TYPE_FOLDER")
13005            }
13006            Self::TargetResourceCrmTypeProject => {
13007                std::option::Option::Some("TARGET_RESOURCE_CRM_TYPE_PROJECT")
13008            }
13009            Self::Application => std::option::Option::Some("TARGET_RESOURCE_TYPE_APPLICATION"),
13010            Self::UnknownValue(u) => u.0.name(),
13011        }
13012    }
13013}
13014
13015impl std::default::Default for TargetResourceType {
13016    fn default() -> Self {
13017        use std::convert::From;
13018        Self::from(0)
13019    }
13020}
13021
13022impl std::fmt::Display for TargetResourceType {
13023    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13024        wkt::internal::display_enum(f, self.name(), self.value())
13025    }
13026}
13027
13028impl std::convert::From<i32> for TargetResourceType {
13029    fn from(value: i32) -> Self {
13030        match value {
13031            0 => Self::Unspecified,
13032            1 => Self::TargetResourceCrmTypeOrg,
13033            2 => Self::TargetResourceCrmTypeFolder,
13034            3 => Self::TargetResourceCrmTypeProject,
13035            4 => Self::Application,
13036            _ => Self::UnknownValue(target_resource_type::UnknownValue(
13037                wkt::internal::UnknownEnumValue::Integer(value),
13038            )),
13039        }
13040    }
13041}
13042
13043impl std::convert::From<&str> for TargetResourceType {
13044    fn from(value: &str) -> Self {
13045        use std::string::ToString;
13046        match value {
13047            "TARGET_RESOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
13048            "TARGET_RESOURCE_CRM_TYPE_ORG" => Self::TargetResourceCrmTypeOrg,
13049            "TARGET_RESOURCE_CRM_TYPE_FOLDER" => Self::TargetResourceCrmTypeFolder,
13050            "TARGET_RESOURCE_CRM_TYPE_PROJECT" => Self::TargetResourceCrmTypeProject,
13051            "TARGET_RESOURCE_TYPE_APPLICATION" => Self::Application,
13052            _ => Self::UnknownValue(target_resource_type::UnknownValue(
13053                wkt::internal::UnknownEnumValue::String(value.to_string()),
13054            )),
13055        }
13056    }
13057}
13058
13059impl serde::ser::Serialize for TargetResourceType {
13060    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13061    where
13062        S: serde::Serializer,
13063    {
13064        match self {
13065            Self::Unspecified => serializer.serialize_i32(0),
13066            Self::TargetResourceCrmTypeOrg => serializer.serialize_i32(1),
13067            Self::TargetResourceCrmTypeFolder => serializer.serialize_i32(2),
13068            Self::TargetResourceCrmTypeProject => serializer.serialize_i32(3),
13069            Self::Application => serializer.serialize_i32(4),
13070            Self::UnknownValue(u) => u.0.serialize(serializer),
13071        }
13072    }
13073}
13074
13075impl<'de> serde::de::Deserialize<'de> for TargetResourceType {
13076    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13077    where
13078        D: serde::Deserializer<'de>,
13079    {
13080        deserializer.deserialize_any(wkt::internal::EnumVisitor::<TargetResourceType>::new(
13081            ".google.cloud.cloudsecuritycompliance.v1.TargetResourceType",
13082        ))
13083    }
13084}
13085
13086/// The state of the deployment resource.
13087///
13088/// # Working with unknown values
13089///
13090/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13091/// additional enum variants at any time. Adding new variants is not considered
13092/// a breaking change. Applications should write their code in anticipation of:
13093///
13094/// - New values appearing in future releases of the client library, **and**
13095/// - New values received dynamically, without application changes.
13096///
13097/// Please consult the [Working with enums] section in the user guide for some
13098/// guidelines.
13099///
13100/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13101#[derive(Clone, Debug, PartialEq)]
13102#[non_exhaustive]
13103pub enum DeploymentState {
13104    /// Default value. This value is unused.
13105    Unspecified,
13106    /// Validating the deployment.
13107    Validating,
13108    /// Deployment is being created.
13109    Creating,
13110    /// Deployment is being deleted.
13111    Deleting,
13112    /// Deployment is being updated.
13113    Updating,
13114    /// Deployment has failed. All the changes made by the deployment were
13115    /// successfully rolled back. You can retry or delete a deployment that's
13116    /// in this state.
13117    Failed,
13118    /// Deployment is successful and ready to use.
13119    Ready,
13120    /// Deployment is partially deployed. All the cloud controls weren't deployed
13121    /// successfully. Retrying the operation resumes from the first failed
13122    /// step.
13123    PartiallyDeployed,
13124    /// Deployment is partially deleted. All the cloud control deployments weren't
13125    /// deleted successfully. Retrying the operation resumes from the first
13126    /// failed step.
13127    PartiallyDeleted,
13128    /// If set, the enum was initialized with an unknown value.
13129    ///
13130    /// Applications can examine the value using [DeploymentState::value] or
13131    /// [DeploymentState::name].
13132    UnknownValue(deployment_state::UnknownValue),
13133}
13134
13135#[doc(hidden)]
13136pub mod deployment_state {
13137    #[allow(unused_imports)]
13138    use super::*;
13139    #[derive(Clone, Debug, PartialEq)]
13140    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13141}
13142
13143impl DeploymentState {
13144    /// Gets the enum value.
13145    ///
13146    /// Returns `None` if the enum contains an unknown value deserialized from
13147    /// the string representation of enums.
13148    pub fn value(&self) -> std::option::Option<i32> {
13149        match self {
13150            Self::Unspecified => std::option::Option::Some(0),
13151            Self::Validating => std::option::Option::Some(1),
13152            Self::Creating => std::option::Option::Some(2),
13153            Self::Deleting => std::option::Option::Some(3),
13154            Self::Updating => std::option::Option::Some(8),
13155            Self::Failed => std::option::Option::Some(4),
13156            Self::Ready => std::option::Option::Some(5),
13157            Self::PartiallyDeployed => std::option::Option::Some(6),
13158            Self::PartiallyDeleted => std::option::Option::Some(7),
13159            Self::UnknownValue(u) => u.0.value(),
13160        }
13161    }
13162
13163    /// Gets the enum value as a string.
13164    ///
13165    /// Returns `None` if the enum contains an unknown value deserialized from
13166    /// the integer representation of enums.
13167    pub fn name(&self) -> std::option::Option<&str> {
13168        match self {
13169            Self::Unspecified => std::option::Option::Some("DEPLOYMENT_STATE_UNSPECIFIED"),
13170            Self::Validating => std::option::Option::Some("DEPLOYMENT_STATE_VALIDATING"),
13171            Self::Creating => std::option::Option::Some("DEPLOYMENT_STATE_CREATING"),
13172            Self::Deleting => std::option::Option::Some("DEPLOYMENT_STATE_DELETING"),
13173            Self::Updating => std::option::Option::Some("DEPLOYMENT_STATE_UPDATING"),
13174            Self::Failed => std::option::Option::Some("DEPLOYMENT_STATE_FAILED"),
13175            Self::Ready => std::option::Option::Some("DEPLOYMENT_STATE_READY"),
13176            Self::PartiallyDeployed => {
13177                std::option::Option::Some("DEPLOYMENT_STATE_PARTIALLY_DEPLOYED")
13178            }
13179            Self::PartiallyDeleted => {
13180                std::option::Option::Some("DEPLOYMENT_STATE_PARTIALLY_DELETED")
13181            }
13182            Self::UnknownValue(u) => u.0.name(),
13183        }
13184    }
13185}
13186
13187impl std::default::Default for DeploymentState {
13188    fn default() -> Self {
13189        use std::convert::From;
13190        Self::from(0)
13191    }
13192}
13193
13194impl std::fmt::Display for DeploymentState {
13195    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13196        wkt::internal::display_enum(f, self.name(), self.value())
13197    }
13198}
13199
13200impl std::convert::From<i32> for DeploymentState {
13201    fn from(value: i32) -> Self {
13202        match value {
13203            0 => Self::Unspecified,
13204            1 => Self::Validating,
13205            2 => Self::Creating,
13206            3 => Self::Deleting,
13207            4 => Self::Failed,
13208            5 => Self::Ready,
13209            6 => Self::PartiallyDeployed,
13210            7 => Self::PartiallyDeleted,
13211            8 => Self::Updating,
13212            _ => Self::UnknownValue(deployment_state::UnknownValue(
13213                wkt::internal::UnknownEnumValue::Integer(value),
13214            )),
13215        }
13216    }
13217}
13218
13219impl std::convert::From<&str> for DeploymentState {
13220    fn from(value: &str) -> Self {
13221        use std::string::ToString;
13222        match value {
13223            "DEPLOYMENT_STATE_UNSPECIFIED" => Self::Unspecified,
13224            "DEPLOYMENT_STATE_VALIDATING" => Self::Validating,
13225            "DEPLOYMENT_STATE_CREATING" => Self::Creating,
13226            "DEPLOYMENT_STATE_DELETING" => Self::Deleting,
13227            "DEPLOYMENT_STATE_UPDATING" => Self::Updating,
13228            "DEPLOYMENT_STATE_FAILED" => Self::Failed,
13229            "DEPLOYMENT_STATE_READY" => Self::Ready,
13230            "DEPLOYMENT_STATE_PARTIALLY_DEPLOYED" => Self::PartiallyDeployed,
13231            "DEPLOYMENT_STATE_PARTIALLY_DELETED" => Self::PartiallyDeleted,
13232            _ => Self::UnknownValue(deployment_state::UnknownValue(
13233                wkt::internal::UnknownEnumValue::String(value.to_string()),
13234            )),
13235        }
13236    }
13237}
13238
13239impl serde::ser::Serialize for DeploymentState {
13240    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13241    where
13242        S: serde::Serializer,
13243    {
13244        match self {
13245            Self::Unspecified => serializer.serialize_i32(0),
13246            Self::Validating => serializer.serialize_i32(1),
13247            Self::Creating => serializer.serialize_i32(2),
13248            Self::Deleting => serializer.serialize_i32(3),
13249            Self::Updating => serializer.serialize_i32(8),
13250            Self::Failed => serializer.serialize_i32(4),
13251            Self::Ready => serializer.serialize_i32(5),
13252            Self::PartiallyDeployed => serializer.serialize_i32(6),
13253            Self::PartiallyDeleted => serializer.serialize_i32(7),
13254            Self::UnknownValue(u) => u.0.serialize(serializer),
13255        }
13256    }
13257}
13258
13259impl<'de> serde::de::Deserialize<'de> for DeploymentState {
13260    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13261    where
13262        D: serde::Deserializer<'de>,
13263    {
13264        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DeploymentState>::new(
13265            ".google.cloud.cloudsecuritycompliance.v1.DeploymentState",
13266        ))
13267    }
13268}
13269
13270/// The evaluation state of the control.
13271///
13272/// # Working with unknown values
13273///
13274/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13275/// additional enum variants at any time. Adding new variants is not considered
13276/// a breaking change. Applications should write their code in anticipation of:
13277///
13278/// - New values appearing in future releases of the client library, **and**
13279/// - New values received dynamically, without application changes.
13280///
13281/// Please consult the [Working with enums] section in the user guide for some
13282/// guidelines.
13283///
13284/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13285#[derive(Clone, Debug, PartialEq)]
13286#[non_exhaustive]
13287pub enum EvaluationState {
13288    /// Default value. This value is unused.
13289    Unspecified,
13290    /// The control is passing.
13291    Passed,
13292    /// The control is failing.
13293    Failed,
13294    /// The control is not assessed.
13295    NotAssessed,
13296    /// If set, the enum was initialized with an unknown value.
13297    ///
13298    /// Applications can examine the value using [EvaluationState::value] or
13299    /// [EvaluationState::name].
13300    UnknownValue(evaluation_state::UnknownValue),
13301}
13302
13303#[doc(hidden)]
13304pub mod evaluation_state {
13305    #[allow(unused_imports)]
13306    use super::*;
13307    #[derive(Clone, Debug, PartialEq)]
13308    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13309}
13310
13311impl EvaluationState {
13312    /// Gets the enum value.
13313    ///
13314    /// Returns `None` if the enum contains an unknown value deserialized from
13315    /// the string representation of enums.
13316    pub fn value(&self) -> std::option::Option<i32> {
13317        match self {
13318            Self::Unspecified => std::option::Option::Some(0),
13319            Self::Passed => std::option::Option::Some(1),
13320            Self::Failed => std::option::Option::Some(2),
13321            Self::NotAssessed => std::option::Option::Some(3),
13322            Self::UnknownValue(u) => u.0.value(),
13323        }
13324    }
13325
13326    /// Gets the enum value as a string.
13327    ///
13328    /// Returns `None` if the enum contains an unknown value deserialized from
13329    /// the integer representation of enums.
13330    pub fn name(&self) -> std::option::Option<&str> {
13331        match self {
13332            Self::Unspecified => std::option::Option::Some("EVALUATION_STATE_UNSPECIFIED"),
13333            Self::Passed => std::option::Option::Some("EVALUATION_STATE_PASSED"),
13334            Self::Failed => std::option::Option::Some("EVALUATION_STATE_FAILED"),
13335            Self::NotAssessed => std::option::Option::Some("EVALUATION_STATE_NOT_ASSESSED"),
13336            Self::UnknownValue(u) => u.0.name(),
13337        }
13338    }
13339}
13340
13341impl std::default::Default for EvaluationState {
13342    fn default() -> Self {
13343        use std::convert::From;
13344        Self::from(0)
13345    }
13346}
13347
13348impl std::fmt::Display for EvaluationState {
13349    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13350        wkt::internal::display_enum(f, self.name(), self.value())
13351    }
13352}
13353
13354impl std::convert::From<i32> for EvaluationState {
13355    fn from(value: i32) -> Self {
13356        match value {
13357            0 => Self::Unspecified,
13358            1 => Self::Passed,
13359            2 => Self::Failed,
13360            3 => Self::NotAssessed,
13361            _ => Self::UnknownValue(evaluation_state::UnknownValue(
13362                wkt::internal::UnknownEnumValue::Integer(value),
13363            )),
13364        }
13365    }
13366}
13367
13368impl std::convert::From<&str> for EvaluationState {
13369    fn from(value: &str) -> Self {
13370        use std::string::ToString;
13371        match value {
13372            "EVALUATION_STATE_UNSPECIFIED" => Self::Unspecified,
13373            "EVALUATION_STATE_PASSED" => Self::Passed,
13374            "EVALUATION_STATE_FAILED" => Self::Failed,
13375            "EVALUATION_STATE_NOT_ASSESSED" => Self::NotAssessed,
13376            _ => Self::UnknownValue(evaluation_state::UnknownValue(
13377                wkt::internal::UnknownEnumValue::String(value.to_string()),
13378            )),
13379        }
13380    }
13381}
13382
13383impl serde::ser::Serialize for EvaluationState {
13384    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13385    where
13386        S: serde::Serializer,
13387    {
13388        match self {
13389            Self::Unspecified => serializer.serialize_i32(0),
13390            Self::Passed => serializer.serialize_i32(1),
13391            Self::Failed => serializer.serialize_i32(2),
13392            Self::NotAssessed => serializer.serialize_i32(3),
13393            Self::UnknownValue(u) => u.0.serialize(serializer),
13394        }
13395    }
13396}
13397
13398impl<'de> serde::de::Deserialize<'de> for EvaluationState {
13399    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13400    where
13401        D: serde::Deserializer<'de>,
13402    {
13403        deserializer.deserialize_any(wkt::internal::EnumVisitor::<EvaluationState>::new(
13404            ".google.cloud.cloudsecuritycompliance.v1.EvaluationState",
13405        ))
13406    }
13407}
13408
13409/// A finding is a record of assessment data like security, risk, health, or
13410/// privacy.
13411///
13412/// # Working with unknown values
13413///
13414/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13415/// additional enum variants at any time. Adding new variants is not considered
13416/// a breaking change. Applications should write their code in anticipation of:
13417///
13418/// - New values appearing in future releases of the client library, **and**
13419/// - New values received dynamically, without application changes.
13420///
13421/// Please consult the [Working with enums] section in the user guide for some
13422/// guidelines.
13423///
13424/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13425#[derive(Clone, Debug, PartialEq)]
13426#[non_exhaustive]
13427pub enum FindingClass {
13428    /// Default value. This value is unused.
13429    Unspecified,
13430    /// The activity is unwanted or malicious.
13431    Threat,
13432    /// A potential weakness in software that increases risk to
13433    /// confidentiality, integrity, and availability.
13434    Vulnerability,
13435    /// A potential weakness in a cloud resource or asset configuration that
13436    /// increases risk.
13437    Misconfiguration,
13438    /// A security observation that is for informational purposes.
13439    Observation,
13440    /// An error that prevents Security Command Center from functioning properly.
13441    SccError,
13442    /// A potential security risk that's due to a change in the security
13443    /// posture.
13444    PostureViolation,
13445    /// A combination of security issues that represent a more severe
13446    /// security problem when taken together.
13447    ToxicCombination,
13448    /// A potential security risk to data assets that contain sensitive
13449    /// data.
13450    SensitiveDataRisk,
13451    /// A resource or resource group where high risk attack paths
13452    /// converge, based on attack path simulations (APS).
13453    Chokepoint,
13454    /// If set, the enum was initialized with an unknown value.
13455    ///
13456    /// Applications can examine the value using [FindingClass::value] or
13457    /// [FindingClass::name].
13458    UnknownValue(finding_class::UnknownValue),
13459}
13460
13461#[doc(hidden)]
13462pub mod finding_class {
13463    #[allow(unused_imports)]
13464    use super::*;
13465    #[derive(Clone, Debug, PartialEq)]
13466    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13467}
13468
13469impl FindingClass {
13470    /// Gets the enum value.
13471    ///
13472    /// Returns `None` if the enum contains an unknown value deserialized from
13473    /// the string representation of enums.
13474    pub fn value(&self) -> std::option::Option<i32> {
13475        match self {
13476            Self::Unspecified => std::option::Option::Some(0),
13477            Self::Threat => std::option::Option::Some(1),
13478            Self::Vulnerability => std::option::Option::Some(2),
13479            Self::Misconfiguration => std::option::Option::Some(3),
13480            Self::Observation => std::option::Option::Some(4),
13481            Self::SccError => std::option::Option::Some(5),
13482            Self::PostureViolation => std::option::Option::Some(6),
13483            Self::ToxicCombination => std::option::Option::Some(7),
13484            Self::SensitiveDataRisk => std::option::Option::Some(8),
13485            Self::Chokepoint => std::option::Option::Some(9),
13486            Self::UnknownValue(u) => u.0.value(),
13487        }
13488    }
13489
13490    /// Gets the enum value as a string.
13491    ///
13492    /// Returns `None` if the enum contains an unknown value deserialized from
13493    /// the integer representation of enums.
13494    pub fn name(&self) -> std::option::Option<&str> {
13495        match self {
13496            Self::Unspecified => std::option::Option::Some("FINDING_CLASS_UNSPECIFIED"),
13497            Self::Threat => std::option::Option::Some("THREAT"),
13498            Self::Vulnerability => std::option::Option::Some("VULNERABILITY"),
13499            Self::Misconfiguration => std::option::Option::Some("MISCONFIGURATION"),
13500            Self::Observation => std::option::Option::Some("OBSERVATION"),
13501            Self::SccError => std::option::Option::Some("SCC_ERROR"),
13502            Self::PostureViolation => std::option::Option::Some("POSTURE_VIOLATION"),
13503            Self::ToxicCombination => std::option::Option::Some("TOXIC_COMBINATION"),
13504            Self::SensitiveDataRisk => std::option::Option::Some("SENSITIVE_DATA_RISK"),
13505            Self::Chokepoint => std::option::Option::Some("CHOKEPOINT"),
13506            Self::UnknownValue(u) => u.0.name(),
13507        }
13508    }
13509}
13510
13511impl std::default::Default for FindingClass {
13512    fn default() -> Self {
13513        use std::convert::From;
13514        Self::from(0)
13515    }
13516}
13517
13518impl std::fmt::Display for FindingClass {
13519    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13520        wkt::internal::display_enum(f, self.name(), self.value())
13521    }
13522}
13523
13524impl std::convert::From<i32> for FindingClass {
13525    fn from(value: i32) -> Self {
13526        match value {
13527            0 => Self::Unspecified,
13528            1 => Self::Threat,
13529            2 => Self::Vulnerability,
13530            3 => Self::Misconfiguration,
13531            4 => Self::Observation,
13532            5 => Self::SccError,
13533            6 => Self::PostureViolation,
13534            7 => Self::ToxicCombination,
13535            8 => Self::SensitiveDataRisk,
13536            9 => Self::Chokepoint,
13537            _ => Self::UnknownValue(finding_class::UnknownValue(
13538                wkt::internal::UnknownEnumValue::Integer(value),
13539            )),
13540        }
13541    }
13542}
13543
13544impl std::convert::From<&str> for FindingClass {
13545    fn from(value: &str) -> Self {
13546        use std::string::ToString;
13547        match value {
13548            "FINDING_CLASS_UNSPECIFIED" => Self::Unspecified,
13549            "THREAT" => Self::Threat,
13550            "VULNERABILITY" => Self::Vulnerability,
13551            "MISCONFIGURATION" => Self::Misconfiguration,
13552            "OBSERVATION" => Self::Observation,
13553            "SCC_ERROR" => Self::SccError,
13554            "POSTURE_VIOLATION" => Self::PostureViolation,
13555            "TOXIC_COMBINATION" => Self::ToxicCombination,
13556            "SENSITIVE_DATA_RISK" => Self::SensitiveDataRisk,
13557            "CHOKEPOINT" => Self::Chokepoint,
13558            _ => Self::UnknownValue(finding_class::UnknownValue(
13559                wkt::internal::UnknownEnumValue::String(value.to_string()),
13560            )),
13561        }
13562    }
13563}
13564
13565impl serde::ser::Serialize for FindingClass {
13566    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13567    where
13568        S: serde::Serializer,
13569    {
13570        match self {
13571            Self::Unspecified => serializer.serialize_i32(0),
13572            Self::Threat => serializer.serialize_i32(1),
13573            Self::Vulnerability => serializer.serialize_i32(2),
13574            Self::Misconfiguration => serializer.serialize_i32(3),
13575            Self::Observation => serializer.serialize_i32(4),
13576            Self::SccError => serializer.serialize_i32(5),
13577            Self::PostureViolation => serializer.serialize_i32(6),
13578            Self::ToxicCombination => serializer.serialize_i32(7),
13579            Self::SensitiveDataRisk => serializer.serialize_i32(8),
13580            Self::Chokepoint => serializer.serialize_i32(9),
13581            Self::UnknownValue(u) => u.0.serialize(serializer),
13582        }
13583    }
13584}
13585
13586impl<'de> serde::de::Deserialize<'de> for FindingClass {
13587    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13588    where
13589        D: serde::Deserializer<'de>,
13590    {
13591        deserializer.deserialize_any(wkt::internal::EnumVisitor::<FindingClass>::new(
13592            ".google.cloud.cloudsecuritycompliance.v1.FindingClass",
13593        ))
13594    }
13595}
13596
13597/// Specifies the view of the framework compliance summary to be returned.
13598/// New values may be added in the future.
13599///
13600/// # Working with unknown values
13601///
13602/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13603/// additional enum variants at any time. Adding new variants is not considered
13604/// a breaking change. Applications should write their code in anticipation of:
13605///
13606/// - New values appearing in future releases of the client library, **and**
13607/// - New values received dynamically, without application changes.
13608///
13609/// Please consult the [Working with enums] section in the user guide for some
13610/// guidelines.
13611///
13612/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13613#[derive(Clone, Debug, PartialEq)]
13614#[non_exhaustive]
13615pub enum FrameworkComplianceSummaryView {
13616    /// The default / unset value. The API will default to the BASIC view.
13617    Unspecified,
13618    /// Includes basic compliance metadata, but omits trend data.
13619    Basic,
13620    /// Includes all information, including
13621    /// [finding_count][google.cloud.cloudsecuritycompliance.v1main.FrameworkComplianceSummary.finding_count]
13622    /// and
13623    /// [controls_passing_trend][google.cloud.cloudsecuritycompliance.v1main.FrameworkComplianceSummary.controls_passing_trend].
13624    /// Trend data is provided for the last 30 days.
13625    Full,
13626    /// If set, the enum was initialized with an unknown value.
13627    ///
13628    /// Applications can examine the value using [FrameworkComplianceSummaryView::value] or
13629    /// [FrameworkComplianceSummaryView::name].
13630    UnknownValue(framework_compliance_summary_view::UnknownValue),
13631}
13632
13633#[doc(hidden)]
13634pub mod framework_compliance_summary_view {
13635    #[allow(unused_imports)]
13636    use super::*;
13637    #[derive(Clone, Debug, PartialEq)]
13638    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13639}
13640
13641impl FrameworkComplianceSummaryView {
13642    /// Gets the enum value.
13643    ///
13644    /// Returns `None` if the enum contains an unknown value deserialized from
13645    /// the string representation of enums.
13646    pub fn value(&self) -> std::option::Option<i32> {
13647        match self {
13648            Self::Unspecified => std::option::Option::Some(0),
13649            Self::Basic => std::option::Option::Some(1),
13650            Self::Full => std::option::Option::Some(2),
13651            Self::UnknownValue(u) => u.0.value(),
13652        }
13653    }
13654
13655    /// Gets the enum value as a string.
13656    ///
13657    /// Returns `None` if the enum contains an unknown value deserialized from
13658    /// the integer representation of enums.
13659    pub fn name(&self) -> std::option::Option<&str> {
13660        match self {
13661            Self::Unspecified => {
13662                std::option::Option::Some("FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED")
13663            }
13664            Self::Basic => std::option::Option::Some("FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC"),
13665            Self::Full => std::option::Option::Some("FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL"),
13666            Self::UnknownValue(u) => u.0.name(),
13667        }
13668    }
13669}
13670
13671impl std::default::Default for FrameworkComplianceSummaryView {
13672    fn default() -> Self {
13673        use std::convert::From;
13674        Self::from(0)
13675    }
13676}
13677
13678impl std::fmt::Display for FrameworkComplianceSummaryView {
13679    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13680        wkt::internal::display_enum(f, self.name(), self.value())
13681    }
13682}
13683
13684impl std::convert::From<i32> for FrameworkComplianceSummaryView {
13685    fn from(value: i32) -> Self {
13686        match value {
13687            0 => Self::Unspecified,
13688            1 => Self::Basic,
13689            2 => Self::Full,
13690            _ => Self::UnknownValue(framework_compliance_summary_view::UnknownValue(
13691                wkt::internal::UnknownEnumValue::Integer(value),
13692            )),
13693        }
13694    }
13695}
13696
13697impl std::convert::From<&str> for FrameworkComplianceSummaryView {
13698    fn from(value: &str) -> Self {
13699        use std::string::ToString;
13700        match value {
13701            "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED" => Self::Unspecified,
13702            "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC" => Self::Basic,
13703            "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL" => Self::Full,
13704            _ => Self::UnknownValue(framework_compliance_summary_view::UnknownValue(
13705                wkt::internal::UnknownEnumValue::String(value.to_string()),
13706            )),
13707        }
13708    }
13709}
13710
13711impl serde::ser::Serialize for FrameworkComplianceSummaryView {
13712    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13713    where
13714        S: serde::Serializer,
13715    {
13716        match self {
13717            Self::Unspecified => serializer.serialize_i32(0),
13718            Self::Basic => serializer.serialize_i32(1),
13719            Self::Full => serializer.serialize_i32(2),
13720            Self::UnknownValue(u) => u.0.serialize(serializer),
13721        }
13722    }
13723}
13724
13725impl<'de> serde::de::Deserialize<'de> for FrameworkComplianceSummaryView {
13726    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13727    where
13728        D: serde::Deserializer<'de>,
13729    {
13730        deserializer.deserialize_any(
13731            wkt::internal::EnumVisitor::<FrameworkComplianceSummaryView>::new(
13732                ".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView",
13733            ),
13734        )
13735    }
13736}