#[non_exhaustive]pub struct StartOAuthResponse {
pub ticket: String,
pub code_challenge: String,
pub code_challenge_method: String,
pub client_id: String,
pub scopes: Vec<String>,
pub auth_uri: String,
pub id: Option<Id>,
/* private fields */
}Expand description
Message for responding to starting an OAuth flow.
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.ticket: StringThe ticket to be used for post processing the callback from the service provider.
code_challenge: StringPlease refer to https://datatracker.ietf.org/doc/html/rfc7636#section-4.1
code_challenge_method: StringPlease refer to https://datatracker.ietf.org/doc/html/rfc7636#section-4.2
client_id: StringThe client ID to the OAuth App of the service provider.
scopes: Vec<String>The list of scopes requested by the application.
auth_uri: StringThe authorization server URL to the OAuth flow of the service provider.
id: Option<Id>The ID of the service provider.
Implementations§
Source§impl StartOAuthResponse
impl StartOAuthResponse
pub fn new() -> Self
Sourcepub fn set_ticket<T: Into<String>>(self, v: T) -> Self
pub fn set_ticket<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_code_challenge<T: Into<String>>(self, v: T) -> Self
pub fn set_code_challenge<T: Into<String>>(self, v: T) -> Self
Sets the value of code_challenge.
§Example
let x = StartOAuthResponse::new().set_code_challenge("example");Sourcepub fn set_code_challenge_method<T: Into<String>>(self, v: T) -> Self
pub fn set_code_challenge_method<T: Into<String>>(self, v: T) -> Self
Sets the value of code_challenge_method.
§Example
let x = StartOAuthResponse::new().set_code_challenge_method("example");Sourcepub fn set_client_id<T: Into<String>>(self, v: T) -> Self
pub fn set_client_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_scopes<T, V>(self, v: T) -> Self
pub fn set_scopes<T, V>(self, v: T) -> Self
Sourcepub fn set_auth_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_auth_uri<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_id<T: Into<Option<Id>>>(self, v: T) -> Self
pub fn set_id<T: Into<Option<Id>>>(self, v: T) -> Self
Sets the value of id.
Note that all the setters affecting id are mutually
exclusive.
§Example
use google_cloud_developerconnect_v1::model::SystemProvider;
let x0 = StartOAuthResponse::new().set_id(Some(
google_cloud_developerconnect_v1::model::start_o_auth_response::Id::SystemProviderId(SystemProvider::Github)));
let x1 = StartOAuthResponse::new().set_id(Some(
google_cloud_developerconnect_v1::model::start_o_auth_response::Id::SystemProviderId(SystemProvider::Gitlab)));
let x2 = StartOAuthResponse::new().set_id(Some(
google_cloud_developerconnect_v1::model::start_o_auth_response::Id::SystemProviderId(SystemProvider::Google)));Sourcepub fn system_provider_id(&self) -> Option<&SystemProvider>
pub fn system_provider_id(&self) -> Option<&SystemProvider>
The value of id
if it holds a SystemProviderId, None if the field is not set or
holds a different branch.
Sourcepub fn set_system_provider_id<T: Into<SystemProvider>>(self, v: T) -> Self
pub fn set_system_provider_id<T: Into<SystemProvider>>(self, v: T) -> Self
Sets the value of id
to hold a SystemProviderId.
Note that all the setters affecting id are
mutually exclusive.
§Example
use google_cloud_developerconnect_v1::model::SystemProvider;
let x0 = StartOAuthResponse::new().set_system_provider_id(SystemProvider::Github);
let x1 = StartOAuthResponse::new().set_system_provider_id(SystemProvider::Gitlab);
let x2 = StartOAuthResponse::new().set_system_provider_id(SystemProvider::Google);
assert!(x0.system_provider_id().is_some());
assert!(x1.system_provider_id().is_some());
assert!(x2.system_provider_id().is_some());Trait Implementations§
Source§impl Clone for StartOAuthResponse
impl Clone for StartOAuthResponse
Source§fn clone(&self) -> StartOAuthResponse
fn clone(&self) -> StartOAuthResponse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more