#[non_exhaustive]pub struct GitHubConfig {
pub github_app: GitHubApp,
pub authorizer_credential: Option<OAuthCredential>,
pub app_installation_id: i64,
pub installation_uri: String,
/* private fields */
}Expand description
Configuration for connections to github.com.
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.github_app: GitHubAppRequired. Immutable. The GitHub Application that was installed to the GitHub user or organization.
Optional. OAuth credential of the account that authorized the GitHub App. It is recommended to use a robot account instead of a human user account. The OAuth token must be tied to the GitHub App of this config.
app_installation_id: i64Optional. GitHub App installation id.
installation_uri: StringOutput only. The URI to navigate to in order to manage the installation associated with this GitHubConfig.
Implementations§
Source§impl GitHubConfig
impl GitHubConfig
pub fn new() -> Self
Sourcepub fn set_github_app<T: Into<GitHubApp>>(self, v: T) -> Self
pub fn set_github_app<T: Into<GitHubApp>>(self, v: T) -> Self
Sets the value of github_app.
§Example
ⓘ
use google_cloud_developerconnect_v1::model::git_hub_config::GitHubApp;
let x0 = GitHubConfig::new().set_github_app(GitHubApp::DeveloperConnect);
let x1 = GitHubConfig::new().set_github_app(GitHubApp::Firebase);Sets the value of authorizer_credential.
§Example
ⓘ
use google_cloud_developerconnect_v1::model::OAuthCredential;
let x = GitHubConfig::new().set_authorizer_credential(OAuthCredential::default()/* use setters */);Sets or clears the value of authorizer_credential.
§Example
ⓘ
use google_cloud_developerconnect_v1::model::OAuthCredential;
let x = GitHubConfig::new().set_or_clear_authorizer_credential(Some(OAuthCredential::default()/* use setters */));
let x = GitHubConfig::new().set_or_clear_authorizer_credential(None::<OAuthCredential>);Sourcepub fn set_app_installation_id<T: Into<i64>>(self, v: T) -> Self
pub fn set_app_installation_id<T: Into<i64>>(self, v: T) -> Self
Sets the value of app_installation_id.
§Example
ⓘ
let x = GitHubConfig::new().set_app_installation_id(42);Sourcepub fn set_installation_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_installation_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of installation_uri.
§Example
ⓘ
let x = GitHubConfig::new().set_installation_uri("example");Trait Implementations§
Source§impl Clone for GitHubConfig
impl Clone for GitHubConfig
Source§fn clone(&self) -> GitHubConfig
fn clone(&self) -> GitHubConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GitHubConfig
impl Debug for GitHubConfig
Source§impl Default for GitHubConfig
impl Default for GitHubConfig
Source§fn default() -> GitHubConfig
fn default() -> GitHubConfig
Returns the “default value” for a type. Read more
Source§impl Message for GitHubConfig
impl Message for GitHubConfig
Source§impl PartialEq for GitHubConfig
impl PartialEq for GitHubConfig
impl StructuralPartialEq for GitHubConfig
Auto Trait Implementations§
impl Freeze for GitHubConfig
impl RefUnwindSafe for GitHubConfig
impl Send for GitHubConfig
impl Sync for GitHubConfig
impl Unpin for GitHubConfig
impl UnwindSafe for GitHubConfig
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