google_cloud_iap_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 gax;
23extern crate gaxi;
24extern crate iam_v1;
25extern crate lazy_static;
26extern crate reqwest;
27extern crate serde;
28extern crate serde_json;
29extern crate serde_with;
30extern crate std;
31extern crate tracing;
32extern crate wkt;
33
34mod debug;
35mod deserialize;
36mod serialize;
37
38/// The request to ListTunnelDestGroups.
39#[derive(Clone, Default, PartialEq)]
40#[non_exhaustive]
41pub struct ListTunnelDestGroupsRequest {
42    /// Required. Google Cloud Project ID and location.
43    /// In the following format:
44    /// `projects/{project_number/id}/iap_tunnel/locations/{location}`.
45    /// A `-` can be used for the location to group across all locations.
46    pub parent: std::string::String,
47
48    /// The maximum number of groups to return. The service might return fewer than
49    /// this value.
50    /// If unspecified, at most 100 groups are returned.
51    /// The maximum value is 1000; values above 1000 are coerced to 1000.
52    pub page_size: i32,
53
54    /// A page token, received from a previous `ListTunnelDestGroups`
55    /// call. Provide this to retrieve the subsequent page.
56    ///
57    /// When paginating, all other parameters provided to
58    /// `ListTunnelDestGroups` must match the call that provided the page
59    /// token.
60    pub page_token: std::string::String,
61
62    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
63}
64
65impl ListTunnelDestGroupsRequest {
66    pub fn new() -> Self {
67        std::default::Default::default()
68    }
69
70    /// Sets the value of [parent][crate::model::ListTunnelDestGroupsRequest::parent].
71    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
72        self.parent = v.into();
73        self
74    }
75
76    /// Sets the value of [page_size][crate::model::ListTunnelDestGroupsRequest::page_size].
77    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
78        self.page_size = v.into();
79        self
80    }
81
82    /// Sets the value of [page_token][crate::model::ListTunnelDestGroupsRequest::page_token].
83    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
84        self.page_token = v.into();
85        self
86    }
87}
88
89impl wkt::message::Message for ListTunnelDestGroupsRequest {
90    fn typename() -> &'static str {
91        "type.googleapis.com/google.cloud.iap.v1.ListTunnelDestGroupsRequest"
92    }
93}
94
95/// The response from ListTunnelDestGroups.
96#[derive(Clone, Default, PartialEq)]
97#[non_exhaustive]
98pub struct ListTunnelDestGroupsResponse {
99    /// TunnelDestGroup existing in the project.
100    pub tunnel_dest_groups: std::vec::Vec<crate::model::TunnelDestGroup>,
101
102    /// A token that you can send as `page_token` to retrieve the next page.
103    /// If this field is omitted, there are no subsequent pages.
104    pub next_page_token: std::string::String,
105
106    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
107}
108
109impl ListTunnelDestGroupsResponse {
110    pub fn new() -> Self {
111        std::default::Default::default()
112    }
113
114    /// Sets the value of [tunnel_dest_groups][crate::model::ListTunnelDestGroupsResponse::tunnel_dest_groups].
115    pub fn set_tunnel_dest_groups<T, V>(mut self, v: T) -> Self
116    where
117        T: std::iter::IntoIterator<Item = V>,
118        V: std::convert::Into<crate::model::TunnelDestGroup>,
119    {
120        use std::iter::Iterator;
121        self.tunnel_dest_groups = v.into_iter().map(|i| i.into()).collect();
122        self
123    }
124
125    /// Sets the value of [next_page_token][crate::model::ListTunnelDestGroupsResponse::next_page_token].
126    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
127        self.next_page_token = v.into();
128        self
129    }
130}
131
132impl wkt::message::Message for ListTunnelDestGroupsResponse {
133    fn typename() -> &'static str {
134        "type.googleapis.com/google.cloud.iap.v1.ListTunnelDestGroupsResponse"
135    }
136}
137
138#[doc(hidden)]
139impl gax::paginator::internal::PageableResponse for ListTunnelDestGroupsResponse {
140    type PageItem = crate::model::TunnelDestGroup;
141
142    fn items(self) -> std::vec::Vec<Self::PageItem> {
143        self.tunnel_dest_groups
144    }
145
146    fn next_page_token(&self) -> std::string::String {
147        use std::clone::Clone;
148        self.next_page_token.clone()
149    }
150}
151
152/// The request to CreateTunnelDestGroup.
153#[derive(Clone, Default, PartialEq)]
154#[non_exhaustive]
155pub struct CreateTunnelDestGroupRequest {
156    /// Required. Google Cloud Project ID and location.
157    /// In the following format:
158    /// `projects/{project_number/id}/iap_tunnel/locations/{location}`.
159    pub parent: std::string::String,
160
161    /// Required. The TunnelDestGroup to create.
162    pub tunnel_dest_group: std::option::Option<crate::model::TunnelDestGroup>,
163
164    /// Required. The ID to use for the TunnelDestGroup, which becomes the final
165    /// component of the resource name.
166    ///
167    /// This value must be 4-63 characters, and valid characters
168    /// are `[a-z]-`.
169    pub tunnel_dest_group_id: std::string::String,
170
171    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
172}
173
174impl CreateTunnelDestGroupRequest {
175    pub fn new() -> Self {
176        std::default::Default::default()
177    }
178
179    /// Sets the value of [parent][crate::model::CreateTunnelDestGroupRequest::parent].
180    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
181        self.parent = v.into();
182        self
183    }
184
185    /// Sets the value of [tunnel_dest_group][crate::model::CreateTunnelDestGroupRequest::tunnel_dest_group].
186    pub fn set_tunnel_dest_group<T>(mut self, v: T) -> Self
187    where
188        T: std::convert::Into<crate::model::TunnelDestGroup>,
189    {
190        self.tunnel_dest_group = std::option::Option::Some(v.into());
191        self
192    }
193
194    /// Sets or clears the value of [tunnel_dest_group][crate::model::CreateTunnelDestGroupRequest::tunnel_dest_group].
195    pub fn set_or_clear_tunnel_dest_group<T>(mut self, v: std::option::Option<T>) -> Self
196    where
197        T: std::convert::Into<crate::model::TunnelDestGroup>,
198    {
199        self.tunnel_dest_group = v.map(|x| x.into());
200        self
201    }
202
203    /// Sets the value of [tunnel_dest_group_id][crate::model::CreateTunnelDestGroupRequest::tunnel_dest_group_id].
204    pub fn set_tunnel_dest_group_id<T: std::convert::Into<std::string::String>>(
205        mut self,
206        v: T,
207    ) -> Self {
208        self.tunnel_dest_group_id = v.into();
209        self
210    }
211}
212
213impl wkt::message::Message for CreateTunnelDestGroupRequest {
214    fn typename() -> &'static str {
215        "type.googleapis.com/google.cloud.iap.v1.CreateTunnelDestGroupRequest"
216    }
217}
218
219/// The request to GetTunnelDestGroup.
220#[derive(Clone, Default, PartialEq)]
221#[non_exhaustive]
222pub struct GetTunnelDestGroupRequest {
223    /// Required. Name of the TunnelDestGroup to be fetched.
224    /// In the following format:
225    /// `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.
226    pub name: std::string::String,
227
228    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
229}
230
231impl GetTunnelDestGroupRequest {
232    pub fn new() -> Self {
233        std::default::Default::default()
234    }
235
236    /// Sets the value of [name][crate::model::GetTunnelDestGroupRequest::name].
237    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
238        self.name = v.into();
239        self
240    }
241}
242
243impl wkt::message::Message for GetTunnelDestGroupRequest {
244    fn typename() -> &'static str {
245        "type.googleapis.com/google.cloud.iap.v1.GetTunnelDestGroupRequest"
246    }
247}
248
249/// The request to DeleteTunnelDestGroup.
250#[derive(Clone, Default, PartialEq)]
251#[non_exhaustive]
252pub struct DeleteTunnelDestGroupRequest {
253    /// Required. Name of the TunnelDestGroup to delete.
254    /// In the following format:
255    /// `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.
256    pub name: std::string::String,
257
258    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
259}
260
261impl DeleteTunnelDestGroupRequest {
262    pub fn new() -> Self {
263        std::default::Default::default()
264    }
265
266    /// Sets the value of [name][crate::model::DeleteTunnelDestGroupRequest::name].
267    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
268        self.name = v.into();
269        self
270    }
271}
272
273impl wkt::message::Message for DeleteTunnelDestGroupRequest {
274    fn typename() -> &'static str {
275        "type.googleapis.com/google.cloud.iap.v1.DeleteTunnelDestGroupRequest"
276    }
277}
278
279/// The request to UpdateTunnelDestGroup.
280#[derive(Clone, Default, PartialEq)]
281#[non_exhaustive]
282pub struct UpdateTunnelDestGroupRequest {
283    /// Required. The new values for the TunnelDestGroup.
284    pub tunnel_dest_group: std::option::Option<crate::model::TunnelDestGroup>,
285
286    /// A field mask that specifies which IAP settings to update.
287    /// If omitted, then all of the settings are updated. See
288    /// <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask>
289    pub update_mask: std::option::Option<wkt::FieldMask>,
290
291    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
292}
293
294impl UpdateTunnelDestGroupRequest {
295    pub fn new() -> Self {
296        std::default::Default::default()
297    }
298
299    /// Sets the value of [tunnel_dest_group][crate::model::UpdateTunnelDestGroupRequest::tunnel_dest_group].
300    pub fn set_tunnel_dest_group<T>(mut self, v: T) -> Self
301    where
302        T: std::convert::Into<crate::model::TunnelDestGroup>,
303    {
304        self.tunnel_dest_group = std::option::Option::Some(v.into());
305        self
306    }
307
308    /// Sets or clears the value of [tunnel_dest_group][crate::model::UpdateTunnelDestGroupRequest::tunnel_dest_group].
309    pub fn set_or_clear_tunnel_dest_group<T>(mut self, v: std::option::Option<T>) -> Self
310    where
311        T: std::convert::Into<crate::model::TunnelDestGroup>,
312    {
313        self.tunnel_dest_group = v.map(|x| x.into());
314        self
315    }
316
317    /// Sets the value of [update_mask][crate::model::UpdateTunnelDestGroupRequest::update_mask].
318    pub fn set_update_mask<T>(mut self, v: T) -> Self
319    where
320        T: std::convert::Into<wkt::FieldMask>,
321    {
322        self.update_mask = std::option::Option::Some(v.into());
323        self
324    }
325
326    /// Sets or clears the value of [update_mask][crate::model::UpdateTunnelDestGroupRequest::update_mask].
327    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
328    where
329        T: std::convert::Into<wkt::FieldMask>,
330    {
331        self.update_mask = v.map(|x| x.into());
332        self
333    }
334}
335
336impl wkt::message::Message for UpdateTunnelDestGroupRequest {
337    fn typename() -> &'static str {
338        "type.googleapis.com/google.cloud.iap.v1.UpdateTunnelDestGroupRequest"
339    }
340}
341
342/// A TunnelDestGroup.
343#[derive(Clone, Default, PartialEq)]
344#[non_exhaustive]
345pub struct TunnelDestGroup {
346    /// Identifier. Identifier for the TunnelDestGroup. Must be unique within the
347    /// project and contain only lower case letters (a-z) and dashes (-).
348    pub name: std::string::String,
349
350    /// Optional. Unordered list. List of CIDRs that this group applies to.
351    pub cidrs: std::vec::Vec<std::string::String>,
352
353    /// Optional. Unordered list. List of FQDNs that this group applies to.
354    pub fqdns: std::vec::Vec<std::string::String>,
355
356    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
357}
358
359impl TunnelDestGroup {
360    pub fn new() -> Self {
361        std::default::Default::default()
362    }
363
364    /// Sets the value of [name][crate::model::TunnelDestGroup::name].
365    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
366        self.name = v.into();
367        self
368    }
369
370    /// Sets the value of [cidrs][crate::model::TunnelDestGroup::cidrs].
371    pub fn set_cidrs<T, V>(mut self, v: T) -> Self
372    where
373        T: std::iter::IntoIterator<Item = V>,
374        V: std::convert::Into<std::string::String>,
375    {
376        use std::iter::Iterator;
377        self.cidrs = v.into_iter().map(|i| i.into()).collect();
378        self
379    }
380
381    /// Sets the value of [fqdns][crate::model::TunnelDestGroup::fqdns].
382    pub fn set_fqdns<T, V>(mut self, v: T) -> Self
383    where
384        T: std::iter::IntoIterator<Item = V>,
385        V: std::convert::Into<std::string::String>,
386    {
387        use std::iter::Iterator;
388        self.fqdns = v.into_iter().map(|i| i.into()).collect();
389        self
390    }
391}
392
393impl wkt::message::Message for TunnelDestGroup {
394    fn typename() -> &'static str {
395        "type.googleapis.com/google.cloud.iap.v1.TunnelDestGroup"
396    }
397}
398
399/// The request sent to GetIapSettings.
400#[derive(Clone, Default, PartialEq)]
401#[non_exhaustive]
402pub struct GetIapSettingsRequest {
403    /// Required. The resource name for which to retrieve the settings.
404    /// Authorization: Requires the `getSettings` permission for the associated
405    /// resource.
406    pub name: std::string::String,
407
408    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
409}
410
411impl GetIapSettingsRequest {
412    pub fn new() -> Self {
413        std::default::Default::default()
414    }
415
416    /// Sets the value of [name][crate::model::GetIapSettingsRequest::name].
417    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
418        self.name = v.into();
419        self
420    }
421}
422
423impl wkt::message::Message for GetIapSettingsRequest {
424    fn typename() -> &'static str {
425        "type.googleapis.com/google.cloud.iap.v1.GetIapSettingsRequest"
426    }
427}
428
429/// The request sent to UpdateIapSettings.
430#[derive(Clone, Default, PartialEq)]
431#[non_exhaustive]
432pub struct UpdateIapSettingsRequest {
433    /// Required. The new values for the IAP settings to be updated.
434    /// Authorization: Requires the `updateSettings` permission for the associated
435    /// resource.
436    pub iap_settings: std::option::Option<crate::model::IapSettings>,
437
438    /// The field mask specifying which IAP settings should be updated.
439    /// If omitted, then all of the settings are updated. See
440    /// <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask>.
441    ///
442    /// Note: All IAP reauth settings must always be set together, using the
443    /// field mask: `iapSettings.accessSettings.reauthSettings`.
444    pub update_mask: std::option::Option<wkt::FieldMask>,
445
446    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
447}
448
449impl UpdateIapSettingsRequest {
450    pub fn new() -> Self {
451        std::default::Default::default()
452    }
453
454    /// Sets the value of [iap_settings][crate::model::UpdateIapSettingsRequest::iap_settings].
455    pub fn set_iap_settings<T>(mut self, v: T) -> Self
456    where
457        T: std::convert::Into<crate::model::IapSettings>,
458    {
459        self.iap_settings = std::option::Option::Some(v.into());
460        self
461    }
462
463    /// Sets or clears the value of [iap_settings][crate::model::UpdateIapSettingsRequest::iap_settings].
464    pub fn set_or_clear_iap_settings<T>(mut self, v: std::option::Option<T>) -> Self
465    where
466        T: std::convert::Into<crate::model::IapSettings>,
467    {
468        self.iap_settings = v.map(|x| x.into());
469        self
470    }
471
472    /// Sets the value of [update_mask][crate::model::UpdateIapSettingsRequest::update_mask].
473    pub fn set_update_mask<T>(mut self, v: T) -> Self
474    where
475        T: std::convert::Into<wkt::FieldMask>,
476    {
477        self.update_mask = std::option::Option::Some(v.into());
478        self
479    }
480
481    /// Sets or clears the value of [update_mask][crate::model::UpdateIapSettingsRequest::update_mask].
482    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
483    where
484        T: std::convert::Into<wkt::FieldMask>,
485    {
486        self.update_mask = v.map(|x| x.into());
487        self
488    }
489}
490
491impl wkt::message::Message for UpdateIapSettingsRequest {
492    fn typename() -> &'static str {
493        "type.googleapis.com/google.cloud.iap.v1.UpdateIapSettingsRequest"
494    }
495}
496
497/// The IAP configurable settings.
498#[derive(Clone, Default, PartialEq)]
499#[non_exhaustive]
500pub struct IapSettings {
501    /// Required. The resource name of the IAP protected resource.
502    pub name: std::string::String,
503
504    /// Optional. Top level wrapper for all access related setting in IAP
505    pub access_settings: std::option::Option<crate::model::AccessSettings>,
506
507    /// Optional. Top level wrapper for all application related settings in IAP
508    pub application_settings: std::option::Option<crate::model::ApplicationSettings>,
509
510    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
511}
512
513impl IapSettings {
514    pub fn new() -> Self {
515        std::default::Default::default()
516    }
517
518    /// Sets the value of [name][crate::model::IapSettings::name].
519    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
520        self.name = v.into();
521        self
522    }
523
524    /// Sets the value of [access_settings][crate::model::IapSettings::access_settings].
525    pub fn set_access_settings<T>(mut self, v: T) -> Self
526    where
527        T: std::convert::Into<crate::model::AccessSettings>,
528    {
529        self.access_settings = std::option::Option::Some(v.into());
530        self
531    }
532
533    /// Sets or clears the value of [access_settings][crate::model::IapSettings::access_settings].
534    pub fn set_or_clear_access_settings<T>(mut self, v: std::option::Option<T>) -> Self
535    where
536        T: std::convert::Into<crate::model::AccessSettings>,
537    {
538        self.access_settings = v.map(|x| x.into());
539        self
540    }
541
542    /// Sets the value of [application_settings][crate::model::IapSettings::application_settings].
543    pub fn set_application_settings<T>(mut self, v: T) -> Self
544    where
545        T: std::convert::Into<crate::model::ApplicationSettings>,
546    {
547        self.application_settings = std::option::Option::Some(v.into());
548        self
549    }
550
551    /// Sets or clears the value of [application_settings][crate::model::IapSettings::application_settings].
552    pub fn set_or_clear_application_settings<T>(mut self, v: std::option::Option<T>) -> Self
553    where
554        T: std::convert::Into<crate::model::ApplicationSettings>,
555    {
556        self.application_settings = v.map(|x| x.into());
557        self
558    }
559}
560
561impl wkt::message::Message for IapSettings {
562    fn typename() -> &'static str {
563        "type.googleapis.com/google.cloud.iap.v1.IapSettings"
564    }
565}
566
567/// Access related settings for IAP protected apps.
568#[derive(Clone, Default, PartialEq)]
569#[non_exhaustive]
570pub struct AccessSettings {
571    /// Optional. GCIP claims and endpoint configurations for 3p identity
572    /// providers.
573    pub gcip_settings: std::option::Option<crate::model::GcipSettings>,
574
575    /// Optional. Configuration to allow cross-origin requests via IAP.
576    pub cors_settings: std::option::Option<crate::model::CorsSettings>,
577
578    /// Optional. Settings to configure IAP's OAuth behavior.
579    pub oauth_settings: std::option::Option<crate::model::OAuthSettings>,
580
581    /// Optional. Settings to configure reauthentication policies in IAP.
582    pub reauth_settings: std::option::Option<crate::model::ReauthSettings>,
583
584    /// Optional. Settings to configure and enable allowed domains.
585    pub allowed_domains_settings: std::option::Option<crate::model::AllowedDomainsSettings>,
586
587    /// Optional. Settings to configure the workforce identity federation,
588    /// including workforce pools and OAuth 2.0 settings.
589    pub workforce_identity_settings: std::option::Option<crate::model::WorkforceIdentitySettings>,
590
591    /// Optional. Identity sources that IAP can use to authenticate the end user.
592    /// Only one identity source can be configured.
593    pub identity_sources: std::vec::Vec<crate::model::access_settings::IdentitySource>,
594
595    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
596}
597
598impl AccessSettings {
599    pub fn new() -> Self {
600        std::default::Default::default()
601    }
602
603    /// Sets the value of [gcip_settings][crate::model::AccessSettings::gcip_settings].
604    pub fn set_gcip_settings<T>(mut self, v: T) -> Self
605    where
606        T: std::convert::Into<crate::model::GcipSettings>,
607    {
608        self.gcip_settings = std::option::Option::Some(v.into());
609        self
610    }
611
612    /// Sets or clears the value of [gcip_settings][crate::model::AccessSettings::gcip_settings].
613    pub fn set_or_clear_gcip_settings<T>(mut self, v: std::option::Option<T>) -> Self
614    where
615        T: std::convert::Into<crate::model::GcipSettings>,
616    {
617        self.gcip_settings = v.map(|x| x.into());
618        self
619    }
620
621    /// Sets the value of [cors_settings][crate::model::AccessSettings::cors_settings].
622    pub fn set_cors_settings<T>(mut self, v: T) -> Self
623    where
624        T: std::convert::Into<crate::model::CorsSettings>,
625    {
626        self.cors_settings = std::option::Option::Some(v.into());
627        self
628    }
629
630    /// Sets or clears the value of [cors_settings][crate::model::AccessSettings::cors_settings].
631    pub fn set_or_clear_cors_settings<T>(mut self, v: std::option::Option<T>) -> Self
632    where
633        T: std::convert::Into<crate::model::CorsSettings>,
634    {
635        self.cors_settings = v.map(|x| x.into());
636        self
637    }
638
639    /// Sets the value of [oauth_settings][crate::model::AccessSettings::oauth_settings].
640    pub fn set_oauth_settings<T>(mut self, v: T) -> Self
641    where
642        T: std::convert::Into<crate::model::OAuthSettings>,
643    {
644        self.oauth_settings = std::option::Option::Some(v.into());
645        self
646    }
647
648    /// Sets or clears the value of [oauth_settings][crate::model::AccessSettings::oauth_settings].
649    pub fn set_or_clear_oauth_settings<T>(mut self, v: std::option::Option<T>) -> Self
650    where
651        T: std::convert::Into<crate::model::OAuthSettings>,
652    {
653        self.oauth_settings = v.map(|x| x.into());
654        self
655    }
656
657    /// Sets the value of [reauth_settings][crate::model::AccessSettings::reauth_settings].
658    pub fn set_reauth_settings<T>(mut self, v: T) -> Self
659    where
660        T: std::convert::Into<crate::model::ReauthSettings>,
661    {
662        self.reauth_settings = std::option::Option::Some(v.into());
663        self
664    }
665
666    /// Sets or clears the value of [reauth_settings][crate::model::AccessSettings::reauth_settings].
667    pub fn set_or_clear_reauth_settings<T>(mut self, v: std::option::Option<T>) -> Self
668    where
669        T: std::convert::Into<crate::model::ReauthSettings>,
670    {
671        self.reauth_settings = v.map(|x| x.into());
672        self
673    }
674
675    /// Sets the value of [allowed_domains_settings][crate::model::AccessSettings::allowed_domains_settings].
676    pub fn set_allowed_domains_settings<T>(mut self, v: T) -> Self
677    where
678        T: std::convert::Into<crate::model::AllowedDomainsSettings>,
679    {
680        self.allowed_domains_settings = std::option::Option::Some(v.into());
681        self
682    }
683
684    /// Sets or clears the value of [allowed_domains_settings][crate::model::AccessSettings::allowed_domains_settings].
685    pub fn set_or_clear_allowed_domains_settings<T>(mut self, v: std::option::Option<T>) -> Self
686    where
687        T: std::convert::Into<crate::model::AllowedDomainsSettings>,
688    {
689        self.allowed_domains_settings = v.map(|x| x.into());
690        self
691    }
692
693    /// Sets the value of [workforce_identity_settings][crate::model::AccessSettings::workforce_identity_settings].
694    pub fn set_workforce_identity_settings<T>(mut self, v: T) -> Self
695    where
696        T: std::convert::Into<crate::model::WorkforceIdentitySettings>,
697    {
698        self.workforce_identity_settings = std::option::Option::Some(v.into());
699        self
700    }
701
702    /// Sets or clears the value of [workforce_identity_settings][crate::model::AccessSettings::workforce_identity_settings].
703    pub fn set_or_clear_workforce_identity_settings<T>(mut self, v: std::option::Option<T>) -> Self
704    where
705        T: std::convert::Into<crate::model::WorkforceIdentitySettings>,
706    {
707        self.workforce_identity_settings = v.map(|x| x.into());
708        self
709    }
710
711    /// Sets the value of [identity_sources][crate::model::AccessSettings::identity_sources].
712    pub fn set_identity_sources<T, V>(mut self, v: T) -> Self
713    where
714        T: std::iter::IntoIterator<Item = V>,
715        V: std::convert::Into<crate::model::access_settings::IdentitySource>,
716    {
717        use std::iter::Iterator;
718        self.identity_sources = v.into_iter().map(|i| i.into()).collect();
719        self
720    }
721}
722
723impl wkt::message::Message for AccessSettings {
724    fn typename() -> &'static str {
725        "type.googleapis.com/google.cloud.iap.v1.AccessSettings"
726    }
727}
728
729/// Defines additional types related to [AccessSettings].
730pub mod access_settings {
731    #[allow(unused_imports)]
732    use super::*;
733
734    /// Types of identity source supported by IAP.
735    ///
736    /// # Working with unknown values
737    ///
738    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
739    /// additional enum variants at any time. Adding new variants is not considered
740    /// a breaking change. Applications should write their code in anticipation of:
741    ///
742    /// - New values appearing in future releases of the client library, **and**
743    /// - New values received dynamically, without application changes.
744    ///
745    /// Please consult the [Working with enums] section in the user guide for some
746    /// guidelines.
747    ///
748    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
749    #[derive(Clone, Debug, PartialEq)]
750    #[non_exhaustive]
751    pub enum IdentitySource {
752        /// IdentitySource Unspecified.
753        /// When selected, IAP relies on which identity settings are fully configured
754        /// to redirect the traffic to. The precedence order is
755        /// WorkforceIdentitySettings > GcipSettings. If none is set, default to use
756        /// Google identity.
757        Unspecified,
758        /// Use external identities set up on Google Cloud Workforce Identity
759        /// Federation.
760        WorkforceIdentityFederation,
761        /// If set, the enum was initialized with an unknown value.
762        ///
763        /// Applications can examine the value using [IdentitySource::value] or
764        /// [IdentitySource::name].
765        UnknownValue(identity_source::UnknownValue),
766    }
767
768    #[doc(hidden)]
769    pub mod identity_source {
770        #[allow(unused_imports)]
771        use super::*;
772        #[derive(Clone, Debug, PartialEq)]
773        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
774    }
775
776    impl IdentitySource {
777        /// Gets the enum value.
778        ///
779        /// Returns `None` if the enum contains an unknown value deserialized from
780        /// the string representation of enums.
781        pub fn value(&self) -> std::option::Option<i32> {
782            match self {
783                Self::Unspecified => std::option::Option::Some(0),
784                Self::WorkforceIdentityFederation => std::option::Option::Some(3),
785                Self::UnknownValue(u) => u.0.value(),
786            }
787        }
788
789        /// Gets the enum value as a string.
790        ///
791        /// Returns `None` if the enum contains an unknown value deserialized from
792        /// the integer representation of enums.
793        pub fn name(&self) -> std::option::Option<&str> {
794            match self {
795                Self::Unspecified => std::option::Option::Some("IDENTITY_SOURCE_UNSPECIFIED"),
796                Self::WorkforceIdentityFederation => {
797                    std::option::Option::Some("WORKFORCE_IDENTITY_FEDERATION")
798                }
799                Self::UnknownValue(u) => u.0.name(),
800            }
801        }
802    }
803
804    impl std::default::Default for IdentitySource {
805        fn default() -> Self {
806            use std::convert::From;
807            Self::from(0)
808        }
809    }
810
811    impl std::fmt::Display for IdentitySource {
812        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
813            wkt::internal::display_enum(f, self.name(), self.value())
814        }
815    }
816
817    impl std::convert::From<i32> for IdentitySource {
818        fn from(value: i32) -> Self {
819            match value {
820                0 => Self::Unspecified,
821                3 => Self::WorkforceIdentityFederation,
822                _ => Self::UnknownValue(identity_source::UnknownValue(
823                    wkt::internal::UnknownEnumValue::Integer(value),
824                )),
825            }
826        }
827    }
828
829    impl std::convert::From<&str> for IdentitySource {
830        fn from(value: &str) -> Self {
831            use std::string::ToString;
832            match value {
833                "IDENTITY_SOURCE_UNSPECIFIED" => Self::Unspecified,
834                "WORKFORCE_IDENTITY_FEDERATION" => Self::WorkforceIdentityFederation,
835                _ => Self::UnknownValue(identity_source::UnknownValue(
836                    wkt::internal::UnknownEnumValue::String(value.to_string()),
837                )),
838            }
839        }
840    }
841
842    impl serde::ser::Serialize for IdentitySource {
843        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
844        where
845            S: serde::Serializer,
846        {
847            match self {
848                Self::Unspecified => serializer.serialize_i32(0),
849                Self::WorkforceIdentityFederation => serializer.serialize_i32(3),
850                Self::UnknownValue(u) => u.0.serialize(serializer),
851            }
852        }
853    }
854
855    impl<'de> serde::de::Deserialize<'de> for IdentitySource {
856        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
857        where
858            D: serde::Deserializer<'de>,
859        {
860            deserializer.deserialize_any(wkt::internal::EnumVisitor::<IdentitySource>::new(
861                ".google.cloud.iap.v1.AccessSettings.IdentitySource",
862            ))
863        }
864    }
865}
866
867/// Allows customers to configure tenant IDs for a Cloud Identity Platform (GCIP)
868/// instance for each application.
869#[derive(Clone, Default, PartialEq)]
870#[non_exhaustive]
871pub struct GcipSettings {
872    /// Optional. GCIP tenant IDs that are linked to the IAP resource. `tenant_ids`
873    /// could be a string beginning with a number character to indicate
874    /// authenticating with GCIP tenant flow, or in the format of
875    /// `_<ProjectNumber>` to indicate authenticating with GCIP agent flow. If
876    /// agent flow is used, `tenant_ids` should only contain one single element,
877    /// while for tenant flow, `tenant_ids` can contain multiple elements.
878    pub tenant_ids: std::vec::Vec<std::string::String>,
879
880    /// Login page URI associated with the GCIP tenants.
881    /// Typically, all resources within the same project share the same login page,
882    /// though it could be overridden at the sub resource level.
883    pub login_page_uri: std::option::Option<wkt::StringValue>,
884
885    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
886}
887
888impl GcipSettings {
889    pub fn new() -> Self {
890        std::default::Default::default()
891    }
892
893    /// Sets the value of [tenant_ids][crate::model::GcipSettings::tenant_ids].
894    pub fn set_tenant_ids<T, V>(mut self, v: T) -> Self
895    where
896        T: std::iter::IntoIterator<Item = V>,
897        V: std::convert::Into<std::string::String>,
898    {
899        use std::iter::Iterator;
900        self.tenant_ids = v.into_iter().map(|i| i.into()).collect();
901        self
902    }
903
904    /// Sets the value of [login_page_uri][crate::model::GcipSettings::login_page_uri].
905    pub fn set_login_page_uri<T>(mut self, v: T) -> Self
906    where
907        T: std::convert::Into<wkt::StringValue>,
908    {
909        self.login_page_uri = std::option::Option::Some(v.into());
910        self
911    }
912
913    /// Sets or clears the value of [login_page_uri][crate::model::GcipSettings::login_page_uri].
914    pub fn set_or_clear_login_page_uri<T>(mut self, v: std::option::Option<T>) -> Self
915    where
916        T: std::convert::Into<wkt::StringValue>,
917    {
918        self.login_page_uri = v.map(|x| x.into());
919        self
920    }
921}
922
923impl wkt::message::Message for GcipSettings {
924    fn typename() -> &'static str {
925        "type.googleapis.com/google.cloud.iap.v1.GcipSettings"
926    }
927}
928
929/// Allows customers to configure HTTP request paths that'll allow HTTP
930/// `OPTIONS` call to bypass authentication and authorization.
931#[derive(Clone, Default, PartialEq)]
932#[non_exhaustive]
933pub struct CorsSettings {
934    /// Configuration to allow HTTP `OPTIONS` calls to skip
935    /// authentication and authorization. If undefined, IAP will not apply any
936    /// special logic to `OPTIONS` requests.
937    pub allow_http_options: std::option::Option<wkt::BoolValue>,
938
939    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
940}
941
942impl CorsSettings {
943    pub fn new() -> Self {
944        std::default::Default::default()
945    }
946
947    /// Sets the value of [allow_http_options][crate::model::CorsSettings::allow_http_options].
948    pub fn set_allow_http_options<T>(mut self, v: T) -> Self
949    where
950        T: std::convert::Into<wkt::BoolValue>,
951    {
952        self.allow_http_options = std::option::Option::Some(v.into());
953        self
954    }
955
956    /// Sets or clears the value of [allow_http_options][crate::model::CorsSettings::allow_http_options].
957    pub fn set_or_clear_allow_http_options<T>(mut self, v: std::option::Option<T>) -> Self
958    where
959        T: std::convert::Into<wkt::BoolValue>,
960    {
961        self.allow_http_options = v.map(|x| x.into());
962        self
963    }
964}
965
966impl wkt::message::Message for CorsSettings {
967    fn typename() -> &'static str {
968        "type.googleapis.com/google.cloud.iap.v1.CorsSettings"
969    }
970}
971
972/// Configuration for OAuth login&consent flow behavior as well as for OAuth
973/// Credentials.
974#[derive(Clone, Default, PartialEq)]
975#[non_exhaustive]
976pub struct OAuthSettings {
977    /// Domain hint to send as hd=? parameter in OAuth request flow. Enables
978    /// redirect to primary IDP by skipping Google's login screen.
979    /// <https://developers.google.com/identity/protocols/OpenIDConnect#hd-param>
980    /// Note: IAP does not verify that the id token's hd claim matches this value
981    /// since access behavior is managed by IAM policies.
982    pub login_hint: std::option::Option<wkt::StringValue>,
983
984    /// Optional. List of client ids allowed to use IAP programmatically.
985    pub programmatic_clients: std::vec::Vec<std::string::String>,
986
987    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
988}
989
990impl OAuthSettings {
991    pub fn new() -> Self {
992        std::default::Default::default()
993    }
994
995    /// Sets the value of [login_hint][crate::model::OAuthSettings::login_hint].
996    pub fn set_login_hint<T>(mut self, v: T) -> Self
997    where
998        T: std::convert::Into<wkt::StringValue>,
999    {
1000        self.login_hint = std::option::Option::Some(v.into());
1001        self
1002    }
1003
1004    /// Sets or clears the value of [login_hint][crate::model::OAuthSettings::login_hint].
1005    pub fn set_or_clear_login_hint<T>(mut self, v: std::option::Option<T>) -> Self
1006    where
1007        T: std::convert::Into<wkt::StringValue>,
1008    {
1009        self.login_hint = v.map(|x| x.into());
1010        self
1011    }
1012
1013    /// Sets the value of [programmatic_clients][crate::model::OAuthSettings::programmatic_clients].
1014    pub fn set_programmatic_clients<T, V>(mut self, v: T) -> Self
1015    where
1016        T: std::iter::IntoIterator<Item = V>,
1017        V: std::convert::Into<std::string::String>,
1018    {
1019        use std::iter::Iterator;
1020        self.programmatic_clients = v.into_iter().map(|i| i.into()).collect();
1021        self
1022    }
1023}
1024
1025impl wkt::message::Message for OAuthSettings {
1026    fn typename() -> &'static str {
1027        "type.googleapis.com/google.cloud.iap.v1.OAuthSettings"
1028    }
1029}
1030
1031/// WorkforceIdentitySettings allows customers to configure workforce pools and
1032/// OAuth 2.0 settings to gate their applications using a third-party IdP with
1033/// access control.
1034#[derive(Clone, Default, PartialEq)]
1035#[non_exhaustive]
1036pub struct WorkforceIdentitySettings {
1037    /// The workforce pool resources. Only one workforce pool is accepted.
1038    pub workforce_pools: std::vec::Vec<std::string::String>,
1039
1040    /// OAuth 2.0 settings for IAP to perform OIDC flow with workforce identity
1041    /// federation services.
1042    pub oauth2: std::option::Option<crate::model::OAuth2>,
1043
1044    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1045}
1046
1047impl WorkforceIdentitySettings {
1048    pub fn new() -> Self {
1049        std::default::Default::default()
1050    }
1051
1052    /// Sets the value of [workforce_pools][crate::model::WorkforceIdentitySettings::workforce_pools].
1053    pub fn set_workforce_pools<T, V>(mut self, v: T) -> Self
1054    where
1055        T: std::iter::IntoIterator<Item = V>,
1056        V: std::convert::Into<std::string::String>,
1057    {
1058        use std::iter::Iterator;
1059        self.workforce_pools = v.into_iter().map(|i| i.into()).collect();
1060        self
1061    }
1062
1063    /// Sets the value of [oauth2][crate::model::WorkforceIdentitySettings::oauth2].
1064    pub fn set_oauth2<T>(mut self, v: T) -> Self
1065    where
1066        T: std::convert::Into<crate::model::OAuth2>,
1067    {
1068        self.oauth2 = std::option::Option::Some(v.into());
1069        self
1070    }
1071
1072    /// Sets or clears the value of [oauth2][crate::model::WorkforceIdentitySettings::oauth2].
1073    pub fn set_or_clear_oauth2<T>(mut self, v: std::option::Option<T>) -> Self
1074    where
1075        T: std::convert::Into<crate::model::OAuth2>,
1076    {
1077        self.oauth2 = v.map(|x| x.into());
1078        self
1079    }
1080}
1081
1082impl wkt::message::Message for WorkforceIdentitySettings {
1083    fn typename() -> &'static str {
1084        "type.googleapis.com/google.cloud.iap.v1.WorkforceIdentitySettings"
1085    }
1086}
1087
1088/// The OAuth 2.0 Settings
1089#[derive(Clone, Default, PartialEq)]
1090#[non_exhaustive]
1091pub struct OAuth2 {
1092    /// The OAuth 2.0 client ID registered in the workforce identity federation
1093    /// OAuth 2.0 Server.
1094    pub client_id: std::string::String,
1095
1096    /// Input only. The OAuth 2.0 client secret created while registering the
1097    /// client ID.
1098    pub client_secret: std::string::String,
1099
1100    /// Output only. SHA256 hash value for the client secret. This field is
1101    /// returned by IAP when the settings are retrieved.
1102    pub client_secret_sha256: std::string::String,
1103
1104    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1105}
1106
1107impl OAuth2 {
1108    pub fn new() -> Self {
1109        std::default::Default::default()
1110    }
1111
1112    /// Sets the value of [client_id][crate::model::OAuth2::client_id].
1113    pub fn set_client_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1114        self.client_id = v.into();
1115        self
1116    }
1117
1118    /// Sets the value of [client_secret][crate::model::OAuth2::client_secret].
1119    pub fn set_client_secret<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1120        self.client_secret = v.into();
1121        self
1122    }
1123
1124    /// Sets the value of [client_secret_sha256][crate::model::OAuth2::client_secret_sha256].
1125    pub fn set_client_secret_sha256<T: std::convert::Into<std::string::String>>(
1126        mut self,
1127        v: T,
1128    ) -> Self {
1129        self.client_secret_sha256 = v.into();
1130        self
1131    }
1132}
1133
1134impl wkt::message::Message for OAuth2 {
1135    fn typename() -> &'static str {
1136        "type.googleapis.com/google.cloud.iap.v1.OAuth2"
1137    }
1138}
1139
1140/// Configuration for IAP reauthentication policies.
1141#[derive(Clone, Default, PartialEq)]
1142#[non_exhaustive]
1143pub struct ReauthSettings {
1144    /// Optional. Reauth method requested.
1145    pub method: crate::model::reauth_settings::Method,
1146
1147    /// Optional. Reauth session lifetime, how long before a user has to
1148    /// reauthenticate again.
1149    pub max_age: std::option::Option<wkt::Duration>,
1150
1151    /// Optional. How IAP determines the effective policy in cases of hierarchical
1152    /// policies. Policies are merged from higher in the hierarchy to lower in the
1153    /// hierarchy.
1154    pub policy_type: crate::model::reauth_settings::PolicyType,
1155
1156    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1157}
1158
1159impl ReauthSettings {
1160    pub fn new() -> Self {
1161        std::default::Default::default()
1162    }
1163
1164    /// Sets the value of [method][crate::model::ReauthSettings::method].
1165    pub fn set_method<T: std::convert::Into<crate::model::reauth_settings::Method>>(
1166        mut self,
1167        v: T,
1168    ) -> Self {
1169        self.method = v.into();
1170        self
1171    }
1172
1173    /// Sets the value of [max_age][crate::model::ReauthSettings::max_age].
1174    pub fn set_max_age<T>(mut self, v: T) -> Self
1175    where
1176        T: std::convert::Into<wkt::Duration>,
1177    {
1178        self.max_age = std::option::Option::Some(v.into());
1179        self
1180    }
1181
1182    /// Sets or clears the value of [max_age][crate::model::ReauthSettings::max_age].
1183    pub fn set_or_clear_max_age<T>(mut self, v: std::option::Option<T>) -> Self
1184    where
1185        T: std::convert::Into<wkt::Duration>,
1186    {
1187        self.max_age = v.map(|x| x.into());
1188        self
1189    }
1190
1191    /// Sets the value of [policy_type][crate::model::ReauthSettings::policy_type].
1192    pub fn set_policy_type<T: std::convert::Into<crate::model::reauth_settings::PolicyType>>(
1193        mut self,
1194        v: T,
1195    ) -> Self {
1196        self.policy_type = v.into();
1197        self
1198    }
1199}
1200
1201impl wkt::message::Message for ReauthSettings {
1202    fn typename() -> &'static str {
1203        "type.googleapis.com/google.cloud.iap.v1.ReauthSettings"
1204    }
1205}
1206
1207/// Defines additional types related to [ReauthSettings].
1208pub mod reauth_settings {
1209    #[allow(unused_imports)]
1210    use super::*;
1211
1212    /// Types of reauthentication methods supported by IAP.
1213    ///
1214    /// # Working with unknown values
1215    ///
1216    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1217    /// additional enum variants at any time. Adding new variants is not considered
1218    /// a breaking change. Applications should write their code in anticipation of:
1219    ///
1220    /// - New values appearing in future releases of the client library, **and**
1221    /// - New values received dynamically, without application changes.
1222    ///
1223    /// Please consult the [Working with enums] section in the user guide for some
1224    /// guidelines.
1225    ///
1226    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1227    #[derive(Clone, Debug, PartialEq)]
1228    #[non_exhaustive]
1229    pub enum Method {
1230        /// Reauthentication disabled.
1231        Unspecified,
1232        /// Prompts the user to log in again.
1233        Login,
1234        #[deprecated]
1235        Password,
1236        /// User must use their secure key 2nd factor device.
1237        SecureKey,
1238        /// User can use any enabled 2nd factor.
1239        EnrolledSecondFactors,
1240        /// If set, the enum was initialized with an unknown value.
1241        ///
1242        /// Applications can examine the value using [Method::value] or
1243        /// [Method::name].
1244        UnknownValue(method::UnknownValue),
1245    }
1246
1247    #[doc(hidden)]
1248    pub mod method {
1249        #[allow(unused_imports)]
1250        use super::*;
1251        #[derive(Clone, Debug, PartialEq)]
1252        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1253    }
1254
1255    impl Method {
1256        /// Gets the enum value.
1257        ///
1258        /// Returns `None` if the enum contains an unknown value deserialized from
1259        /// the string representation of enums.
1260        pub fn value(&self) -> std::option::Option<i32> {
1261            match self {
1262                Self::Unspecified => std::option::Option::Some(0),
1263                Self::Login => std::option::Option::Some(1),
1264                Self::Password => std::option::Option::Some(2),
1265                Self::SecureKey => std::option::Option::Some(3),
1266                Self::EnrolledSecondFactors => std::option::Option::Some(4),
1267                Self::UnknownValue(u) => u.0.value(),
1268            }
1269        }
1270
1271        /// Gets the enum value as a string.
1272        ///
1273        /// Returns `None` if the enum contains an unknown value deserialized from
1274        /// the integer representation of enums.
1275        pub fn name(&self) -> std::option::Option<&str> {
1276            match self {
1277                Self::Unspecified => std::option::Option::Some("METHOD_UNSPECIFIED"),
1278                Self::Login => std::option::Option::Some("LOGIN"),
1279                Self::Password => std::option::Option::Some("PASSWORD"),
1280                Self::SecureKey => std::option::Option::Some("SECURE_KEY"),
1281                Self::EnrolledSecondFactors => std::option::Option::Some("ENROLLED_SECOND_FACTORS"),
1282                Self::UnknownValue(u) => u.0.name(),
1283            }
1284        }
1285    }
1286
1287    impl std::default::Default for Method {
1288        fn default() -> Self {
1289            use std::convert::From;
1290            Self::from(0)
1291        }
1292    }
1293
1294    impl std::fmt::Display for Method {
1295        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1296            wkt::internal::display_enum(f, self.name(), self.value())
1297        }
1298    }
1299
1300    impl std::convert::From<i32> for Method {
1301        fn from(value: i32) -> Self {
1302            match value {
1303                0 => Self::Unspecified,
1304                1 => Self::Login,
1305                2 => Self::Password,
1306                3 => Self::SecureKey,
1307                4 => Self::EnrolledSecondFactors,
1308                _ => Self::UnknownValue(method::UnknownValue(
1309                    wkt::internal::UnknownEnumValue::Integer(value),
1310                )),
1311            }
1312        }
1313    }
1314
1315    impl std::convert::From<&str> for Method {
1316        fn from(value: &str) -> Self {
1317            use std::string::ToString;
1318            match value {
1319                "METHOD_UNSPECIFIED" => Self::Unspecified,
1320                "LOGIN" => Self::Login,
1321                "PASSWORD" => Self::Password,
1322                "SECURE_KEY" => Self::SecureKey,
1323                "ENROLLED_SECOND_FACTORS" => Self::EnrolledSecondFactors,
1324                _ => Self::UnknownValue(method::UnknownValue(
1325                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1326                )),
1327            }
1328        }
1329    }
1330
1331    impl serde::ser::Serialize for Method {
1332        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1333        where
1334            S: serde::Serializer,
1335        {
1336            match self {
1337                Self::Unspecified => serializer.serialize_i32(0),
1338                Self::Login => serializer.serialize_i32(1),
1339                Self::Password => serializer.serialize_i32(2),
1340                Self::SecureKey => serializer.serialize_i32(3),
1341                Self::EnrolledSecondFactors => serializer.serialize_i32(4),
1342                Self::UnknownValue(u) => u.0.serialize(serializer),
1343            }
1344        }
1345    }
1346
1347    impl<'de> serde::de::Deserialize<'de> for Method {
1348        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1349        where
1350            D: serde::Deserializer<'de>,
1351        {
1352            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Method>::new(
1353                ".google.cloud.iap.v1.ReauthSettings.Method",
1354            ))
1355        }
1356    }
1357
1358    /// Type of policy in the case of hierarchical policies.
1359    ///
1360    /// # Working with unknown values
1361    ///
1362    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1363    /// additional enum variants at any time. Adding new variants is not considered
1364    /// a breaking change. Applications should write their code in anticipation of:
1365    ///
1366    /// - New values appearing in future releases of the client library, **and**
1367    /// - New values received dynamically, without application changes.
1368    ///
1369    /// Please consult the [Working with enums] section in the user guide for some
1370    /// guidelines.
1371    ///
1372    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1373    #[derive(Clone, Debug, PartialEq)]
1374    #[non_exhaustive]
1375    pub enum PolicyType {
1376        /// Default value. This value is unused.
1377        Unspecified,
1378        /// This policy acts as a minimum to other policies, lower in the hierarchy.
1379        /// Effective policy may only be the same or stricter.
1380        Minimum,
1381        /// This policy acts as a default if no other reauth policy is set.
1382        Default,
1383        /// If set, the enum was initialized with an unknown value.
1384        ///
1385        /// Applications can examine the value using [PolicyType::value] or
1386        /// [PolicyType::name].
1387        UnknownValue(policy_type::UnknownValue),
1388    }
1389
1390    #[doc(hidden)]
1391    pub mod policy_type {
1392        #[allow(unused_imports)]
1393        use super::*;
1394        #[derive(Clone, Debug, PartialEq)]
1395        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1396    }
1397
1398    impl PolicyType {
1399        /// Gets the enum value.
1400        ///
1401        /// Returns `None` if the enum contains an unknown value deserialized from
1402        /// the string representation of enums.
1403        pub fn value(&self) -> std::option::Option<i32> {
1404            match self {
1405                Self::Unspecified => std::option::Option::Some(0),
1406                Self::Minimum => std::option::Option::Some(1),
1407                Self::Default => std::option::Option::Some(2),
1408                Self::UnknownValue(u) => u.0.value(),
1409            }
1410        }
1411
1412        /// Gets the enum value as a string.
1413        ///
1414        /// Returns `None` if the enum contains an unknown value deserialized from
1415        /// the integer representation of enums.
1416        pub fn name(&self) -> std::option::Option<&str> {
1417            match self {
1418                Self::Unspecified => std::option::Option::Some("POLICY_TYPE_UNSPECIFIED"),
1419                Self::Minimum => std::option::Option::Some("MINIMUM"),
1420                Self::Default => std::option::Option::Some("DEFAULT"),
1421                Self::UnknownValue(u) => u.0.name(),
1422            }
1423        }
1424    }
1425
1426    impl std::default::Default for PolicyType {
1427        fn default() -> Self {
1428            use std::convert::From;
1429            Self::from(0)
1430        }
1431    }
1432
1433    impl std::fmt::Display for PolicyType {
1434        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1435            wkt::internal::display_enum(f, self.name(), self.value())
1436        }
1437    }
1438
1439    impl std::convert::From<i32> for PolicyType {
1440        fn from(value: i32) -> Self {
1441            match value {
1442                0 => Self::Unspecified,
1443                1 => Self::Minimum,
1444                2 => Self::Default,
1445                _ => Self::UnknownValue(policy_type::UnknownValue(
1446                    wkt::internal::UnknownEnumValue::Integer(value),
1447                )),
1448            }
1449        }
1450    }
1451
1452    impl std::convert::From<&str> for PolicyType {
1453        fn from(value: &str) -> Self {
1454            use std::string::ToString;
1455            match value {
1456                "POLICY_TYPE_UNSPECIFIED" => Self::Unspecified,
1457                "MINIMUM" => Self::Minimum,
1458                "DEFAULT" => Self::Default,
1459                _ => Self::UnknownValue(policy_type::UnknownValue(
1460                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1461                )),
1462            }
1463        }
1464    }
1465
1466    impl serde::ser::Serialize for PolicyType {
1467        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1468        where
1469            S: serde::Serializer,
1470        {
1471            match self {
1472                Self::Unspecified => serializer.serialize_i32(0),
1473                Self::Minimum => serializer.serialize_i32(1),
1474                Self::Default => serializer.serialize_i32(2),
1475                Self::UnknownValue(u) => u.0.serialize(serializer),
1476            }
1477        }
1478    }
1479
1480    impl<'de> serde::de::Deserialize<'de> for PolicyType {
1481        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1482        where
1483            D: serde::Deserializer<'de>,
1484        {
1485            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PolicyType>::new(
1486                ".google.cloud.iap.v1.ReauthSettings.PolicyType",
1487            ))
1488        }
1489    }
1490}
1491
1492/// Configuration for IAP allowed domains. Lets you to restrict access to an app
1493/// and allow access to only the domains that you list.
1494#[derive(Clone, Default, PartialEq)]
1495#[non_exhaustive]
1496pub struct AllowedDomainsSettings {
1497    /// Optional. Configuration for customers to opt in for the feature.
1498    pub enable: std::option::Option<bool>,
1499
1500    /// Optional. List of trusted domains.
1501    pub domains: std::vec::Vec<std::string::String>,
1502
1503    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1504}
1505
1506impl AllowedDomainsSettings {
1507    pub fn new() -> Self {
1508        std::default::Default::default()
1509    }
1510
1511    /// Sets the value of [enable][crate::model::AllowedDomainsSettings::enable].
1512    pub fn set_enable<T>(mut self, v: T) -> Self
1513    where
1514        T: std::convert::Into<bool>,
1515    {
1516        self.enable = std::option::Option::Some(v.into());
1517        self
1518    }
1519
1520    /// Sets or clears the value of [enable][crate::model::AllowedDomainsSettings::enable].
1521    pub fn set_or_clear_enable<T>(mut self, v: std::option::Option<T>) -> Self
1522    where
1523        T: std::convert::Into<bool>,
1524    {
1525        self.enable = v.map(|x| x.into());
1526        self
1527    }
1528
1529    /// Sets the value of [domains][crate::model::AllowedDomainsSettings::domains].
1530    pub fn set_domains<T, V>(mut self, v: T) -> Self
1531    where
1532        T: std::iter::IntoIterator<Item = V>,
1533        V: std::convert::Into<std::string::String>,
1534    {
1535        use std::iter::Iterator;
1536        self.domains = v.into_iter().map(|i| i.into()).collect();
1537        self
1538    }
1539}
1540
1541impl wkt::message::Message for AllowedDomainsSettings {
1542    fn typename() -> &'static str {
1543        "type.googleapis.com/google.cloud.iap.v1.AllowedDomainsSettings"
1544    }
1545}
1546
1547/// Wrapper over application specific settings for IAP.
1548#[derive(Clone, Default, PartialEq)]
1549#[non_exhaustive]
1550pub struct ApplicationSettings {
1551    /// Optional. Settings to configure IAP's behavior for a service mesh.
1552    pub csm_settings: std::option::Option<crate::model::CsmSettings>,
1553
1554    /// Optional. Customization for Access Denied page.
1555    pub access_denied_page_settings: std::option::Option<crate::model::AccessDeniedPageSettings>,
1556
1557    /// The Domain value to set for cookies generated by IAP. This value is not
1558    /// validated by the API, but will be ignored at runtime if invalid.
1559    pub cookie_domain: std::option::Option<wkt::StringValue>,
1560
1561    /// Optional. Settings to configure attribute propagation.
1562    pub attribute_propagation_settings:
1563        std::option::Option<crate::model::AttributePropagationSettings>,
1564
1565    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1566}
1567
1568impl ApplicationSettings {
1569    pub fn new() -> Self {
1570        std::default::Default::default()
1571    }
1572
1573    /// Sets the value of [csm_settings][crate::model::ApplicationSettings::csm_settings].
1574    pub fn set_csm_settings<T>(mut self, v: T) -> Self
1575    where
1576        T: std::convert::Into<crate::model::CsmSettings>,
1577    {
1578        self.csm_settings = std::option::Option::Some(v.into());
1579        self
1580    }
1581
1582    /// Sets or clears the value of [csm_settings][crate::model::ApplicationSettings::csm_settings].
1583    pub fn set_or_clear_csm_settings<T>(mut self, v: std::option::Option<T>) -> Self
1584    where
1585        T: std::convert::Into<crate::model::CsmSettings>,
1586    {
1587        self.csm_settings = v.map(|x| x.into());
1588        self
1589    }
1590
1591    /// Sets the value of [access_denied_page_settings][crate::model::ApplicationSettings::access_denied_page_settings].
1592    pub fn set_access_denied_page_settings<T>(mut self, v: T) -> Self
1593    where
1594        T: std::convert::Into<crate::model::AccessDeniedPageSettings>,
1595    {
1596        self.access_denied_page_settings = std::option::Option::Some(v.into());
1597        self
1598    }
1599
1600    /// Sets or clears the value of [access_denied_page_settings][crate::model::ApplicationSettings::access_denied_page_settings].
1601    pub fn set_or_clear_access_denied_page_settings<T>(mut self, v: std::option::Option<T>) -> Self
1602    where
1603        T: std::convert::Into<crate::model::AccessDeniedPageSettings>,
1604    {
1605        self.access_denied_page_settings = v.map(|x| x.into());
1606        self
1607    }
1608
1609    /// Sets the value of [cookie_domain][crate::model::ApplicationSettings::cookie_domain].
1610    pub fn set_cookie_domain<T>(mut self, v: T) -> Self
1611    where
1612        T: std::convert::Into<wkt::StringValue>,
1613    {
1614        self.cookie_domain = std::option::Option::Some(v.into());
1615        self
1616    }
1617
1618    /// Sets or clears the value of [cookie_domain][crate::model::ApplicationSettings::cookie_domain].
1619    pub fn set_or_clear_cookie_domain<T>(mut self, v: std::option::Option<T>) -> Self
1620    where
1621        T: std::convert::Into<wkt::StringValue>,
1622    {
1623        self.cookie_domain = v.map(|x| x.into());
1624        self
1625    }
1626
1627    /// Sets the value of [attribute_propagation_settings][crate::model::ApplicationSettings::attribute_propagation_settings].
1628    pub fn set_attribute_propagation_settings<T>(mut self, v: T) -> Self
1629    where
1630        T: std::convert::Into<crate::model::AttributePropagationSettings>,
1631    {
1632        self.attribute_propagation_settings = std::option::Option::Some(v.into());
1633        self
1634    }
1635
1636    /// Sets or clears the value of [attribute_propagation_settings][crate::model::ApplicationSettings::attribute_propagation_settings].
1637    pub fn set_or_clear_attribute_propagation_settings<T>(
1638        mut self,
1639        v: std::option::Option<T>,
1640    ) -> Self
1641    where
1642        T: std::convert::Into<crate::model::AttributePropagationSettings>,
1643    {
1644        self.attribute_propagation_settings = v.map(|x| x.into());
1645        self
1646    }
1647}
1648
1649impl wkt::message::Message for ApplicationSettings {
1650    fn typename() -> &'static str {
1651        "type.googleapis.com/google.cloud.iap.v1.ApplicationSettings"
1652    }
1653}
1654
1655/// Configuration for RCToken generated for service mesh workloads protected by
1656/// IAP. RCToken are IAP generated JWTs that can be verified at the application.
1657/// The RCToken is primarily used for service mesh deployments, and can be scoped
1658/// to a single mesh by configuring the audience field accordingly.
1659#[derive(Clone, Default, PartialEq)]
1660#[non_exhaustive]
1661pub struct CsmSettings {
1662    /// Audience claim set in the generated RCToken. This value is not validated by
1663    /// IAP.
1664    pub rctoken_aud: std::option::Option<wkt::StringValue>,
1665
1666    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1667}
1668
1669impl CsmSettings {
1670    pub fn new() -> Self {
1671        std::default::Default::default()
1672    }
1673
1674    /// Sets the value of [rctoken_aud][crate::model::CsmSettings::rctoken_aud].
1675    pub fn set_rctoken_aud<T>(mut self, v: T) -> Self
1676    where
1677        T: std::convert::Into<wkt::StringValue>,
1678    {
1679        self.rctoken_aud = std::option::Option::Some(v.into());
1680        self
1681    }
1682
1683    /// Sets or clears the value of [rctoken_aud][crate::model::CsmSettings::rctoken_aud].
1684    pub fn set_or_clear_rctoken_aud<T>(mut self, v: std::option::Option<T>) -> Self
1685    where
1686        T: std::convert::Into<wkt::StringValue>,
1687    {
1688        self.rctoken_aud = v.map(|x| x.into());
1689        self
1690    }
1691}
1692
1693impl wkt::message::Message for CsmSettings {
1694    fn typename() -> &'static str {
1695        "type.googleapis.com/google.cloud.iap.v1.CsmSettings"
1696    }
1697}
1698
1699/// Custom content configuration for access denied page.
1700/// IAP allows customers to define a custom URI to use as the error page when
1701/// access is denied to users. If IAP prevents access to this page, the default
1702/// IAP error page will be displayed instead.
1703#[derive(Clone, Default, PartialEq)]
1704#[non_exhaustive]
1705pub struct AccessDeniedPageSettings {
1706    /// The URI to be redirected to when access is denied.
1707    pub access_denied_page_uri: std::option::Option<wkt::StringValue>,
1708
1709    /// Whether to generate a troubleshooting URL on access denied events to this
1710    /// application.
1711    pub generate_troubleshooting_uri: std::option::Option<wkt::BoolValue>,
1712
1713    /// Whether to generate remediation token on access denied events to this
1714    /// application.
1715    pub remediation_token_generation_enabled: std::option::Option<wkt::BoolValue>,
1716
1717    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1718}
1719
1720impl AccessDeniedPageSettings {
1721    pub fn new() -> Self {
1722        std::default::Default::default()
1723    }
1724
1725    /// Sets the value of [access_denied_page_uri][crate::model::AccessDeniedPageSettings::access_denied_page_uri].
1726    pub fn set_access_denied_page_uri<T>(mut self, v: T) -> Self
1727    where
1728        T: std::convert::Into<wkt::StringValue>,
1729    {
1730        self.access_denied_page_uri = std::option::Option::Some(v.into());
1731        self
1732    }
1733
1734    /// Sets or clears the value of [access_denied_page_uri][crate::model::AccessDeniedPageSettings::access_denied_page_uri].
1735    pub fn set_or_clear_access_denied_page_uri<T>(mut self, v: std::option::Option<T>) -> Self
1736    where
1737        T: std::convert::Into<wkt::StringValue>,
1738    {
1739        self.access_denied_page_uri = v.map(|x| x.into());
1740        self
1741    }
1742
1743    /// Sets the value of [generate_troubleshooting_uri][crate::model::AccessDeniedPageSettings::generate_troubleshooting_uri].
1744    pub fn set_generate_troubleshooting_uri<T>(mut self, v: T) -> Self
1745    where
1746        T: std::convert::Into<wkt::BoolValue>,
1747    {
1748        self.generate_troubleshooting_uri = std::option::Option::Some(v.into());
1749        self
1750    }
1751
1752    /// Sets or clears the value of [generate_troubleshooting_uri][crate::model::AccessDeniedPageSettings::generate_troubleshooting_uri].
1753    pub fn set_or_clear_generate_troubleshooting_uri<T>(mut self, v: std::option::Option<T>) -> Self
1754    where
1755        T: std::convert::Into<wkt::BoolValue>,
1756    {
1757        self.generate_troubleshooting_uri = v.map(|x| x.into());
1758        self
1759    }
1760
1761    /// Sets the value of [remediation_token_generation_enabled][crate::model::AccessDeniedPageSettings::remediation_token_generation_enabled].
1762    pub fn set_remediation_token_generation_enabled<T>(mut self, v: T) -> Self
1763    where
1764        T: std::convert::Into<wkt::BoolValue>,
1765    {
1766        self.remediation_token_generation_enabled = std::option::Option::Some(v.into());
1767        self
1768    }
1769
1770    /// Sets or clears the value of [remediation_token_generation_enabled][crate::model::AccessDeniedPageSettings::remediation_token_generation_enabled].
1771    pub fn set_or_clear_remediation_token_generation_enabled<T>(
1772        mut self,
1773        v: std::option::Option<T>,
1774    ) -> Self
1775    where
1776        T: std::convert::Into<wkt::BoolValue>,
1777    {
1778        self.remediation_token_generation_enabled = v.map(|x| x.into());
1779        self
1780    }
1781}
1782
1783impl wkt::message::Message for AccessDeniedPageSettings {
1784    fn typename() -> &'static str {
1785        "type.googleapis.com/google.cloud.iap.v1.AccessDeniedPageSettings"
1786    }
1787}
1788
1789/// Configuration for propagating attributes to applications protected
1790/// by IAP.
1791#[derive(Clone, Default, PartialEq)]
1792#[non_exhaustive]
1793pub struct AttributePropagationSettings {
1794    /// Optional. Raw string CEL expression. Must return a list of attributes. A
1795    /// maximum of 45 attributes can be selected. Expressions can select different
1796    /// attribute types from `attributes`: `attributes.saml_attributes`,
1797    /// `attributes.iap_attributes`. The following functions are supported:
1798    ///
1799    /// - filter `<list>.filter(<iter_var>, <predicate>)`: Returns a subset of
1800    ///   `<list>` where `<predicate>` is true for every item.
1801    ///
1802    /// - in `<var> in <list>`: Returns true if `<list>` contains `<var>`.
1803    ///
1804    /// - selectByName `<list>.selectByName(<string>)`: Returns the attribute
1805    ///   in
1806    ///   `<list>` with the given `<string>` name, otherwise returns empty.
1807    ///
1808    /// - emitAs `<attribute>.emitAs(<string>)`: Sets the `<attribute>` name
1809    ///   field to the given `<string>` for propagation in selected output
1810    ///   credentials.
1811    ///
1812    /// - strict `<attribute>.strict()`: Ignores the `x-goog-iap-attr-` prefix
1813    ///   for the provided `<attribute>` when propagating with the `HEADER` output
1814    ///   credential, such as request headers.
1815    ///
1816    /// - append `<target_list>.append(<attribute>)` OR
1817    ///   `<target_list>.append(<list>)`: Appends the provided `<attribute>` or
1818    ///   `<list>` to the end of `<target_list>`.
1819    ///
1820    ///
1821    /// Example expression: `attributes.saml_attributes.filter(x, x.name in
1822    /// ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())`
1823    pub expression: std::option::Option<std::string::String>,
1824
1825    /// Optional. Which output credentials attributes selected by the CEL
1826    /// expression should be propagated in. All attributes will be fully duplicated
1827    /// in each selected output credential.
1828    pub output_credentials:
1829        std::vec::Vec<crate::model::attribute_propagation_settings::OutputCredentials>,
1830
1831    /// Optional. Whether the provided attribute propagation settings should be
1832    /// evaluated on user requests. If set to true, attributes returned from the
1833    /// expression will be propagated in the set output credentials.
1834    pub enable: std::option::Option<bool>,
1835
1836    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1837}
1838
1839impl AttributePropagationSettings {
1840    pub fn new() -> Self {
1841        std::default::Default::default()
1842    }
1843
1844    /// Sets the value of [expression][crate::model::AttributePropagationSettings::expression].
1845    pub fn set_expression<T>(mut self, v: T) -> Self
1846    where
1847        T: std::convert::Into<std::string::String>,
1848    {
1849        self.expression = std::option::Option::Some(v.into());
1850        self
1851    }
1852
1853    /// Sets or clears the value of [expression][crate::model::AttributePropagationSettings::expression].
1854    pub fn set_or_clear_expression<T>(mut self, v: std::option::Option<T>) -> Self
1855    where
1856        T: std::convert::Into<std::string::String>,
1857    {
1858        self.expression = v.map(|x| x.into());
1859        self
1860    }
1861
1862    /// Sets the value of [output_credentials][crate::model::AttributePropagationSettings::output_credentials].
1863    pub fn set_output_credentials<T, V>(mut self, v: T) -> Self
1864    where
1865        T: std::iter::IntoIterator<Item = V>,
1866        V: std::convert::Into<crate::model::attribute_propagation_settings::OutputCredentials>,
1867    {
1868        use std::iter::Iterator;
1869        self.output_credentials = v.into_iter().map(|i| i.into()).collect();
1870        self
1871    }
1872
1873    /// Sets the value of [enable][crate::model::AttributePropagationSettings::enable].
1874    pub fn set_enable<T>(mut self, v: T) -> Self
1875    where
1876        T: std::convert::Into<bool>,
1877    {
1878        self.enable = std::option::Option::Some(v.into());
1879        self
1880    }
1881
1882    /// Sets or clears the value of [enable][crate::model::AttributePropagationSettings::enable].
1883    pub fn set_or_clear_enable<T>(mut self, v: std::option::Option<T>) -> Self
1884    where
1885        T: std::convert::Into<bool>,
1886    {
1887        self.enable = v.map(|x| x.into());
1888        self
1889    }
1890}
1891
1892impl wkt::message::Message for AttributePropagationSettings {
1893    fn typename() -> &'static str {
1894        "type.googleapis.com/google.cloud.iap.v1.AttributePropagationSettings"
1895    }
1896}
1897
1898/// Defines additional types related to [AttributePropagationSettings].
1899pub mod attribute_propagation_settings {
1900    #[allow(unused_imports)]
1901    use super::*;
1902
1903    /// Supported output credentials for attribute propagation. Each output
1904    /// credential maps to a "field" in the response. For example, selecting JWT
1905    /// will propagate all attributes in the IAP JWT, header in the headers, etc.
1906    ///
1907    /// # Working with unknown values
1908    ///
1909    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1910    /// additional enum variants at any time. Adding new variants is not considered
1911    /// a breaking change. Applications should write their code in anticipation of:
1912    ///
1913    /// - New values appearing in future releases of the client library, **and**
1914    /// - New values received dynamically, without application changes.
1915    ///
1916    /// Please consult the [Working with enums] section in the user guide for some
1917    /// guidelines.
1918    ///
1919    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1920    #[derive(Clone, Debug, PartialEq)]
1921    #[non_exhaustive]
1922    pub enum OutputCredentials {
1923        /// An output credential is required.
1924        Unspecified,
1925        /// Propagate attributes in the headers with "x-goog-iap-attr-" prefix.
1926        Header,
1927        /// Propagate attributes in the JWT of the form: `"additional_claims": {
1928        /// "my_attribute": ["value1", "value2"] }`
1929        Jwt,
1930        /// Propagate attributes in the RCToken of the form: `"additional_claims": {
1931        /// "my_attribute": ["value1", "value2"] }`
1932        Rctoken,
1933        /// If set, the enum was initialized with an unknown value.
1934        ///
1935        /// Applications can examine the value using [OutputCredentials::value] or
1936        /// [OutputCredentials::name].
1937        UnknownValue(output_credentials::UnknownValue),
1938    }
1939
1940    #[doc(hidden)]
1941    pub mod output_credentials {
1942        #[allow(unused_imports)]
1943        use super::*;
1944        #[derive(Clone, Debug, PartialEq)]
1945        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1946    }
1947
1948    impl OutputCredentials {
1949        /// Gets the enum value.
1950        ///
1951        /// Returns `None` if the enum contains an unknown value deserialized from
1952        /// the string representation of enums.
1953        pub fn value(&self) -> std::option::Option<i32> {
1954            match self {
1955                Self::Unspecified => std::option::Option::Some(0),
1956                Self::Header => std::option::Option::Some(1),
1957                Self::Jwt => std::option::Option::Some(2),
1958                Self::Rctoken => std::option::Option::Some(3),
1959                Self::UnknownValue(u) => u.0.value(),
1960            }
1961        }
1962
1963        /// Gets the enum value as a string.
1964        ///
1965        /// Returns `None` if the enum contains an unknown value deserialized from
1966        /// the integer representation of enums.
1967        pub fn name(&self) -> std::option::Option<&str> {
1968            match self {
1969                Self::Unspecified => std::option::Option::Some("OUTPUT_CREDENTIALS_UNSPECIFIED"),
1970                Self::Header => std::option::Option::Some("HEADER"),
1971                Self::Jwt => std::option::Option::Some("JWT"),
1972                Self::Rctoken => std::option::Option::Some("RCTOKEN"),
1973                Self::UnknownValue(u) => u.0.name(),
1974            }
1975        }
1976    }
1977
1978    impl std::default::Default for OutputCredentials {
1979        fn default() -> Self {
1980            use std::convert::From;
1981            Self::from(0)
1982        }
1983    }
1984
1985    impl std::fmt::Display for OutputCredentials {
1986        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1987            wkt::internal::display_enum(f, self.name(), self.value())
1988        }
1989    }
1990
1991    impl std::convert::From<i32> for OutputCredentials {
1992        fn from(value: i32) -> Self {
1993            match value {
1994                0 => Self::Unspecified,
1995                1 => Self::Header,
1996                2 => Self::Jwt,
1997                3 => Self::Rctoken,
1998                _ => Self::UnknownValue(output_credentials::UnknownValue(
1999                    wkt::internal::UnknownEnumValue::Integer(value),
2000                )),
2001            }
2002        }
2003    }
2004
2005    impl std::convert::From<&str> for OutputCredentials {
2006        fn from(value: &str) -> Self {
2007            use std::string::ToString;
2008            match value {
2009                "OUTPUT_CREDENTIALS_UNSPECIFIED" => Self::Unspecified,
2010                "HEADER" => Self::Header,
2011                "JWT" => Self::Jwt,
2012                "RCTOKEN" => Self::Rctoken,
2013                _ => Self::UnknownValue(output_credentials::UnknownValue(
2014                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2015                )),
2016            }
2017        }
2018    }
2019
2020    impl serde::ser::Serialize for OutputCredentials {
2021        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2022        where
2023            S: serde::Serializer,
2024        {
2025            match self {
2026                Self::Unspecified => serializer.serialize_i32(0),
2027                Self::Header => serializer.serialize_i32(1),
2028                Self::Jwt => serializer.serialize_i32(2),
2029                Self::Rctoken => serializer.serialize_i32(3),
2030                Self::UnknownValue(u) => u.0.serialize(serializer),
2031            }
2032        }
2033    }
2034
2035    impl<'de> serde::de::Deserialize<'de> for OutputCredentials {
2036        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2037        where
2038            D: serde::Deserializer<'de>,
2039        {
2040            deserializer.deserialize_any(wkt::internal::EnumVisitor::<OutputCredentials>::new(
2041                ".google.cloud.iap.v1.AttributePropagationSettings.OutputCredentials",
2042            ))
2043        }
2044    }
2045}
2046
2047/// Request sent to IAP Expression Linter endpoint.
2048#[derive(Clone, Default, PartialEq)]
2049#[non_exhaustive]
2050pub struct ValidateIapAttributeExpressionRequest {
2051    /// Required. The resource name of the IAP protected resource.
2052    pub name: std::string::String,
2053
2054    /// Required. User input string expression. Should be of the form
2055    /// `attributes.saml_attributes.filter(attribute, attribute.name in
2056    /// ['{attribute_name}', '{attribute_name}'])`
2057    pub expression: std::string::String,
2058
2059    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2060}
2061
2062impl ValidateIapAttributeExpressionRequest {
2063    pub fn new() -> Self {
2064        std::default::Default::default()
2065    }
2066
2067    /// Sets the value of [name][crate::model::ValidateIapAttributeExpressionRequest::name].
2068    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2069        self.name = v.into();
2070        self
2071    }
2072
2073    /// Sets the value of [expression][crate::model::ValidateIapAttributeExpressionRequest::expression].
2074    pub fn set_expression<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2075        self.expression = v.into();
2076        self
2077    }
2078}
2079
2080impl wkt::message::Message for ValidateIapAttributeExpressionRequest {
2081    fn typename() -> &'static str {
2082        "type.googleapis.com/google.cloud.iap.v1.ValidateIapAttributeExpressionRequest"
2083    }
2084}
2085
2086/// IAP Expression Linter endpoint returns empty response body.
2087#[derive(Clone, Default, PartialEq)]
2088#[non_exhaustive]
2089pub struct ValidateIapAttributeExpressionResponse {
2090    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2091}
2092
2093impl ValidateIapAttributeExpressionResponse {
2094    pub fn new() -> Self {
2095        std::default::Default::default()
2096    }
2097}
2098
2099impl wkt::message::Message for ValidateIapAttributeExpressionResponse {
2100    fn typename() -> &'static str {
2101        "type.googleapis.com/google.cloud.iap.v1.ValidateIapAttributeExpressionResponse"
2102    }
2103}
2104
2105/// The request sent to ListBrands.
2106#[derive(Clone, Default, PartialEq)]
2107#[non_exhaustive]
2108pub struct ListBrandsRequest {
2109    /// Required. GCP Project number/id.
2110    /// In the following format: projects/{project_number/id}.
2111    pub parent: std::string::String,
2112
2113    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2114}
2115
2116impl ListBrandsRequest {
2117    pub fn new() -> Self {
2118        std::default::Default::default()
2119    }
2120
2121    /// Sets the value of [parent][crate::model::ListBrandsRequest::parent].
2122    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2123        self.parent = v.into();
2124        self
2125    }
2126}
2127
2128impl wkt::message::Message for ListBrandsRequest {
2129    fn typename() -> &'static str {
2130        "type.googleapis.com/google.cloud.iap.v1.ListBrandsRequest"
2131    }
2132}
2133
2134/// Response message for ListBrands.
2135#[derive(Clone, Default, PartialEq)]
2136#[non_exhaustive]
2137pub struct ListBrandsResponse {
2138    /// Brands existing in the project.
2139    pub brands: std::vec::Vec<crate::model::Brand>,
2140
2141    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2142}
2143
2144impl ListBrandsResponse {
2145    pub fn new() -> Self {
2146        std::default::Default::default()
2147    }
2148
2149    /// Sets the value of [brands][crate::model::ListBrandsResponse::brands].
2150    pub fn set_brands<T, V>(mut self, v: T) -> Self
2151    where
2152        T: std::iter::IntoIterator<Item = V>,
2153        V: std::convert::Into<crate::model::Brand>,
2154    {
2155        use std::iter::Iterator;
2156        self.brands = v.into_iter().map(|i| i.into()).collect();
2157        self
2158    }
2159}
2160
2161impl wkt::message::Message for ListBrandsResponse {
2162    fn typename() -> &'static str {
2163        "type.googleapis.com/google.cloud.iap.v1.ListBrandsResponse"
2164    }
2165}
2166
2167/// The request sent to CreateBrand.
2168#[derive(Clone, Default, PartialEq)]
2169#[non_exhaustive]
2170pub struct CreateBrandRequest {
2171    /// Required. GCP Project number/id under which the brand is to be created.
2172    /// In the following format: projects/{project_number/id}.
2173    pub parent: std::string::String,
2174
2175    /// Required. The brand to be created.
2176    pub brand: std::option::Option<crate::model::Brand>,
2177
2178    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2179}
2180
2181impl CreateBrandRequest {
2182    pub fn new() -> Self {
2183        std::default::Default::default()
2184    }
2185
2186    /// Sets the value of [parent][crate::model::CreateBrandRequest::parent].
2187    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2188        self.parent = v.into();
2189        self
2190    }
2191
2192    /// Sets the value of [brand][crate::model::CreateBrandRequest::brand].
2193    pub fn set_brand<T>(mut self, v: T) -> Self
2194    where
2195        T: std::convert::Into<crate::model::Brand>,
2196    {
2197        self.brand = std::option::Option::Some(v.into());
2198        self
2199    }
2200
2201    /// Sets or clears the value of [brand][crate::model::CreateBrandRequest::brand].
2202    pub fn set_or_clear_brand<T>(mut self, v: std::option::Option<T>) -> Self
2203    where
2204        T: std::convert::Into<crate::model::Brand>,
2205    {
2206        self.brand = v.map(|x| x.into());
2207        self
2208    }
2209}
2210
2211impl wkt::message::Message for CreateBrandRequest {
2212    fn typename() -> &'static str {
2213        "type.googleapis.com/google.cloud.iap.v1.CreateBrandRequest"
2214    }
2215}
2216
2217/// The request sent to GetBrand.
2218#[derive(Clone, Default, PartialEq)]
2219#[non_exhaustive]
2220pub struct GetBrandRequest {
2221    /// Required. Name of the brand to be fetched.
2222    /// In the following format: projects/{project_number/id}/brands/{brand}.
2223    pub name: std::string::String,
2224
2225    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2226}
2227
2228impl GetBrandRequest {
2229    pub fn new() -> Self {
2230        std::default::Default::default()
2231    }
2232
2233    /// Sets the value of [name][crate::model::GetBrandRequest::name].
2234    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2235        self.name = v.into();
2236        self
2237    }
2238}
2239
2240impl wkt::message::Message for GetBrandRequest {
2241    fn typename() -> &'static str {
2242        "type.googleapis.com/google.cloud.iap.v1.GetBrandRequest"
2243    }
2244}
2245
2246/// The request sent to ListIdentityAwareProxyClients.
2247#[derive(Clone, Default, PartialEq)]
2248#[non_exhaustive]
2249pub struct ListIdentityAwareProxyClientsRequest {
2250    /// Required. Full brand path.
2251    /// In the following format: projects/{project_number/id}/brands/{brand}.
2252    pub parent: std::string::String,
2253
2254    /// The maximum number of clients to return. The service may return fewer than
2255    /// this value.
2256    /// If unspecified, at most 100 clients will be returned.
2257    /// The maximum value is 1000; values above 1000 will be coerced to 1000.
2258    pub page_size: i32,
2259
2260    /// A page token, received from a previous `ListIdentityAwareProxyClients`
2261    /// call. Provide this to retrieve the subsequent page.
2262    ///
2263    /// When paginating, all other parameters provided to
2264    /// `ListIdentityAwareProxyClients` must match the call that provided the page
2265    /// token.
2266    pub page_token: std::string::String,
2267
2268    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2269}
2270
2271impl ListIdentityAwareProxyClientsRequest {
2272    pub fn new() -> Self {
2273        std::default::Default::default()
2274    }
2275
2276    /// Sets the value of [parent][crate::model::ListIdentityAwareProxyClientsRequest::parent].
2277    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2278        self.parent = v.into();
2279        self
2280    }
2281
2282    /// Sets the value of [page_size][crate::model::ListIdentityAwareProxyClientsRequest::page_size].
2283    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2284        self.page_size = v.into();
2285        self
2286    }
2287
2288    /// Sets the value of [page_token][crate::model::ListIdentityAwareProxyClientsRequest::page_token].
2289    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2290        self.page_token = v.into();
2291        self
2292    }
2293}
2294
2295impl wkt::message::Message for ListIdentityAwareProxyClientsRequest {
2296    fn typename() -> &'static str {
2297        "type.googleapis.com/google.cloud.iap.v1.ListIdentityAwareProxyClientsRequest"
2298    }
2299}
2300
2301/// Response message for ListIdentityAwareProxyClients.
2302#[derive(Clone, Default, PartialEq)]
2303#[non_exhaustive]
2304pub struct ListIdentityAwareProxyClientsResponse {
2305    /// Clients existing in the brand.
2306    pub identity_aware_proxy_clients: std::vec::Vec<crate::model::IdentityAwareProxyClient>,
2307
2308    /// A token, which can be send as `page_token` to retrieve the next page.
2309    /// If this field is omitted, there are no subsequent pages.
2310    pub next_page_token: std::string::String,
2311
2312    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2313}
2314
2315impl ListIdentityAwareProxyClientsResponse {
2316    pub fn new() -> Self {
2317        std::default::Default::default()
2318    }
2319
2320    /// Sets the value of [identity_aware_proxy_clients][crate::model::ListIdentityAwareProxyClientsResponse::identity_aware_proxy_clients].
2321    pub fn set_identity_aware_proxy_clients<T, V>(mut self, v: T) -> Self
2322    where
2323        T: std::iter::IntoIterator<Item = V>,
2324        V: std::convert::Into<crate::model::IdentityAwareProxyClient>,
2325    {
2326        use std::iter::Iterator;
2327        self.identity_aware_proxy_clients = v.into_iter().map(|i| i.into()).collect();
2328        self
2329    }
2330
2331    /// Sets the value of [next_page_token][crate::model::ListIdentityAwareProxyClientsResponse::next_page_token].
2332    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2333        self.next_page_token = v.into();
2334        self
2335    }
2336}
2337
2338impl wkt::message::Message for ListIdentityAwareProxyClientsResponse {
2339    fn typename() -> &'static str {
2340        "type.googleapis.com/google.cloud.iap.v1.ListIdentityAwareProxyClientsResponse"
2341    }
2342}
2343
2344#[doc(hidden)]
2345impl gax::paginator::internal::PageableResponse for ListIdentityAwareProxyClientsResponse {
2346    type PageItem = crate::model::IdentityAwareProxyClient;
2347
2348    fn items(self) -> std::vec::Vec<Self::PageItem> {
2349        self.identity_aware_proxy_clients
2350    }
2351
2352    fn next_page_token(&self) -> std::string::String {
2353        use std::clone::Clone;
2354        self.next_page_token.clone()
2355    }
2356}
2357
2358/// The request sent to CreateIdentityAwareProxyClient.
2359#[derive(Clone, Default, PartialEq)]
2360#[non_exhaustive]
2361pub struct CreateIdentityAwareProxyClientRequest {
2362    /// Required. Path to create the client in.
2363    /// In the following format:
2364    /// projects/{project_number/id}/brands/{brand}.
2365    /// The project must belong to a G Suite account.
2366    pub parent: std::string::String,
2367
2368    /// Required. Identity Aware Proxy Client to be created.
2369    pub identity_aware_proxy_client: std::option::Option<crate::model::IdentityAwareProxyClient>,
2370
2371    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2372}
2373
2374impl CreateIdentityAwareProxyClientRequest {
2375    pub fn new() -> Self {
2376        std::default::Default::default()
2377    }
2378
2379    /// Sets the value of [parent][crate::model::CreateIdentityAwareProxyClientRequest::parent].
2380    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2381        self.parent = v.into();
2382        self
2383    }
2384
2385    /// Sets the value of [identity_aware_proxy_client][crate::model::CreateIdentityAwareProxyClientRequest::identity_aware_proxy_client].
2386    pub fn set_identity_aware_proxy_client<T>(mut self, v: T) -> Self
2387    where
2388        T: std::convert::Into<crate::model::IdentityAwareProxyClient>,
2389    {
2390        self.identity_aware_proxy_client = std::option::Option::Some(v.into());
2391        self
2392    }
2393
2394    /// Sets or clears the value of [identity_aware_proxy_client][crate::model::CreateIdentityAwareProxyClientRequest::identity_aware_proxy_client].
2395    pub fn set_or_clear_identity_aware_proxy_client<T>(mut self, v: std::option::Option<T>) -> Self
2396    where
2397        T: std::convert::Into<crate::model::IdentityAwareProxyClient>,
2398    {
2399        self.identity_aware_proxy_client = v.map(|x| x.into());
2400        self
2401    }
2402}
2403
2404impl wkt::message::Message for CreateIdentityAwareProxyClientRequest {
2405    fn typename() -> &'static str {
2406        "type.googleapis.com/google.cloud.iap.v1.CreateIdentityAwareProxyClientRequest"
2407    }
2408}
2409
2410/// The request sent to GetIdentityAwareProxyClient.
2411#[derive(Clone, Default, PartialEq)]
2412#[non_exhaustive]
2413pub struct GetIdentityAwareProxyClientRequest {
2414    /// Required. Name of the Identity Aware Proxy client to be fetched.
2415    /// In the following format:
2416    /// projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}.
2417    pub name: std::string::String,
2418
2419    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2420}
2421
2422impl GetIdentityAwareProxyClientRequest {
2423    pub fn new() -> Self {
2424        std::default::Default::default()
2425    }
2426
2427    /// Sets the value of [name][crate::model::GetIdentityAwareProxyClientRequest::name].
2428    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2429        self.name = v.into();
2430        self
2431    }
2432}
2433
2434impl wkt::message::Message for GetIdentityAwareProxyClientRequest {
2435    fn typename() -> &'static str {
2436        "type.googleapis.com/google.cloud.iap.v1.GetIdentityAwareProxyClientRequest"
2437    }
2438}
2439
2440/// The request sent to ResetIdentityAwareProxyClientSecret.
2441#[derive(Clone, Default, PartialEq)]
2442#[non_exhaustive]
2443pub struct ResetIdentityAwareProxyClientSecretRequest {
2444    /// Required. Name of the Identity Aware Proxy client to that will have its
2445    /// secret reset. In the following format:
2446    /// projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}.
2447    pub name: std::string::String,
2448
2449    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2450}
2451
2452impl ResetIdentityAwareProxyClientSecretRequest {
2453    pub fn new() -> Self {
2454        std::default::Default::default()
2455    }
2456
2457    /// Sets the value of [name][crate::model::ResetIdentityAwareProxyClientSecretRequest::name].
2458    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2459        self.name = v.into();
2460        self
2461    }
2462}
2463
2464impl wkt::message::Message for ResetIdentityAwareProxyClientSecretRequest {
2465    fn typename() -> &'static str {
2466        "type.googleapis.com/google.cloud.iap.v1.ResetIdentityAwareProxyClientSecretRequest"
2467    }
2468}
2469
2470/// The request sent to DeleteIdentityAwareProxyClient.
2471#[derive(Clone, Default, PartialEq)]
2472#[non_exhaustive]
2473pub struct DeleteIdentityAwareProxyClientRequest {
2474    /// Required. Name of the Identity Aware Proxy client to be deleted.
2475    /// In the following format:
2476    /// projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}.
2477    pub name: std::string::String,
2478
2479    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2480}
2481
2482impl DeleteIdentityAwareProxyClientRequest {
2483    pub fn new() -> Self {
2484        std::default::Default::default()
2485    }
2486
2487    /// Sets the value of [name][crate::model::DeleteIdentityAwareProxyClientRequest::name].
2488    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2489        self.name = v.into();
2490        self
2491    }
2492}
2493
2494impl wkt::message::Message for DeleteIdentityAwareProxyClientRequest {
2495    fn typename() -> &'static str {
2496        "type.googleapis.com/google.cloud.iap.v1.DeleteIdentityAwareProxyClientRequest"
2497    }
2498}
2499
2500/// OAuth brand data.
2501/// NOTE: Only contains a portion of the data that describes a brand.
2502#[derive(Clone, Default, PartialEq)]
2503#[non_exhaustive]
2504pub struct Brand {
2505    /// Output only. Identifier of the brand.
2506    /// NOTE: GCP project number achieves the same brand identification purpose as
2507    /// only one brand per project can be created.
2508    pub name: std::string::String,
2509
2510    /// Support email displayed on the OAuth consent screen.
2511    pub support_email: std::string::String,
2512
2513    /// Application name displayed on OAuth consent screen.
2514    pub application_title: std::string::String,
2515
2516    /// Output only. Whether the brand is only intended for usage inside the
2517    /// G Suite organization only.
2518    pub org_internal_only: bool,
2519
2520    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2521}
2522
2523impl Brand {
2524    pub fn new() -> Self {
2525        std::default::Default::default()
2526    }
2527
2528    /// Sets the value of [name][crate::model::Brand::name].
2529    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2530        self.name = v.into();
2531        self
2532    }
2533
2534    /// Sets the value of [support_email][crate::model::Brand::support_email].
2535    pub fn set_support_email<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2536        self.support_email = v.into();
2537        self
2538    }
2539
2540    /// Sets the value of [application_title][crate::model::Brand::application_title].
2541    pub fn set_application_title<T: std::convert::Into<std::string::String>>(
2542        mut self,
2543        v: T,
2544    ) -> Self {
2545        self.application_title = v.into();
2546        self
2547    }
2548
2549    /// Sets the value of [org_internal_only][crate::model::Brand::org_internal_only].
2550    pub fn set_org_internal_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2551        self.org_internal_only = v.into();
2552        self
2553    }
2554}
2555
2556impl wkt::message::Message for Brand {
2557    fn typename() -> &'static str {
2558        "type.googleapis.com/google.cloud.iap.v1.Brand"
2559    }
2560}
2561
2562/// Contains the data that describes an Identity Aware Proxy owned client.
2563#[derive(Clone, Default, PartialEq)]
2564#[non_exhaustive]
2565pub struct IdentityAwareProxyClient {
2566    /// Output only. Unique identifier of the OAuth client.
2567    pub name: std::string::String,
2568
2569    /// Output only. Client secret of the OAuth client.
2570    pub secret: std::string::String,
2571
2572    /// Human-friendly name given to the OAuth client.
2573    pub display_name: std::string::String,
2574
2575    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2576}
2577
2578impl IdentityAwareProxyClient {
2579    pub fn new() -> Self {
2580        std::default::Default::default()
2581    }
2582
2583    /// Sets the value of [name][crate::model::IdentityAwareProxyClient::name].
2584    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2585        self.name = v.into();
2586        self
2587    }
2588
2589    /// Sets the value of [secret][crate::model::IdentityAwareProxyClient::secret].
2590    pub fn set_secret<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2591        self.secret = v.into();
2592        self
2593    }
2594
2595    /// Sets the value of [display_name][crate::model::IdentityAwareProxyClient::display_name].
2596    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2597        self.display_name = v.into();
2598        self
2599    }
2600}
2601
2602impl wkt::message::Message for IdentityAwareProxyClient {
2603    fn typename() -> &'static str {
2604        "type.googleapis.com/google.cloud.iap.v1.IdentityAwareProxyClient"
2605    }
2606}