#[non_exhaustive]pub struct IdentityMappingEntry {
pub external_identity: String,
pub identity_provider_id: Option<IdentityProviderId>,
/* private fields */
}identity-mapping-store-service only.Expand description
Identity Mapping Entry that maps an external identity to an internal identity.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.external_identity: StringRequired. Identity outside the customer identity provider. The length limit of external identity will be of 100 characters.
identity_provider_id: Option<IdentityProviderId>Union field identity_provider_id. Identity Provider id can be a user or a group.
Implementations§
Source§impl IdentityMappingEntry
impl IdentityMappingEntry
pub fn new() -> Self
Sourcepub fn set_external_identity<T: Into<String>>(self, v: T) -> Self
pub fn set_external_identity<T: Into<String>>(self, v: T) -> Self
Sets the value of external_identity.
§Example
let x = IdentityMappingEntry::new().set_external_identity("example");Sourcepub fn set_identity_provider_id<T: Into<Option<IdentityProviderId>>>(
self,
v: T,
) -> Self
pub fn set_identity_provider_id<T: Into<Option<IdentityProviderId>>>( self, v: T, ) -> Self
Sets the value of identity_provider_id.
Note that all the setters affecting identity_provider_id are mutually
exclusive.
§Example
use google_cloud_discoveryengine_v1::model::identity_mapping_entry::IdentityProviderId;
let x = IdentityMappingEntry::new().set_identity_provider_id(Some(IdentityProviderId::UserId("example".to_string())));Sourcepub fn user_id(&self) -> Option<&String>
pub fn user_id(&self) -> Option<&String>
The value of identity_provider_id
if it holds a UserId, None if the field is not set or
holds a different branch.
Sourcepub fn set_user_id<T: Into<String>>(self, v: T) -> Self
pub fn set_user_id<T: Into<String>>(self, v: T) -> Self
Sets the value of identity_provider_id
to hold a UserId.
Note that all the setters affecting identity_provider_id are
mutually exclusive.
§Example
let x = IdentityMappingEntry::new().set_user_id("example");
assert!(x.user_id().is_some());
assert!(x.group_id().is_none());Sourcepub fn group_id(&self) -> Option<&String>
pub fn group_id(&self) -> Option<&String>
The value of identity_provider_id
if it holds a GroupId, None if the field is not set or
holds a different branch.
Sourcepub fn set_group_id<T: Into<String>>(self, v: T) -> Self
pub fn set_group_id<T: Into<String>>(self, v: T) -> Self
Sets the value of identity_provider_id
to hold a GroupId.
Note that all the setters affecting identity_provider_id are
mutually exclusive.
§Example
let x = IdentityMappingEntry::new().set_group_id("example");
assert!(x.group_id().is_some());
assert!(x.user_id().is_none());Trait Implementations§
Source§impl Clone for IdentityMappingEntry
impl Clone for IdentityMappingEntry
Source§fn clone(&self) -> IdentityMappingEntry
fn clone(&self) -> IdentityMappingEntry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more