#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StartOAuthResponse
impl Debug for StartOAuthResponse
Source§impl Default for StartOAuthResponse
impl Default for StartOAuthResponse
Source§fn default() -> StartOAuthResponse
fn default() -> StartOAuthResponse
Source§impl Message for StartOAuthResponse
impl Message for StartOAuthResponse
Source§impl PartialEq for StartOAuthResponse
impl PartialEq for StartOAuthResponse
impl StructuralPartialEq for StartOAuthResponse
Auto Trait Implementations§
impl Freeze for StartOAuthResponse
impl RefUnwindSafe for StartOAuthResponse
impl Send for StartOAuthResponse
impl Sync for StartOAuthResponse
impl Unpin for StartOAuthResponse
impl UnsafeUnpin for StartOAuthResponse
impl UnwindSafe for StartOAuthResponse
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request