Skip to main content

google_cloud_storageinsights_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_rpc;
28extern crate google_cloud_type;
29extern crate serde;
30extern crate serde_json;
31extern crate serde_with;
32extern crate std;
33extern crate tracing;
34extern crate wkt;
35
36mod debug;
37mod deserialize;
38mod serialize;
39
40/// Request message for
41/// [`ListReportConfigs`][google.cloud.storageinsights.v1.StorageInsights.ListReportConfigs]
42///
43/// [google.cloud.storageinsights.v1.StorageInsights.ListReportConfigs]: crate::client::StorageInsights::list_report_configs
44#[derive(Clone, Default, PartialEq)]
45#[non_exhaustive]
46pub struct ListReportConfigsRequest {
47    /// Required. Parent value for ListReportConfigsRequest
48    pub parent: std::string::String,
49
50    /// Requested page size. Server may return fewer items than requested.
51    /// If unspecified, server will pick an appropriate default.
52    pub page_size: i32,
53
54    /// A token identifying a page of results the server should return.
55    pub page_token: std::string::String,
56
57    /// Filtering results
58    pub filter: std::string::String,
59
60    /// Hint for how to order the results
61    pub order_by: std::string::String,
62
63    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
64}
65
66impl ListReportConfigsRequest {
67    /// Creates a new default instance.
68    pub fn new() -> Self {
69        std::default::Default::default()
70    }
71
72    /// Sets the value of [parent][crate::model::ListReportConfigsRequest::parent].
73    ///
74    /// # Example
75    /// ```ignore,no_run
76    /// # use google_cloud_storageinsights_v1::model::ListReportConfigsRequest;
77    /// let x = ListReportConfigsRequest::new().set_parent("example");
78    /// ```
79    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
80        self.parent = v.into();
81        self
82    }
83
84    /// Sets the value of [page_size][crate::model::ListReportConfigsRequest::page_size].
85    ///
86    /// # Example
87    /// ```ignore,no_run
88    /// # use google_cloud_storageinsights_v1::model::ListReportConfigsRequest;
89    /// let x = ListReportConfigsRequest::new().set_page_size(42);
90    /// ```
91    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
92        self.page_size = v.into();
93        self
94    }
95
96    /// Sets the value of [page_token][crate::model::ListReportConfigsRequest::page_token].
97    ///
98    /// # Example
99    /// ```ignore,no_run
100    /// # use google_cloud_storageinsights_v1::model::ListReportConfigsRequest;
101    /// let x = ListReportConfigsRequest::new().set_page_token("example");
102    /// ```
103    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
104        self.page_token = v.into();
105        self
106    }
107
108    /// Sets the value of [filter][crate::model::ListReportConfigsRequest::filter].
109    ///
110    /// # Example
111    /// ```ignore,no_run
112    /// # use google_cloud_storageinsights_v1::model::ListReportConfigsRequest;
113    /// let x = ListReportConfigsRequest::new().set_filter("example");
114    /// ```
115    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
116        self.filter = v.into();
117        self
118    }
119
120    /// Sets the value of [order_by][crate::model::ListReportConfigsRequest::order_by].
121    ///
122    /// # Example
123    /// ```ignore,no_run
124    /// # use google_cloud_storageinsights_v1::model::ListReportConfigsRequest;
125    /// let x = ListReportConfigsRequest::new().set_order_by("example");
126    /// ```
127    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
128        self.order_by = v.into();
129        self
130    }
131}
132
133impl wkt::message::Message for ListReportConfigsRequest {
134    fn typename() -> &'static str {
135        "type.googleapis.com/google.cloud.storageinsights.v1.ListReportConfigsRequest"
136    }
137}
138
139/// Message for response to listing ReportConfigs
140#[derive(Clone, Default, PartialEq)]
141#[non_exhaustive]
142pub struct ListReportConfigsResponse {
143    /// The list of ReportConfig
144    pub report_configs: std::vec::Vec<crate::model::ReportConfig>,
145
146    /// A token identifying a page of results the server should return.
147    pub next_page_token: std::string::String,
148
149    /// Locations that could not be reached.
150    pub unreachable: std::vec::Vec<std::string::String>,
151
152    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
153}
154
155impl ListReportConfigsResponse {
156    /// Creates a new default instance.
157    pub fn new() -> Self {
158        std::default::Default::default()
159    }
160
161    /// Sets the value of [report_configs][crate::model::ListReportConfigsResponse::report_configs].
162    ///
163    /// # Example
164    /// ```ignore,no_run
165    /// # use google_cloud_storageinsights_v1::model::ListReportConfigsResponse;
166    /// use google_cloud_storageinsights_v1::model::ReportConfig;
167    /// let x = ListReportConfigsResponse::new()
168    ///     .set_report_configs([
169    ///         ReportConfig::default()/* use setters */,
170    ///         ReportConfig::default()/* use (different) setters */,
171    ///     ]);
172    /// ```
173    pub fn set_report_configs<T, V>(mut self, v: T) -> Self
174    where
175        T: std::iter::IntoIterator<Item = V>,
176        V: std::convert::Into<crate::model::ReportConfig>,
177    {
178        use std::iter::Iterator;
179        self.report_configs = v.into_iter().map(|i| i.into()).collect();
180        self
181    }
182
183    /// Sets the value of [next_page_token][crate::model::ListReportConfigsResponse::next_page_token].
184    ///
185    /// # Example
186    /// ```ignore,no_run
187    /// # use google_cloud_storageinsights_v1::model::ListReportConfigsResponse;
188    /// let x = ListReportConfigsResponse::new().set_next_page_token("example");
189    /// ```
190    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
191        self.next_page_token = v.into();
192        self
193    }
194
195    /// Sets the value of [unreachable][crate::model::ListReportConfigsResponse::unreachable].
196    ///
197    /// # Example
198    /// ```ignore,no_run
199    /// # use google_cloud_storageinsights_v1::model::ListReportConfigsResponse;
200    /// let x = ListReportConfigsResponse::new().set_unreachable(["a", "b", "c"]);
201    /// ```
202    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
203    where
204        T: std::iter::IntoIterator<Item = V>,
205        V: std::convert::Into<std::string::String>,
206    {
207        use std::iter::Iterator;
208        self.unreachable = v.into_iter().map(|i| i.into()).collect();
209        self
210    }
211}
212
213impl wkt::message::Message for ListReportConfigsResponse {
214    fn typename() -> &'static str {
215        "type.googleapis.com/google.cloud.storageinsights.v1.ListReportConfigsResponse"
216    }
217}
218
219#[doc(hidden)]
220impl google_cloud_gax::paginator::internal::PageableResponse for ListReportConfigsResponse {
221    type PageItem = crate::model::ReportConfig;
222
223    fn items(self) -> std::vec::Vec<Self::PageItem> {
224        self.report_configs
225    }
226
227    fn next_page_token(&self) -> std::string::String {
228        use std::clone::Clone;
229        self.next_page_token.clone()
230    }
231}
232
233/// Message for getting a ReportConfig
234#[derive(Clone, Default, PartialEq)]
235#[non_exhaustive]
236pub struct GetReportConfigRequest {
237    /// Required. Name of the resource
238    pub name: std::string::String,
239
240    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
241}
242
243impl GetReportConfigRequest {
244    /// Creates a new default instance.
245    pub fn new() -> Self {
246        std::default::Default::default()
247    }
248
249    /// Sets the value of [name][crate::model::GetReportConfigRequest::name].
250    ///
251    /// # Example
252    /// ```ignore,no_run
253    /// # use google_cloud_storageinsights_v1::model::GetReportConfigRequest;
254    /// let x = GetReportConfigRequest::new().set_name("example");
255    /// ```
256    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
257        self.name = v.into();
258        self
259    }
260}
261
262impl wkt::message::Message for GetReportConfigRequest {
263    fn typename() -> &'static str {
264        "type.googleapis.com/google.cloud.storageinsights.v1.GetReportConfigRequest"
265    }
266}
267
268/// Message for creating a ReportConfig
269#[derive(Clone, Default, PartialEq)]
270#[non_exhaustive]
271pub struct CreateReportConfigRequest {
272    /// Required. Value for parent.
273    pub parent: std::string::String,
274
275    /// Required. The resource being created
276    pub report_config: std::option::Option<crate::model::ReportConfig>,
277
278    /// Optional. An optional request ID to identify requests. Specify a unique
279    /// request ID so that if you must retry your request, the server will know to
280    /// ignore the request if it has already been completed. The server will
281    /// guarantee that for at least 60 minutes since the first request.
282    ///
283    /// For example, consider a situation where you make an initial request and
284    /// the request times out. If you make the request again with the same request
285    /// ID, the server can check if original operation with the same request ID
286    /// was received, and if so, will ignore the second request. This prevents
287    /// clients from accidentally creating duplicate commitments.
288    ///
289    /// The request ID must be a valid UUID with the exception that zero UUID is
290    /// not supported (00000000-0000-0000-0000-000000000000).
291    pub request_id: std::string::String,
292
293    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
294}
295
296impl CreateReportConfigRequest {
297    /// Creates a new default instance.
298    pub fn new() -> Self {
299        std::default::Default::default()
300    }
301
302    /// Sets the value of [parent][crate::model::CreateReportConfigRequest::parent].
303    ///
304    /// # Example
305    /// ```ignore,no_run
306    /// # use google_cloud_storageinsights_v1::model::CreateReportConfigRequest;
307    /// let x = CreateReportConfigRequest::new().set_parent("example");
308    /// ```
309    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
310        self.parent = v.into();
311        self
312    }
313
314    /// Sets the value of [report_config][crate::model::CreateReportConfigRequest::report_config].
315    ///
316    /// # Example
317    /// ```ignore,no_run
318    /// # use google_cloud_storageinsights_v1::model::CreateReportConfigRequest;
319    /// use google_cloud_storageinsights_v1::model::ReportConfig;
320    /// let x = CreateReportConfigRequest::new().set_report_config(ReportConfig::default()/* use setters */);
321    /// ```
322    pub fn set_report_config<T>(mut self, v: T) -> Self
323    where
324        T: std::convert::Into<crate::model::ReportConfig>,
325    {
326        self.report_config = std::option::Option::Some(v.into());
327        self
328    }
329
330    /// Sets or clears the value of [report_config][crate::model::CreateReportConfigRequest::report_config].
331    ///
332    /// # Example
333    /// ```ignore,no_run
334    /// # use google_cloud_storageinsights_v1::model::CreateReportConfigRequest;
335    /// use google_cloud_storageinsights_v1::model::ReportConfig;
336    /// let x = CreateReportConfigRequest::new().set_or_clear_report_config(Some(ReportConfig::default()/* use setters */));
337    /// let x = CreateReportConfigRequest::new().set_or_clear_report_config(None::<ReportConfig>);
338    /// ```
339    pub fn set_or_clear_report_config<T>(mut self, v: std::option::Option<T>) -> Self
340    where
341        T: std::convert::Into<crate::model::ReportConfig>,
342    {
343        self.report_config = v.map(|x| x.into());
344        self
345    }
346
347    /// Sets the value of [request_id][crate::model::CreateReportConfigRequest::request_id].
348    ///
349    /// # Example
350    /// ```ignore,no_run
351    /// # use google_cloud_storageinsights_v1::model::CreateReportConfigRequest;
352    /// let x = CreateReportConfigRequest::new().set_request_id("example");
353    /// ```
354    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
355        self.request_id = v.into();
356        self
357    }
358}
359
360impl wkt::message::Message for CreateReportConfigRequest {
361    fn typename() -> &'static str {
362        "type.googleapis.com/google.cloud.storageinsights.v1.CreateReportConfigRequest"
363    }
364}
365
366/// Message for updating a ReportConfig
367#[derive(Clone, Default, PartialEq)]
368#[non_exhaustive]
369pub struct UpdateReportConfigRequest {
370    /// Required. Field mask is used to specify the fields to be overwritten in the
371    /// ReportConfig resource by the update.
372    /// The fields specified in the update_mask are relative to the resource, not
373    /// the full request. A field will be overwritten if it is in the mask. If the
374    /// user does not provide a mask then all fields will be overwritten.
375    pub update_mask: std::option::Option<wkt::FieldMask>,
376
377    /// Required. The resource being updated
378    pub report_config: std::option::Option<crate::model::ReportConfig>,
379
380    /// Optional. An optional request ID to identify requests. Specify a unique
381    /// request ID so that if you must retry your request, the server will know to
382    /// ignore the request if it has already been completed. The server will
383    /// guarantee that for at least 60 minutes since the first request.
384    ///
385    /// For example, consider a situation where you make an initial request and
386    /// the request times out. If you make the request again with the same request
387    /// ID, the server can check if original operation with the same request ID
388    /// was received, and if so, will ignore the second request. This prevents
389    /// clients from accidentally creating duplicate commitments.
390    ///
391    /// The request ID must be a valid UUID with the exception that zero UUID is
392    /// not supported (00000000-0000-0000-0000-000000000000).
393    pub request_id: std::string::String,
394
395    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
396}
397
398impl UpdateReportConfigRequest {
399    /// Creates a new default instance.
400    pub fn new() -> Self {
401        std::default::Default::default()
402    }
403
404    /// Sets the value of [update_mask][crate::model::UpdateReportConfigRequest::update_mask].
405    ///
406    /// # Example
407    /// ```ignore,no_run
408    /// # use google_cloud_storageinsights_v1::model::UpdateReportConfigRequest;
409    /// use wkt::FieldMask;
410    /// let x = UpdateReportConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
411    /// ```
412    pub fn set_update_mask<T>(mut self, v: T) -> Self
413    where
414        T: std::convert::Into<wkt::FieldMask>,
415    {
416        self.update_mask = std::option::Option::Some(v.into());
417        self
418    }
419
420    /// Sets or clears the value of [update_mask][crate::model::UpdateReportConfigRequest::update_mask].
421    ///
422    /// # Example
423    /// ```ignore,no_run
424    /// # use google_cloud_storageinsights_v1::model::UpdateReportConfigRequest;
425    /// use wkt::FieldMask;
426    /// let x = UpdateReportConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
427    /// let x = UpdateReportConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
428    /// ```
429    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
430    where
431        T: std::convert::Into<wkt::FieldMask>,
432    {
433        self.update_mask = v.map(|x| x.into());
434        self
435    }
436
437    /// Sets the value of [report_config][crate::model::UpdateReportConfigRequest::report_config].
438    ///
439    /// # Example
440    /// ```ignore,no_run
441    /// # use google_cloud_storageinsights_v1::model::UpdateReportConfigRequest;
442    /// use google_cloud_storageinsights_v1::model::ReportConfig;
443    /// let x = UpdateReportConfigRequest::new().set_report_config(ReportConfig::default()/* use setters */);
444    /// ```
445    pub fn set_report_config<T>(mut self, v: T) -> Self
446    where
447        T: std::convert::Into<crate::model::ReportConfig>,
448    {
449        self.report_config = std::option::Option::Some(v.into());
450        self
451    }
452
453    /// Sets or clears the value of [report_config][crate::model::UpdateReportConfigRequest::report_config].
454    ///
455    /// # Example
456    /// ```ignore,no_run
457    /// # use google_cloud_storageinsights_v1::model::UpdateReportConfigRequest;
458    /// use google_cloud_storageinsights_v1::model::ReportConfig;
459    /// let x = UpdateReportConfigRequest::new().set_or_clear_report_config(Some(ReportConfig::default()/* use setters */));
460    /// let x = UpdateReportConfigRequest::new().set_or_clear_report_config(None::<ReportConfig>);
461    /// ```
462    pub fn set_or_clear_report_config<T>(mut self, v: std::option::Option<T>) -> Self
463    where
464        T: std::convert::Into<crate::model::ReportConfig>,
465    {
466        self.report_config = v.map(|x| x.into());
467        self
468    }
469
470    /// Sets the value of [request_id][crate::model::UpdateReportConfigRequest::request_id].
471    ///
472    /// # Example
473    /// ```ignore,no_run
474    /// # use google_cloud_storageinsights_v1::model::UpdateReportConfigRequest;
475    /// let x = UpdateReportConfigRequest::new().set_request_id("example");
476    /// ```
477    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
478        self.request_id = v.into();
479        self
480    }
481}
482
483impl wkt::message::Message for UpdateReportConfigRequest {
484    fn typename() -> &'static str {
485        "type.googleapis.com/google.cloud.storageinsights.v1.UpdateReportConfigRequest"
486    }
487}
488
489/// Message for deleting a ReportConfig
490#[derive(Clone, Default, PartialEq)]
491#[non_exhaustive]
492pub struct DeleteReportConfigRequest {
493    /// Required. Name of the resource
494    pub name: std::string::String,
495
496    /// Optional. If set, all ReportDetails for this ReportConfig will be deleted.
497    pub force: bool,
498
499    /// Optional. An optional request ID to identify requests. Specify a unique
500    /// request ID so that if you must retry your request, the server will know to
501    /// ignore the request if it has already been completed. The server will
502    /// guarantee that for at least 60 minutes after the first request.
503    ///
504    /// For example, consider a situation where you make an initial request and
505    /// the request times out. If you make the request again with the same request
506    /// ID, the server can check if original operation with the same request ID
507    /// was received, and if so, will ignore the second request. This prevents
508    /// clients from accidentally creating duplicate commitments.
509    ///
510    /// The request ID must be a valid UUID with the exception that zero UUID is
511    /// not supported (00000000-0000-0000-0000-000000000000).
512    pub request_id: std::string::String,
513
514    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
515}
516
517impl DeleteReportConfigRequest {
518    /// Creates a new default instance.
519    pub fn new() -> Self {
520        std::default::Default::default()
521    }
522
523    /// Sets the value of [name][crate::model::DeleteReportConfigRequest::name].
524    ///
525    /// # Example
526    /// ```ignore,no_run
527    /// # use google_cloud_storageinsights_v1::model::DeleteReportConfigRequest;
528    /// let x = DeleteReportConfigRequest::new().set_name("example");
529    /// ```
530    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
531        self.name = v.into();
532        self
533    }
534
535    /// Sets the value of [force][crate::model::DeleteReportConfigRequest::force].
536    ///
537    /// # Example
538    /// ```ignore,no_run
539    /// # use google_cloud_storageinsights_v1::model::DeleteReportConfigRequest;
540    /// let x = DeleteReportConfigRequest::new().set_force(true);
541    /// ```
542    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
543        self.force = v.into();
544        self
545    }
546
547    /// Sets the value of [request_id][crate::model::DeleteReportConfigRequest::request_id].
548    ///
549    /// # Example
550    /// ```ignore,no_run
551    /// # use google_cloud_storageinsights_v1::model::DeleteReportConfigRequest;
552    /// let x = DeleteReportConfigRequest::new().set_request_id("example");
553    /// ```
554    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
555        self.request_id = v.into();
556        self
557    }
558}
559
560impl wkt::message::Message for DeleteReportConfigRequest {
561    fn typename() -> &'static str {
562        "type.googleapis.com/google.cloud.storageinsights.v1.DeleteReportConfigRequest"
563    }
564}
565
566/// Message describing ReportDetail object. ReportDetail represents metadata of
567/// generated reports for a ReportConfig.
568/// Next ID: 10
569#[derive(Clone, Default, PartialEq)]
570#[non_exhaustive]
571pub struct ReportDetail {
572    /// Name of resource. It will be of form
573    /// projects/\<project\>/locations/\<location\>/reportConfigs/\<report-config-id\>/reportDetails/\<report-detail-id\>.
574    pub name: std::string::String,
575
576    /// The snapshot time.
577    /// All the report data is referenced at this point of time.
578    pub snapshot_time: std::option::Option<wkt::Timestamp>,
579
580    /// Prefix of the object name of each report's shard. This will have full
581    /// prefix except the "extension" and "shard_id".
582    /// For example, if the `destination_path` is
583    /// `{{report-config-id}}/dt={{datetime}}`, the shard object name would be
584    /// `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_5.csv`
585    /// and the value of `report_path_prefix` field would be
586    /// `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_`.
587    pub report_path_prefix: std::string::String,
588
589    /// Total shards generated for the report.
590    pub shards_count: i64,
591
592    /// Status of the ReportDetail.
593    pub status: std::option::Option<google_cloud_rpc::model::Status>,
594
595    /// Labels as key value pairs
596    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
597
598    /// The date for which report is generated. The time part of target_datetime
599    /// will be zero till we support multiple reports per day.
600    pub target_datetime: std::option::Option<google_cloud_type::model::DateTime>,
601
602    /// Metrics of the report.
603    pub report_metrics: std::option::Option<crate::model::report_detail::Metrics>,
604
605    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
606}
607
608impl ReportDetail {
609    /// Creates a new default instance.
610    pub fn new() -> Self {
611        std::default::Default::default()
612    }
613
614    /// Sets the value of [name][crate::model::ReportDetail::name].
615    ///
616    /// # Example
617    /// ```ignore,no_run
618    /// # use google_cloud_storageinsights_v1::model::ReportDetail;
619    /// let x = ReportDetail::new().set_name("example");
620    /// ```
621    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
622        self.name = v.into();
623        self
624    }
625
626    /// Sets the value of [snapshot_time][crate::model::ReportDetail::snapshot_time].
627    ///
628    /// # Example
629    /// ```ignore,no_run
630    /// # use google_cloud_storageinsights_v1::model::ReportDetail;
631    /// use wkt::Timestamp;
632    /// let x = ReportDetail::new().set_snapshot_time(Timestamp::default()/* use setters */);
633    /// ```
634    pub fn set_snapshot_time<T>(mut self, v: T) -> Self
635    where
636        T: std::convert::Into<wkt::Timestamp>,
637    {
638        self.snapshot_time = std::option::Option::Some(v.into());
639        self
640    }
641
642    /// Sets or clears the value of [snapshot_time][crate::model::ReportDetail::snapshot_time].
643    ///
644    /// # Example
645    /// ```ignore,no_run
646    /// # use google_cloud_storageinsights_v1::model::ReportDetail;
647    /// use wkt::Timestamp;
648    /// let x = ReportDetail::new().set_or_clear_snapshot_time(Some(Timestamp::default()/* use setters */));
649    /// let x = ReportDetail::new().set_or_clear_snapshot_time(None::<Timestamp>);
650    /// ```
651    pub fn set_or_clear_snapshot_time<T>(mut self, v: std::option::Option<T>) -> Self
652    where
653        T: std::convert::Into<wkt::Timestamp>,
654    {
655        self.snapshot_time = v.map(|x| x.into());
656        self
657    }
658
659    /// Sets the value of [report_path_prefix][crate::model::ReportDetail::report_path_prefix].
660    ///
661    /// # Example
662    /// ```ignore,no_run
663    /// # use google_cloud_storageinsights_v1::model::ReportDetail;
664    /// let x = ReportDetail::new().set_report_path_prefix("example");
665    /// ```
666    pub fn set_report_path_prefix<T: std::convert::Into<std::string::String>>(
667        mut self,
668        v: T,
669    ) -> Self {
670        self.report_path_prefix = v.into();
671        self
672    }
673
674    /// Sets the value of [shards_count][crate::model::ReportDetail::shards_count].
675    ///
676    /// # Example
677    /// ```ignore,no_run
678    /// # use google_cloud_storageinsights_v1::model::ReportDetail;
679    /// let x = ReportDetail::new().set_shards_count(42);
680    /// ```
681    pub fn set_shards_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
682        self.shards_count = v.into();
683        self
684    }
685
686    /// Sets the value of [status][crate::model::ReportDetail::status].
687    ///
688    /// # Example
689    /// ```ignore,no_run
690    /// # use google_cloud_storageinsights_v1::model::ReportDetail;
691    /// use google_cloud_rpc::model::Status;
692    /// let x = ReportDetail::new().set_status(Status::default()/* use setters */);
693    /// ```
694    pub fn set_status<T>(mut self, v: T) -> Self
695    where
696        T: std::convert::Into<google_cloud_rpc::model::Status>,
697    {
698        self.status = std::option::Option::Some(v.into());
699        self
700    }
701
702    /// Sets or clears the value of [status][crate::model::ReportDetail::status].
703    ///
704    /// # Example
705    /// ```ignore,no_run
706    /// # use google_cloud_storageinsights_v1::model::ReportDetail;
707    /// use google_cloud_rpc::model::Status;
708    /// let x = ReportDetail::new().set_or_clear_status(Some(Status::default()/* use setters */));
709    /// let x = ReportDetail::new().set_or_clear_status(None::<Status>);
710    /// ```
711    pub fn set_or_clear_status<T>(mut self, v: std::option::Option<T>) -> Self
712    where
713        T: std::convert::Into<google_cloud_rpc::model::Status>,
714    {
715        self.status = v.map(|x| x.into());
716        self
717    }
718
719    /// Sets the value of [labels][crate::model::ReportDetail::labels].
720    ///
721    /// # Example
722    /// ```ignore,no_run
723    /// # use google_cloud_storageinsights_v1::model::ReportDetail;
724    /// let x = ReportDetail::new().set_labels([
725    ///     ("key0", "abc"),
726    ///     ("key1", "xyz"),
727    /// ]);
728    /// ```
729    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
730    where
731        T: std::iter::IntoIterator<Item = (K, V)>,
732        K: std::convert::Into<std::string::String>,
733        V: std::convert::Into<std::string::String>,
734    {
735        use std::iter::Iterator;
736        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
737        self
738    }
739
740    /// Sets the value of [target_datetime][crate::model::ReportDetail::target_datetime].
741    ///
742    /// # Example
743    /// ```ignore,no_run
744    /// # use google_cloud_storageinsights_v1::model::ReportDetail;
745    /// use google_cloud_type::model::DateTime;
746    /// let x = ReportDetail::new().set_target_datetime(DateTime::default()/* use setters */);
747    /// ```
748    pub fn set_target_datetime<T>(mut self, v: T) -> Self
749    where
750        T: std::convert::Into<google_cloud_type::model::DateTime>,
751    {
752        self.target_datetime = std::option::Option::Some(v.into());
753        self
754    }
755
756    /// Sets or clears the value of [target_datetime][crate::model::ReportDetail::target_datetime].
757    ///
758    /// # Example
759    /// ```ignore,no_run
760    /// # use google_cloud_storageinsights_v1::model::ReportDetail;
761    /// use google_cloud_type::model::DateTime;
762    /// let x = ReportDetail::new().set_or_clear_target_datetime(Some(DateTime::default()/* use setters */));
763    /// let x = ReportDetail::new().set_or_clear_target_datetime(None::<DateTime>);
764    /// ```
765    pub fn set_or_clear_target_datetime<T>(mut self, v: std::option::Option<T>) -> Self
766    where
767        T: std::convert::Into<google_cloud_type::model::DateTime>,
768    {
769        self.target_datetime = v.map(|x| x.into());
770        self
771    }
772
773    /// Sets the value of [report_metrics][crate::model::ReportDetail::report_metrics].
774    ///
775    /// # Example
776    /// ```ignore,no_run
777    /// # use google_cloud_storageinsights_v1::model::ReportDetail;
778    /// use google_cloud_storageinsights_v1::model::report_detail::Metrics;
779    /// let x = ReportDetail::new().set_report_metrics(Metrics::default()/* use setters */);
780    /// ```
781    pub fn set_report_metrics<T>(mut self, v: T) -> Self
782    where
783        T: std::convert::Into<crate::model::report_detail::Metrics>,
784    {
785        self.report_metrics = std::option::Option::Some(v.into());
786        self
787    }
788
789    /// Sets or clears the value of [report_metrics][crate::model::ReportDetail::report_metrics].
790    ///
791    /// # Example
792    /// ```ignore,no_run
793    /// # use google_cloud_storageinsights_v1::model::ReportDetail;
794    /// use google_cloud_storageinsights_v1::model::report_detail::Metrics;
795    /// let x = ReportDetail::new().set_or_clear_report_metrics(Some(Metrics::default()/* use setters */));
796    /// let x = ReportDetail::new().set_or_clear_report_metrics(None::<Metrics>);
797    /// ```
798    pub fn set_or_clear_report_metrics<T>(mut self, v: std::option::Option<T>) -> Self
799    where
800        T: std::convert::Into<crate::model::report_detail::Metrics>,
801    {
802        self.report_metrics = v.map(|x| x.into());
803        self
804    }
805}
806
807impl wkt::message::Message for ReportDetail {
808    fn typename() -> &'static str {
809        "type.googleapis.com/google.cloud.storageinsights.v1.ReportDetail"
810    }
811}
812
813/// Defines additional types related to [ReportDetail].
814pub mod report_detail {
815    #[allow(unused_imports)]
816    use super::*;
817
818    /// Different metrics associated with the generated report.
819    #[derive(Clone, Default, PartialEq)]
820    #[non_exhaustive]
821    pub struct Metrics {
822        /// Count of Cloud Storage objects which are part of the report.
823        pub processed_records_count: i64,
824
825        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
826    }
827
828    impl Metrics {
829        /// Creates a new default instance.
830        pub fn new() -> Self {
831            std::default::Default::default()
832        }
833
834        /// Sets the value of [processed_records_count][crate::model::report_detail::Metrics::processed_records_count].
835        ///
836        /// # Example
837        /// ```ignore,no_run
838        /// # use google_cloud_storageinsights_v1::model::report_detail::Metrics;
839        /// let x = Metrics::new().set_processed_records_count(42);
840        /// ```
841        pub fn set_processed_records_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
842            self.processed_records_count = v.into();
843            self
844        }
845    }
846
847    impl wkt::message::Message for Metrics {
848        fn typename() -> &'static str {
849            "type.googleapis.com/google.cloud.storageinsights.v1.ReportDetail.Metrics"
850        }
851    }
852}
853
854/// Message for requesting list of ReportDetails
855#[derive(Clone, Default, PartialEq)]
856#[non_exhaustive]
857pub struct ListReportDetailsRequest {
858    /// Required. Parent value for ListReportDetailsRequest
859    pub parent: std::string::String,
860
861    /// Requested page size. Server may return fewer items than requested.
862    /// If unspecified, server will pick an appropriate default.
863    pub page_size: i32,
864
865    /// A token identifying a page of results the server should return.
866    pub page_token: std::string::String,
867
868    /// Filtering results
869    pub filter: std::string::String,
870
871    /// Hint for how to order the results
872    pub order_by: std::string::String,
873
874    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
875}
876
877impl ListReportDetailsRequest {
878    /// Creates a new default instance.
879    pub fn new() -> Self {
880        std::default::Default::default()
881    }
882
883    /// Sets the value of [parent][crate::model::ListReportDetailsRequest::parent].
884    ///
885    /// # Example
886    /// ```ignore,no_run
887    /// # use google_cloud_storageinsights_v1::model::ListReportDetailsRequest;
888    /// let x = ListReportDetailsRequest::new().set_parent("example");
889    /// ```
890    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
891        self.parent = v.into();
892        self
893    }
894
895    /// Sets the value of [page_size][crate::model::ListReportDetailsRequest::page_size].
896    ///
897    /// # Example
898    /// ```ignore,no_run
899    /// # use google_cloud_storageinsights_v1::model::ListReportDetailsRequest;
900    /// let x = ListReportDetailsRequest::new().set_page_size(42);
901    /// ```
902    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
903        self.page_size = v.into();
904        self
905    }
906
907    /// Sets the value of [page_token][crate::model::ListReportDetailsRequest::page_token].
908    ///
909    /// # Example
910    /// ```ignore,no_run
911    /// # use google_cloud_storageinsights_v1::model::ListReportDetailsRequest;
912    /// let x = ListReportDetailsRequest::new().set_page_token("example");
913    /// ```
914    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
915        self.page_token = v.into();
916        self
917    }
918
919    /// Sets the value of [filter][crate::model::ListReportDetailsRequest::filter].
920    ///
921    /// # Example
922    /// ```ignore,no_run
923    /// # use google_cloud_storageinsights_v1::model::ListReportDetailsRequest;
924    /// let x = ListReportDetailsRequest::new().set_filter("example");
925    /// ```
926    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
927        self.filter = v.into();
928        self
929    }
930
931    /// Sets the value of [order_by][crate::model::ListReportDetailsRequest::order_by].
932    ///
933    /// # Example
934    /// ```ignore,no_run
935    /// # use google_cloud_storageinsights_v1::model::ListReportDetailsRequest;
936    /// let x = ListReportDetailsRequest::new().set_order_by("example");
937    /// ```
938    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
939        self.order_by = v.into();
940        self
941    }
942}
943
944impl wkt::message::Message for ListReportDetailsRequest {
945    fn typename() -> &'static str {
946        "type.googleapis.com/google.cloud.storageinsights.v1.ListReportDetailsRequest"
947    }
948}
949
950/// Message for response to listing ReportDetails
951#[derive(Clone, Default, PartialEq)]
952#[non_exhaustive]
953pub struct ListReportDetailsResponse {
954    /// The list of ReportDetail
955    pub report_details: std::vec::Vec<crate::model::ReportDetail>,
956
957    /// A token identifying a page of results the server should return.
958    pub next_page_token: std::string::String,
959
960    /// Locations that could not be reached.
961    pub unreachable: std::vec::Vec<std::string::String>,
962
963    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
964}
965
966impl ListReportDetailsResponse {
967    /// Creates a new default instance.
968    pub fn new() -> Self {
969        std::default::Default::default()
970    }
971
972    /// Sets the value of [report_details][crate::model::ListReportDetailsResponse::report_details].
973    ///
974    /// # Example
975    /// ```ignore,no_run
976    /// # use google_cloud_storageinsights_v1::model::ListReportDetailsResponse;
977    /// use google_cloud_storageinsights_v1::model::ReportDetail;
978    /// let x = ListReportDetailsResponse::new()
979    ///     .set_report_details([
980    ///         ReportDetail::default()/* use setters */,
981    ///         ReportDetail::default()/* use (different) setters */,
982    ///     ]);
983    /// ```
984    pub fn set_report_details<T, V>(mut self, v: T) -> Self
985    where
986        T: std::iter::IntoIterator<Item = V>,
987        V: std::convert::Into<crate::model::ReportDetail>,
988    {
989        use std::iter::Iterator;
990        self.report_details = v.into_iter().map(|i| i.into()).collect();
991        self
992    }
993
994    /// Sets the value of [next_page_token][crate::model::ListReportDetailsResponse::next_page_token].
995    ///
996    /// # Example
997    /// ```ignore,no_run
998    /// # use google_cloud_storageinsights_v1::model::ListReportDetailsResponse;
999    /// let x = ListReportDetailsResponse::new().set_next_page_token("example");
1000    /// ```
1001    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1002        self.next_page_token = v.into();
1003        self
1004    }
1005
1006    /// Sets the value of [unreachable][crate::model::ListReportDetailsResponse::unreachable].
1007    ///
1008    /// # Example
1009    /// ```ignore,no_run
1010    /// # use google_cloud_storageinsights_v1::model::ListReportDetailsResponse;
1011    /// let x = ListReportDetailsResponse::new().set_unreachable(["a", "b", "c"]);
1012    /// ```
1013    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1014    where
1015        T: std::iter::IntoIterator<Item = V>,
1016        V: std::convert::Into<std::string::String>,
1017    {
1018        use std::iter::Iterator;
1019        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1020        self
1021    }
1022}
1023
1024impl wkt::message::Message for ListReportDetailsResponse {
1025    fn typename() -> &'static str {
1026        "type.googleapis.com/google.cloud.storageinsights.v1.ListReportDetailsResponse"
1027    }
1028}
1029
1030#[doc(hidden)]
1031impl google_cloud_gax::paginator::internal::PageableResponse for ListReportDetailsResponse {
1032    type PageItem = crate::model::ReportDetail;
1033
1034    fn items(self) -> std::vec::Vec<Self::PageItem> {
1035        self.report_details
1036    }
1037
1038    fn next_page_token(&self) -> std::string::String {
1039        use std::clone::Clone;
1040        self.next_page_token.clone()
1041    }
1042}
1043
1044/// Message for getting a ReportDetail
1045#[derive(Clone, Default, PartialEq)]
1046#[non_exhaustive]
1047pub struct GetReportDetailRequest {
1048    /// Required. Name of the resource
1049    pub name: std::string::String,
1050
1051    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1052}
1053
1054impl GetReportDetailRequest {
1055    /// Creates a new default instance.
1056    pub fn new() -> Self {
1057        std::default::Default::default()
1058    }
1059
1060    /// Sets the value of [name][crate::model::GetReportDetailRequest::name].
1061    ///
1062    /// # Example
1063    /// ```ignore,no_run
1064    /// # use google_cloud_storageinsights_v1::model::GetReportDetailRequest;
1065    /// let x = GetReportDetailRequest::new().set_name("example");
1066    /// ```
1067    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1068        self.name = v.into();
1069        self
1070    }
1071}
1072
1073impl wkt::message::Message for GetReportDetailRequest {
1074    fn typename() -> &'static str {
1075        "type.googleapis.com/google.cloud.storageinsights.v1.GetReportDetailRequest"
1076    }
1077}
1078
1079/// Represents the metadata of the long-running operation.
1080#[derive(Clone, Default, PartialEq)]
1081#[non_exhaustive]
1082pub struct OperationMetadata {
1083    /// Output only. The time the operation was created.
1084    pub create_time: std::option::Option<wkt::Timestamp>,
1085
1086    /// Output only. The time the operation finished running.
1087    pub end_time: std::option::Option<wkt::Timestamp>,
1088
1089    /// Output only. Server-defined resource path for the target of the operation.
1090    pub target: std::string::String,
1091
1092    /// Output only. Name of the verb executed by the operation.
1093    pub verb: std::string::String,
1094
1095    /// Output only. Human-readable status of the operation, if any.
1096    pub status_message: std::string::String,
1097
1098    /// Output only. Identifies whether the user has requested cancellation
1099    /// of the operation. Operations that have been cancelled successfully
1100    /// have [Operation.error][] value with a
1101    /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
1102    /// `Code.CANCELLED`.
1103    ///
1104    /// [google.rpc.Status.code]: google_cloud_rpc::model::Status::code
1105    pub requested_cancellation: bool,
1106
1107    /// Output only. API version used to start the operation.
1108    pub api_version: std::string::String,
1109
1110    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1111}
1112
1113impl OperationMetadata {
1114    /// Creates a new default instance.
1115    pub fn new() -> Self {
1116        std::default::Default::default()
1117    }
1118
1119    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
1120    ///
1121    /// # Example
1122    /// ```ignore,no_run
1123    /// # use google_cloud_storageinsights_v1::model::OperationMetadata;
1124    /// use wkt::Timestamp;
1125    /// let x = OperationMetadata::new().set_create_time(Timestamp::default()/* use setters */);
1126    /// ```
1127    pub fn set_create_time<T>(mut self, v: T) -> Self
1128    where
1129        T: std::convert::Into<wkt::Timestamp>,
1130    {
1131        self.create_time = std::option::Option::Some(v.into());
1132        self
1133    }
1134
1135    /// Sets or clears the value of [create_time][crate::model::OperationMetadata::create_time].
1136    ///
1137    /// # Example
1138    /// ```ignore,no_run
1139    /// # use google_cloud_storageinsights_v1::model::OperationMetadata;
1140    /// use wkt::Timestamp;
1141    /// let x = OperationMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
1142    /// let x = OperationMetadata::new().set_or_clear_create_time(None::<Timestamp>);
1143    /// ```
1144    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1145    where
1146        T: std::convert::Into<wkt::Timestamp>,
1147    {
1148        self.create_time = v.map(|x| x.into());
1149        self
1150    }
1151
1152    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
1153    ///
1154    /// # Example
1155    /// ```ignore,no_run
1156    /// # use google_cloud_storageinsights_v1::model::OperationMetadata;
1157    /// use wkt::Timestamp;
1158    /// let x = OperationMetadata::new().set_end_time(Timestamp::default()/* use setters */);
1159    /// ```
1160    pub fn set_end_time<T>(mut self, v: T) -> Self
1161    where
1162        T: std::convert::Into<wkt::Timestamp>,
1163    {
1164        self.end_time = std::option::Option::Some(v.into());
1165        self
1166    }
1167
1168    /// Sets or clears the value of [end_time][crate::model::OperationMetadata::end_time].
1169    ///
1170    /// # Example
1171    /// ```ignore,no_run
1172    /// # use google_cloud_storageinsights_v1::model::OperationMetadata;
1173    /// use wkt::Timestamp;
1174    /// let x = OperationMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
1175    /// let x = OperationMetadata::new().set_or_clear_end_time(None::<Timestamp>);
1176    /// ```
1177    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
1178    where
1179        T: std::convert::Into<wkt::Timestamp>,
1180    {
1181        self.end_time = v.map(|x| x.into());
1182        self
1183    }
1184
1185    /// Sets the value of [target][crate::model::OperationMetadata::target].
1186    ///
1187    /// # Example
1188    /// ```ignore,no_run
1189    /// # use google_cloud_storageinsights_v1::model::OperationMetadata;
1190    /// let x = OperationMetadata::new().set_target("example");
1191    /// ```
1192    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1193        self.target = v.into();
1194        self
1195    }
1196
1197    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
1198    ///
1199    /// # Example
1200    /// ```ignore,no_run
1201    /// # use google_cloud_storageinsights_v1::model::OperationMetadata;
1202    /// let x = OperationMetadata::new().set_verb("example");
1203    /// ```
1204    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1205        self.verb = v.into();
1206        self
1207    }
1208
1209    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
1210    ///
1211    /// # Example
1212    /// ```ignore,no_run
1213    /// # use google_cloud_storageinsights_v1::model::OperationMetadata;
1214    /// let x = OperationMetadata::new().set_status_message("example");
1215    /// ```
1216    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1217        self.status_message = v.into();
1218        self
1219    }
1220
1221    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
1222    ///
1223    /// # Example
1224    /// ```ignore,no_run
1225    /// # use google_cloud_storageinsights_v1::model::OperationMetadata;
1226    /// let x = OperationMetadata::new().set_requested_cancellation(true);
1227    /// ```
1228    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1229        self.requested_cancellation = v.into();
1230        self
1231    }
1232
1233    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
1234    ///
1235    /// # Example
1236    /// ```ignore,no_run
1237    /// # use google_cloud_storageinsights_v1::model::OperationMetadata;
1238    /// let x = OperationMetadata::new().set_api_version("example");
1239    /// ```
1240    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1241        self.api_version = v.into();
1242        self
1243    }
1244}
1245
1246impl wkt::message::Message for OperationMetadata {
1247    fn typename() -> &'static str {
1248        "type.googleapis.com/google.cloud.storageinsights.v1.OperationMetadata"
1249    }
1250}
1251
1252/// ReportConfig Resource:
1253///
1254/// Options to setup frequency of report generation.
1255#[derive(Clone, Default, PartialEq)]
1256#[non_exhaustive]
1257pub struct FrequencyOptions {
1258    /// Frequency of report generation.
1259    pub frequency: crate::model::frequency_options::Frequency,
1260
1261    /// The date from which report generation should start.
1262    /// UTC time zone.
1263    pub start_date: std::option::Option<google_cloud_type::model::Date>,
1264
1265    /// The date on which report generation should stop (Inclusive).
1266    /// UTC time zone.
1267    pub end_date: std::option::Option<google_cloud_type::model::Date>,
1268
1269    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1270}
1271
1272impl FrequencyOptions {
1273    /// Creates a new default instance.
1274    pub fn new() -> Self {
1275        std::default::Default::default()
1276    }
1277
1278    /// Sets the value of [frequency][crate::model::FrequencyOptions::frequency].
1279    ///
1280    /// # Example
1281    /// ```ignore,no_run
1282    /// # use google_cloud_storageinsights_v1::model::FrequencyOptions;
1283    /// use google_cloud_storageinsights_v1::model::frequency_options::Frequency;
1284    /// let x0 = FrequencyOptions::new().set_frequency(Frequency::Daily);
1285    /// let x1 = FrequencyOptions::new().set_frequency(Frequency::Weekly);
1286    /// ```
1287    pub fn set_frequency<T: std::convert::Into<crate::model::frequency_options::Frequency>>(
1288        mut self,
1289        v: T,
1290    ) -> Self {
1291        self.frequency = v.into();
1292        self
1293    }
1294
1295    /// Sets the value of [start_date][crate::model::FrequencyOptions::start_date].
1296    ///
1297    /// # Example
1298    /// ```ignore,no_run
1299    /// # use google_cloud_storageinsights_v1::model::FrequencyOptions;
1300    /// use google_cloud_type::model::Date;
1301    /// let x = FrequencyOptions::new().set_start_date(Date::default()/* use setters */);
1302    /// ```
1303    pub fn set_start_date<T>(mut self, v: T) -> Self
1304    where
1305        T: std::convert::Into<google_cloud_type::model::Date>,
1306    {
1307        self.start_date = std::option::Option::Some(v.into());
1308        self
1309    }
1310
1311    /// Sets or clears the value of [start_date][crate::model::FrequencyOptions::start_date].
1312    ///
1313    /// # Example
1314    /// ```ignore,no_run
1315    /// # use google_cloud_storageinsights_v1::model::FrequencyOptions;
1316    /// use google_cloud_type::model::Date;
1317    /// let x = FrequencyOptions::new().set_or_clear_start_date(Some(Date::default()/* use setters */));
1318    /// let x = FrequencyOptions::new().set_or_clear_start_date(None::<Date>);
1319    /// ```
1320    pub fn set_or_clear_start_date<T>(mut self, v: std::option::Option<T>) -> Self
1321    where
1322        T: std::convert::Into<google_cloud_type::model::Date>,
1323    {
1324        self.start_date = v.map(|x| x.into());
1325        self
1326    }
1327
1328    /// Sets the value of [end_date][crate::model::FrequencyOptions::end_date].
1329    ///
1330    /// # Example
1331    /// ```ignore,no_run
1332    /// # use google_cloud_storageinsights_v1::model::FrequencyOptions;
1333    /// use google_cloud_type::model::Date;
1334    /// let x = FrequencyOptions::new().set_end_date(Date::default()/* use setters */);
1335    /// ```
1336    pub fn set_end_date<T>(mut self, v: T) -> Self
1337    where
1338        T: std::convert::Into<google_cloud_type::model::Date>,
1339    {
1340        self.end_date = std::option::Option::Some(v.into());
1341        self
1342    }
1343
1344    /// Sets or clears the value of [end_date][crate::model::FrequencyOptions::end_date].
1345    ///
1346    /// # Example
1347    /// ```ignore,no_run
1348    /// # use google_cloud_storageinsights_v1::model::FrequencyOptions;
1349    /// use google_cloud_type::model::Date;
1350    /// let x = FrequencyOptions::new().set_or_clear_end_date(Some(Date::default()/* use setters */));
1351    /// let x = FrequencyOptions::new().set_or_clear_end_date(None::<Date>);
1352    /// ```
1353    pub fn set_or_clear_end_date<T>(mut self, v: std::option::Option<T>) -> Self
1354    where
1355        T: std::convert::Into<google_cloud_type::model::Date>,
1356    {
1357        self.end_date = v.map(|x| x.into());
1358        self
1359    }
1360}
1361
1362impl wkt::message::Message for FrequencyOptions {
1363    fn typename() -> &'static str {
1364        "type.googleapis.com/google.cloud.storageinsights.v1.FrequencyOptions"
1365    }
1366}
1367
1368/// Defines additional types related to [FrequencyOptions].
1369pub mod frequency_options {
1370    #[allow(unused_imports)]
1371    use super::*;
1372
1373    /// This ENUM specifies possible frequencies of report generation.
1374    ///
1375    /// # Working with unknown values
1376    ///
1377    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1378    /// additional enum variants at any time. Adding new variants is not considered
1379    /// a breaking change. Applications should write their code in anticipation of:
1380    ///
1381    /// - New values appearing in future releases of the client library, **and**
1382    /// - New values received dynamically, without application changes.
1383    ///
1384    /// Please consult the [Working with enums] section in the user guide for some
1385    /// guidelines.
1386    ///
1387    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1388    #[derive(Clone, Debug, PartialEq)]
1389    #[non_exhaustive]
1390    pub enum Frequency {
1391        /// Unspecified.
1392        Unspecified,
1393        /// Report will be generated daily.
1394        Daily,
1395        /// Report will be generated weekly.
1396        Weekly,
1397        /// If set, the enum was initialized with an unknown value.
1398        ///
1399        /// Applications can examine the value using [Frequency::value] or
1400        /// [Frequency::name].
1401        UnknownValue(frequency::UnknownValue),
1402    }
1403
1404    #[doc(hidden)]
1405    pub mod frequency {
1406        #[allow(unused_imports)]
1407        use super::*;
1408        #[derive(Clone, Debug, PartialEq)]
1409        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1410    }
1411
1412    impl Frequency {
1413        /// Gets the enum value.
1414        ///
1415        /// Returns `None` if the enum contains an unknown value deserialized from
1416        /// the string representation of enums.
1417        pub fn value(&self) -> std::option::Option<i32> {
1418            match self {
1419                Self::Unspecified => std::option::Option::Some(0),
1420                Self::Daily => std::option::Option::Some(1),
1421                Self::Weekly => std::option::Option::Some(2),
1422                Self::UnknownValue(u) => u.0.value(),
1423            }
1424        }
1425
1426        /// Gets the enum value as a string.
1427        ///
1428        /// Returns `None` if the enum contains an unknown value deserialized from
1429        /// the integer representation of enums.
1430        pub fn name(&self) -> std::option::Option<&str> {
1431            match self {
1432                Self::Unspecified => std::option::Option::Some("FREQUENCY_UNSPECIFIED"),
1433                Self::Daily => std::option::Option::Some("DAILY"),
1434                Self::Weekly => std::option::Option::Some("WEEKLY"),
1435                Self::UnknownValue(u) => u.0.name(),
1436            }
1437        }
1438    }
1439
1440    impl std::default::Default for Frequency {
1441        fn default() -> Self {
1442            use std::convert::From;
1443            Self::from(0)
1444        }
1445    }
1446
1447    impl std::fmt::Display for Frequency {
1448        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1449            wkt::internal::display_enum(f, self.name(), self.value())
1450        }
1451    }
1452
1453    impl std::convert::From<i32> for Frequency {
1454        fn from(value: i32) -> Self {
1455            match value {
1456                0 => Self::Unspecified,
1457                1 => Self::Daily,
1458                2 => Self::Weekly,
1459                _ => Self::UnknownValue(frequency::UnknownValue(
1460                    wkt::internal::UnknownEnumValue::Integer(value),
1461                )),
1462            }
1463        }
1464    }
1465
1466    impl std::convert::From<&str> for Frequency {
1467        fn from(value: &str) -> Self {
1468            use std::string::ToString;
1469            match value {
1470                "FREQUENCY_UNSPECIFIED" => Self::Unspecified,
1471                "DAILY" => Self::Daily,
1472                "WEEKLY" => Self::Weekly,
1473                _ => Self::UnknownValue(frequency::UnknownValue(
1474                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1475                )),
1476            }
1477        }
1478    }
1479
1480    impl serde::ser::Serialize for Frequency {
1481        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1482        where
1483            S: serde::Serializer,
1484        {
1485            match self {
1486                Self::Unspecified => serializer.serialize_i32(0),
1487                Self::Daily => serializer.serialize_i32(1),
1488                Self::Weekly => serializer.serialize_i32(2),
1489                Self::UnknownValue(u) => u.0.serialize(serializer),
1490            }
1491        }
1492    }
1493
1494    impl<'de> serde::de::Deserialize<'de> for Frequency {
1495        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1496        where
1497            D: serde::Deserializer<'de>,
1498        {
1499            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Frequency>::new(
1500                ".google.cloud.storageinsights.v1.FrequencyOptions.Frequency",
1501            ))
1502        }
1503    }
1504}
1505
1506/// Options to configure CSV formatted reports.
1507#[derive(Clone, Default, PartialEq)]
1508#[non_exhaustive]
1509pub struct CSVOptions {
1510    /// Record separator characters in CSV.
1511    pub record_separator: std::string::String,
1512
1513    /// Delimiter characters in CSV.
1514    pub delimiter: std::string::String,
1515
1516    /// If set, will include a header row in the CSV report.
1517    pub header_required: bool,
1518
1519    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1520}
1521
1522impl CSVOptions {
1523    /// Creates a new default instance.
1524    pub fn new() -> Self {
1525        std::default::Default::default()
1526    }
1527
1528    /// Sets the value of [record_separator][crate::model::CSVOptions::record_separator].
1529    ///
1530    /// # Example
1531    /// ```ignore,no_run
1532    /// # use google_cloud_storageinsights_v1::model::CSVOptions;
1533    /// let x = CSVOptions::new().set_record_separator("example");
1534    /// ```
1535    pub fn set_record_separator<T: std::convert::Into<std::string::String>>(
1536        mut self,
1537        v: T,
1538    ) -> Self {
1539        self.record_separator = v.into();
1540        self
1541    }
1542
1543    /// Sets the value of [delimiter][crate::model::CSVOptions::delimiter].
1544    ///
1545    /// # Example
1546    /// ```ignore,no_run
1547    /// # use google_cloud_storageinsights_v1::model::CSVOptions;
1548    /// let x = CSVOptions::new().set_delimiter("example");
1549    /// ```
1550    pub fn set_delimiter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1551        self.delimiter = v.into();
1552        self
1553    }
1554
1555    /// Sets the value of [header_required][crate::model::CSVOptions::header_required].
1556    ///
1557    /// # Example
1558    /// ```ignore,no_run
1559    /// # use google_cloud_storageinsights_v1::model::CSVOptions;
1560    /// let x = CSVOptions::new().set_header_required(true);
1561    /// ```
1562    pub fn set_header_required<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1563        self.header_required = v.into();
1564        self
1565    }
1566}
1567
1568impl wkt::message::Message for CSVOptions {
1569    fn typename() -> &'static str {
1570        "type.googleapis.com/google.cloud.storageinsights.v1.CSVOptions"
1571    }
1572}
1573
1574/// Options to configure Parquet formatted reports.
1575#[derive(Clone, Default, PartialEq)]
1576#[non_exhaustive]
1577pub struct ParquetOptions {
1578    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1579}
1580
1581impl ParquetOptions {
1582    /// Creates a new default instance.
1583    pub fn new() -> Self {
1584        std::default::Default::default()
1585    }
1586}
1587
1588impl wkt::message::Message for ParquetOptions {
1589    fn typename() -> &'static str {
1590        "type.googleapis.com/google.cloud.storageinsights.v1.ParquetOptions"
1591    }
1592}
1593
1594/// Options to filter data on storage systems.
1595/// Next ID: 2
1596#[derive(Clone, Default, PartialEq)]
1597#[non_exhaustive]
1598pub struct CloudStorageFilters {
1599    /// Bucket for which the report will be generated.
1600    pub bucket: std::string::String,
1601
1602    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1603}
1604
1605impl CloudStorageFilters {
1606    /// Creates a new default instance.
1607    pub fn new() -> Self {
1608        std::default::Default::default()
1609    }
1610
1611    /// Sets the value of [bucket][crate::model::CloudStorageFilters::bucket].
1612    ///
1613    /// # Example
1614    /// ```ignore,no_run
1615    /// # use google_cloud_storageinsights_v1::model::CloudStorageFilters;
1616    /// let x = CloudStorageFilters::new().set_bucket("example");
1617    /// ```
1618    pub fn set_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1619        self.bucket = v.into();
1620        self
1621    }
1622}
1623
1624impl wkt::message::Message for CloudStorageFilters {
1625    fn typename() -> &'static str {
1626        "type.googleapis.com/google.cloud.storageinsights.v1.CloudStorageFilters"
1627    }
1628}
1629
1630/// Options to store reports in storage systems.
1631/// Next ID: 3
1632#[derive(Clone, Default, PartialEq)]
1633#[non_exhaustive]
1634pub struct CloudStorageDestinationOptions {
1635    /// Destination bucket.
1636    pub bucket: std::string::String,
1637
1638    /// Destination path is the path in the bucket where the report should be
1639    /// generated.
1640    pub destination_path: std::string::String,
1641
1642    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1643}
1644
1645impl CloudStorageDestinationOptions {
1646    /// Creates a new default instance.
1647    pub fn new() -> Self {
1648        std::default::Default::default()
1649    }
1650
1651    /// Sets the value of [bucket][crate::model::CloudStorageDestinationOptions::bucket].
1652    ///
1653    /// # Example
1654    /// ```ignore,no_run
1655    /// # use google_cloud_storageinsights_v1::model::CloudStorageDestinationOptions;
1656    /// let x = CloudStorageDestinationOptions::new().set_bucket("example");
1657    /// ```
1658    pub fn set_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1659        self.bucket = v.into();
1660        self
1661    }
1662
1663    /// Sets the value of [destination_path][crate::model::CloudStorageDestinationOptions::destination_path].
1664    ///
1665    /// # Example
1666    /// ```ignore,no_run
1667    /// # use google_cloud_storageinsights_v1::model::CloudStorageDestinationOptions;
1668    /// let x = CloudStorageDestinationOptions::new().set_destination_path("example");
1669    /// ```
1670    pub fn set_destination_path<T: std::convert::Into<std::string::String>>(
1671        mut self,
1672        v: T,
1673    ) -> Self {
1674        self.destination_path = v.into();
1675        self
1676    }
1677}
1678
1679impl wkt::message::Message for CloudStorageDestinationOptions {
1680    fn typename() -> &'static str {
1681        "type.googleapis.com/google.cloud.storageinsights.v1.CloudStorageDestinationOptions"
1682    }
1683}
1684
1685/// Report specification for exporting object metadata.
1686/// Next ID: 4
1687#[derive(Clone, Default, PartialEq)]
1688#[non_exhaustive]
1689pub struct ObjectMetadataReportOptions {
1690    /// Metadata fields to be included in the report.
1691    pub metadata_fields: std::vec::Vec<std::string::String>,
1692
1693    /// Filter options for storage systems.
1694    pub filter: std::option::Option<crate::model::object_metadata_report_options::Filter>,
1695
1696    /// Options on destination for storage systems.
1697    pub destination_options:
1698        std::option::Option<crate::model::object_metadata_report_options::DestinationOptions>,
1699
1700    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1701}
1702
1703impl ObjectMetadataReportOptions {
1704    /// Creates a new default instance.
1705    pub fn new() -> Self {
1706        std::default::Default::default()
1707    }
1708
1709    /// Sets the value of [metadata_fields][crate::model::ObjectMetadataReportOptions::metadata_fields].
1710    ///
1711    /// # Example
1712    /// ```ignore,no_run
1713    /// # use google_cloud_storageinsights_v1::model::ObjectMetadataReportOptions;
1714    /// let x = ObjectMetadataReportOptions::new().set_metadata_fields(["a", "b", "c"]);
1715    /// ```
1716    pub fn set_metadata_fields<T, V>(mut self, v: T) -> Self
1717    where
1718        T: std::iter::IntoIterator<Item = V>,
1719        V: std::convert::Into<std::string::String>,
1720    {
1721        use std::iter::Iterator;
1722        self.metadata_fields = v.into_iter().map(|i| i.into()).collect();
1723        self
1724    }
1725
1726    /// Sets the value of [filter][crate::model::ObjectMetadataReportOptions::filter].
1727    ///
1728    /// Note that all the setters affecting `filter` are mutually
1729    /// exclusive.
1730    ///
1731    /// # Example
1732    /// ```ignore,no_run
1733    /// # use google_cloud_storageinsights_v1::model::ObjectMetadataReportOptions;
1734    /// use google_cloud_storageinsights_v1::model::CloudStorageFilters;
1735    /// let x = ObjectMetadataReportOptions::new().set_filter(Some(
1736    ///     google_cloud_storageinsights_v1::model::object_metadata_report_options::Filter::StorageFilters(CloudStorageFilters::default().into())));
1737    /// ```
1738    pub fn set_filter<
1739        T: std::convert::Into<
1740                std::option::Option<crate::model::object_metadata_report_options::Filter>,
1741            >,
1742    >(
1743        mut self,
1744        v: T,
1745    ) -> Self {
1746        self.filter = v.into();
1747        self
1748    }
1749
1750    /// The value of [filter][crate::model::ObjectMetadataReportOptions::filter]
1751    /// if it holds a `StorageFilters`, `None` if the field is not set or
1752    /// holds a different branch.
1753    pub fn storage_filters(
1754        &self,
1755    ) -> std::option::Option<&std::boxed::Box<crate::model::CloudStorageFilters>> {
1756        #[allow(unreachable_patterns)]
1757        self.filter.as_ref().and_then(|v| match v {
1758            crate::model::object_metadata_report_options::Filter::StorageFilters(v) => {
1759                std::option::Option::Some(v)
1760            }
1761            _ => std::option::Option::None,
1762        })
1763    }
1764
1765    /// Sets the value of [filter][crate::model::ObjectMetadataReportOptions::filter]
1766    /// to hold a `StorageFilters`.
1767    ///
1768    /// Note that all the setters affecting `filter` are
1769    /// mutually exclusive.
1770    ///
1771    /// # Example
1772    /// ```ignore,no_run
1773    /// # use google_cloud_storageinsights_v1::model::ObjectMetadataReportOptions;
1774    /// use google_cloud_storageinsights_v1::model::CloudStorageFilters;
1775    /// let x = ObjectMetadataReportOptions::new().set_storage_filters(CloudStorageFilters::default()/* use setters */);
1776    /// assert!(x.storage_filters().is_some());
1777    /// ```
1778    pub fn set_storage_filters<
1779        T: std::convert::Into<std::boxed::Box<crate::model::CloudStorageFilters>>,
1780    >(
1781        mut self,
1782        v: T,
1783    ) -> Self {
1784        self.filter = std::option::Option::Some(
1785            crate::model::object_metadata_report_options::Filter::StorageFilters(v.into()),
1786        );
1787        self
1788    }
1789
1790    /// Sets the value of [destination_options][crate::model::ObjectMetadataReportOptions::destination_options].
1791    ///
1792    /// Note that all the setters affecting `destination_options` are mutually
1793    /// exclusive.
1794    ///
1795    /// # Example
1796    /// ```ignore,no_run
1797    /// # use google_cloud_storageinsights_v1::model::ObjectMetadataReportOptions;
1798    /// use google_cloud_storageinsights_v1::model::CloudStorageDestinationOptions;
1799    /// let x = ObjectMetadataReportOptions::new().set_destination_options(Some(
1800    ///     google_cloud_storageinsights_v1::model::object_metadata_report_options::DestinationOptions::StorageDestinationOptions(CloudStorageDestinationOptions::default().into())));
1801    /// ```
1802    pub fn set_destination_options<
1803        T: std::convert::Into<
1804                std::option::Option<
1805                    crate::model::object_metadata_report_options::DestinationOptions,
1806                >,
1807            >,
1808    >(
1809        mut self,
1810        v: T,
1811    ) -> Self {
1812        self.destination_options = v.into();
1813        self
1814    }
1815
1816    /// The value of [destination_options][crate::model::ObjectMetadataReportOptions::destination_options]
1817    /// if it holds a `StorageDestinationOptions`, `None` if the field is not set or
1818    /// holds a different branch.
1819    pub fn storage_destination_options(
1820        &self,
1821    ) -> std::option::Option<&std::boxed::Box<crate::model::CloudStorageDestinationOptions>> {
1822        #[allow(unreachable_patterns)]
1823        self.destination_options.as_ref().and_then(|v| match v {
1824            crate::model::object_metadata_report_options::DestinationOptions::StorageDestinationOptions(v) => std::option::Option::Some(v),
1825            _ => std::option::Option::None,
1826        })
1827    }
1828
1829    /// Sets the value of [destination_options][crate::model::ObjectMetadataReportOptions::destination_options]
1830    /// to hold a `StorageDestinationOptions`.
1831    ///
1832    /// Note that all the setters affecting `destination_options` are
1833    /// mutually exclusive.
1834    ///
1835    /// # Example
1836    /// ```ignore,no_run
1837    /// # use google_cloud_storageinsights_v1::model::ObjectMetadataReportOptions;
1838    /// use google_cloud_storageinsights_v1::model::CloudStorageDestinationOptions;
1839    /// let x = ObjectMetadataReportOptions::new().set_storage_destination_options(CloudStorageDestinationOptions::default()/* use setters */);
1840    /// assert!(x.storage_destination_options().is_some());
1841    /// ```
1842    pub fn set_storage_destination_options<
1843        T: std::convert::Into<std::boxed::Box<crate::model::CloudStorageDestinationOptions>>,
1844    >(
1845        mut self,
1846        v: T,
1847    ) -> Self {
1848        self.destination_options = std::option::Option::Some(
1849            crate::model::object_metadata_report_options::DestinationOptions::StorageDestinationOptions(
1850                v.into()
1851            )
1852        );
1853        self
1854    }
1855}
1856
1857impl wkt::message::Message for ObjectMetadataReportOptions {
1858    fn typename() -> &'static str {
1859        "type.googleapis.com/google.cloud.storageinsights.v1.ObjectMetadataReportOptions"
1860    }
1861}
1862
1863/// Defines additional types related to [ObjectMetadataReportOptions].
1864pub mod object_metadata_report_options {
1865    #[allow(unused_imports)]
1866    use super::*;
1867
1868    /// Filter options for storage systems.
1869    #[derive(Clone, Debug, PartialEq)]
1870    #[non_exhaustive]
1871    pub enum Filter {
1872        /// Cloud Storage as the storage system.
1873        StorageFilters(std::boxed::Box<crate::model::CloudStorageFilters>),
1874    }
1875
1876    /// Options on destination for storage systems.
1877    #[derive(Clone, Debug, PartialEq)]
1878    #[non_exhaustive]
1879    pub enum DestinationOptions {
1880        /// Cloud Storage as the storage system.
1881        StorageDestinationOptions(std::boxed::Box<crate::model::CloudStorageDestinationOptions>),
1882    }
1883}
1884
1885/// Message describing ReportConfig object. ReportConfig is the configuration to
1886/// generate reports.
1887/// See
1888/// <https://cloud.google.com/storage/docs/insights/using-inventory-reports#create-config-rest>
1889/// for more details on how to set various fields.
1890/// Next ID: 12
1891#[derive(Clone, Default, PartialEq)]
1892#[non_exhaustive]
1893pub struct ReportConfig {
1894    /// name of resource. It will be of form
1895    /// projects/\<project\>/locations/\<location\>/reportConfigs/\<report-config-id\>.
1896    pub name: std::string::String,
1897
1898    /// Output only. [Output only] Create time stamp
1899    pub create_time: std::option::Option<wkt::Timestamp>,
1900
1901    /// Output only. [Output only] Update time stamp
1902    pub update_time: std::option::Option<wkt::Timestamp>,
1903
1904    /// The frequency of report generation.
1905    pub frequency_options: std::option::Option<crate::model::FrequencyOptions>,
1906
1907    /// Labels as key value pairs
1908    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1909
1910    /// User provided display name which can be empty and limited to 256 characters
1911    /// that is editable.
1912    pub display_name: std::string::String,
1913
1914    /// Format in which report will be published.
1915    pub report_format: std::option::Option<crate::model::report_config::ReportFormat>,
1916
1917    /// Configuration options for report contents.
1918    pub report_kind: std::option::Option<crate::model::report_config::ReportKind>,
1919
1920    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1921}
1922
1923impl ReportConfig {
1924    /// Creates a new default instance.
1925    pub fn new() -> Self {
1926        std::default::Default::default()
1927    }
1928
1929    /// Sets the value of [name][crate::model::ReportConfig::name].
1930    ///
1931    /// # Example
1932    /// ```ignore,no_run
1933    /// # use google_cloud_storageinsights_v1::model::ReportConfig;
1934    /// let x = ReportConfig::new().set_name("example");
1935    /// ```
1936    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1937        self.name = v.into();
1938        self
1939    }
1940
1941    /// Sets the value of [create_time][crate::model::ReportConfig::create_time].
1942    ///
1943    /// # Example
1944    /// ```ignore,no_run
1945    /// # use google_cloud_storageinsights_v1::model::ReportConfig;
1946    /// use wkt::Timestamp;
1947    /// let x = ReportConfig::new().set_create_time(Timestamp::default()/* use setters */);
1948    /// ```
1949    pub fn set_create_time<T>(mut self, v: T) -> Self
1950    where
1951        T: std::convert::Into<wkt::Timestamp>,
1952    {
1953        self.create_time = std::option::Option::Some(v.into());
1954        self
1955    }
1956
1957    /// Sets or clears the value of [create_time][crate::model::ReportConfig::create_time].
1958    ///
1959    /// # Example
1960    /// ```ignore,no_run
1961    /// # use google_cloud_storageinsights_v1::model::ReportConfig;
1962    /// use wkt::Timestamp;
1963    /// let x = ReportConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
1964    /// let x = ReportConfig::new().set_or_clear_create_time(None::<Timestamp>);
1965    /// ```
1966    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1967    where
1968        T: std::convert::Into<wkt::Timestamp>,
1969    {
1970        self.create_time = v.map(|x| x.into());
1971        self
1972    }
1973
1974    /// Sets the value of [update_time][crate::model::ReportConfig::update_time].
1975    ///
1976    /// # Example
1977    /// ```ignore,no_run
1978    /// # use google_cloud_storageinsights_v1::model::ReportConfig;
1979    /// use wkt::Timestamp;
1980    /// let x = ReportConfig::new().set_update_time(Timestamp::default()/* use setters */);
1981    /// ```
1982    pub fn set_update_time<T>(mut self, v: T) -> Self
1983    where
1984        T: std::convert::Into<wkt::Timestamp>,
1985    {
1986        self.update_time = std::option::Option::Some(v.into());
1987        self
1988    }
1989
1990    /// Sets or clears the value of [update_time][crate::model::ReportConfig::update_time].
1991    ///
1992    /// # Example
1993    /// ```ignore,no_run
1994    /// # use google_cloud_storageinsights_v1::model::ReportConfig;
1995    /// use wkt::Timestamp;
1996    /// let x = ReportConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
1997    /// let x = ReportConfig::new().set_or_clear_update_time(None::<Timestamp>);
1998    /// ```
1999    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
2000    where
2001        T: std::convert::Into<wkt::Timestamp>,
2002    {
2003        self.update_time = v.map(|x| x.into());
2004        self
2005    }
2006
2007    /// Sets the value of [frequency_options][crate::model::ReportConfig::frequency_options].
2008    ///
2009    /// # Example
2010    /// ```ignore,no_run
2011    /// # use google_cloud_storageinsights_v1::model::ReportConfig;
2012    /// use google_cloud_storageinsights_v1::model::FrequencyOptions;
2013    /// let x = ReportConfig::new().set_frequency_options(FrequencyOptions::default()/* use setters */);
2014    /// ```
2015    pub fn set_frequency_options<T>(mut self, v: T) -> Self
2016    where
2017        T: std::convert::Into<crate::model::FrequencyOptions>,
2018    {
2019        self.frequency_options = std::option::Option::Some(v.into());
2020        self
2021    }
2022
2023    /// Sets or clears the value of [frequency_options][crate::model::ReportConfig::frequency_options].
2024    ///
2025    /// # Example
2026    /// ```ignore,no_run
2027    /// # use google_cloud_storageinsights_v1::model::ReportConfig;
2028    /// use google_cloud_storageinsights_v1::model::FrequencyOptions;
2029    /// let x = ReportConfig::new().set_or_clear_frequency_options(Some(FrequencyOptions::default()/* use setters */));
2030    /// let x = ReportConfig::new().set_or_clear_frequency_options(None::<FrequencyOptions>);
2031    /// ```
2032    pub fn set_or_clear_frequency_options<T>(mut self, v: std::option::Option<T>) -> Self
2033    where
2034        T: std::convert::Into<crate::model::FrequencyOptions>,
2035    {
2036        self.frequency_options = v.map(|x| x.into());
2037        self
2038    }
2039
2040    /// Sets the value of [labels][crate::model::ReportConfig::labels].
2041    ///
2042    /// # Example
2043    /// ```ignore,no_run
2044    /// # use google_cloud_storageinsights_v1::model::ReportConfig;
2045    /// let x = ReportConfig::new().set_labels([
2046    ///     ("key0", "abc"),
2047    ///     ("key1", "xyz"),
2048    /// ]);
2049    /// ```
2050    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2051    where
2052        T: std::iter::IntoIterator<Item = (K, V)>,
2053        K: std::convert::Into<std::string::String>,
2054        V: std::convert::Into<std::string::String>,
2055    {
2056        use std::iter::Iterator;
2057        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2058        self
2059    }
2060
2061    /// Sets the value of [display_name][crate::model::ReportConfig::display_name].
2062    ///
2063    /// # Example
2064    /// ```ignore,no_run
2065    /// # use google_cloud_storageinsights_v1::model::ReportConfig;
2066    /// let x = ReportConfig::new().set_display_name("example");
2067    /// ```
2068    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2069        self.display_name = v.into();
2070        self
2071    }
2072
2073    /// Sets the value of [report_format][crate::model::ReportConfig::report_format].
2074    ///
2075    /// Note that all the setters affecting `report_format` are mutually
2076    /// exclusive.
2077    ///
2078    /// # Example
2079    /// ```ignore,no_run
2080    /// # use google_cloud_storageinsights_v1::model::ReportConfig;
2081    /// use google_cloud_storageinsights_v1::model::CSVOptions;
2082    /// let x = ReportConfig::new().set_report_format(Some(
2083    ///     google_cloud_storageinsights_v1::model::report_config::ReportFormat::CsvOptions(CSVOptions::default().into())));
2084    /// ```
2085    pub fn set_report_format<
2086        T: std::convert::Into<std::option::Option<crate::model::report_config::ReportFormat>>,
2087    >(
2088        mut self,
2089        v: T,
2090    ) -> Self {
2091        self.report_format = v.into();
2092        self
2093    }
2094
2095    /// The value of [report_format][crate::model::ReportConfig::report_format]
2096    /// if it holds a `CsvOptions`, `None` if the field is not set or
2097    /// holds a different branch.
2098    pub fn csv_options(&self) -> std::option::Option<&std::boxed::Box<crate::model::CSVOptions>> {
2099        #[allow(unreachable_patterns)]
2100        self.report_format.as_ref().and_then(|v| match v {
2101            crate::model::report_config::ReportFormat::CsvOptions(v) => {
2102                std::option::Option::Some(v)
2103            }
2104            _ => std::option::Option::None,
2105        })
2106    }
2107
2108    /// Sets the value of [report_format][crate::model::ReportConfig::report_format]
2109    /// to hold a `CsvOptions`.
2110    ///
2111    /// Note that all the setters affecting `report_format` are
2112    /// mutually exclusive.
2113    ///
2114    /// # Example
2115    /// ```ignore,no_run
2116    /// # use google_cloud_storageinsights_v1::model::ReportConfig;
2117    /// use google_cloud_storageinsights_v1::model::CSVOptions;
2118    /// let x = ReportConfig::new().set_csv_options(CSVOptions::default()/* use setters */);
2119    /// assert!(x.csv_options().is_some());
2120    /// assert!(x.parquet_options().is_none());
2121    /// ```
2122    pub fn set_csv_options<T: std::convert::Into<std::boxed::Box<crate::model::CSVOptions>>>(
2123        mut self,
2124        v: T,
2125    ) -> Self {
2126        self.report_format = std::option::Option::Some(
2127            crate::model::report_config::ReportFormat::CsvOptions(v.into()),
2128        );
2129        self
2130    }
2131
2132    /// The value of [report_format][crate::model::ReportConfig::report_format]
2133    /// if it holds a `ParquetOptions`, `None` if the field is not set or
2134    /// holds a different branch.
2135    pub fn parquet_options(
2136        &self,
2137    ) -> std::option::Option<&std::boxed::Box<crate::model::ParquetOptions>> {
2138        #[allow(unreachable_patterns)]
2139        self.report_format.as_ref().and_then(|v| match v {
2140            crate::model::report_config::ReportFormat::ParquetOptions(v) => {
2141                std::option::Option::Some(v)
2142            }
2143            _ => std::option::Option::None,
2144        })
2145    }
2146
2147    /// Sets the value of [report_format][crate::model::ReportConfig::report_format]
2148    /// to hold a `ParquetOptions`.
2149    ///
2150    /// Note that all the setters affecting `report_format` are
2151    /// mutually exclusive.
2152    ///
2153    /// # Example
2154    /// ```ignore,no_run
2155    /// # use google_cloud_storageinsights_v1::model::ReportConfig;
2156    /// use google_cloud_storageinsights_v1::model::ParquetOptions;
2157    /// let x = ReportConfig::new().set_parquet_options(ParquetOptions::default()/* use setters */);
2158    /// assert!(x.parquet_options().is_some());
2159    /// assert!(x.csv_options().is_none());
2160    /// ```
2161    pub fn set_parquet_options<
2162        T: std::convert::Into<std::boxed::Box<crate::model::ParquetOptions>>,
2163    >(
2164        mut self,
2165        v: T,
2166    ) -> Self {
2167        self.report_format = std::option::Option::Some(
2168            crate::model::report_config::ReportFormat::ParquetOptions(v.into()),
2169        );
2170        self
2171    }
2172
2173    /// Sets the value of [report_kind][crate::model::ReportConfig::report_kind].
2174    ///
2175    /// Note that all the setters affecting `report_kind` are mutually
2176    /// exclusive.
2177    ///
2178    /// # Example
2179    /// ```ignore,no_run
2180    /// # use google_cloud_storageinsights_v1::model::ReportConfig;
2181    /// use google_cloud_storageinsights_v1::model::ObjectMetadataReportOptions;
2182    /// let x = ReportConfig::new().set_report_kind(Some(
2183    ///     google_cloud_storageinsights_v1::model::report_config::ReportKind::ObjectMetadataReportOptions(ObjectMetadataReportOptions::default().into())));
2184    /// ```
2185    pub fn set_report_kind<
2186        T: std::convert::Into<std::option::Option<crate::model::report_config::ReportKind>>,
2187    >(
2188        mut self,
2189        v: T,
2190    ) -> Self {
2191        self.report_kind = v.into();
2192        self
2193    }
2194
2195    /// The value of [report_kind][crate::model::ReportConfig::report_kind]
2196    /// if it holds a `ObjectMetadataReportOptions`, `None` if the field is not set or
2197    /// holds a different branch.
2198    pub fn object_metadata_report_options(
2199        &self,
2200    ) -> std::option::Option<&std::boxed::Box<crate::model::ObjectMetadataReportOptions>> {
2201        #[allow(unreachable_patterns)]
2202        self.report_kind.as_ref().and_then(|v| match v {
2203            crate::model::report_config::ReportKind::ObjectMetadataReportOptions(v) => {
2204                std::option::Option::Some(v)
2205            }
2206            _ => std::option::Option::None,
2207        })
2208    }
2209
2210    /// Sets the value of [report_kind][crate::model::ReportConfig::report_kind]
2211    /// to hold a `ObjectMetadataReportOptions`.
2212    ///
2213    /// Note that all the setters affecting `report_kind` are
2214    /// mutually exclusive.
2215    ///
2216    /// # Example
2217    /// ```ignore,no_run
2218    /// # use google_cloud_storageinsights_v1::model::ReportConfig;
2219    /// use google_cloud_storageinsights_v1::model::ObjectMetadataReportOptions;
2220    /// let x = ReportConfig::new().set_object_metadata_report_options(ObjectMetadataReportOptions::default()/* use setters */);
2221    /// assert!(x.object_metadata_report_options().is_some());
2222    /// ```
2223    pub fn set_object_metadata_report_options<
2224        T: std::convert::Into<std::boxed::Box<crate::model::ObjectMetadataReportOptions>>,
2225    >(
2226        mut self,
2227        v: T,
2228    ) -> Self {
2229        self.report_kind = std::option::Option::Some(
2230            crate::model::report_config::ReportKind::ObjectMetadataReportOptions(v.into()),
2231        );
2232        self
2233    }
2234}
2235
2236impl wkt::message::Message for ReportConfig {
2237    fn typename() -> &'static str {
2238        "type.googleapis.com/google.cloud.storageinsights.v1.ReportConfig"
2239    }
2240}
2241
2242/// Defines additional types related to [ReportConfig].
2243pub mod report_config {
2244    #[allow(unused_imports)]
2245    use super::*;
2246
2247    /// Format in which report will be published.
2248    #[derive(Clone, Debug, PartialEq)]
2249    #[non_exhaustive]
2250    pub enum ReportFormat {
2251        /// Options for CSV formatted reports.
2252        CsvOptions(std::boxed::Box<crate::model::CSVOptions>),
2253        /// Options for Parquet formatted reports.
2254        ParquetOptions(std::boxed::Box<crate::model::ParquetOptions>),
2255    }
2256
2257    /// Configuration options for report contents.
2258    #[derive(Clone, Debug, PartialEq)]
2259    #[non_exhaustive]
2260    pub enum ReportKind {
2261        /// Report for exporting object metadata.
2262        ObjectMetadataReportOptions(std::boxed::Box<crate::model::ObjectMetadataReportOptions>),
2263    }
2264}
2265
2266/// Identity lets the user provide the type of identity to use, and outputs
2267/// the identity string that can be used for IAM policy changes.
2268#[derive(Clone, Default, PartialEq)]
2269#[non_exhaustive]
2270pub struct Identity {
2271    /// Output only. Name of the identity.
2272    pub name: std::string::String,
2273
2274    /// Type of identity to use for the datasetConfig.
2275    pub r#type: crate::model::identity::IdentityType,
2276
2277    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2278}
2279
2280impl Identity {
2281    /// Creates a new default instance.
2282    pub fn new() -> Self {
2283        std::default::Default::default()
2284    }
2285
2286    /// Sets the value of [name][crate::model::Identity::name].
2287    ///
2288    /// # Example
2289    /// ```ignore,no_run
2290    /// # use google_cloud_storageinsights_v1::model::Identity;
2291    /// let x = Identity::new().set_name("example");
2292    /// ```
2293    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2294        self.name = v.into();
2295        self
2296    }
2297
2298    /// Sets the value of [r#type][crate::model::Identity::type].
2299    ///
2300    /// # Example
2301    /// ```ignore,no_run
2302    /// # use google_cloud_storageinsights_v1::model::Identity;
2303    /// use google_cloud_storageinsights_v1::model::identity::IdentityType;
2304    /// let x0 = Identity::new().set_type(IdentityType::PerConfig);
2305    /// let x1 = Identity::new().set_type(IdentityType::PerProject);
2306    /// ```
2307    pub fn set_type<T: std::convert::Into<crate::model::identity::IdentityType>>(
2308        mut self,
2309        v: T,
2310    ) -> Self {
2311        self.r#type = v.into();
2312        self
2313    }
2314}
2315
2316impl wkt::message::Message for Identity {
2317    fn typename() -> &'static str {
2318        "type.googleapis.com/google.cloud.storageinsights.v1.Identity"
2319    }
2320}
2321
2322/// Defines additional types related to [Identity].
2323pub mod identity {
2324    #[allow(unused_imports)]
2325    use super::*;
2326
2327    /// Type of service account to use for the dataset configuration.
2328    ///
2329    /// # Working with unknown values
2330    ///
2331    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2332    /// additional enum variants at any time. Adding new variants is not considered
2333    /// a breaking change. Applications should write their code in anticipation of:
2334    ///
2335    /// - New values appearing in future releases of the client library, **and**
2336    /// - New values received dynamically, without application changes.
2337    ///
2338    /// Please consult the [Working with enums] section in the user guide for some
2339    /// guidelines.
2340    ///
2341    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
2342    #[derive(Clone, Debug, PartialEq)]
2343    #[non_exhaustive]
2344    pub enum IdentityType {
2345        /// Default is unspecified and should not be used.
2346        Unspecified,
2347        /// Google managed service account per resource.
2348        PerConfig,
2349        /// Google managed service account per project.
2350        PerProject,
2351        /// If set, the enum was initialized with an unknown value.
2352        ///
2353        /// Applications can examine the value using [IdentityType::value] or
2354        /// [IdentityType::name].
2355        UnknownValue(identity_type::UnknownValue),
2356    }
2357
2358    #[doc(hidden)]
2359    pub mod identity_type {
2360        #[allow(unused_imports)]
2361        use super::*;
2362        #[derive(Clone, Debug, PartialEq)]
2363        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2364    }
2365
2366    impl IdentityType {
2367        /// Gets the enum value.
2368        ///
2369        /// Returns `None` if the enum contains an unknown value deserialized from
2370        /// the string representation of enums.
2371        pub fn value(&self) -> std::option::Option<i32> {
2372            match self {
2373                Self::Unspecified => std::option::Option::Some(0),
2374                Self::PerConfig => std::option::Option::Some(1),
2375                Self::PerProject => std::option::Option::Some(2),
2376                Self::UnknownValue(u) => u.0.value(),
2377            }
2378        }
2379
2380        /// Gets the enum value as a string.
2381        ///
2382        /// Returns `None` if the enum contains an unknown value deserialized from
2383        /// the integer representation of enums.
2384        pub fn name(&self) -> std::option::Option<&str> {
2385            match self {
2386                Self::Unspecified => std::option::Option::Some("IDENTITY_TYPE_UNSPECIFIED"),
2387                Self::PerConfig => std::option::Option::Some("IDENTITY_TYPE_PER_CONFIG"),
2388                Self::PerProject => std::option::Option::Some("IDENTITY_TYPE_PER_PROJECT"),
2389                Self::UnknownValue(u) => u.0.name(),
2390            }
2391        }
2392    }
2393
2394    impl std::default::Default for IdentityType {
2395        fn default() -> Self {
2396            use std::convert::From;
2397            Self::from(0)
2398        }
2399    }
2400
2401    impl std::fmt::Display for IdentityType {
2402        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2403            wkt::internal::display_enum(f, self.name(), self.value())
2404        }
2405    }
2406
2407    impl std::convert::From<i32> for IdentityType {
2408        fn from(value: i32) -> Self {
2409            match value {
2410                0 => Self::Unspecified,
2411                1 => Self::PerConfig,
2412                2 => Self::PerProject,
2413                _ => Self::UnknownValue(identity_type::UnknownValue(
2414                    wkt::internal::UnknownEnumValue::Integer(value),
2415                )),
2416            }
2417        }
2418    }
2419
2420    impl std::convert::From<&str> for IdentityType {
2421        fn from(value: &str) -> Self {
2422            use std::string::ToString;
2423            match value {
2424                "IDENTITY_TYPE_UNSPECIFIED" => Self::Unspecified,
2425                "IDENTITY_TYPE_PER_CONFIG" => Self::PerConfig,
2426                "IDENTITY_TYPE_PER_PROJECT" => Self::PerProject,
2427                _ => Self::UnknownValue(identity_type::UnknownValue(
2428                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2429                )),
2430            }
2431        }
2432    }
2433
2434    impl serde::ser::Serialize for IdentityType {
2435        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2436        where
2437            S: serde::Serializer,
2438        {
2439            match self {
2440                Self::Unspecified => serializer.serialize_i32(0),
2441                Self::PerConfig => serializer.serialize_i32(1),
2442                Self::PerProject => serializer.serialize_i32(2),
2443                Self::UnknownValue(u) => u.0.serialize(serializer),
2444            }
2445        }
2446    }
2447
2448    impl<'de> serde::de::Deserialize<'de> for IdentityType {
2449        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2450        where
2451            D: serde::Deserializer<'de>,
2452        {
2453            deserializer.deserialize_any(wkt::internal::EnumVisitor::<IdentityType>::new(
2454                ".google.cloud.storageinsights.v1.Identity.IdentityType",
2455            ))
2456        }
2457    }
2458}
2459
2460/// Message describing the dataset configuration properties. For more
2461/// information, see [Dataset configuration
2462/// properties](https://cloud.google.com/storage/docs/insights/datasets#dataset-config).
2463#[derive(Clone, Default, PartialEq)]
2464#[non_exhaustive]
2465pub struct DatasetConfig {
2466    /// Identifier. name of resource
2467    pub name: std::string::String,
2468
2469    /// Output only. The UTC time at which the dataset configuration was created.
2470    /// This is auto-populated.
2471    pub create_time: std::option::Option<wkt::Timestamp>,
2472
2473    /// Output only. The UTC time at which the dataset configuration was last
2474    /// updated. This is auto-populated.
2475    pub update_time: std::option::Option<wkt::Timestamp>,
2476
2477    /// Labels as key value pairs
2478    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
2479
2480    /// Output only. System generated unique identifier for the resource.
2481    pub uid: std::string::String,
2482
2483    /// Optional. Organization resource ID that the source projects should belong
2484    /// to. Projects that do not belong to the provided organization are not
2485    /// considered when creating the dataset.
2486    pub organization_number: i64,
2487
2488    /// If set to `true`, the request includes all the newly created buckets in the
2489    /// dataset that meet the inclusion and exclusion rules.
2490    pub include_newly_created_buckets: bool,
2491
2492    /// Optional. If set to `false`, then all the permission checks must be
2493    /// successful before the system can start ingesting data. This field can only
2494    /// be updated before the system ingests data for the first time. Any attempt
2495    /// to modify the field after data ingestion starts results in an error.
2496    #[deprecated]
2497    pub skip_verification_and_ingest: bool,
2498
2499    /// Number of days of history that must be retained.
2500    pub retention_period_days: i32,
2501
2502    /// Details of the linked dataset.
2503    pub link: std::option::Option<crate::model::dataset_config::Link>,
2504
2505    /// Identity used by this `datasetConfig`.
2506    pub identity: std::option::Option<crate::model::Identity>,
2507
2508    /// Output only. Status of the `datasetConfig`.
2509    pub status: std::option::Option<google_cloud_rpc::model::Status>,
2510
2511    /// Output only. State of the `datasetConfig`.
2512    pub dataset_config_state: crate::model::dataset_config::ConfigState,
2513
2514    /// Optional. A user-provided description for the dataset configuration.
2515    ///
2516    /// Maximum length: 256 characters.
2517    pub description: std::string::String,
2518
2519    /// Defines the options for providing source identifiers for the dataset.
2520    pub source_options: std::option::Option<crate::model::dataset_config::SourceOptions>,
2521
2522    /// Cloud Storage locations to include or exclude.
2523    pub cloud_storage_locations:
2524        std::option::Option<crate::model::dataset_config::CloudStorageLocationsOneOf>,
2525
2526    /// Cloud Storage buckets to include or exclude.
2527    pub cloud_storage_buckets:
2528        std::option::Option<crate::model::dataset_config::CloudStorageBucketsOneOf>,
2529
2530    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2531}
2532
2533impl DatasetConfig {
2534    /// Creates a new default instance.
2535    pub fn new() -> Self {
2536        std::default::Default::default()
2537    }
2538
2539    /// Sets the value of [name][crate::model::DatasetConfig::name].
2540    ///
2541    /// # Example
2542    /// ```ignore,no_run
2543    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2544    /// let x = DatasetConfig::new().set_name("example");
2545    /// ```
2546    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2547        self.name = v.into();
2548        self
2549    }
2550
2551    /// Sets the value of [create_time][crate::model::DatasetConfig::create_time].
2552    ///
2553    /// # Example
2554    /// ```ignore,no_run
2555    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2556    /// use wkt::Timestamp;
2557    /// let x = DatasetConfig::new().set_create_time(Timestamp::default()/* use setters */);
2558    /// ```
2559    pub fn set_create_time<T>(mut self, v: T) -> Self
2560    where
2561        T: std::convert::Into<wkt::Timestamp>,
2562    {
2563        self.create_time = std::option::Option::Some(v.into());
2564        self
2565    }
2566
2567    /// Sets or clears the value of [create_time][crate::model::DatasetConfig::create_time].
2568    ///
2569    /// # Example
2570    /// ```ignore,no_run
2571    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2572    /// use wkt::Timestamp;
2573    /// let x = DatasetConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
2574    /// let x = DatasetConfig::new().set_or_clear_create_time(None::<Timestamp>);
2575    /// ```
2576    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2577    where
2578        T: std::convert::Into<wkt::Timestamp>,
2579    {
2580        self.create_time = v.map(|x| x.into());
2581        self
2582    }
2583
2584    /// Sets the value of [update_time][crate::model::DatasetConfig::update_time].
2585    ///
2586    /// # Example
2587    /// ```ignore,no_run
2588    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2589    /// use wkt::Timestamp;
2590    /// let x = DatasetConfig::new().set_update_time(Timestamp::default()/* use setters */);
2591    /// ```
2592    pub fn set_update_time<T>(mut self, v: T) -> Self
2593    where
2594        T: std::convert::Into<wkt::Timestamp>,
2595    {
2596        self.update_time = std::option::Option::Some(v.into());
2597        self
2598    }
2599
2600    /// Sets or clears the value of [update_time][crate::model::DatasetConfig::update_time].
2601    ///
2602    /// # Example
2603    /// ```ignore,no_run
2604    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2605    /// use wkt::Timestamp;
2606    /// let x = DatasetConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
2607    /// let x = DatasetConfig::new().set_or_clear_update_time(None::<Timestamp>);
2608    /// ```
2609    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
2610    where
2611        T: std::convert::Into<wkt::Timestamp>,
2612    {
2613        self.update_time = v.map(|x| x.into());
2614        self
2615    }
2616
2617    /// Sets the value of [labels][crate::model::DatasetConfig::labels].
2618    ///
2619    /// # Example
2620    /// ```ignore,no_run
2621    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2622    /// let x = DatasetConfig::new().set_labels([
2623    ///     ("key0", "abc"),
2624    ///     ("key1", "xyz"),
2625    /// ]);
2626    /// ```
2627    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2628    where
2629        T: std::iter::IntoIterator<Item = (K, V)>,
2630        K: std::convert::Into<std::string::String>,
2631        V: std::convert::Into<std::string::String>,
2632    {
2633        use std::iter::Iterator;
2634        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2635        self
2636    }
2637
2638    /// Sets the value of [uid][crate::model::DatasetConfig::uid].
2639    ///
2640    /// # Example
2641    /// ```ignore,no_run
2642    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2643    /// let x = DatasetConfig::new().set_uid("example");
2644    /// ```
2645    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2646        self.uid = v.into();
2647        self
2648    }
2649
2650    /// Sets the value of [organization_number][crate::model::DatasetConfig::organization_number].
2651    ///
2652    /// # Example
2653    /// ```ignore,no_run
2654    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2655    /// let x = DatasetConfig::new().set_organization_number(42);
2656    /// ```
2657    pub fn set_organization_number<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2658        self.organization_number = v.into();
2659        self
2660    }
2661
2662    /// Sets the value of [include_newly_created_buckets][crate::model::DatasetConfig::include_newly_created_buckets].
2663    ///
2664    /// # Example
2665    /// ```ignore,no_run
2666    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2667    /// let x = DatasetConfig::new().set_include_newly_created_buckets(true);
2668    /// ```
2669    pub fn set_include_newly_created_buckets<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2670        self.include_newly_created_buckets = v.into();
2671        self
2672    }
2673
2674    /// Sets the value of [skip_verification_and_ingest][crate::model::DatasetConfig::skip_verification_and_ingest].
2675    ///
2676    /// # Example
2677    /// ```ignore,no_run
2678    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2679    /// let x = DatasetConfig::new().set_skip_verification_and_ingest(true);
2680    /// ```
2681    #[deprecated]
2682    pub fn set_skip_verification_and_ingest<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2683        self.skip_verification_and_ingest = v.into();
2684        self
2685    }
2686
2687    /// Sets the value of [retention_period_days][crate::model::DatasetConfig::retention_period_days].
2688    ///
2689    /// # Example
2690    /// ```ignore,no_run
2691    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2692    /// let x = DatasetConfig::new().set_retention_period_days(42);
2693    /// ```
2694    pub fn set_retention_period_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2695        self.retention_period_days = v.into();
2696        self
2697    }
2698
2699    /// Sets the value of [link][crate::model::DatasetConfig::link].
2700    ///
2701    /// # Example
2702    /// ```ignore,no_run
2703    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2704    /// use google_cloud_storageinsights_v1::model::dataset_config::Link;
2705    /// let x = DatasetConfig::new().set_link(Link::default()/* use setters */);
2706    /// ```
2707    pub fn set_link<T>(mut self, v: T) -> Self
2708    where
2709        T: std::convert::Into<crate::model::dataset_config::Link>,
2710    {
2711        self.link = std::option::Option::Some(v.into());
2712        self
2713    }
2714
2715    /// Sets or clears the value of [link][crate::model::DatasetConfig::link].
2716    ///
2717    /// # Example
2718    /// ```ignore,no_run
2719    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2720    /// use google_cloud_storageinsights_v1::model::dataset_config::Link;
2721    /// let x = DatasetConfig::new().set_or_clear_link(Some(Link::default()/* use setters */));
2722    /// let x = DatasetConfig::new().set_or_clear_link(None::<Link>);
2723    /// ```
2724    pub fn set_or_clear_link<T>(mut self, v: std::option::Option<T>) -> Self
2725    where
2726        T: std::convert::Into<crate::model::dataset_config::Link>,
2727    {
2728        self.link = v.map(|x| x.into());
2729        self
2730    }
2731
2732    /// Sets the value of [identity][crate::model::DatasetConfig::identity].
2733    ///
2734    /// # Example
2735    /// ```ignore,no_run
2736    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2737    /// use google_cloud_storageinsights_v1::model::Identity;
2738    /// let x = DatasetConfig::new().set_identity(Identity::default()/* use setters */);
2739    /// ```
2740    pub fn set_identity<T>(mut self, v: T) -> Self
2741    where
2742        T: std::convert::Into<crate::model::Identity>,
2743    {
2744        self.identity = std::option::Option::Some(v.into());
2745        self
2746    }
2747
2748    /// Sets or clears the value of [identity][crate::model::DatasetConfig::identity].
2749    ///
2750    /// # Example
2751    /// ```ignore,no_run
2752    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2753    /// use google_cloud_storageinsights_v1::model::Identity;
2754    /// let x = DatasetConfig::new().set_or_clear_identity(Some(Identity::default()/* use setters */));
2755    /// let x = DatasetConfig::new().set_or_clear_identity(None::<Identity>);
2756    /// ```
2757    pub fn set_or_clear_identity<T>(mut self, v: std::option::Option<T>) -> Self
2758    where
2759        T: std::convert::Into<crate::model::Identity>,
2760    {
2761        self.identity = v.map(|x| x.into());
2762        self
2763    }
2764
2765    /// Sets the value of [status][crate::model::DatasetConfig::status].
2766    ///
2767    /// # Example
2768    /// ```ignore,no_run
2769    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2770    /// use google_cloud_rpc::model::Status;
2771    /// let x = DatasetConfig::new().set_status(Status::default()/* use setters */);
2772    /// ```
2773    pub fn set_status<T>(mut self, v: T) -> Self
2774    where
2775        T: std::convert::Into<google_cloud_rpc::model::Status>,
2776    {
2777        self.status = std::option::Option::Some(v.into());
2778        self
2779    }
2780
2781    /// Sets or clears the value of [status][crate::model::DatasetConfig::status].
2782    ///
2783    /// # Example
2784    /// ```ignore,no_run
2785    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2786    /// use google_cloud_rpc::model::Status;
2787    /// let x = DatasetConfig::new().set_or_clear_status(Some(Status::default()/* use setters */));
2788    /// let x = DatasetConfig::new().set_or_clear_status(None::<Status>);
2789    /// ```
2790    pub fn set_or_clear_status<T>(mut self, v: std::option::Option<T>) -> Self
2791    where
2792        T: std::convert::Into<google_cloud_rpc::model::Status>,
2793    {
2794        self.status = v.map(|x| x.into());
2795        self
2796    }
2797
2798    /// Sets the value of [dataset_config_state][crate::model::DatasetConfig::dataset_config_state].
2799    ///
2800    /// # Example
2801    /// ```ignore,no_run
2802    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2803    /// use google_cloud_storageinsights_v1::model::dataset_config::ConfigState;
2804    /// let x0 = DatasetConfig::new().set_dataset_config_state(ConfigState::Active);
2805    /// let x1 = DatasetConfig::new().set_dataset_config_state(ConfigState::VerificationInProgress);
2806    /// let x2 = DatasetConfig::new().set_dataset_config_state(ConfigState::Created);
2807    /// ```
2808    pub fn set_dataset_config_state<
2809        T: std::convert::Into<crate::model::dataset_config::ConfigState>,
2810    >(
2811        mut self,
2812        v: T,
2813    ) -> Self {
2814        self.dataset_config_state = v.into();
2815        self
2816    }
2817
2818    /// Sets the value of [description][crate::model::DatasetConfig::description].
2819    ///
2820    /// # Example
2821    /// ```ignore,no_run
2822    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2823    /// let x = DatasetConfig::new().set_description("example");
2824    /// ```
2825    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2826        self.description = v.into();
2827        self
2828    }
2829
2830    /// Sets the value of [source_options][crate::model::DatasetConfig::source_options].
2831    ///
2832    /// Note that all the setters affecting `source_options` are mutually
2833    /// exclusive.
2834    ///
2835    /// # Example
2836    /// ```ignore,no_run
2837    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2838    /// use google_cloud_storageinsights_v1::model::dataset_config::SourceOptions;
2839    /// let x = DatasetConfig::new().set_source_options(Some(SourceOptions::OrganizationScope(true)));
2840    /// ```
2841    pub fn set_source_options<
2842        T: std::convert::Into<std::option::Option<crate::model::dataset_config::SourceOptions>>,
2843    >(
2844        mut self,
2845        v: T,
2846    ) -> Self {
2847        self.source_options = v.into();
2848        self
2849    }
2850
2851    /// The value of [source_options][crate::model::DatasetConfig::source_options]
2852    /// if it holds a `SourceProjects`, `None` if the field is not set or
2853    /// holds a different branch.
2854    pub fn source_projects(
2855        &self,
2856    ) -> std::option::Option<&std::boxed::Box<crate::model::dataset_config::SourceProjects>> {
2857        #[allow(unreachable_patterns)]
2858        self.source_options.as_ref().and_then(|v| match v {
2859            crate::model::dataset_config::SourceOptions::SourceProjects(v) => {
2860                std::option::Option::Some(v)
2861            }
2862            _ => std::option::Option::None,
2863        })
2864    }
2865
2866    /// Sets the value of [source_options][crate::model::DatasetConfig::source_options]
2867    /// to hold a `SourceProjects`.
2868    ///
2869    /// Note that all the setters affecting `source_options` are
2870    /// mutually exclusive.
2871    ///
2872    /// # Example
2873    /// ```ignore,no_run
2874    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2875    /// use google_cloud_storageinsights_v1::model::dataset_config::SourceProjects;
2876    /// let x = DatasetConfig::new().set_source_projects(SourceProjects::default()/* use setters */);
2877    /// assert!(x.source_projects().is_some());
2878    /// assert!(x.source_folders().is_none());
2879    /// assert!(x.organization_scope().is_none());
2880    /// assert!(x.cloud_storage_object_path().is_none());
2881    /// ```
2882    pub fn set_source_projects<
2883        T: std::convert::Into<std::boxed::Box<crate::model::dataset_config::SourceProjects>>,
2884    >(
2885        mut self,
2886        v: T,
2887    ) -> Self {
2888        self.source_options = std::option::Option::Some(
2889            crate::model::dataset_config::SourceOptions::SourceProjects(v.into()),
2890        );
2891        self
2892    }
2893
2894    /// The value of [source_options][crate::model::DatasetConfig::source_options]
2895    /// if it holds a `SourceFolders`, `None` if the field is not set or
2896    /// holds a different branch.
2897    pub fn source_folders(
2898        &self,
2899    ) -> std::option::Option<&std::boxed::Box<crate::model::dataset_config::SourceFolders>> {
2900        #[allow(unreachable_patterns)]
2901        self.source_options.as_ref().and_then(|v| match v {
2902            crate::model::dataset_config::SourceOptions::SourceFolders(v) => {
2903                std::option::Option::Some(v)
2904            }
2905            _ => std::option::Option::None,
2906        })
2907    }
2908
2909    /// Sets the value of [source_options][crate::model::DatasetConfig::source_options]
2910    /// to hold a `SourceFolders`.
2911    ///
2912    /// Note that all the setters affecting `source_options` are
2913    /// mutually exclusive.
2914    ///
2915    /// # Example
2916    /// ```ignore,no_run
2917    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2918    /// use google_cloud_storageinsights_v1::model::dataset_config::SourceFolders;
2919    /// let x = DatasetConfig::new().set_source_folders(SourceFolders::default()/* use setters */);
2920    /// assert!(x.source_folders().is_some());
2921    /// assert!(x.source_projects().is_none());
2922    /// assert!(x.organization_scope().is_none());
2923    /// assert!(x.cloud_storage_object_path().is_none());
2924    /// ```
2925    pub fn set_source_folders<
2926        T: std::convert::Into<std::boxed::Box<crate::model::dataset_config::SourceFolders>>,
2927    >(
2928        mut self,
2929        v: T,
2930    ) -> Self {
2931        self.source_options = std::option::Option::Some(
2932            crate::model::dataset_config::SourceOptions::SourceFolders(v.into()),
2933        );
2934        self
2935    }
2936
2937    /// The value of [source_options][crate::model::DatasetConfig::source_options]
2938    /// if it holds a `OrganizationScope`, `None` if the field is not set or
2939    /// holds a different branch.
2940    pub fn organization_scope(&self) -> std::option::Option<&bool> {
2941        #[allow(unreachable_patterns)]
2942        self.source_options.as_ref().and_then(|v| match v {
2943            crate::model::dataset_config::SourceOptions::OrganizationScope(v) => {
2944                std::option::Option::Some(v)
2945            }
2946            _ => std::option::Option::None,
2947        })
2948    }
2949
2950    /// Sets the value of [source_options][crate::model::DatasetConfig::source_options]
2951    /// to hold a `OrganizationScope`.
2952    ///
2953    /// Note that all the setters affecting `source_options` are
2954    /// mutually exclusive.
2955    ///
2956    /// # Example
2957    /// ```ignore,no_run
2958    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2959    /// let x = DatasetConfig::new().set_organization_scope(true);
2960    /// assert!(x.organization_scope().is_some());
2961    /// assert!(x.source_projects().is_none());
2962    /// assert!(x.source_folders().is_none());
2963    /// assert!(x.cloud_storage_object_path().is_none());
2964    /// ```
2965    pub fn set_organization_scope<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2966        self.source_options = std::option::Option::Some(
2967            crate::model::dataset_config::SourceOptions::OrganizationScope(v.into()),
2968        );
2969        self
2970    }
2971
2972    /// The value of [source_options][crate::model::DatasetConfig::source_options]
2973    /// if it holds a `CloudStorageObjectPath`, `None` if the field is not set or
2974    /// holds a different branch.
2975    pub fn cloud_storage_object_path(&self) -> std::option::Option<&std::string::String> {
2976        #[allow(unreachable_patterns)]
2977        self.source_options.as_ref().and_then(|v| match v {
2978            crate::model::dataset_config::SourceOptions::CloudStorageObjectPath(v) => {
2979                std::option::Option::Some(v)
2980            }
2981            _ => std::option::Option::None,
2982        })
2983    }
2984
2985    /// Sets the value of [source_options][crate::model::DatasetConfig::source_options]
2986    /// to hold a `CloudStorageObjectPath`.
2987    ///
2988    /// Note that all the setters affecting `source_options` are
2989    /// mutually exclusive.
2990    ///
2991    /// # Example
2992    /// ```ignore,no_run
2993    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
2994    /// let x = DatasetConfig::new().set_cloud_storage_object_path("example");
2995    /// assert!(x.cloud_storage_object_path().is_some());
2996    /// assert!(x.source_projects().is_none());
2997    /// assert!(x.source_folders().is_none());
2998    /// assert!(x.organization_scope().is_none());
2999    /// ```
3000    pub fn set_cloud_storage_object_path<T: std::convert::Into<std::string::String>>(
3001        mut self,
3002        v: T,
3003    ) -> Self {
3004        self.source_options = std::option::Option::Some(
3005            crate::model::dataset_config::SourceOptions::CloudStorageObjectPath(v.into()),
3006        );
3007        self
3008    }
3009
3010    /// Sets the value of [cloud_storage_locations][crate::model::DatasetConfig::cloud_storage_locations].
3011    ///
3012    /// Note that all the setters affecting `cloud_storage_locations` are mutually
3013    /// exclusive.
3014    ///
3015    /// # Example
3016    /// ```ignore,no_run
3017    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
3018    /// use google_cloud_storageinsights_v1::model::dataset_config::CloudStorageLocations;
3019    /// let x = DatasetConfig::new().set_cloud_storage_locations(Some(
3020    ///     google_cloud_storageinsights_v1::model::dataset_config::CloudStorageLocationsOneOf::IncludeCloudStorageLocations(CloudStorageLocations::default().into())));
3021    /// ```
3022    pub fn set_cloud_storage_locations<
3023        T: std::convert::Into<
3024                std::option::Option<crate::model::dataset_config::CloudStorageLocationsOneOf>,
3025            >,
3026    >(
3027        mut self,
3028        v: T,
3029    ) -> Self {
3030        self.cloud_storage_locations = v.into();
3031        self
3032    }
3033
3034    /// The value of [cloud_storage_locations][crate::model::DatasetConfig::cloud_storage_locations]
3035    /// if it holds a `IncludeCloudStorageLocations`, `None` if the field is not set or
3036    /// holds a different branch.
3037    pub fn include_cloud_storage_locations(
3038        &self,
3039    ) -> std::option::Option<&std::boxed::Box<crate::model::dataset_config::CloudStorageLocations>>
3040    {
3041        #[allow(unreachable_patterns)]
3042        self.cloud_storage_locations.as_ref().and_then(|v| match v {
3043            crate::model::dataset_config::CloudStorageLocationsOneOf::IncludeCloudStorageLocations(v) => std::option::Option::Some(v),
3044            _ => std::option::Option::None,
3045        })
3046    }
3047
3048    /// Sets the value of [cloud_storage_locations][crate::model::DatasetConfig::cloud_storage_locations]
3049    /// to hold a `IncludeCloudStorageLocations`.
3050    ///
3051    /// Note that all the setters affecting `cloud_storage_locations` are
3052    /// mutually exclusive.
3053    ///
3054    /// # Example
3055    /// ```ignore,no_run
3056    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
3057    /// use google_cloud_storageinsights_v1::model::dataset_config::CloudStorageLocations;
3058    /// let x = DatasetConfig::new().set_include_cloud_storage_locations(CloudStorageLocations::default()/* use setters */);
3059    /// assert!(x.include_cloud_storage_locations().is_some());
3060    /// assert!(x.exclude_cloud_storage_locations().is_none());
3061    /// ```
3062    pub fn set_include_cloud_storage_locations<
3063        T: std::convert::Into<std::boxed::Box<crate::model::dataset_config::CloudStorageLocations>>,
3064    >(
3065        mut self,
3066        v: T,
3067    ) -> Self {
3068        self.cloud_storage_locations = std::option::Option::Some(
3069            crate::model::dataset_config::CloudStorageLocationsOneOf::IncludeCloudStorageLocations(
3070                v.into(),
3071            ),
3072        );
3073        self
3074    }
3075
3076    /// The value of [cloud_storage_locations][crate::model::DatasetConfig::cloud_storage_locations]
3077    /// if it holds a `ExcludeCloudStorageLocations`, `None` if the field is not set or
3078    /// holds a different branch.
3079    pub fn exclude_cloud_storage_locations(
3080        &self,
3081    ) -> std::option::Option<&std::boxed::Box<crate::model::dataset_config::CloudStorageLocations>>
3082    {
3083        #[allow(unreachable_patterns)]
3084        self.cloud_storage_locations.as_ref().and_then(|v| match v {
3085            crate::model::dataset_config::CloudStorageLocationsOneOf::ExcludeCloudStorageLocations(v) => std::option::Option::Some(v),
3086            _ => std::option::Option::None,
3087        })
3088    }
3089
3090    /// Sets the value of [cloud_storage_locations][crate::model::DatasetConfig::cloud_storage_locations]
3091    /// to hold a `ExcludeCloudStorageLocations`.
3092    ///
3093    /// Note that all the setters affecting `cloud_storage_locations` are
3094    /// mutually exclusive.
3095    ///
3096    /// # Example
3097    /// ```ignore,no_run
3098    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
3099    /// use google_cloud_storageinsights_v1::model::dataset_config::CloudStorageLocations;
3100    /// let x = DatasetConfig::new().set_exclude_cloud_storage_locations(CloudStorageLocations::default()/* use setters */);
3101    /// assert!(x.exclude_cloud_storage_locations().is_some());
3102    /// assert!(x.include_cloud_storage_locations().is_none());
3103    /// ```
3104    pub fn set_exclude_cloud_storage_locations<
3105        T: std::convert::Into<std::boxed::Box<crate::model::dataset_config::CloudStorageLocations>>,
3106    >(
3107        mut self,
3108        v: T,
3109    ) -> Self {
3110        self.cloud_storage_locations = std::option::Option::Some(
3111            crate::model::dataset_config::CloudStorageLocationsOneOf::ExcludeCloudStorageLocations(
3112                v.into(),
3113            ),
3114        );
3115        self
3116    }
3117
3118    /// Sets the value of [cloud_storage_buckets][crate::model::DatasetConfig::cloud_storage_buckets].
3119    ///
3120    /// Note that all the setters affecting `cloud_storage_buckets` are mutually
3121    /// exclusive.
3122    ///
3123    /// # Example
3124    /// ```ignore,no_run
3125    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
3126    /// use google_cloud_storageinsights_v1::model::dataset_config::CloudStorageBuckets;
3127    /// let x = DatasetConfig::new().set_cloud_storage_buckets(Some(
3128    ///     google_cloud_storageinsights_v1::model::dataset_config::CloudStorageBucketsOneOf::IncludeCloudStorageBuckets(CloudStorageBuckets::default().into())));
3129    /// ```
3130    pub fn set_cloud_storage_buckets<
3131        T: std::convert::Into<
3132                std::option::Option<crate::model::dataset_config::CloudStorageBucketsOneOf>,
3133            >,
3134    >(
3135        mut self,
3136        v: T,
3137    ) -> Self {
3138        self.cloud_storage_buckets = v.into();
3139        self
3140    }
3141
3142    /// The value of [cloud_storage_buckets][crate::model::DatasetConfig::cloud_storage_buckets]
3143    /// if it holds a `IncludeCloudStorageBuckets`, `None` if the field is not set or
3144    /// holds a different branch.
3145    pub fn include_cloud_storage_buckets(
3146        &self,
3147    ) -> std::option::Option<&std::boxed::Box<crate::model::dataset_config::CloudStorageBuckets>>
3148    {
3149        #[allow(unreachable_patterns)]
3150        self.cloud_storage_buckets.as_ref().and_then(|v| match v {
3151            crate::model::dataset_config::CloudStorageBucketsOneOf::IncludeCloudStorageBuckets(
3152                v,
3153            ) => std::option::Option::Some(v),
3154            _ => std::option::Option::None,
3155        })
3156    }
3157
3158    /// Sets the value of [cloud_storage_buckets][crate::model::DatasetConfig::cloud_storage_buckets]
3159    /// to hold a `IncludeCloudStorageBuckets`.
3160    ///
3161    /// Note that all the setters affecting `cloud_storage_buckets` are
3162    /// mutually exclusive.
3163    ///
3164    /// # Example
3165    /// ```ignore,no_run
3166    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
3167    /// use google_cloud_storageinsights_v1::model::dataset_config::CloudStorageBuckets;
3168    /// let x = DatasetConfig::new().set_include_cloud_storage_buckets(CloudStorageBuckets::default()/* use setters */);
3169    /// assert!(x.include_cloud_storage_buckets().is_some());
3170    /// assert!(x.exclude_cloud_storage_buckets().is_none());
3171    /// ```
3172    pub fn set_include_cloud_storage_buckets<
3173        T: std::convert::Into<std::boxed::Box<crate::model::dataset_config::CloudStorageBuckets>>,
3174    >(
3175        mut self,
3176        v: T,
3177    ) -> Self {
3178        self.cloud_storage_buckets = std::option::Option::Some(
3179            crate::model::dataset_config::CloudStorageBucketsOneOf::IncludeCloudStorageBuckets(
3180                v.into(),
3181            ),
3182        );
3183        self
3184    }
3185
3186    /// The value of [cloud_storage_buckets][crate::model::DatasetConfig::cloud_storage_buckets]
3187    /// if it holds a `ExcludeCloudStorageBuckets`, `None` if the field is not set or
3188    /// holds a different branch.
3189    pub fn exclude_cloud_storage_buckets(
3190        &self,
3191    ) -> std::option::Option<&std::boxed::Box<crate::model::dataset_config::CloudStorageBuckets>>
3192    {
3193        #[allow(unreachable_patterns)]
3194        self.cloud_storage_buckets.as_ref().and_then(|v| match v {
3195            crate::model::dataset_config::CloudStorageBucketsOneOf::ExcludeCloudStorageBuckets(
3196                v,
3197            ) => std::option::Option::Some(v),
3198            _ => std::option::Option::None,
3199        })
3200    }
3201
3202    /// Sets the value of [cloud_storage_buckets][crate::model::DatasetConfig::cloud_storage_buckets]
3203    /// to hold a `ExcludeCloudStorageBuckets`.
3204    ///
3205    /// Note that all the setters affecting `cloud_storage_buckets` are
3206    /// mutually exclusive.
3207    ///
3208    /// # Example
3209    /// ```ignore,no_run
3210    /// # use google_cloud_storageinsights_v1::model::DatasetConfig;
3211    /// use google_cloud_storageinsights_v1::model::dataset_config::CloudStorageBuckets;
3212    /// let x = DatasetConfig::new().set_exclude_cloud_storage_buckets(CloudStorageBuckets::default()/* use setters */);
3213    /// assert!(x.exclude_cloud_storage_buckets().is_some());
3214    /// assert!(x.include_cloud_storage_buckets().is_none());
3215    /// ```
3216    pub fn set_exclude_cloud_storage_buckets<
3217        T: std::convert::Into<std::boxed::Box<crate::model::dataset_config::CloudStorageBuckets>>,
3218    >(
3219        mut self,
3220        v: T,
3221    ) -> Self {
3222        self.cloud_storage_buckets = std::option::Option::Some(
3223            crate::model::dataset_config::CloudStorageBucketsOneOf::ExcludeCloudStorageBuckets(
3224                v.into(),
3225            ),
3226        );
3227        self
3228    }
3229}
3230
3231impl wkt::message::Message for DatasetConfig {
3232    fn typename() -> &'static str {
3233        "type.googleapis.com/google.cloud.storageinsights.v1.DatasetConfig"
3234    }
3235}
3236
3237/// Defines additional types related to [DatasetConfig].
3238pub mod dataset_config {
3239    #[allow(unused_imports)]
3240    use super::*;
3241
3242    /// Collection of project numbers
3243    #[derive(Clone, Default, PartialEq)]
3244    #[non_exhaustive]
3245    pub struct SourceProjects {
3246        #[allow(missing_docs)]
3247        pub project_numbers: std::vec::Vec<i64>,
3248
3249        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3250    }
3251
3252    impl SourceProjects {
3253        /// Creates a new default instance.
3254        pub fn new() -> Self {
3255            std::default::Default::default()
3256        }
3257
3258        /// Sets the value of [project_numbers][crate::model::dataset_config::SourceProjects::project_numbers].
3259        ///
3260        /// # Example
3261        /// ```ignore,no_run
3262        /// # use google_cloud_storageinsights_v1::model::dataset_config::SourceProjects;
3263        /// let x = SourceProjects::new().set_project_numbers([1, 2, 3]);
3264        /// ```
3265        pub fn set_project_numbers<T, V>(mut self, v: T) -> Self
3266        where
3267            T: std::iter::IntoIterator<Item = V>,
3268            V: std::convert::Into<i64>,
3269        {
3270            use std::iter::Iterator;
3271            self.project_numbers = v.into_iter().map(|i| i.into()).collect();
3272            self
3273        }
3274    }
3275
3276    impl wkt::message::Message for SourceProjects {
3277        fn typename() -> &'static str {
3278            "type.googleapis.com/google.cloud.storageinsights.v1.DatasetConfig.SourceProjects"
3279        }
3280    }
3281
3282    /// Specifies a set of folders to include in the dataset
3283    #[derive(Clone, Default, PartialEq)]
3284    #[non_exhaustive]
3285    pub struct SourceFolders {
3286        /// Optional. The list of folder numbers to include in the dataset.
3287        pub folder_numbers: std::vec::Vec<i64>,
3288
3289        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3290    }
3291
3292    impl SourceFolders {
3293        /// Creates a new default instance.
3294        pub fn new() -> Self {
3295            std::default::Default::default()
3296        }
3297
3298        /// Sets the value of [folder_numbers][crate::model::dataset_config::SourceFolders::folder_numbers].
3299        ///
3300        /// # Example
3301        /// ```ignore,no_run
3302        /// # use google_cloud_storageinsights_v1::model::dataset_config::SourceFolders;
3303        /// let x = SourceFolders::new().set_folder_numbers([1, 2, 3]);
3304        /// ```
3305        pub fn set_folder_numbers<T, V>(mut self, v: T) -> Self
3306        where
3307            T: std::iter::IntoIterator<Item = V>,
3308            V: std::convert::Into<i64>,
3309        {
3310            use std::iter::Iterator;
3311            self.folder_numbers = v.into_iter().map(|i| i.into()).collect();
3312            self
3313        }
3314    }
3315
3316    impl wkt::message::Message for SourceFolders {
3317        fn typename() -> &'static str {
3318            "type.googleapis.com/google.cloud.storageinsights.v1.DatasetConfig.SourceFolders"
3319        }
3320    }
3321
3322    /// Collection of Cloud Storage locations.
3323    #[derive(Clone, Default, PartialEq)]
3324    #[non_exhaustive]
3325    pub struct CloudStorageLocations {
3326        #[allow(missing_docs)]
3327        pub locations: std::vec::Vec<std::string::String>,
3328
3329        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3330    }
3331
3332    impl CloudStorageLocations {
3333        /// Creates a new default instance.
3334        pub fn new() -> Self {
3335            std::default::Default::default()
3336        }
3337
3338        /// Sets the value of [locations][crate::model::dataset_config::CloudStorageLocations::locations].
3339        ///
3340        /// # Example
3341        /// ```ignore,no_run
3342        /// # use google_cloud_storageinsights_v1::model::dataset_config::CloudStorageLocations;
3343        /// let x = CloudStorageLocations::new().set_locations(["a", "b", "c"]);
3344        /// ```
3345        pub fn set_locations<T, V>(mut self, v: T) -> Self
3346        where
3347            T: std::iter::IntoIterator<Item = V>,
3348            V: std::convert::Into<std::string::String>,
3349        {
3350            use std::iter::Iterator;
3351            self.locations = v.into_iter().map(|i| i.into()).collect();
3352            self
3353        }
3354    }
3355
3356    impl wkt::message::Message for CloudStorageLocations {
3357        fn typename() -> &'static str {
3358            "type.googleapis.com/google.cloud.storageinsights.v1.DatasetConfig.CloudStorageLocations"
3359        }
3360    }
3361
3362    /// Collection of Cloud Storage buckets.
3363    #[derive(Clone, Default, PartialEq)]
3364    #[non_exhaustive]
3365    pub struct CloudStorageBuckets {
3366        #[allow(missing_docs)]
3367        pub cloud_storage_buckets:
3368            std::vec::Vec<crate::model::dataset_config::cloud_storage_buckets::CloudStorageBucket>,
3369
3370        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3371    }
3372
3373    impl CloudStorageBuckets {
3374        /// Creates a new default instance.
3375        pub fn new() -> Self {
3376            std::default::Default::default()
3377        }
3378
3379        /// Sets the value of [cloud_storage_buckets][crate::model::dataset_config::CloudStorageBuckets::cloud_storage_buckets].
3380        ///
3381        /// # Example
3382        /// ```ignore,no_run
3383        /// # use google_cloud_storageinsights_v1::model::dataset_config::CloudStorageBuckets;
3384        /// use google_cloud_storageinsights_v1::model::dataset_config::cloud_storage_buckets::CloudStorageBucket;
3385        /// let x = CloudStorageBuckets::new()
3386        ///     .set_cloud_storage_buckets([
3387        ///         CloudStorageBucket::default()/* use setters */,
3388        ///         CloudStorageBucket::default()/* use (different) setters */,
3389        ///     ]);
3390        /// ```
3391        pub fn set_cloud_storage_buckets<T, V>(mut self, v: T) -> Self
3392        where
3393            T: std::iter::IntoIterator<Item = V>,
3394            V: std::convert::Into<
3395                    crate::model::dataset_config::cloud_storage_buckets::CloudStorageBucket,
3396                >,
3397        {
3398            use std::iter::Iterator;
3399            self.cloud_storage_buckets = v.into_iter().map(|i| i.into()).collect();
3400            self
3401        }
3402    }
3403
3404    impl wkt::message::Message for CloudStorageBuckets {
3405        fn typename() -> &'static str {
3406            "type.googleapis.com/google.cloud.storageinsights.v1.DatasetConfig.CloudStorageBuckets"
3407        }
3408    }
3409
3410    /// Defines additional types related to [CloudStorageBuckets].
3411    pub mod cloud_storage_buckets {
3412        #[allow(unused_imports)]
3413        use super::*;
3414
3415        /// Defines the bucket by its name or a regex pattern to match buckets.
3416        #[derive(Clone, Default, PartialEq)]
3417        #[non_exhaustive]
3418        pub struct CloudStorageBucket {
3419
3420            #[allow(missing_docs)]
3421            pub cloud_storage_bucket: std::option::Option<crate::model::dataset_config::cloud_storage_buckets::cloud_storage_bucket::CloudStorageBucket>,
3422
3423            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3424        }
3425
3426        impl CloudStorageBucket {
3427            /// Creates a new default instance.
3428            pub fn new() -> Self {
3429                std::default::Default::default()
3430            }
3431
3432            /// Sets the value of [cloud_storage_bucket][crate::model::dataset_config::cloud_storage_buckets::CloudStorageBucket::cloud_storage_bucket].
3433            ///
3434            /// Note that all the setters affecting `cloud_storage_bucket` are mutually
3435            /// exclusive.
3436            ///
3437            /// # Example
3438            /// ```ignore,no_run
3439            /// # use google_cloud_storageinsights_v1::model::dataset_config::cloud_storage_buckets::CloudStorageBucket;
3440            /// use google_cloud_storageinsights_v1::model::dataset_config::cloud_storage_buckets::cloud_storage_bucket::CloudStorageBucket as CloudStorageBucketOneOf;
3441            /// let x = CloudStorageBucket::new().set_cloud_storage_bucket(Some(CloudStorageBucketOneOf::BucketName("example".to_string())));
3442            /// ```
3443            pub fn set_cloud_storage_bucket<T: std::convert::Into<std::option::Option<crate::model::dataset_config::cloud_storage_buckets::cloud_storage_bucket::CloudStorageBucket>>>(mut self, v: T) -> Self
3444            {
3445                self.cloud_storage_bucket = v.into();
3446                self
3447            }
3448
3449            /// The value of [cloud_storage_bucket][crate::model::dataset_config::cloud_storage_buckets::CloudStorageBucket::cloud_storage_bucket]
3450            /// if it holds a `BucketName`, `None` if the field is not set or
3451            /// holds a different branch.
3452            pub fn bucket_name(&self) -> std::option::Option<&std::string::String> {
3453                #[allow(unreachable_patterns)]
3454                self.cloud_storage_bucket.as_ref().and_then(|v| match v {
3455                    crate::model::dataset_config::cloud_storage_buckets::cloud_storage_bucket::CloudStorageBucket::BucketName(v) => std::option::Option::Some(v),
3456                    _ => std::option::Option::None,
3457                })
3458            }
3459
3460            /// Sets the value of [cloud_storage_bucket][crate::model::dataset_config::cloud_storage_buckets::CloudStorageBucket::cloud_storage_bucket]
3461            /// to hold a `BucketName`.
3462            ///
3463            /// Note that all the setters affecting `cloud_storage_bucket` are
3464            /// mutually exclusive.
3465            ///
3466            /// # Example
3467            /// ```ignore,no_run
3468            /// # use google_cloud_storageinsights_v1::model::dataset_config::cloud_storage_buckets::CloudStorageBucket;
3469            /// let x = CloudStorageBucket::new().set_bucket_name("example");
3470            /// assert!(x.bucket_name().is_some());
3471            /// assert!(x.bucket_prefix_regex().is_none());
3472            /// ```
3473            pub fn set_bucket_name<T: std::convert::Into<std::string::String>>(
3474                mut self,
3475                v: T,
3476            ) -> Self {
3477                self.cloud_storage_bucket = std::option::Option::Some(
3478                    crate::model::dataset_config::cloud_storage_buckets::cloud_storage_bucket::CloudStorageBucket::BucketName(
3479                        v.into()
3480                    )
3481                );
3482                self
3483            }
3484
3485            /// The value of [cloud_storage_bucket][crate::model::dataset_config::cloud_storage_buckets::CloudStorageBucket::cloud_storage_bucket]
3486            /// if it holds a `BucketPrefixRegex`, `None` if the field is not set or
3487            /// holds a different branch.
3488            pub fn bucket_prefix_regex(&self) -> std::option::Option<&std::string::String> {
3489                #[allow(unreachable_patterns)]
3490                self.cloud_storage_bucket.as_ref().and_then(|v| match v {
3491                    crate::model::dataset_config::cloud_storage_buckets::cloud_storage_bucket::CloudStorageBucket::BucketPrefixRegex(v) => std::option::Option::Some(v),
3492                    _ => std::option::Option::None,
3493                })
3494            }
3495
3496            /// Sets the value of [cloud_storage_bucket][crate::model::dataset_config::cloud_storage_buckets::CloudStorageBucket::cloud_storage_bucket]
3497            /// to hold a `BucketPrefixRegex`.
3498            ///
3499            /// Note that all the setters affecting `cloud_storage_bucket` are
3500            /// mutually exclusive.
3501            ///
3502            /// # Example
3503            /// ```ignore,no_run
3504            /// # use google_cloud_storageinsights_v1::model::dataset_config::cloud_storage_buckets::CloudStorageBucket;
3505            /// let x = CloudStorageBucket::new().set_bucket_prefix_regex("example");
3506            /// assert!(x.bucket_prefix_regex().is_some());
3507            /// assert!(x.bucket_name().is_none());
3508            /// ```
3509            pub fn set_bucket_prefix_regex<T: std::convert::Into<std::string::String>>(
3510                mut self,
3511                v: T,
3512            ) -> Self {
3513                self.cloud_storage_bucket = std::option::Option::Some(
3514                    crate::model::dataset_config::cloud_storage_buckets::cloud_storage_bucket::CloudStorageBucket::BucketPrefixRegex(
3515                        v.into()
3516                    )
3517                );
3518                self
3519            }
3520        }
3521
3522        impl wkt::message::Message for CloudStorageBucket {
3523            fn typename() -> &'static str {
3524                "type.googleapis.com/google.cloud.storageinsights.v1.DatasetConfig.CloudStorageBuckets.CloudStorageBucket"
3525            }
3526        }
3527
3528        /// Defines additional types related to [CloudStorageBucket].
3529        pub mod cloud_storage_bucket {
3530            #[allow(unused_imports)]
3531            use super::*;
3532
3533            #[allow(missing_docs)]
3534            #[derive(Clone, Debug, PartialEq)]
3535            #[non_exhaustive]
3536            pub enum CloudStorageBucket {
3537                /// Cloud Storage bucket name.
3538                BucketName(std::string::String),
3539                /// A regex pattern for bucket names matching the regex. Regex should
3540                /// follow the syntax specified in `google/re2` on GitHub.
3541                BucketPrefixRegex(std::string::String),
3542            }
3543        }
3544    }
3545
3546    /// Defines the details about the linked dataset.
3547    #[derive(Clone, Default, PartialEq)]
3548    #[non_exhaustive]
3549    pub struct Link {
3550        /// Output only. Dataset name for linked dataset.
3551        pub dataset: std::string::String,
3552
3553        /// Output only. State of the linked dataset.
3554        pub linked: bool,
3555
3556        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3557    }
3558
3559    impl Link {
3560        /// Creates a new default instance.
3561        pub fn new() -> Self {
3562            std::default::Default::default()
3563        }
3564
3565        /// Sets the value of [dataset][crate::model::dataset_config::Link::dataset].
3566        ///
3567        /// # Example
3568        /// ```ignore,no_run
3569        /// # use google_cloud_storageinsights_v1::model::dataset_config::Link;
3570        /// let x = Link::new().set_dataset("example");
3571        /// ```
3572        pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3573            self.dataset = v.into();
3574            self
3575        }
3576
3577        /// Sets the value of [linked][crate::model::dataset_config::Link::linked].
3578        ///
3579        /// # Example
3580        /// ```ignore,no_run
3581        /// # use google_cloud_storageinsights_v1::model::dataset_config::Link;
3582        /// let x = Link::new().set_linked(true);
3583        /// ```
3584        pub fn set_linked<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3585            self.linked = v.into();
3586            self
3587        }
3588    }
3589
3590    impl wkt::message::Message for Link {
3591        fn typename() -> &'static str {
3592            "type.googleapis.com/google.cloud.storageinsights.v1.DatasetConfig.Link"
3593        }
3594    }
3595
3596    /// Provides a summary of the bucket level error statistics.
3597    #[derive(Clone, Default, PartialEq)]
3598    #[non_exhaustive]
3599    pub struct BucketErrors {
3600        /// Optional. Count of successfully validated buckets.
3601        pub validated_count: i64,
3602
3603        /// Optional. Count of buckets with permission denied errors.
3604        pub permission_denied_count: i64,
3605
3606        /// Optional. Subset of bucket names that have permission denied.
3607        pub permission_denied_bucket_ids: std::vec::Vec<std::string::String>,
3608
3609        /// Optional. Count of buckets that are not subscribed to Storage
3610        /// Intelligence.
3611        #[deprecated]
3612        pub non_management_hub_entitled_count: i64,
3613
3614        /// Optional. Number of buckets that encountered internal errors during the
3615        /// validation process. These buckets are automatically retried in subsequent
3616        /// validation attempts.
3617        pub internal_error_count: i64,
3618
3619        /// Optional. Count of buckets that are not subscribed to Storage
3620        /// Intelligence.
3621        pub non_storage_intelligence_entitled_count: i64,
3622
3623        /// Optional. Subset of bucket names that are not subscribed to Storage
3624        /// Intelligence.
3625        pub non_storage_intelligence_entitled_bucket_ids: std::vec::Vec<std::string::String>,
3626
3627        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3628    }
3629
3630    impl BucketErrors {
3631        /// Creates a new default instance.
3632        pub fn new() -> Self {
3633            std::default::Default::default()
3634        }
3635
3636        /// Sets the value of [validated_count][crate::model::dataset_config::BucketErrors::validated_count].
3637        ///
3638        /// # Example
3639        /// ```ignore,no_run
3640        /// # use google_cloud_storageinsights_v1::model::dataset_config::BucketErrors;
3641        /// let x = BucketErrors::new().set_validated_count(42);
3642        /// ```
3643        pub fn set_validated_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3644            self.validated_count = v.into();
3645            self
3646        }
3647
3648        /// Sets the value of [permission_denied_count][crate::model::dataset_config::BucketErrors::permission_denied_count].
3649        ///
3650        /// # Example
3651        /// ```ignore,no_run
3652        /// # use google_cloud_storageinsights_v1::model::dataset_config::BucketErrors;
3653        /// let x = BucketErrors::new().set_permission_denied_count(42);
3654        /// ```
3655        pub fn set_permission_denied_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3656            self.permission_denied_count = v.into();
3657            self
3658        }
3659
3660        /// Sets the value of [permission_denied_bucket_ids][crate::model::dataset_config::BucketErrors::permission_denied_bucket_ids].
3661        ///
3662        /// # Example
3663        /// ```ignore,no_run
3664        /// # use google_cloud_storageinsights_v1::model::dataset_config::BucketErrors;
3665        /// let x = BucketErrors::new().set_permission_denied_bucket_ids(["a", "b", "c"]);
3666        /// ```
3667        pub fn set_permission_denied_bucket_ids<T, V>(mut self, v: T) -> Self
3668        where
3669            T: std::iter::IntoIterator<Item = V>,
3670            V: std::convert::Into<std::string::String>,
3671        {
3672            use std::iter::Iterator;
3673            self.permission_denied_bucket_ids = v.into_iter().map(|i| i.into()).collect();
3674            self
3675        }
3676
3677        /// Sets the value of [non_management_hub_entitled_count][crate::model::dataset_config::BucketErrors::non_management_hub_entitled_count].
3678        ///
3679        /// # Example
3680        /// ```ignore,no_run
3681        /// # use google_cloud_storageinsights_v1::model::dataset_config::BucketErrors;
3682        /// let x = BucketErrors::new().set_non_management_hub_entitled_count(42);
3683        /// ```
3684        #[deprecated]
3685        pub fn set_non_management_hub_entitled_count<T: std::convert::Into<i64>>(
3686            mut self,
3687            v: T,
3688        ) -> Self {
3689            self.non_management_hub_entitled_count = v.into();
3690            self
3691        }
3692
3693        /// Sets the value of [internal_error_count][crate::model::dataset_config::BucketErrors::internal_error_count].
3694        ///
3695        /// # Example
3696        /// ```ignore,no_run
3697        /// # use google_cloud_storageinsights_v1::model::dataset_config::BucketErrors;
3698        /// let x = BucketErrors::new().set_internal_error_count(42);
3699        /// ```
3700        pub fn set_internal_error_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3701            self.internal_error_count = v.into();
3702            self
3703        }
3704
3705        /// Sets the value of [non_storage_intelligence_entitled_count][crate::model::dataset_config::BucketErrors::non_storage_intelligence_entitled_count].
3706        ///
3707        /// # Example
3708        /// ```ignore,no_run
3709        /// # use google_cloud_storageinsights_v1::model::dataset_config::BucketErrors;
3710        /// let x = BucketErrors::new().set_non_storage_intelligence_entitled_count(42);
3711        /// ```
3712        pub fn set_non_storage_intelligence_entitled_count<T: std::convert::Into<i64>>(
3713            mut self,
3714            v: T,
3715        ) -> Self {
3716            self.non_storage_intelligence_entitled_count = v.into();
3717            self
3718        }
3719
3720        /// Sets the value of [non_storage_intelligence_entitled_bucket_ids][crate::model::dataset_config::BucketErrors::non_storage_intelligence_entitled_bucket_ids].
3721        ///
3722        /// # Example
3723        /// ```ignore,no_run
3724        /// # use google_cloud_storageinsights_v1::model::dataset_config::BucketErrors;
3725        /// let x = BucketErrors::new().set_non_storage_intelligence_entitled_bucket_ids(["a", "b", "c"]);
3726        /// ```
3727        pub fn set_non_storage_intelligence_entitled_bucket_ids<T, V>(mut self, v: T) -> Self
3728        where
3729            T: std::iter::IntoIterator<Item = V>,
3730            V: std::convert::Into<std::string::String>,
3731        {
3732            use std::iter::Iterator;
3733            self.non_storage_intelligence_entitled_bucket_ids =
3734                v.into_iter().map(|i| i.into()).collect();
3735            self
3736        }
3737    }
3738
3739    impl wkt::message::Message for BucketErrors {
3740        fn typename() -> &'static str {
3741            "type.googleapis.com/google.cloud.storageinsights.v1.DatasetConfig.BucketErrors"
3742        }
3743    }
3744
3745    /// Provides a summary of the project level error statistics.
3746    #[derive(Clone, Default, PartialEq)]
3747    #[non_exhaustive]
3748    pub struct ProjectErrors {
3749        /// Optional. Count of successfully validated projects.
3750        pub validated_count: std::option::Option<i64>,
3751
3752        /// Optional. Count of projects which are not in the same organization.
3753        pub outside_org_error_count: std::option::Option<i64>,
3754
3755        /// Optional. Subset of project numbers which are not in the same
3756        /// organization.
3757        pub outside_org_project_numbers: std::vec::Vec<i64>,
3758
3759        /// Optional. Count of projects that are not subscribed to Storage
3760        /// Intelligence.
3761        #[deprecated]
3762        pub non_management_hub_entitled_error_count: std::option::Option<i64>,
3763
3764        /// Optional. Subset of project numbers that are not subscribed to Storage
3765        /// Intelligence.
3766        #[deprecated]
3767        pub non_management_hub_entitled_project_numbers: std::vec::Vec<i64>,
3768
3769        /// Optional. Count of projects that are not subscribed to Storage
3770        /// Intelligence.
3771        pub non_storage_intelligence_entitled_error_count: std::option::Option<i64>,
3772
3773        /// Optional. Subset of project numbers that are not subscribed to Storage
3774        /// Intelligence.
3775        pub non_storage_intelligence_entitled_project_numbers: std::vec::Vec<i64>,
3776
3777        /// Optional. Number of projects that encountered internal errors during
3778        /// validation and are automatically retried.
3779        pub internal_error_count: std::option::Option<i64>,
3780
3781        /// The destination project check result. It indicates whether the project
3782        /// is in the correct organization or if an internal error occurred during
3783        /// the check.
3784        pub destination_project_check_result: std::option::Option<
3785            crate::model::dataset_config::project_errors::DestinationProjectCheckResult,
3786        >,
3787
3788        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3789    }
3790
3791    impl ProjectErrors {
3792        /// Creates a new default instance.
3793        pub fn new() -> Self {
3794            std::default::Default::default()
3795        }
3796
3797        /// Sets the value of [validated_count][crate::model::dataset_config::ProjectErrors::validated_count].
3798        ///
3799        /// # Example
3800        /// ```ignore,no_run
3801        /// # use google_cloud_storageinsights_v1::model::dataset_config::ProjectErrors;
3802        /// let x = ProjectErrors::new().set_validated_count(42);
3803        /// ```
3804        pub fn set_validated_count<T>(mut self, v: T) -> Self
3805        where
3806            T: std::convert::Into<i64>,
3807        {
3808            self.validated_count = std::option::Option::Some(v.into());
3809            self
3810        }
3811
3812        /// Sets or clears the value of [validated_count][crate::model::dataset_config::ProjectErrors::validated_count].
3813        ///
3814        /// # Example
3815        /// ```ignore,no_run
3816        /// # use google_cloud_storageinsights_v1::model::dataset_config::ProjectErrors;
3817        /// let x = ProjectErrors::new().set_or_clear_validated_count(Some(42));
3818        /// let x = ProjectErrors::new().set_or_clear_validated_count(None::<i32>);
3819        /// ```
3820        pub fn set_or_clear_validated_count<T>(mut self, v: std::option::Option<T>) -> Self
3821        where
3822            T: std::convert::Into<i64>,
3823        {
3824            self.validated_count = v.map(|x| x.into());
3825            self
3826        }
3827
3828        /// Sets the value of [outside_org_error_count][crate::model::dataset_config::ProjectErrors::outside_org_error_count].
3829        ///
3830        /// # Example
3831        /// ```ignore,no_run
3832        /// # use google_cloud_storageinsights_v1::model::dataset_config::ProjectErrors;
3833        /// let x = ProjectErrors::new().set_outside_org_error_count(42);
3834        /// ```
3835        pub fn set_outside_org_error_count<T>(mut self, v: T) -> Self
3836        where
3837            T: std::convert::Into<i64>,
3838        {
3839            self.outside_org_error_count = std::option::Option::Some(v.into());
3840            self
3841        }
3842
3843        /// Sets or clears the value of [outside_org_error_count][crate::model::dataset_config::ProjectErrors::outside_org_error_count].
3844        ///
3845        /// # Example
3846        /// ```ignore,no_run
3847        /// # use google_cloud_storageinsights_v1::model::dataset_config::ProjectErrors;
3848        /// let x = ProjectErrors::new().set_or_clear_outside_org_error_count(Some(42));
3849        /// let x = ProjectErrors::new().set_or_clear_outside_org_error_count(None::<i32>);
3850        /// ```
3851        pub fn set_or_clear_outside_org_error_count<T>(mut self, v: std::option::Option<T>) -> Self
3852        where
3853            T: std::convert::Into<i64>,
3854        {
3855            self.outside_org_error_count = v.map(|x| x.into());
3856            self
3857        }
3858
3859        /// Sets the value of [outside_org_project_numbers][crate::model::dataset_config::ProjectErrors::outside_org_project_numbers].
3860        ///
3861        /// # Example
3862        /// ```ignore,no_run
3863        /// # use google_cloud_storageinsights_v1::model::dataset_config::ProjectErrors;
3864        /// let x = ProjectErrors::new().set_outside_org_project_numbers([1, 2, 3]);
3865        /// ```
3866        pub fn set_outside_org_project_numbers<T, V>(mut self, v: T) -> Self
3867        where
3868            T: std::iter::IntoIterator<Item = V>,
3869            V: std::convert::Into<i64>,
3870        {
3871            use std::iter::Iterator;
3872            self.outside_org_project_numbers = v.into_iter().map(|i| i.into()).collect();
3873            self
3874        }
3875
3876        /// Sets the value of [non_management_hub_entitled_error_count][crate::model::dataset_config::ProjectErrors::non_management_hub_entitled_error_count].
3877        ///
3878        /// # Example
3879        /// ```ignore,no_run
3880        /// # use google_cloud_storageinsights_v1::model::dataset_config::ProjectErrors;
3881        /// let x = ProjectErrors::new().set_non_management_hub_entitled_error_count(42);
3882        /// ```
3883        #[deprecated]
3884        pub fn set_non_management_hub_entitled_error_count<T>(mut self, v: T) -> Self
3885        where
3886            T: std::convert::Into<i64>,
3887        {
3888            self.non_management_hub_entitled_error_count = std::option::Option::Some(v.into());
3889            self
3890        }
3891
3892        /// Sets or clears the value of [non_management_hub_entitled_error_count][crate::model::dataset_config::ProjectErrors::non_management_hub_entitled_error_count].
3893        ///
3894        /// # Example
3895        /// ```ignore,no_run
3896        /// # use google_cloud_storageinsights_v1::model::dataset_config::ProjectErrors;
3897        /// let x = ProjectErrors::new().set_or_clear_non_management_hub_entitled_error_count(Some(42));
3898        /// let x = ProjectErrors::new().set_or_clear_non_management_hub_entitled_error_count(None::<i32>);
3899        /// ```
3900        #[deprecated]
3901        pub fn set_or_clear_non_management_hub_entitled_error_count<T>(
3902            mut self,
3903            v: std::option::Option<T>,
3904        ) -> Self
3905        where
3906            T: std::convert::Into<i64>,
3907        {
3908            self.non_management_hub_entitled_error_count = v.map(|x| x.into());
3909            self
3910        }
3911
3912        /// Sets the value of [non_management_hub_entitled_project_numbers][crate::model::dataset_config::ProjectErrors::non_management_hub_entitled_project_numbers].
3913        ///
3914        /// # Example
3915        /// ```ignore,no_run
3916        /// # use google_cloud_storageinsights_v1::model::dataset_config::ProjectErrors;
3917        /// let x = ProjectErrors::new().set_non_management_hub_entitled_project_numbers([1, 2, 3]);
3918        /// ```
3919        #[deprecated]
3920        pub fn set_non_management_hub_entitled_project_numbers<T, V>(mut self, v: T) -> Self
3921        where
3922            T: std::iter::IntoIterator<Item = V>,
3923            V: std::convert::Into<i64>,
3924        {
3925            use std::iter::Iterator;
3926            self.non_management_hub_entitled_project_numbers =
3927                v.into_iter().map(|i| i.into()).collect();
3928            self
3929        }
3930
3931        /// Sets the value of [non_storage_intelligence_entitled_error_count][crate::model::dataset_config::ProjectErrors::non_storage_intelligence_entitled_error_count].
3932        ///
3933        /// # Example
3934        /// ```ignore,no_run
3935        /// # use google_cloud_storageinsights_v1::model::dataset_config::ProjectErrors;
3936        /// let x = ProjectErrors::new().set_non_storage_intelligence_entitled_error_count(42);
3937        /// ```
3938        pub fn set_non_storage_intelligence_entitled_error_count<T>(mut self, v: T) -> Self
3939        where
3940            T: std::convert::Into<i64>,
3941        {
3942            self.non_storage_intelligence_entitled_error_count =
3943                std::option::Option::Some(v.into());
3944            self
3945        }
3946
3947        /// Sets or clears the value of [non_storage_intelligence_entitled_error_count][crate::model::dataset_config::ProjectErrors::non_storage_intelligence_entitled_error_count].
3948        ///
3949        /// # Example
3950        /// ```ignore,no_run
3951        /// # use google_cloud_storageinsights_v1::model::dataset_config::ProjectErrors;
3952        /// let x = ProjectErrors::new().set_or_clear_non_storage_intelligence_entitled_error_count(Some(42));
3953        /// let x = ProjectErrors::new().set_or_clear_non_storage_intelligence_entitled_error_count(None::<i32>);
3954        /// ```
3955        pub fn set_or_clear_non_storage_intelligence_entitled_error_count<T>(
3956            mut self,
3957            v: std::option::Option<T>,
3958        ) -> Self
3959        where
3960            T: std::convert::Into<i64>,
3961        {
3962            self.non_storage_intelligence_entitled_error_count = v.map(|x| x.into());
3963            self
3964        }
3965
3966        /// Sets the value of [non_storage_intelligence_entitled_project_numbers][crate::model::dataset_config::ProjectErrors::non_storage_intelligence_entitled_project_numbers].
3967        ///
3968        /// # Example
3969        /// ```ignore,no_run
3970        /// # use google_cloud_storageinsights_v1::model::dataset_config::ProjectErrors;
3971        /// let x = ProjectErrors::new().set_non_storage_intelligence_entitled_project_numbers([1, 2, 3]);
3972        /// ```
3973        pub fn set_non_storage_intelligence_entitled_project_numbers<T, V>(mut self, v: T) -> Self
3974        where
3975            T: std::iter::IntoIterator<Item = V>,
3976            V: std::convert::Into<i64>,
3977        {
3978            use std::iter::Iterator;
3979            self.non_storage_intelligence_entitled_project_numbers =
3980                v.into_iter().map(|i| i.into()).collect();
3981            self
3982        }
3983
3984        /// Sets the value of [internal_error_count][crate::model::dataset_config::ProjectErrors::internal_error_count].
3985        ///
3986        /// # Example
3987        /// ```ignore,no_run
3988        /// # use google_cloud_storageinsights_v1::model::dataset_config::ProjectErrors;
3989        /// let x = ProjectErrors::new().set_internal_error_count(42);
3990        /// ```
3991        pub fn set_internal_error_count<T>(mut self, v: T) -> Self
3992        where
3993            T: std::convert::Into<i64>,
3994        {
3995            self.internal_error_count = std::option::Option::Some(v.into());
3996            self
3997        }
3998
3999        /// Sets or clears the value of [internal_error_count][crate::model::dataset_config::ProjectErrors::internal_error_count].
4000        ///
4001        /// # Example
4002        /// ```ignore,no_run
4003        /// # use google_cloud_storageinsights_v1::model::dataset_config::ProjectErrors;
4004        /// let x = ProjectErrors::new().set_or_clear_internal_error_count(Some(42));
4005        /// let x = ProjectErrors::new().set_or_clear_internal_error_count(None::<i32>);
4006        /// ```
4007        pub fn set_or_clear_internal_error_count<T>(mut self, v: std::option::Option<T>) -> Self
4008        where
4009            T: std::convert::Into<i64>,
4010        {
4011            self.internal_error_count = v.map(|x| x.into());
4012            self
4013        }
4014
4015        /// Sets the value of [destination_project_check_result][crate::model::dataset_config::ProjectErrors::destination_project_check_result].
4016        ///
4017        /// Note that all the setters affecting `destination_project_check_result` are mutually
4018        /// exclusive.
4019        ///
4020        /// # Example
4021        /// ```ignore,no_run
4022        /// # use google_cloud_storageinsights_v1::model::dataset_config::ProjectErrors;
4023        /// use google_cloud_storageinsights_v1::model::dataset_config::project_errors::DestinationProjectCheckResult;
4024        /// let x = ProjectErrors::new().set_destination_project_check_result(Some(DestinationProjectCheckResult::DestinationProjectOrgError(true)));
4025        /// ```
4026        pub fn set_destination_project_check_result<
4027            T: std::convert::Into<
4028                    std::option::Option<
4029                        crate::model::dataset_config::project_errors::DestinationProjectCheckResult,
4030                    >,
4031                >,
4032        >(
4033            mut self,
4034            v: T,
4035        ) -> Self {
4036            self.destination_project_check_result = v.into();
4037            self
4038        }
4039
4040        /// The value of [destination_project_check_result][crate::model::dataset_config::ProjectErrors::destination_project_check_result]
4041        /// if it holds a `DestinationProjectOrgError`, `None` if the field is not set or
4042        /// holds a different branch.
4043        pub fn destination_project_org_error(&self) -> std::option::Option<&bool> {
4044            #[allow(unreachable_patterns)]
4045            self.destination_project_check_result.as_ref().and_then(|v| match v {
4046                crate::model::dataset_config::project_errors::DestinationProjectCheckResult::DestinationProjectOrgError(v) => std::option::Option::Some(v),
4047                _ => std::option::Option::None,
4048            })
4049        }
4050
4051        /// Sets the value of [destination_project_check_result][crate::model::dataset_config::ProjectErrors::destination_project_check_result]
4052        /// to hold a `DestinationProjectOrgError`.
4053        ///
4054        /// Note that all the setters affecting `destination_project_check_result` are
4055        /// mutually exclusive.
4056        ///
4057        /// # Example
4058        /// ```ignore,no_run
4059        /// # use google_cloud_storageinsights_v1::model::dataset_config::ProjectErrors;
4060        /// let x = ProjectErrors::new().set_destination_project_org_error(true);
4061        /// assert!(x.destination_project_org_error().is_some());
4062        /// assert!(x.destination_project_check_has_internal_error().is_none());
4063        /// ```
4064        pub fn set_destination_project_org_error<T: std::convert::Into<bool>>(
4065            mut self,
4066            v: T,
4067        ) -> Self {
4068            self.destination_project_check_result = std::option::Option::Some(
4069                crate::model::dataset_config::project_errors::DestinationProjectCheckResult::DestinationProjectOrgError(
4070                    v.into()
4071                )
4072            );
4073            self
4074        }
4075
4076        /// The value of [destination_project_check_result][crate::model::dataset_config::ProjectErrors::destination_project_check_result]
4077        /// if it holds a `DestinationProjectCheckHasInternalError`, `None` if the field is not set or
4078        /// holds a different branch.
4079        pub fn destination_project_check_has_internal_error(&self) -> std::option::Option<&bool> {
4080            #[allow(unreachable_patterns)]
4081            self.destination_project_check_result.as_ref().and_then(|v| match v {
4082                crate::model::dataset_config::project_errors::DestinationProjectCheckResult::DestinationProjectCheckHasInternalError(v) => std::option::Option::Some(v),
4083                _ => std::option::Option::None,
4084            })
4085        }
4086
4087        /// Sets the value of [destination_project_check_result][crate::model::dataset_config::ProjectErrors::destination_project_check_result]
4088        /// to hold a `DestinationProjectCheckHasInternalError`.
4089        ///
4090        /// Note that all the setters affecting `destination_project_check_result` are
4091        /// mutually exclusive.
4092        ///
4093        /// # Example
4094        /// ```ignore,no_run
4095        /// # use google_cloud_storageinsights_v1::model::dataset_config::ProjectErrors;
4096        /// let x = ProjectErrors::new().set_destination_project_check_has_internal_error(true);
4097        /// assert!(x.destination_project_check_has_internal_error().is_some());
4098        /// assert!(x.destination_project_org_error().is_none());
4099        /// ```
4100        pub fn set_destination_project_check_has_internal_error<T: std::convert::Into<bool>>(
4101            mut self,
4102            v: T,
4103        ) -> Self {
4104            self.destination_project_check_result = std::option::Option::Some(
4105                crate::model::dataset_config::project_errors::DestinationProjectCheckResult::DestinationProjectCheckHasInternalError(
4106                    v.into()
4107                )
4108            );
4109            self
4110        }
4111    }
4112
4113    impl wkt::message::Message for ProjectErrors {
4114        fn typename() -> &'static str {
4115            "type.googleapis.com/google.cloud.storageinsights.v1.DatasetConfig.ProjectErrors"
4116        }
4117    }
4118
4119    /// Defines additional types related to [ProjectErrors].
4120    pub mod project_errors {
4121        #[allow(unused_imports)]
4122        use super::*;
4123
4124        /// The destination project check result. It indicates whether the project
4125        /// is in the correct organization or if an internal error occurred during
4126        /// the check.
4127        #[derive(Clone, Debug, PartialEq)]
4128        #[non_exhaustive]
4129        pub enum DestinationProjectCheckResult {
4130            /// Optional. Indicates if the destination project resides within the same
4131            /// organization as the source project.
4132            DestinationProjectOrgError(bool),
4133            /// Optional. Indicates whether the destination project check failed due to
4134            /// an internal error. If `true`, the system automatically retries the
4135            /// check.
4136            DestinationProjectCheckHasInternalError(bool),
4137        }
4138    }
4139
4140    /// Summary of validation errors that occurred during the verification phase.
4141    #[derive(Clone, Default, PartialEq)]
4142    #[non_exhaustive]
4143    pub struct ValidationErrorsBeforeIngestion {
4144        /// Optional. Provides a summary of the bucket level error stats.
4145        pub bucket_errors: std::option::Option<crate::model::dataset_config::BucketErrors>,
4146
4147        /// Optional. Provides a summary of the project level error stats.
4148        pub project_errors: std::option::Option<crate::model::dataset_config::ProjectErrors>,
4149
4150        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4151    }
4152
4153    impl ValidationErrorsBeforeIngestion {
4154        /// Creates a new default instance.
4155        pub fn new() -> Self {
4156            std::default::Default::default()
4157        }
4158
4159        /// Sets the value of [bucket_errors][crate::model::dataset_config::ValidationErrorsBeforeIngestion::bucket_errors].
4160        ///
4161        /// # Example
4162        /// ```ignore,no_run
4163        /// # use google_cloud_storageinsights_v1::model::dataset_config::ValidationErrorsBeforeIngestion;
4164        /// use google_cloud_storageinsights_v1::model::dataset_config::BucketErrors;
4165        /// let x = ValidationErrorsBeforeIngestion::new().set_bucket_errors(BucketErrors::default()/* use setters */);
4166        /// ```
4167        pub fn set_bucket_errors<T>(mut self, v: T) -> Self
4168        where
4169            T: std::convert::Into<crate::model::dataset_config::BucketErrors>,
4170        {
4171            self.bucket_errors = std::option::Option::Some(v.into());
4172            self
4173        }
4174
4175        /// Sets or clears the value of [bucket_errors][crate::model::dataset_config::ValidationErrorsBeforeIngestion::bucket_errors].
4176        ///
4177        /// # Example
4178        /// ```ignore,no_run
4179        /// # use google_cloud_storageinsights_v1::model::dataset_config::ValidationErrorsBeforeIngestion;
4180        /// use google_cloud_storageinsights_v1::model::dataset_config::BucketErrors;
4181        /// let x = ValidationErrorsBeforeIngestion::new().set_or_clear_bucket_errors(Some(BucketErrors::default()/* use setters */));
4182        /// let x = ValidationErrorsBeforeIngestion::new().set_or_clear_bucket_errors(None::<BucketErrors>);
4183        /// ```
4184        pub fn set_or_clear_bucket_errors<T>(mut self, v: std::option::Option<T>) -> Self
4185        where
4186            T: std::convert::Into<crate::model::dataset_config::BucketErrors>,
4187        {
4188            self.bucket_errors = v.map(|x| x.into());
4189            self
4190        }
4191
4192        /// Sets the value of [project_errors][crate::model::dataset_config::ValidationErrorsBeforeIngestion::project_errors].
4193        ///
4194        /// # Example
4195        /// ```ignore,no_run
4196        /// # use google_cloud_storageinsights_v1::model::dataset_config::ValidationErrorsBeforeIngestion;
4197        /// use google_cloud_storageinsights_v1::model::dataset_config::ProjectErrors;
4198        /// let x = ValidationErrorsBeforeIngestion::new().set_project_errors(ProjectErrors::default()/* use setters */);
4199        /// ```
4200        pub fn set_project_errors<T>(mut self, v: T) -> Self
4201        where
4202            T: std::convert::Into<crate::model::dataset_config::ProjectErrors>,
4203        {
4204            self.project_errors = std::option::Option::Some(v.into());
4205            self
4206        }
4207
4208        /// Sets or clears the value of [project_errors][crate::model::dataset_config::ValidationErrorsBeforeIngestion::project_errors].
4209        ///
4210        /// # Example
4211        /// ```ignore,no_run
4212        /// # use google_cloud_storageinsights_v1::model::dataset_config::ValidationErrorsBeforeIngestion;
4213        /// use google_cloud_storageinsights_v1::model::dataset_config::ProjectErrors;
4214        /// let x = ValidationErrorsBeforeIngestion::new().set_or_clear_project_errors(Some(ProjectErrors::default()/* use setters */));
4215        /// let x = ValidationErrorsBeforeIngestion::new().set_or_clear_project_errors(None::<ProjectErrors>);
4216        /// ```
4217        pub fn set_or_clear_project_errors<T>(mut self, v: std::option::Option<T>) -> Self
4218        where
4219            T: std::convert::Into<crate::model::dataset_config::ProjectErrors>,
4220        {
4221            self.project_errors = v.map(|x| x.into());
4222            self
4223        }
4224    }
4225
4226    impl wkt::message::Message for ValidationErrorsBeforeIngestion {
4227        fn typename() -> &'static str {
4228            "type.googleapis.com/google.cloud.storageinsights.v1.DatasetConfig.ValidationErrorsBeforeIngestion"
4229        }
4230    }
4231
4232    /// State of the configuration.
4233    ///
4234    /// # Working with unknown values
4235    ///
4236    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4237    /// additional enum variants at any time. Adding new variants is not considered
4238    /// a breaking change. Applications should write their code in anticipation of:
4239    ///
4240    /// - New values appearing in future releases of the client library, **and**
4241    /// - New values received dynamically, without application changes.
4242    ///
4243    /// Please consult the [Working with enums] section in the user guide for some
4244    /// guidelines.
4245    ///
4246    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
4247    #[derive(Clone, Debug, PartialEq)]
4248    #[non_exhaustive]
4249    pub enum ConfigState {
4250        /// Unspecified state.
4251        Unspecified,
4252        /// Active configuration indicates that the configuration is
4253        /// actively ingesting data.
4254        Active,
4255        /// In this state, the configuration is being verified for various
4256        /// permissions.
4257        VerificationInProgress,
4258        /// Configuration is created and further processing needs to happen.
4259        Created,
4260        /// Configuration is under processing
4261        Processing,
4262        /// If set, the enum was initialized with an unknown value.
4263        ///
4264        /// Applications can examine the value using [ConfigState::value] or
4265        /// [ConfigState::name].
4266        UnknownValue(config_state::UnknownValue),
4267    }
4268
4269    #[doc(hidden)]
4270    pub mod config_state {
4271        #[allow(unused_imports)]
4272        use super::*;
4273        #[derive(Clone, Debug, PartialEq)]
4274        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4275    }
4276
4277    impl ConfigState {
4278        /// Gets the enum value.
4279        ///
4280        /// Returns `None` if the enum contains an unknown value deserialized from
4281        /// the string representation of enums.
4282        pub fn value(&self) -> std::option::Option<i32> {
4283            match self {
4284                Self::Unspecified => std::option::Option::Some(0),
4285                Self::Active => std::option::Option::Some(1),
4286                Self::VerificationInProgress => std::option::Option::Some(2),
4287                Self::Created => std::option::Option::Some(3),
4288                Self::Processing => std::option::Option::Some(4),
4289                Self::UnknownValue(u) => u.0.value(),
4290            }
4291        }
4292
4293        /// Gets the enum value as a string.
4294        ///
4295        /// Returns `None` if the enum contains an unknown value deserialized from
4296        /// the integer representation of enums.
4297        pub fn name(&self) -> std::option::Option<&str> {
4298            match self {
4299                Self::Unspecified => std::option::Option::Some("CONFIG_STATE_UNSPECIFIED"),
4300                Self::Active => std::option::Option::Some("CONFIG_STATE_ACTIVE"),
4301                Self::VerificationInProgress => {
4302                    std::option::Option::Some("CONFIG_STATE_VERIFICATION_IN_PROGRESS")
4303                }
4304                Self::Created => std::option::Option::Some("CONFIG_STATE_CREATED"),
4305                Self::Processing => std::option::Option::Some("CONFIG_STATE_PROCESSING"),
4306                Self::UnknownValue(u) => u.0.name(),
4307            }
4308        }
4309    }
4310
4311    impl std::default::Default for ConfigState {
4312        fn default() -> Self {
4313            use std::convert::From;
4314            Self::from(0)
4315        }
4316    }
4317
4318    impl std::fmt::Display for ConfigState {
4319        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4320            wkt::internal::display_enum(f, self.name(), self.value())
4321        }
4322    }
4323
4324    impl std::convert::From<i32> for ConfigState {
4325        fn from(value: i32) -> Self {
4326            match value {
4327                0 => Self::Unspecified,
4328                1 => Self::Active,
4329                2 => Self::VerificationInProgress,
4330                3 => Self::Created,
4331                4 => Self::Processing,
4332                _ => Self::UnknownValue(config_state::UnknownValue(
4333                    wkt::internal::UnknownEnumValue::Integer(value),
4334                )),
4335            }
4336        }
4337    }
4338
4339    impl std::convert::From<&str> for ConfigState {
4340        fn from(value: &str) -> Self {
4341            use std::string::ToString;
4342            match value {
4343                "CONFIG_STATE_UNSPECIFIED" => Self::Unspecified,
4344                "CONFIG_STATE_ACTIVE" => Self::Active,
4345                "CONFIG_STATE_VERIFICATION_IN_PROGRESS" => Self::VerificationInProgress,
4346                "CONFIG_STATE_CREATED" => Self::Created,
4347                "CONFIG_STATE_PROCESSING" => Self::Processing,
4348                _ => Self::UnknownValue(config_state::UnknownValue(
4349                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4350                )),
4351            }
4352        }
4353    }
4354
4355    impl serde::ser::Serialize for ConfigState {
4356        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4357        where
4358            S: serde::Serializer,
4359        {
4360            match self {
4361                Self::Unspecified => serializer.serialize_i32(0),
4362                Self::Active => serializer.serialize_i32(1),
4363                Self::VerificationInProgress => serializer.serialize_i32(2),
4364                Self::Created => serializer.serialize_i32(3),
4365                Self::Processing => serializer.serialize_i32(4),
4366                Self::UnknownValue(u) => u.0.serialize(serializer),
4367            }
4368        }
4369    }
4370
4371    impl<'de> serde::de::Deserialize<'de> for ConfigState {
4372        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4373        where
4374            D: serde::Deserializer<'de>,
4375        {
4376            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ConfigState>::new(
4377                ".google.cloud.storageinsights.v1.DatasetConfig.ConfigState",
4378            ))
4379        }
4380    }
4381
4382    /// Defines the options for providing source identifiers for the dataset.
4383    #[derive(Clone, Debug, PartialEq)]
4384    #[non_exhaustive]
4385    pub enum SourceOptions {
4386        /// Defines the options for providing source projects for the dataset.
4387        SourceProjects(std::boxed::Box<crate::model::dataset_config::SourceProjects>),
4388        /// Defines the options for providing source folders for the dataset.
4389        SourceFolders(std::boxed::Box<crate::model::dataset_config::SourceFolders>),
4390        /// Defines the options for providing a source organization for the dataset.
4391        OrganizationScope(bool),
4392        /// Input only. Cloud Storage object path containing a list of
4393        /// project or folder numbers to include in the dataset;
4394        /// it cannot contain a mix of project and folders.
4395        ///
4396        /// The object must be a text file where each line has one of the following
4397        /// entries:
4398        ///
4399        /// - Project number, formatted as `projects/{project_number}`, for example,
4400        ///   `projects/1234567890`.
4401        /// - Folder identifier, formatted as `folders/{folder_number}`, for example,
4402        ///   `folders/9876543210`.
4403        ///   Path must be in the format `gs://{bucket_name}/{object_name}`.
4404        CloudStorageObjectPath(std::string::String),
4405    }
4406
4407    /// Cloud Storage locations to include or exclude.
4408    #[derive(Clone, Debug, PartialEq)]
4409    #[non_exhaustive]
4410    pub enum CloudStorageLocationsOneOf {
4411        #[allow(missing_docs)]
4412        IncludeCloudStorageLocations(
4413            std::boxed::Box<crate::model::dataset_config::CloudStorageLocations>,
4414        ),
4415        #[allow(missing_docs)]
4416        ExcludeCloudStorageLocations(
4417            std::boxed::Box<crate::model::dataset_config::CloudStorageLocations>,
4418        ),
4419    }
4420
4421    /// Cloud Storage buckets to include or exclude.
4422    #[derive(Clone, Debug, PartialEq)]
4423    #[non_exhaustive]
4424    pub enum CloudStorageBucketsOneOf {
4425        #[allow(missing_docs)]
4426        IncludeCloudStorageBuckets(
4427            std::boxed::Box<crate::model::dataset_config::CloudStorageBuckets>,
4428        ),
4429        #[allow(missing_docs)]
4430        ExcludeCloudStorageBuckets(
4431            std::boxed::Box<crate::model::dataset_config::CloudStorageBuckets>,
4432        ),
4433    }
4434}
4435
4436/// Request message for
4437/// [`ListDatasetConfigs`][google.cloud.storageinsights.v1.StorageInsights.ListDatasetConfigs]
4438///
4439/// [google.cloud.storageinsights.v1.StorageInsights.ListDatasetConfigs]: crate::client::StorageInsights::list_dataset_configs
4440#[derive(Clone, Default, PartialEq)]
4441#[non_exhaustive]
4442pub struct ListDatasetConfigsRequest {
4443    /// Required. Parent value for ListDatasetConfigsRequest
4444    pub parent: std::string::String,
4445
4446    /// Requested page size. Server might return fewer items than requested.
4447    /// If unspecified, server picks an appropriate default.
4448    pub page_size: i32,
4449
4450    /// A token identifying a page of results the server should return.
4451    pub page_token: std::string::String,
4452
4453    /// Filtering results
4454    pub filter: std::string::String,
4455
4456    /// Hint for how to order the results
4457    pub order_by: std::string::String,
4458
4459    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4460}
4461
4462impl ListDatasetConfigsRequest {
4463    /// Creates a new default instance.
4464    pub fn new() -> Self {
4465        std::default::Default::default()
4466    }
4467
4468    /// Sets the value of [parent][crate::model::ListDatasetConfigsRequest::parent].
4469    ///
4470    /// # Example
4471    /// ```ignore,no_run
4472    /// # use google_cloud_storageinsights_v1::model::ListDatasetConfigsRequest;
4473    /// let x = ListDatasetConfigsRequest::new().set_parent("example");
4474    /// ```
4475    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4476        self.parent = v.into();
4477        self
4478    }
4479
4480    /// Sets the value of [page_size][crate::model::ListDatasetConfigsRequest::page_size].
4481    ///
4482    /// # Example
4483    /// ```ignore,no_run
4484    /// # use google_cloud_storageinsights_v1::model::ListDatasetConfigsRequest;
4485    /// let x = ListDatasetConfigsRequest::new().set_page_size(42);
4486    /// ```
4487    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4488        self.page_size = v.into();
4489        self
4490    }
4491
4492    /// Sets the value of [page_token][crate::model::ListDatasetConfigsRequest::page_token].
4493    ///
4494    /// # Example
4495    /// ```ignore,no_run
4496    /// # use google_cloud_storageinsights_v1::model::ListDatasetConfigsRequest;
4497    /// let x = ListDatasetConfigsRequest::new().set_page_token("example");
4498    /// ```
4499    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4500        self.page_token = v.into();
4501        self
4502    }
4503
4504    /// Sets the value of [filter][crate::model::ListDatasetConfigsRequest::filter].
4505    ///
4506    /// # Example
4507    /// ```ignore,no_run
4508    /// # use google_cloud_storageinsights_v1::model::ListDatasetConfigsRequest;
4509    /// let x = ListDatasetConfigsRequest::new().set_filter("example");
4510    /// ```
4511    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4512        self.filter = v.into();
4513        self
4514    }
4515
4516    /// Sets the value of [order_by][crate::model::ListDatasetConfigsRequest::order_by].
4517    ///
4518    /// # Example
4519    /// ```ignore,no_run
4520    /// # use google_cloud_storageinsights_v1::model::ListDatasetConfigsRequest;
4521    /// let x = ListDatasetConfigsRequest::new().set_order_by("example");
4522    /// ```
4523    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4524        self.order_by = v.into();
4525        self
4526    }
4527}
4528
4529impl wkt::message::Message for ListDatasetConfigsRequest {
4530    fn typename() -> &'static str {
4531        "type.googleapis.com/google.cloud.storageinsights.v1.ListDatasetConfigsRequest"
4532    }
4533}
4534
4535/// Response message for
4536/// [`ListDatasetConfigs`][google.cloud.storageinsights.v1.StorageInsights.ListDatasetConfigs]
4537///
4538/// [google.cloud.storageinsights.v1.StorageInsights.ListDatasetConfigs]: crate::client::StorageInsights::list_dataset_configs
4539#[derive(Clone, Default, PartialEq)]
4540#[non_exhaustive]
4541pub struct ListDatasetConfigsResponse {
4542    /// The list of `DatasetConfigs`
4543    pub dataset_configs: std::vec::Vec<crate::model::DatasetConfig>,
4544
4545    /// A token identifying a page of results the server should return.
4546    pub next_page_token: std::string::String,
4547
4548    /// Locations that could not be reached.
4549    pub unreachable: std::vec::Vec<std::string::String>,
4550
4551    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4552}
4553
4554impl ListDatasetConfigsResponse {
4555    /// Creates a new default instance.
4556    pub fn new() -> Self {
4557        std::default::Default::default()
4558    }
4559
4560    /// Sets the value of [dataset_configs][crate::model::ListDatasetConfigsResponse::dataset_configs].
4561    ///
4562    /// # Example
4563    /// ```ignore,no_run
4564    /// # use google_cloud_storageinsights_v1::model::ListDatasetConfigsResponse;
4565    /// use google_cloud_storageinsights_v1::model::DatasetConfig;
4566    /// let x = ListDatasetConfigsResponse::new()
4567    ///     .set_dataset_configs([
4568    ///         DatasetConfig::default()/* use setters */,
4569    ///         DatasetConfig::default()/* use (different) setters */,
4570    ///     ]);
4571    /// ```
4572    pub fn set_dataset_configs<T, V>(mut self, v: T) -> Self
4573    where
4574        T: std::iter::IntoIterator<Item = V>,
4575        V: std::convert::Into<crate::model::DatasetConfig>,
4576    {
4577        use std::iter::Iterator;
4578        self.dataset_configs = v.into_iter().map(|i| i.into()).collect();
4579        self
4580    }
4581
4582    /// Sets the value of [next_page_token][crate::model::ListDatasetConfigsResponse::next_page_token].
4583    ///
4584    /// # Example
4585    /// ```ignore,no_run
4586    /// # use google_cloud_storageinsights_v1::model::ListDatasetConfigsResponse;
4587    /// let x = ListDatasetConfigsResponse::new().set_next_page_token("example");
4588    /// ```
4589    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4590        self.next_page_token = v.into();
4591        self
4592    }
4593
4594    /// Sets the value of [unreachable][crate::model::ListDatasetConfigsResponse::unreachable].
4595    ///
4596    /// # Example
4597    /// ```ignore,no_run
4598    /// # use google_cloud_storageinsights_v1::model::ListDatasetConfigsResponse;
4599    /// let x = ListDatasetConfigsResponse::new().set_unreachable(["a", "b", "c"]);
4600    /// ```
4601    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4602    where
4603        T: std::iter::IntoIterator<Item = V>,
4604        V: std::convert::Into<std::string::String>,
4605    {
4606        use std::iter::Iterator;
4607        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4608        self
4609    }
4610}
4611
4612impl wkt::message::Message for ListDatasetConfigsResponse {
4613    fn typename() -> &'static str {
4614        "type.googleapis.com/google.cloud.storageinsights.v1.ListDatasetConfigsResponse"
4615    }
4616}
4617
4618#[doc(hidden)]
4619impl google_cloud_gax::paginator::internal::PageableResponse for ListDatasetConfigsResponse {
4620    type PageItem = crate::model::DatasetConfig;
4621
4622    fn items(self) -> std::vec::Vec<Self::PageItem> {
4623        self.dataset_configs
4624    }
4625
4626    fn next_page_token(&self) -> std::string::String {
4627        use std::clone::Clone;
4628        self.next_page_token.clone()
4629    }
4630}
4631
4632/// Request message for
4633/// [`GetDatasetConfig`][google.cloud.storageinsights.v1.StorageInsights.GetDatasetConfig]
4634///
4635/// [google.cloud.storageinsights.v1.StorageInsights.GetDatasetConfig]: crate::client::StorageInsights::get_dataset_config
4636#[derive(Clone, Default, PartialEq)]
4637#[non_exhaustive]
4638pub struct GetDatasetConfigRequest {
4639    /// Required. Name of the resource
4640    pub name: std::string::String,
4641
4642    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4643}
4644
4645impl GetDatasetConfigRequest {
4646    /// Creates a new default instance.
4647    pub fn new() -> Self {
4648        std::default::Default::default()
4649    }
4650
4651    /// Sets the value of [name][crate::model::GetDatasetConfigRequest::name].
4652    ///
4653    /// # Example
4654    /// ```ignore,no_run
4655    /// # use google_cloud_storageinsights_v1::model::GetDatasetConfigRequest;
4656    /// let x = GetDatasetConfigRequest::new().set_name("example");
4657    /// ```
4658    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4659        self.name = v.into();
4660        self
4661    }
4662}
4663
4664impl wkt::message::Message for GetDatasetConfigRequest {
4665    fn typename() -> &'static str {
4666        "type.googleapis.com/google.cloud.storageinsights.v1.GetDatasetConfigRequest"
4667    }
4668}
4669
4670/// Request message for
4671/// [`CreateDatasetConfig`][google.cloud.storageinsights.v1.StorageInsights.CreateDatasetConfig]
4672///
4673/// [google.cloud.storageinsights.v1.StorageInsights.CreateDatasetConfig]: crate::client::StorageInsights::create_dataset_config
4674#[derive(Clone, Default, PartialEq)]
4675#[non_exhaustive]
4676pub struct CreateDatasetConfigRequest {
4677    /// Required. Value for parent.
4678    pub parent: std::string::String,
4679
4680    /// Required. ID of the requesting object.
4681    /// If auto-generating ID is enabled on the server-side, remove this field and
4682    /// `dataset_config_id` from the method_signature of Create RPC
4683    /// Note: The value should not contain any hyphens.
4684    pub dataset_config_id: std::string::String,
4685
4686    /// Required. The resource being created
4687    pub dataset_config: std::option::Option<crate::model::DatasetConfig>,
4688
4689    /// Optional. A unique identifier for your request.
4690    /// Specify the request ID if you need to retry the request.
4691    /// If you retry the request with the same ID within 60 minutes, the server
4692    /// ignores the request if it has already completed the original request.
4693    ///
4694    /// For example, if your initial request times out and you retry the request
4695    /// using the same request ID, the server recognizes the original request and
4696    /// does not process the new request.
4697    ///
4698    /// The request ID must be a valid UUID and cannot be a zero UUID
4699    /// (00000000-0000-0000-0000-000000000000).
4700    pub request_id: std::string::String,
4701
4702    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4703}
4704
4705impl CreateDatasetConfigRequest {
4706    /// Creates a new default instance.
4707    pub fn new() -> Self {
4708        std::default::Default::default()
4709    }
4710
4711    /// Sets the value of [parent][crate::model::CreateDatasetConfigRequest::parent].
4712    ///
4713    /// # Example
4714    /// ```ignore,no_run
4715    /// # use google_cloud_storageinsights_v1::model::CreateDatasetConfigRequest;
4716    /// let x = CreateDatasetConfigRequest::new().set_parent("example");
4717    /// ```
4718    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4719        self.parent = v.into();
4720        self
4721    }
4722
4723    /// Sets the value of [dataset_config_id][crate::model::CreateDatasetConfigRequest::dataset_config_id].
4724    ///
4725    /// # Example
4726    /// ```ignore,no_run
4727    /// # use google_cloud_storageinsights_v1::model::CreateDatasetConfigRequest;
4728    /// let x = CreateDatasetConfigRequest::new().set_dataset_config_id("example");
4729    /// ```
4730    pub fn set_dataset_config_id<T: std::convert::Into<std::string::String>>(
4731        mut self,
4732        v: T,
4733    ) -> Self {
4734        self.dataset_config_id = v.into();
4735        self
4736    }
4737
4738    /// Sets the value of [dataset_config][crate::model::CreateDatasetConfigRequest::dataset_config].
4739    ///
4740    /// # Example
4741    /// ```ignore,no_run
4742    /// # use google_cloud_storageinsights_v1::model::CreateDatasetConfigRequest;
4743    /// use google_cloud_storageinsights_v1::model::DatasetConfig;
4744    /// let x = CreateDatasetConfigRequest::new().set_dataset_config(DatasetConfig::default()/* use setters */);
4745    /// ```
4746    pub fn set_dataset_config<T>(mut self, v: T) -> Self
4747    where
4748        T: std::convert::Into<crate::model::DatasetConfig>,
4749    {
4750        self.dataset_config = std::option::Option::Some(v.into());
4751        self
4752    }
4753
4754    /// Sets or clears the value of [dataset_config][crate::model::CreateDatasetConfigRequest::dataset_config].
4755    ///
4756    /// # Example
4757    /// ```ignore,no_run
4758    /// # use google_cloud_storageinsights_v1::model::CreateDatasetConfigRequest;
4759    /// use google_cloud_storageinsights_v1::model::DatasetConfig;
4760    /// let x = CreateDatasetConfigRequest::new().set_or_clear_dataset_config(Some(DatasetConfig::default()/* use setters */));
4761    /// let x = CreateDatasetConfigRequest::new().set_or_clear_dataset_config(None::<DatasetConfig>);
4762    /// ```
4763    pub fn set_or_clear_dataset_config<T>(mut self, v: std::option::Option<T>) -> Self
4764    where
4765        T: std::convert::Into<crate::model::DatasetConfig>,
4766    {
4767        self.dataset_config = v.map(|x| x.into());
4768        self
4769    }
4770
4771    /// Sets the value of [request_id][crate::model::CreateDatasetConfigRequest::request_id].
4772    ///
4773    /// # Example
4774    /// ```ignore,no_run
4775    /// # use google_cloud_storageinsights_v1::model::CreateDatasetConfigRequest;
4776    /// let x = CreateDatasetConfigRequest::new().set_request_id("example");
4777    /// ```
4778    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4779        self.request_id = v.into();
4780        self
4781    }
4782}
4783
4784impl wkt::message::Message for CreateDatasetConfigRequest {
4785    fn typename() -> &'static str {
4786        "type.googleapis.com/google.cloud.storageinsights.v1.CreateDatasetConfigRequest"
4787    }
4788}
4789
4790/// Request message for
4791/// [`UpdateDatasetConfig`][google.cloud.storageinsights.v1.StorageInsights.UpdateDatasetConfig]
4792///
4793/// [google.cloud.storageinsights.v1.StorageInsights.UpdateDatasetConfig]: crate::client::StorageInsights::update_dataset_config
4794#[derive(Clone, Default, PartialEq)]
4795#[non_exhaustive]
4796pub struct UpdateDatasetConfigRequest {
4797    /// Required. Field mask is used to specify the fields to be overwritten in the
4798    /// `DatasetConfig` resource by the update.
4799    /// The fields specified in the `update_mask` are relative to the resource, not
4800    /// the full request. A field is overwritten if it is in the mask. If the
4801    /// user does not provide a mask then it returns an "Invalid Argument" error.
4802    pub update_mask: std::option::Option<wkt::FieldMask>,
4803
4804    /// Required. The resource being updated
4805    pub dataset_config: std::option::Option<crate::model::DatasetConfig>,
4806
4807    /// Optional. A unique identifier for your request.
4808    /// Specify the request ID if you need to retry the request.
4809    /// If you retry the request with the same ID within 60 minutes, the server
4810    /// ignores the request if it has already completed the original request.
4811    ///
4812    /// For example, if your initial request times out and you retry the request
4813    /// using the same request ID, the server recognizes the original request and
4814    /// does not process the new request.
4815    ///
4816    /// The request ID must be a valid UUID and cannot be a zero UUID
4817    /// (00000000-0000-0000-0000-000000000000).
4818    pub request_id: std::string::String,
4819
4820    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4821}
4822
4823impl UpdateDatasetConfigRequest {
4824    /// Creates a new default instance.
4825    pub fn new() -> Self {
4826        std::default::Default::default()
4827    }
4828
4829    /// Sets the value of [update_mask][crate::model::UpdateDatasetConfigRequest::update_mask].
4830    ///
4831    /// # Example
4832    /// ```ignore,no_run
4833    /// # use google_cloud_storageinsights_v1::model::UpdateDatasetConfigRequest;
4834    /// use wkt::FieldMask;
4835    /// let x = UpdateDatasetConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
4836    /// ```
4837    pub fn set_update_mask<T>(mut self, v: T) -> Self
4838    where
4839        T: std::convert::Into<wkt::FieldMask>,
4840    {
4841        self.update_mask = std::option::Option::Some(v.into());
4842        self
4843    }
4844
4845    /// Sets or clears the value of [update_mask][crate::model::UpdateDatasetConfigRequest::update_mask].
4846    ///
4847    /// # Example
4848    /// ```ignore,no_run
4849    /// # use google_cloud_storageinsights_v1::model::UpdateDatasetConfigRequest;
4850    /// use wkt::FieldMask;
4851    /// let x = UpdateDatasetConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
4852    /// let x = UpdateDatasetConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
4853    /// ```
4854    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4855    where
4856        T: std::convert::Into<wkt::FieldMask>,
4857    {
4858        self.update_mask = v.map(|x| x.into());
4859        self
4860    }
4861
4862    /// Sets the value of [dataset_config][crate::model::UpdateDatasetConfigRequest::dataset_config].
4863    ///
4864    /// # Example
4865    /// ```ignore,no_run
4866    /// # use google_cloud_storageinsights_v1::model::UpdateDatasetConfigRequest;
4867    /// use google_cloud_storageinsights_v1::model::DatasetConfig;
4868    /// let x = UpdateDatasetConfigRequest::new().set_dataset_config(DatasetConfig::default()/* use setters */);
4869    /// ```
4870    pub fn set_dataset_config<T>(mut self, v: T) -> Self
4871    where
4872        T: std::convert::Into<crate::model::DatasetConfig>,
4873    {
4874        self.dataset_config = std::option::Option::Some(v.into());
4875        self
4876    }
4877
4878    /// Sets or clears the value of [dataset_config][crate::model::UpdateDatasetConfigRequest::dataset_config].
4879    ///
4880    /// # Example
4881    /// ```ignore,no_run
4882    /// # use google_cloud_storageinsights_v1::model::UpdateDatasetConfigRequest;
4883    /// use google_cloud_storageinsights_v1::model::DatasetConfig;
4884    /// let x = UpdateDatasetConfigRequest::new().set_or_clear_dataset_config(Some(DatasetConfig::default()/* use setters */));
4885    /// let x = UpdateDatasetConfigRequest::new().set_or_clear_dataset_config(None::<DatasetConfig>);
4886    /// ```
4887    pub fn set_or_clear_dataset_config<T>(mut self, v: std::option::Option<T>) -> Self
4888    where
4889        T: std::convert::Into<crate::model::DatasetConfig>,
4890    {
4891        self.dataset_config = v.map(|x| x.into());
4892        self
4893    }
4894
4895    /// Sets the value of [request_id][crate::model::UpdateDatasetConfigRequest::request_id].
4896    ///
4897    /// # Example
4898    /// ```ignore,no_run
4899    /// # use google_cloud_storageinsights_v1::model::UpdateDatasetConfigRequest;
4900    /// let x = UpdateDatasetConfigRequest::new().set_request_id("example");
4901    /// ```
4902    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4903        self.request_id = v.into();
4904        self
4905    }
4906}
4907
4908impl wkt::message::Message for UpdateDatasetConfigRequest {
4909    fn typename() -> &'static str {
4910        "type.googleapis.com/google.cloud.storageinsights.v1.UpdateDatasetConfigRequest"
4911    }
4912}
4913
4914/// Request message for
4915/// [`DeleteDatasetConfig`][google.cloud.storageinsights.v1.StorageInsights.DeleteDatasetConfig]
4916///
4917/// [google.cloud.storageinsights.v1.StorageInsights.DeleteDatasetConfig]: crate::client::StorageInsights::delete_dataset_config
4918#[derive(Clone, Default, PartialEq)]
4919#[non_exhaustive]
4920pub struct DeleteDatasetConfigRequest {
4921    /// Required. Name of the resource
4922    pub name: std::string::String,
4923
4924    /// Optional. A unique identifier for your request.
4925    /// Specify the request ID if you need to retry the request.
4926    /// If you retry the request with the same ID within 60 minutes, the server
4927    /// ignores the request if it has already completed the original request.
4928    ///
4929    /// For example, if your initial request times out and you retry the request
4930    /// using the same request ID, the server recognizes the original request and
4931    /// does not process the new request.
4932    ///
4933    /// The request ID must be a valid UUID and cannot be a zero UUID
4934    /// (00000000-0000-0000-0000-000000000000).
4935    pub request_id: std::string::String,
4936
4937    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4938}
4939
4940impl DeleteDatasetConfigRequest {
4941    /// Creates a new default instance.
4942    pub fn new() -> Self {
4943        std::default::Default::default()
4944    }
4945
4946    /// Sets the value of [name][crate::model::DeleteDatasetConfigRequest::name].
4947    ///
4948    /// # Example
4949    /// ```ignore,no_run
4950    /// # use google_cloud_storageinsights_v1::model::DeleteDatasetConfigRequest;
4951    /// let x = DeleteDatasetConfigRequest::new().set_name("example");
4952    /// ```
4953    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4954        self.name = v.into();
4955        self
4956    }
4957
4958    /// Sets the value of [request_id][crate::model::DeleteDatasetConfigRequest::request_id].
4959    ///
4960    /// # Example
4961    /// ```ignore,no_run
4962    /// # use google_cloud_storageinsights_v1::model::DeleteDatasetConfigRequest;
4963    /// let x = DeleteDatasetConfigRequest::new().set_request_id("example");
4964    /// ```
4965    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4966        self.request_id = v.into();
4967        self
4968    }
4969}
4970
4971impl wkt::message::Message for DeleteDatasetConfigRequest {
4972    fn typename() -> &'static str {
4973        "type.googleapis.com/google.cloud.storageinsights.v1.DeleteDatasetConfigRequest"
4974    }
4975}
4976
4977/// Request message for
4978/// [`LinkDataset`][google.cloud.storageinsights.v1.StorageInsights.LinkDataset]
4979///
4980/// [google.cloud.storageinsights.v1.StorageInsights.LinkDataset]: crate::client::StorageInsights::link_dataset
4981#[derive(Clone, Default, PartialEq)]
4982#[non_exhaustive]
4983pub struct LinkDatasetRequest {
4984    /// Required. Name of the resource
4985    pub name: std::string::String,
4986
4987    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4988}
4989
4990impl LinkDatasetRequest {
4991    /// Creates a new default instance.
4992    pub fn new() -> Self {
4993        std::default::Default::default()
4994    }
4995
4996    /// Sets the value of [name][crate::model::LinkDatasetRequest::name].
4997    ///
4998    /// # Example
4999    /// ```ignore,no_run
5000    /// # use google_cloud_storageinsights_v1::model::LinkDatasetRequest;
5001    /// let x = LinkDatasetRequest::new().set_name("example");
5002    /// ```
5003    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5004        self.name = v.into();
5005        self
5006    }
5007}
5008
5009impl wkt::message::Message for LinkDatasetRequest {
5010    fn typename() -> &'static str {
5011        "type.googleapis.com/google.cloud.storageinsights.v1.LinkDatasetRequest"
5012    }
5013}
5014
5015/// Response message for
5016/// [`LinkDataset`][google.cloud.storageinsights.v1.StorageInsights.LinkDataset]
5017///
5018/// [google.cloud.storageinsights.v1.StorageInsights.LinkDataset]: crate::client::StorageInsights::link_dataset
5019#[derive(Clone, Default, PartialEq)]
5020#[non_exhaustive]
5021pub struct LinkDatasetResponse {
5022    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5023}
5024
5025impl LinkDatasetResponse {
5026    /// Creates a new default instance.
5027    pub fn new() -> Self {
5028        std::default::Default::default()
5029    }
5030}
5031
5032impl wkt::message::Message for LinkDatasetResponse {
5033    fn typename() -> &'static str {
5034        "type.googleapis.com/google.cloud.storageinsights.v1.LinkDatasetResponse"
5035    }
5036}
5037
5038/// Request message for
5039/// [`UnlinkDataset`][google.cloud.storageinsights.v1.StorageInsights.UnlinkDataset]
5040///
5041/// [google.cloud.storageinsights.v1.StorageInsights.UnlinkDataset]: crate::client::StorageInsights::unlink_dataset
5042#[derive(Clone, Default, PartialEq)]
5043#[non_exhaustive]
5044pub struct UnlinkDatasetRequest {
5045    /// Required. Name of the resource
5046    pub name: std::string::String,
5047
5048    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5049}
5050
5051impl UnlinkDatasetRequest {
5052    /// Creates a new default instance.
5053    pub fn new() -> Self {
5054        std::default::Default::default()
5055    }
5056
5057    /// Sets the value of [name][crate::model::UnlinkDatasetRequest::name].
5058    ///
5059    /// # Example
5060    /// ```ignore,no_run
5061    /// # use google_cloud_storageinsights_v1::model::UnlinkDatasetRequest;
5062    /// let x = UnlinkDatasetRequest::new().set_name("example");
5063    /// ```
5064    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5065        self.name = v.into();
5066        self
5067    }
5068}
5069
5070impl wkt::message::Message for UnlinkDatasetRequest {
5071    fn typename() -> &'static str {
5072        "type.googleapis.com/google.cloud.storageinsights.v1.UnlinkDatasetRequest"
5073    }
5074}
5075
5076/// Metadata that helps discover which resources are available in a location.
5077#[derive(Clone, Default, PartialEq)]
5078#[non_exhaustive]
5079pub struct LocationMetadata {
5080    /// If true, `storageinsights.googleapis.com/ReportConfig` resource is
5081    /// available at the location.
5082    pub report_config_available: bool,
5083
5084    /// If true, `storageinsights.googleapis.com/DatasetConfig` resource is
5085    /// available at the location.
5086    pub dataset_config_available: bool,
5087
5088    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5089}
5090
5091impl LocationMetadata {
5092    /// Creates a new default instance.
5093    pub fn new() -> Self {
5094        std::default::Default::default()
5095    }
5096
5097    /// Sets the value of [report_config_available][crate::model::LocationMetadata::report_config_available].
5098    ///
5099    /// # Example
5100    /// ```ignore,no_run
5101    /// # use google_cloud_storageinsights_v1::model::LocationMetadata;
5102    /// let x = LocationMetadata::new().set_report_config_available(true);
5103    /// ```
5104    pub fn set_report_config_available<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5105        self.report_config_available = v.into();
5106        self
5107    }
5108
5109    /// Sets the value of [dataset_config_available][crate::model::LocationMetadata::dataset_config_available].
5110    ///
5111    /// # Example
5112    /// ```ignore,no_run
5113    /// # use google_cloud_storageinsights_v1::model::LocationMetadata;
5114    /// let x = LocationMetadata::new().set_dataset_config_available(true);
5115    /// ```
5116    pub fn set_dataset_config_available<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5117        self.dataset_config_available = v.into();
5118        self
5119    }
5120}
5121
5122impl wkt::message::Message for LocationMetadata {
5123    fn typename() -> &'static str {
5124        "type.googleapis.com/google.cloud.storageinsights.v1.LocationMetadata"
5125    }
5126}