#[non_exhaustive]pub struct ApiAuth {
pub auth_config: Option<AuthConfig>,
/* private fields */
}Available on crate feature
vertex-rag-data-service only.Expand description
The generic reusable api auth config.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.auth_config: Option<AuthConfig>The auth config.
Implementations§
Source§impl ApiAuth
impl ApiAuth
pub fn new() -> Self
Sourcepub fn set_auth_config<T: Into<Option<AuthConfig>>>(self, v: T) -> Self
pub fn set_auth_config<T: Into<Option<AuthConfig>>>(self, v: T) -> Self
Sets the value of auth_config.
Note that all the setters affecting auth_config are mutually
exclusive.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::api_auth::ApiKeyConfig;
let x = ApiAuth::new().set_auth_config(Some(
google_cloud_aiplatform_v1::model::api_auth::AuthConfig::ApiKeyConfig(ApiKeyConfig::default().into())));Sourcepub fn api_key_config(&self) -> Option<&Box<ApiKeyConfig>>
pub fn api_key_config(&self) -> Option<&Box<ApiKeyConfig>>
The value of auth_config
if it holds a ApiKeyConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_api_key_config<T: Into<Box<ApiKeyConfig>>>(self, v: T) -> Self
pub fn set_api_key_config<T: Into<Box<ApiKeyConfig>>>(self, v: T) -> Self
Sets the value of auth_config
to hold a ApiKeyConfig.
Note that all the setters affecting auth_config are
mutually exclusive.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::api_auth::ApiKeyConfig;
let x = ApiAuth::new().set_api_key_config(ApiKeyConfig::default()/* use setters */);
assert!(x.api_key_config().is_some());Trait Implementations§
impl StructuralPartialEq for ApiAuth
Auto Trait Implementations§
impl Freeze for ApiAuth
impl RefUnwindSafe for ApiAuth
impl Send for ApiAuth
impl Sync for ApiAuth
impl Unpin for ApiAuth
impl UnwindSafe for ApiAuth
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more