#[non_exhaustive]pub struct GitHubEventsConfig {
pub installation_id: i64,
pub owner: String,
pub name: String,
pub event: Option<Event>,
/* private fields */
}
Expand description
GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received.
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.installation_id: i64
The installationID that emits the GitHub event.
owner: String
Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is “googlecloudplatform”.
name: String
Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is “cloud-builders”.
event: Option<Event>
Filter describing the types of events to trigger a build. Currently supported event types: push, pull_request.
Implementations§
Source§impl GitHubEventsConfig
impl GitHubEventsConfig
pub fn new() -> Self
Sourcepub fn set_installation_id<T: Into<i64>>(self, v: T) -> Self
👎Deprecated
pub fn set_installation_id<T: Into<i64>>(self, v: T) -> Self
Sets the value of installation_id.
Sourcepub fn set_event<T: Into<Option<Event>>>(self, v: T) -> Self
pub fn set_event<T: Into<Option<Event>>>(self, v: T) -> Self
Sets the value of event.
Note that all the setters affecting event
are mutually
exclusive.
Sourcepub fn pull_request(&self) -> Option<&Box<PullRequestFilter>>
pub fn pull_request(&self) -> Option<&Box<PullRequestFilter>>
The value of event
if it holds a PullRequest
, None
if the field is not set or
holds a different branch.
Sourcepub fn set_pull_request<T: Into<Box<PullRequestFilter>>>(self, v: T) -> Self
pub fn set_pull_request<T: Into<Box<PullRequestFilter>>>(self, v: T) -> Self
Sets the value of event
to hold a PullRequest
.
Note that all the setters affecting event
are
mutually exclusive.
Trait Implementations§
Source§impl Clone for GitHubEventsConfig
impl Clone for GitHubEventsConfig
Source§fn clone(&self) -> GitHubEventsConfig
fn clone(&self) -> GitHubEventsConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more