1#![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#[derive(Clone, Default, PartialEq)]
40#[non_exhaustive]
41pub struct ListTunnelDestGroupsRequest {
42 pub parent: std::string::String,
47
48 pub page_size: i32,
53
54 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 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 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 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#[derive(Clone, Default, PartialEq)]
97#[non_exhaustive]
98pub struct ListTunnelDestGroupsResponse {
99 pub tunnel_dest_groups: std::vec::Vec<crate::model::TunnelDestGroup>,
101
102 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 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 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#[derive(Clone, Default, PartialEq)]
154#[non_exhaustive]
155pub struct CreateTunnelDestGroupRequest {
156 pub parent: std::string::String,
160
161 pub tunnel_dest_group: std::option::Option<crate::model::TunnelDestGroup>,
163
164 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
221#[non_exhaustive]
222pub struct GetTunnelDestGroupRequest {
223 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 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#[derive(Clone, Default, PartialEq)]
251#[non_exhaustive]
252pub struct DeleteTunnelDestGroupRequest {
253 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 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#[derive(Clone, Default, PartialEq)]
281#[non_exhaustive]
282pub struct UpdateTunnelDestGroupRequest {
283 pub tunnel_dest_group: std::option::Option<crate::model::TunnelDestGroup>,
285
286 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
344#[non_exhaustive]
345pub struct TunnelDestGroup {
346 pub name: std::string::String,
349
350 pub cidrs: std::vec::Vec<std::string::String>,
352
353 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 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 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 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#[derive(Clone, Default, PartialEq)]
401#[non_exhaustive]
402pub struct GetIapSettingsRequest {
403 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 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#[derive(Clone, Default, PartialEq)]
431#[non_exhaustive]
432pub struct UpdateIapSettingsRequest {
433 pub iap_settings: std::option::Option<crate::model::IapSettings>,
437
438 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
499#[non_exhaustive]
500pub struct IapSettings {
501 pub name: std::string::String,
503
504 pub access_settings: std::option::Option<crate::model::AccessSettings>,
506
507 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
569#[non_exhaustive]
570pub struct AccessSettings {
571 pub gcip_settings: std::option::Option<crate::model::GcipSettings>,
574
575 pub cors_settings: std::option::Option<crate::model::CorsSettings>,
577
578 pub oauth_settings: std::option::Option<crate::model::OAuthSettings>,
580
581 pub reauth_settings: std::option::Option<crate::model::ReauthSettings>,
583
584 pub allowed_domains_settings: std::option::Option<crate::model::AllowedDomainsSettings>,
586
587 pub workforce_identity_settings: std::option::Option<crate::model::WorkforceIdentitySettings>,
590
591 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 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 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 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 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 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 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 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 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 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 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 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 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 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
729pub mod access_settings {
731 #[allow(unused_imports)]
732 use super::*;
733
734 #[derive(Clone, Debug, PartialEq)]
750 #[non_exhaustive]
751 pub enum IdentitySource {
752 Unspecified,
758 WorkforceIdentityFederation,
761 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 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 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#[derive(Clone, Default, PartialEq)]
870#[non_exhaustive]
871pub struct GcipSettings {
872 pub tenant_ids: std::vec::Vec<std::string::String>,
879
880 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 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 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 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#[derive(Clone, Default, PartialEq)]
932#[non_exhaustive]
933pub struct CorsSettings {
934 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 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 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#[derive(Clone, Default, PartialEq)]
975#[non_exhaustive]
976pub struct OAuthSettings {
977 pub login_hint: std::option::Option<wkt::StringValue>,
983
984 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 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 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 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#[derive(Clone, Default, PartialEq)]
1035#[non_exhaustive]
1036pub struct WorkforceIdentitySettings {
1037 pub workforce_pools: std::vec::Vec<std::string::String>,
1039
1040 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 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 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 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#[derive(Clone, Default, PartialEq)]
1090#[non_exhaustive]
1091pub struct OAuth2 {
1092 pub client_id: std::string::String,
1095
1096 pub client_secret: std::string::String,
1099
1100 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 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 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 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#[derive(Clone, Default, PartialEq)]
1142#[non_exhaustive]
1143pub struct ReauthSettings {
1144 pub method: crate::model::reauth_settings::Method,
1146
1147 pub max_age: std::option::Option<wkt::Duration>,
1150
1151 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 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 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 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 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
1207pub mod reauth_settings {
1209 #[allow(unused_imports)]
1210 use super::*;
1211
1212 #[derive(Clone, Debug, PartialEq)]
1228 #[non_exhaustive]
1229 pub enum Method {
1230 Unspecified,
1232 Login,
1234 #[deprecated]
1235 Password,
1236 SecureKey,
1238 EnrolledSecondFactors,
1240 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 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 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 #[derive(Clone, Debug, PartialEq)]
1374 #[non_exhaustive]
1375 pub enum PolicyType {
1376 Unspecified,
1378 Minimum,
1381 Default,
1383 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 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 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#[derive(Clone, Default, PartialEq)]
1495#[non_exhaustive]
1496pub struct AllowedDomainsSettings {
1497 pub enable: std::option::Option<bool>,
1499
1500 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 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 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 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#[derive(Clone, Default, PartialEq)]
1549#[non_exhaustive]
1550pub struct ApplicationSettings {
1551 pub csm_settings: std::option::Option<crate::model::CsmSettings>,
1553
1554 pub access_denied_page_settings: std::option::Option<crate::model::AccessDeniedPageSettings>,
1556
1557 pub cookie_domain: std::option::Option<wkt::StringValue>,
1560
1561 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 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
1660#[non_exhaustive]
1661pub struct CsmSettings {
1662 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 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 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#[derive(Clone, Default, PartialEq)]
1704#[non_exhaustive]
1705pub struct AccessDeniedPageSettings {
1706 pub access_denied_page_uri: std::option::Option<wkt::StringValue>,
1708
1709 pub generate_troubleshooting_uri: std::option::Option<wkt::BoolValue>,
1712
1713 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
1792#[non_exhaustive]
1793pub struct AttributePropagationSettings {
1794 pub expression: std::option::Option<std::string::String>,
1824
1825 pub output_credentials:
1829 std::vec::Vec<crate::model::attribute_propagation_settings::OutputCredentials>,
1830
1831 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 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 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 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 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 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
1898pub mod attribute_propagation_settings {
1900 #[allow(unused_imports)]
1901 use super::*;
1902
1903 #[derive(Clone, Debug, PartialEq)]
1921 #[non_exhaustive]
1922 pub enum OutputCredentials {
1923 Unspecified,
1925 Header,
1927 Jwt,
1930 Rctoken,
1933 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 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 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#[derive(Clone, Default, PartialEq)]
2049#[non_exhaustive]
2050pub struct ValidateIapAttributeExpressionRequest {
2051 pub name: std::string::String,
2053
2054 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 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 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#[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#[derive(Clone, Default, PartialEq)]
2107#[non_exhaustive]
2108pub struct ListBrandsRequest {
2109 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 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#[derive(Clone, Default, PartialEq)]
2136#[non_exhaustive]
2137pub struct ListBrandsResponse {
2138 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 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#[derive(Clone, Default, PartialEq)]
2169#[non_exhaustive]
2170pub struct CreateBrandRequest {
2171 pub parent: std::string::String,
2174
2175 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 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 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 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#[derive(Clone, Default, PartialEq)]
2219#[non_exhaustive]
2220pub struct GetBrandRequest {
2221 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 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#[derive(Clone, Default, PartialEq)]
2248#[non_exhaustive]
2249pub struct ListIdentityAwareProxyClientsRequest {
2250 pub parent: std::string::String,
2253
2254 pub page_size: i32,
2259
2260 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 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 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 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#[derive(Clone, Default, PartialEq)]
2303#[non_exhaustive]
2304pub struct ListIdentityAwareProxyClientsResponse {
2305 pub identity_aware_proxy_clients: std::vec::Vec<crate::model::IdentityAwareProxyClient>,
2307
2308 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 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 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#[derive(Clone, Default, PartialEq)]
2360#[non_exhaustive]
2361pub struct CreateIdentityAwareProxyClientRequest {
2362 pub parent: std::string::String,
2367
2368 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 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 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 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#[derive(Clone, Default, PartialEq)]
2412#[non_exhaustive]
2413pub struct GetIdentityAwareProxyClientRequest {
2414 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 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#[derive(Clone, Default, PartialEq)]
2442#[non_exhaustive]
2443pub struct ResetIdentityAwareProxyClientSecretRequest {
2444 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 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#[derive(Clone, Default, PartialEq)]
2472#[non_exhaustive]
2473pub struct DeleteIdentityAwareProxyClientRequest {
2474 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 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#[derive(Clone, Default, PartialEq)]
2503#[non_exhaustive]
2504pub struct Brand {
2505 pub name: std::string::String,
2509
2510 pub support_email: std::string::String,
2512
2513 pub application_title: std::string::String,
2515
2516 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
2564#[non_exhaustive]
2565pub struct IdentityAwareProxyClient {
2566 pub name: std::string::String,
2568
2569 pub secret: std::string::String,
2571
2572 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 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 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 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}