1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352
// This file is @generated by prost-build.
/// The request to ListTunnelDestGroups.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTunnelDestGroupsRequest {
/// Required. Google Cloud Project ID and location.
/// In the following format:
/// `projects/{project_number/id}/iap_tunnel/locations/{location}`.
/// A `-` can be used for the location to group across all locations.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// The maximum number of groups to return. The service might return fewer than
/// this value.
/// If unspecified, at most 100 groups are returned.
/// The maximum value is 1000; values above 1000 are coerced to 1000.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A page token, received from a previous `ListTunnelDestGroups`
/// call. Provide this to retrieve the subsequent page.
///
/// When paginating, all other parameters provided to
/// `ListTunnelDestGroups` must match the call that provided the page
/// token.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
/// The response from ListTunnelDestGroups.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTunnelDestGroupsResponse {
/// TunnelDestGroup existing in the project.
#[prost(message, repeated, tag = "1")]
pub tunnel_dest_groups: ::prost::alloc::vec::Vec<TunnelDestGroup>,
/// A token that you can send as `page_token` to retrieve the next page.
/// If this field is omitted, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// The request to CreateTunnelDestGroup.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateTunnelDestGroupRequest {
/// Required. Google Cloud Project ID and location.
/// In the following format:
/// `projects/{project_number/id}/iap_tunnel/locations/{location}`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The TunnelDestGroup to create.
#[prost(message, optional, tag = "2")]
pub tunnel_dest_group: ::core::option::Option<TunnelDestGroup>,
/// Required. The ID to use for the TunnelDestGroup, which becomes the final
/// component of the resource name.
///
/// This value must be 4-63 characters, and valid characters
/// are `\[a-z\]-`.
#[prost(string, tag = "3")]
pub tunnel_dest_group_id: ::prost::alloc::string::String,
}
/// The request to GetTunnelDestGroup.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTunnelDestGroupRequest {
/// Required. Name of the TunnelDestGroup to be fetched.
/// In the following format:
/// `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// The request to DeleteTunnelDestGroup.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteTunnelDestGroupRequest {
/// Required. Name of the TunnelDestGroup to delete.
/// In the following format:
/// `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// The request to UpdateTunnelDestGroup.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateTunnelDestGroupRequest {
/// Required. The new values for the TunnelDestGroup.
#[prost(message, optional, tag = "1")]
pub tunnel_dest_group: ::core::option::Option<TunnelDestGroup>,
/// A field mask that specifies which IAP settings to update.
/// If omitted, then all of the settings are updated. See
/// <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask>
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// A TunnelDestGroup.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TunnelDestGroup {
/// Required. Immutable. Identifier for the TunnelDestGroup. Must be unique
/// within the project and contain only lower case letters (a-z) and dashes
/// (-).
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Unordered list. List of CIDRs that this group applies to.
#[prost(string, repeated, tag = "2")]
pub cidrs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Unordered list. List of FQDNs that this group applies to.
#[prost(string, repeated, tag = "3")]
pub fqdns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// The request sent to GetIapSettings.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIapSettingsRequest {
/// Required. The resource name for which to retrieve the settings.
/// Authorization: Requires the `getSettings` permission for the associated
/// resource.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// The request sent to UpdateIapSettings.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateIapSettingsRequest {
/// Required. The new values for the IAP settings to be updated.
/// Authorization: Requires the `updateSettings` permission for the associated
/// resource.
#[prost(message, optional, tag = "1")]
pub iap_settings: ::core::option::Option<IapSettings>,
/// The field mask specifying which IAP settings should be updated.
/// If omitted, then all of the settings are updated. See
/// <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.>
///
/// Note: All IAP reauth settings must always be set together, using the
/// field mask: `iapSettings.accessSettings.reauthSettings`.
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// The IAP configurable settings.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IapSettings {
/// Required. The resource name of the IAP protected resource.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Top level wrapper for all access related setting in IAP
#[prost(message, optional, tag = "5")]
pub access_settings: ::core::option::Option<AccessSettings>,
/// Top level wrapper for all application related settings in IAP
#[prost(message, optional, tag = "6")]
pub application_settings: ::core::option::Option<ApplicationSettings>,
}
/// Access related settings for IAP protected apps.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccessSettings {
/// GCIP claims and endpoint configurations for 3p identity providers.
#[prost(message, optional, tag = "1")]
pub gcip_settings: ::core::option::Option<GcipSettings>,
/// Configuration to allow cross-origin requests via IAP.
#[prost(message, optional, tag = "2")]
pub cors_settings: ::core::option::Option<CorsSettings>,
/// Settings to configure IAP's OAuth behavior.
#[prost(message, optional, tag = "3")]
pub oauth_settings: ::core::option::Option<OAuthSettings>,
/// Settings to configure reauthentication policies in IAP.
#[prost(message, optional, tag = "6")]
pub reauth_settings: ::core::option::Option<ReauthSettings>,
/// Settings to configure and enable allowed domains.
#[prost(message, optional, tag = "7")]
pub allowed_domains_settings: ::core::option::Option<AllowedDomainsSettings>,
}
/// Allows customers to configure tenant_id for GCIP instance per-app.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GcipSettings {
/// GCIP tenant ids that are linked to the IAP resource.
/// tenant_ids could be a string beginning with a number character to indicate
/// authenticating with GCIP tenant flow, or in the format of _<ProjectNumber>
/// to indicate authenticating with GCIP agent flow.
/// If agent flow is used, tenant_ids should only contain one single element,
/// while for tenant flow, tenant_ids can contain multiple elements.
#[prost(string, repeated, tag = "1")]
pub tenant_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Login page URI associated with the GCIP tenants.
/// Typically, all resources within the same project share the same login page,
/// though it could be overridden at the sub resource level.
#[prost(message, optional, tag = "2")]
pub login_page_uri: ::core::option::Option<::prost::alloc::string::String>,
}
/// Allows customers to configure HTTP request paths that'll allow HTTP OPTIONS
/// call to bypass authentication and authorization.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CorsSettings {
/// Configuration to allow HTTP OPTIONS calls to skip authorization. If
/// undefined, IAP will not apply any special logic to OPTIONS requests.
#[prost(message, optional, tag = "1")]
pub allow_http_options: ::core::option::Option<bool>,
}
/// Configuration for OAuth login&consent flow behavior as well as for OAuth
/// Credentials.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OAuthSettings {
/// Domain hint to send as hd=? parameter in OAuth request flow. Enables
/// redirect to primary IDP by skipping Google's login screen.
/// <https://developers.google.com/identity/protocols/OpenIDConnect#hd-param>
/// Note: IAP does not verify that the id token's hd claim matches this value
/// since access behavior is managed by IAM policies.
#[prost(message, optional, tag = "2")]
pub login_hint: ::core::option::Option<::prost::alloc::string::String>,
/// List of OAuth client IDs allowed to programmatically authenticate with IAP.
#[prost(string, repeated, tag = "5")]
pub programmatic_clients: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Configuration for IAP reauthentication policies.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReauthSettings {
/// Reauth method requested.
#[prost(enumeration = "reauth_settings::Method", tag = "1")]
pub method: i32,
/// Reauth session lifetime, how long before a user has to reauthenticate
/// again.
#[prost(message, optional, tag = "2")]
pub max_age: ::core::option::Option<::prost_types::Duration>,
/// How IAP determines the effective policy in cases of hierarchial policies.
/// Policies are merged from higher in the hierarchy to lower in the hierarchy.
#[prost(enumeration = "reauth_settings::PolicyType", tag = "3")]
pub policy_type: i32,
}
/// Nested message and enum types in `ReauthSettings`.
pub mod reauth_settings {
/// Types of reauthentication methods supported by IAP.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Method {
/// Reauthentication disabled.
Unspecified = 0,
/// Prompts the user to log in again.
Login = 1,
Password = 2,
/// User must use their secure key 2nd factor device.
SecureKey = 3,
/// User can use any enabled 2nd factor.
EnrolledSecondFactors = 4,
}
impl Method {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Method::Unspecified => "METHOD_UNSPECIFIED",
Method::Login => "LOGIN",
Method::Password => "PASSWORD",
Method::SecureKey => "SECURE_KEY",
Method::EnrolledSecondFactors => "ENROLLED_SECOND_FACTORS",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"METHOD_UNSPECIFIED" => Some(Self::Unspecified),
"LOGIN" => Some(Self::Login),
"PASSWORD" => Some(Self::Password),
"SECURE_KEY" => Some(Self::SecureKey),
"ENROLLED_SECOND_FACTORS" => Some(Self::EnrolledSecondFactors),
_ => None,
}
}
}
/// Type of policy in the case of hierarchial policies.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum PolicyType {
/// Default value. This value is unused.
Unspecified = 0,
/// This policy acts as a minimum to other policies, lower in the hierarchy.
/// Effective policy may only be the same or stricter.
Minimum = 1,
/// This policy acts as a default if no other reauth policy is set.
Default = 2,
}
impl PolicyType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
PolicyType::Unspecified => "POLICY_TYPE_UNSPECIFIED",
PolicyType::Minimum => "MINIMUM",
PolicyType::Default => "DEFAULT",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"POLICY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"MINIMUM" => Some(Self::Minimum),
"DEFAULT" => Some(Self::Default),
_ => None,
}
}
}
}
/// Configuration for IAP allowed domains. Lets you to restrict access to an app
/// and allow access to only the domains that you list.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AllowedDomainsSettings {
/// Configuration for customers to opt in for the feature.
#[prost(bool, optional, tag = "1")]
pub enable: ::core::option::Option<bool>,
/// List of trusted domains.
#[prost(string, repeated, tag = "2")]
pub domains: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Wrapper over application specific settings for IAP.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApplicationSettings {
/// Settings to configure IAP's behavior for a service mesh.
#[prost(message, optional, tag = "1")]
pub csm_settings: ::core::option::Option<CsmSettings>,
/// Customization for Access Denied page.
#[prost(message, optional, tag = "2")]
pub access_denied_page_settings: ::core::option::Option<AccessDeniedPageSettings>,
/// The Domain value to set for cookies generated by IAP. This value is not
/// validated by the API, but will be ignored at runtime if invalid.
#[prost(message, optional, tag = "3")]
pub cookie_domain: ::core::option::Option<::prost::alloc::string::String>,
/// Settings to configure attribute propagation.
#[prost(message, optional, tag = "4")]
pub attribute_propagation_settings: ::core::option::Option<
AttributePropagationSettings,
>,
}
/// Configuration for RCToken generated for service mesh workloads protected by
/// IAP. RCToken are IAP generated JWTs that can be verified at the application.
/// The RCToken is primarily used for service mesh deployments, and can be scoped
/// to a single mesh by configuring the audience field accordingly.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CsmSettings {
/// Audience claim set in the generated RCToken. This value is not validated by
/// IAP.
#[prost(message, optional, tag = "1")]
pub rctoken_aud: ::core::option::Option<::prost::alloc::string::String>,
}
/// Custom content configuration for access denied page.
/// IAP allows customers to define a custom URI to use as the error page when
/// access is denied to users. If IAP prevents access to this page, the default
/// IAP error page will be displayed instead.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccessDeniedPageSettings {
/// The URI to be redirected to when access is denied.
#[prost(message, optional, tag = "1")]
pub access_denied_page_uri: ::core::option::Option<::prost::alloc::string::String>,
/// Whether to generate a troubleshooting URL on access denied events to this
/// application.
#[prost(message, optional, tag = "2")]
pub generate_troubleshooting_uri: ::core::option::Option<bool>,
/// Whether to generate remediation token on access denied events to this
/// application.
#[prost(message, optional, tag = "3")]
pub remediation_token_generation_enabled: ::core::option::Option<bool>,
}
/// Configuration for propagating attributes to applications protected
/// by IAP.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttributePropagationSettings {
/// Raw string CEL expression. Must return a list of attributes. A maximum of
/// 45 attributes can be selected. Expressions can select different attribute
/// types from `attributes`: `attributes.saml_attributes`,
/// `attributes.iap_attributes`. The following functions are supported:
///
/// - filter `<list>.filter(<iter_var>, <predicate>)`: Returns a subset of
/// `<list>` where `<predicate>` is true for every item.
///
/// - in `<var> in <list>`: Returns true if `<list>` contains `<var>`.
///
/// - selectByName `<list>.selectByName(<string>)`: Returns the attribute
/// in
/// `<list>` with the given `<string>` name, otherwise returns empty.
///
/// - emitAs `<attribute>.emitAs(<string>)`: Sets the `<attribute>` name
/// field to the given `<string>` for propagation in selected output
/// credentials.
///
/// - strict `<attribute>.strict()`: Ignores the `x-goog-iap-attr-` prefix
/// for the provided `<attribute>` when propagating with the `HEADER` output
/// credential, such as request headers.
///
/// - append `<target_list>.append(<attribute>)` OR
/// `<target_list>.append(<list>)`: Appends the provided `<attribute>` or
/// `<list>` to the end of `<target_list>`.
///
/// Example expression: `attributes.saml_attributes.filter(x, x.name in
/// \['test'\]).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())`
#[prost(string, optional, tag = "1")]
pub expression: ::core::option::Option<::prost::alloc::string::String>,
/// Which output credentials attributes selected by the CEL expression should
/// be propagated in. All attributes will be fully duplicated in each selected
/// output credential.
#[prost(
enumeration = "attribute_propagation_settings::OutputCredentials",
repeated,
tag = "2"
)]
pub output_credentials: ::prost::alloc::vec::Vec<i32>,
/// Whether the provided attribute propagation settings should be evaluated on
/// user requests. If set to true, attributes returned from the expression will
/// be propagated in the set output credentials.
#[prost(bool, optional, tag = "3")]
pub enable: ::core::option::Option<bool>,
}
/// Nested message and enum types in `AttributePropagationSettings`.
pub mod attribute_propagation_settings {
/// Supported output credentials for attribute propagation. Each output
/// credential maps to a "field" in the response. For example, selecting JWT
/// will propagate all attributes in the IAP JWT, header in the headers, etc.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum OutputCredentials {
/// An output credential is required.
Unspecified = 0,
/// Propagate attributes in the headers with "x-goog-iap-attr-" prefix.
Header = 1,
/// Propagate attributes in the JWT of the form: `"additional_claims": {
/// "my_attribute": \["value1", "value2"\] }`
Jwt = 2,
/// Propagate attributes in the RCToken of the form: `"additional_claims": {
/// "my_attribute": \["value1", "value2"\] }`
Rctoken = 3,
}
impl OutputCredentials {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
OutputCredentials::Unspecified => "OUTPUT_CREDENTIALS_UNSPECIFIED",
OutputCredentials::Header => "HEADER",
OutputCredentials::Jwt => "JWT",
OutputCredentials::Rctoken => "RCTOKEN",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OUTPUT_CREDENTIALS_UNSPECIFIED" => Some(Self::Unspecified),
"HEADER" => Some(Self::Header),
"JWT" => Some(Self::Jwt),
"RCTOKEN" => Some(Self::Rctoken),
_ => None,
}
}
}
}
/// The request sent to ListBrands.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBrandsRequest {
/// Required. GCP Project number/id.
/// In the following format: projects/{project_number/id}.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
}
/// Response message for ListBrands.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBrandsResponse {
/// Brands existing in the project.
#[prost(message, repeated, tag = "1")]
pub brands: ::prost::alloc::vec::Vec<Brand>,
}
/// The request sent to CreateBrand.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateBrandRequest {
/// Required. GCP Project number/id under which the brand is to be created.
/// In the following format: projects/{project_number/id}.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The brand to be created.
#[prost(message, optional, tag = "2")]
pub brand: ::core::option::Option<Brand>,
}
/// The request sent to GetBrand.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBrandRequest {
/// Required. Name of the brand to be fetched.
/// In the following format: projects/{project_number/id}/brands/{brand}.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// The request sent to ListIdentityAwareProxyClients.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListIdentityAwareProxyClientsRequest {
/// Required. Full brand path.
/// In the following format: projects/{project_number/id}/brands/{brand}.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// The maximum number of clients to return. The service may return fewer than
/// this value.
/// If unspecified, at most 100 clients will be returned.
/// The maximum value is 1000; values above 1000 will be coerced to 1000.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A page token, received from a previous `ListIdentityAwareProxyClients`
/// call. Provide this to retrieve the subsequent page.
///
/// When paginating, all other parameters provided to
/// `ListIdentityAwareProxyClients` must match the call that provided the page
/// token.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
/// Response message for ListIdentityAwareProxyClients.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListIdentityAwareProxyClientsResponse {
/// Clients existing in the brand.
#[prost(message, repeated, tag = "1")]
pub identity_aware_proxy_clients: ::prost::alloc::vec::Vec<IdentityAwareProxyClient>,
/// A token, which can be send as `page_token` to retrieve the next page.
/// If this field is omitted, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// The request sent to CreateIdentityAwareProxyClient.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateIdentityAwareProxyClientRequest {
/// Required. Path to create the client in.
/// In the following format:
/// projects/{project_number/id}/brands/{brand}.
/// The project must belong to a G Suite account.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. Identity Aware Proxy Client to be created.
#[prost(message, optional, tag = "2")]
pub identity_aware_proxy_client: ::core::option::Option<IdentityAwareProxyClient>,
}
/// The request sent to GetIdentityAwareProxyClient.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIdentityAwareProxyClientRequest {
/// Required. Name of the Identity Aware Proxy client to be fetched.
/// In the following format:
/// projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// The request sent to ResetIdentityAwareProxyClientSecret.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResetIdentityAwareProxyClientSecretRequest {
/// Required. Name of the Identity Aware Proxy client to that will have its
/// secret reset. In the following format:
/// projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// The request sent to DeleteIdentityAwareProxyClient.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteIdentityAwareProxyClientRequest {
/// Required. Name of the Identity Aware Proxy client to be deleted.
/// In the following format:
/// projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// OAuth brand data.
/// NOTE: Only contains a portion of the data that describes a brand.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Brand {
/// Output only. Identifier of the brand.
/// NOTE: GCP project number achieves the same brand identification purpose as
/// only one brand per project can be created.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Support email displayed on the OAuth consent screen.
#[prost(string, tag = "2")]
pub support_email: ::prost::alloc::string::String,
/// Application name displayed on OAuth consent screen.
#[prost(string, tag = "3")]
pub application_title: ::prost::alloc::string::String,
/// Output only. Whether the brand is only intended for usage inside the
/// G Suite organization only.
#[prost(bool, tag = "4")]
pub org_internal_only: bool,
}
/// Contains the data that describes an Identity Aware Proxy owned client.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdentityAwareProxyClient {
/// Output only. Unique identifier of the OAuth client.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. Client secret of the OAuth client.
#[prost(string, tag = "2")]
pub secret: ::prost::alloc::string::String,
/// Human-friendly name given to the OAuth client.
#[prost(string, tag = "3")]
pub display_name: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod identity_aware_proxy_admin_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// APIs for Identity-Aware Proxy Admin configurations.
#[derive(Debug, Clone)]
pub struct IdentityAwareProxyAdminServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> IdentityAwareProxyAdminServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> IdentityAwareProxyAdminServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
IdentityAwareProxyAdminServiceClient::new(
InterceptedService::new(inner, interceptor),
)
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Sets the access control policy for an Identity-Aware Proxy protected
/// resource. Replaces any existing policy.
/// More information about managing access via IAP can be found at:
/// https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
pub async fn set_iam_policy(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::super::iam::v1::SetIamPolicyRequest,
>,
) -> std::result::Result<
tonic::Response<super::super::super::super::iam::v1::Policy>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.iap.v1.IdentityAwareProxyAdminService/SetIamPolicy",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.iap.v1.IdentityAwareProxyAdminService",
"SetIamPolicy",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets the access control policy for an Identity-Aware Proxy protected
/// resource.
/// More information about managing access via IAP can be found at:
/// https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
pub async fn get_iam_policy(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::super::iam::v1::GetIamPolicyRequest,
>,
) -> std::result::Result<
tonic::Response<super::super::super::super::iam::v1::Policy>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.iap.v1.IdentityAwareProxyAdminService/GetIamPolicy",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.iap.v1.IdentityAwareProxyAdminService",
"GetIamPolicy",
),
);
self.inner.unary(req, path, codec).await
}
/// Returns permissions that a caller has on the Identity-Aware Proxy protected
/// resource.
/// More information about managing access via IAP can be found at:
/// https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
pub async fn test_iam_permissions(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::super::iam::v1::TestIamPermissionsRequest,
>,
) -> std::result::Result<
tonic::Response<
super::super::super::super::iam::v1::TestIamPermissionsResponse,
>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.iap.v1.IdentityAwareProxyAdminService/TestIamPermissions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.iap.v1.IdentityAwareProxyAdminService",
"TestIamPermissions",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets the IAP settings on a particular IAP protected resource.
pub async fn get_iap_settings(
&mut self,
request: impl tonic::IntoRequest<super::GetIapSettingsRequest>,
) -> std::result::Result<tonic::Response<super::IapSettings>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.iap.v1.IdentityAwareProxyAdminService/GetIapSettings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.iap.v1.IdentityAwareProxyAdminService",
"GetIapSettings",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates the IAP settings on a particular IAP protected resource. It
/// replaces all fields unless the `update_mask` is set.
pub async fn update_iap_settings(
&mut self,
request: impl tonic::IntoRequest<super::UpdateIapSettingsRequest>,
) -> std::result::Result<tonic::Response<super::IapSettings>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.iap.v1.IdentityAwareProxyAdminService/UpdateIapSettings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.iap.v1.IdentityAwareProxyAdminService",
"UpdateIapSettings",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists the existing TunnelDestGroups. To group across all locations, use a
/// `-` as the location ID. For example:
/// `/v1/projects/123/iap_tunnel/locations/-/destGroups`
pub async fn list_tunnel_dest_groups(
&mut self,
request: impl tonic::IntoRequest<super::ListTunnelDestGroupsRequest>,
) -> std::result::Result<
tonic::Response<super::ListTunnelDestGroupsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.iap.v1.IdentityAwareProxyAdminService/ListTunnelDestGroups",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.iap.v1.IdentityAwareProxyAdminService",
"ListTunnelDestGroups",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new TunnelDestGroup.
pub async fn create_tunnel_dest_group(
&mut self,
request: impl tonic::IntoRequest<super::CreateTunnelDestGroupRequest>,
) -> std::result::Result<
tonic::Response<super::TunnelDestGroup>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.iap.v1.IdentityAwareProxyAdminService/CreateTunnelDestGroup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.iap.v1.IdentityAwareProxyAdminService",
"CreateTunnelDestGroup",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves an existing TunnelDestGroup.
pub async fn get_tunnel_dest_group(
&mut self,
request: impl tonic::IntoRequest<super::GetTunnelDestGroupRequest>,
) -> std::result::Result<
tonic::Response<super::TunnelDestGroup>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.iap.v1.IdentityAwareProxyAdminService/GetTunnelDestGroup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.iap.v1.IdentityAwareProxyAdminService",
"GetTunnelDestGroup",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a TunnelDestGroup.
pub async fn delete_tunnel_dest_group(
&mut self,
request: impl tonic::IntoRequest<super::DeleteTunnelDestGroupRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.iap.v1.IdentityAwareProxyAdminService/DeleteTunnelDestGroup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.iap.v1.IdentityAwareProxyAdminService",
"DeleteTunnelDestGroup",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates a TunnelDestGroup.
pub async fn update_tunnel_dest_group(
&mut self,
request: impl tonic::IntoRequest<super::UpdateTunnelDestGroupRequest>,
) -> std::result::Result<
tonic::Response<super::TunnelDestGroup>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.iap.v1.IdentityAwareProxyAdminService/UpdateTunnelDestGroup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.iap.v1.IdentityAwareProxyAdminService",
"UpdateTunnelDestGroup",
),
);
self.inner.unary(req, path, codec).await
}
}
}
/// Generated client implementations.
pub mod identity_aware_proxy_o_auth_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// API to programmatically create, list and retrieve Identity Aware Proxy (IAP)
/// OAuth brands; and create, retrieve, delete and reset-secret of IAP OAuth
/// clients.
#[derive(Debug, Clone)]
pub struct IdentityAwareProxyOAuthServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> IdentityAwareProxyOAuthServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> IdentityAwareProxyOAuthServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
IdentityAwareProxyOAuthServiceClient::new(
InterceptedService::new(inner, interceptor),
)
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Lists the existing brands for the project.
pub async fn list_brands(
&mut self,
request: impl tonic::IntoRequest<super::ListBrandsRequest>,
) -> std::result::Result<
tonic::Response<super::ListBrandsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.iap.v1.IdentityAwareProxyOAuthService/ListBrands",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.iap.v1.IdentityAwareProxyOAuthService",
"ListBrands",
),
);
self.inner.unary(req, path, codec).await
}
/// Constructs a new OAuth brand for the project if one does not exist.
/// The created brand is "internal only", meaning that OAuth clients created
/// under it only accept requests from users who belong to the same Google
/// Workspace organization as the project. The brand is created in an
/// un-reviewed status. NOTE: The "internal only" status can be manually
/// changed in the Google Cloud Console. Requires that a brand does not already
/// exist for the project, and that the specified support email is owned by the
/// caller.
pub async fn create_brand(
&mut self,
request: impl tonic::IntoRequest<super::CreateBrandRequest>,
) -> std::result::Result<tonic::Response<super::Brand>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.iap.v1.IdentityAwareProxyOAuthService/CreateBrand",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.iap.v1.IdentityAwareProxyOAuthService",
"CreateBrand",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves the OAuth brand of the project.
pub async fn get_brand(
&mut self,
request: impl tonic::IntoRequest<super::GetBrandRequest>,
) -> std::result::Result<tonic::Response<super::Brand>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.iap.v1.IdentityAwareProxyOAuthService/GetBrand",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.iap.v1.IdentityAwareProxyOAuthService",
"GetBrand",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates an Identity Aware Proxy (IAP) OAuth client. The client is owned
/// by IAP. Requires that the brand for the project exists and that it is
/// set for internal-only use.
pub async fn create_identity_aware_proxy_client(
&mut self,
request: impl tonic::IntoRequest<
super::CreateIdentityAwareProxyClientRequest,
>,
) -> std::result::Result<
tonic::Response<super::IdentityAwareProxyClient>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.iap.v1.IdentityAwareProxyOAuthService/CreateIdentityAwareProxyClient",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.iap.v1.IdentityAwareProxyOAuthService",
"CreateIdentityAwareProxyClient",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists the existing clients for the brand.
pub async fn list_identity_aware_proxy_clients(
&mut self,
request: impl tonic::IntoRequest<super::ListIdentityAwareProxyClientsRequest>,
) -> std::result::Result<
tonic::Response<super::ListIdentityAwareProxyClientsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.iap.v1.IdentityAwareProxyOAuthService/ListIdentityAwareProxyClients",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.iap.v1.IdentityAwareProxyOAuthService",
"ListIdentityAwareProxyClients",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves an Identity Aware Proxy (IAP) OAuth client.
/// Requires that the client is owned by IAP.
pub async fn get_identity_aware_proxy_client(
&mut self,
request: impl tonic::IntoRequest<super::GetIdentityAwareProxyClientRequest>,
) -> std::result::Result<
tonic::Response<super::IdentityAwareProxyClient>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.iap.v1.IdentityAwareProxyOAuthService/GetIdentityAwareProxyClient",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.iap.v1.IdentityAwareProxyOAuthService",
"GetIdentityAwareProxyClient",
),
);
self.inner.unary(req, path, codec).await
}
/// Resets an Identity Aware Proxy (IAP) OAuth client secret. Useful if the
/// secret was compromised. Requires that the client is owned by IAP.
pub async fn reset_identity_aware_proxy_client_secret(
&mut self,
request: impl tonic::IntoRequest<
super::ResetIdentityAwareProxyClientSecretRequest,
>,
) -> std::result::Result<
tonic::Response<super::IdentityAwareProxyClient>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.iap.v1.IdentityAwareProxyOAuthService/ResetIdentityAwareProxyClientSecret",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.iap.v1.IdentityAwareProxyOAuthService",
"ResetIdentityAwareProxyClientSecret",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes an Identity Aware Proxy (IAP) OAuth client. Useful for removing
/// obsolete clients, managing the number of clients in a given project, and
/// cleaning up after tests. Requires that the client is owned by IAP.
pub async fn delete_identity_aware_proxy_client(
&mut self,
request: impl tonic::IntoRequest<
super::DeleteIdentityAwareProxyClientRequest,
>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.iap.v1.IdentityAwareProxyOAuthService/DeleteIdentityAwareProxyClient",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.iap.v1.IdentityAwareProxyOAuthService",
"DeleteIdentityAwareProxyClient",
),
);
self.inner.unary(req, path, codec).await
}
}
}