#[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: i64The installationID that emits the GitHub event.
owner: StringOwner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is “googlecloudplatform”.
name: StringName 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
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.
§Example
let x = GitHubEventsConfig::new().set_installation_id(42);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.
§Example
use google_cloud_build_v1::model::PullRequestFilter;
let x = GitHubEventsConfig::new().set_event(Some(
google_cloud_build_v1::model::git_hub_events_config::Event::PullRequest(PullRequestFilter::default().into())));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.
§Example
use google_cloud_build_v1::model::PullRequestFilter;
let x = GitHubEventsConfig::new().set_pull_request(PullRequestFilter::default()/* use setters */);
assert!(x.pull_request().is_some());
assert!(x.push().is_none());Sourcepub fn push(&self) -> Option<&Box<PushFilter>>
pub fn push(&self) -> Option<&Box<PushFilter>>
The value of event
if it holds a Push, None if the field is not set or
holds a different branch.
Sourcepub fn set_push<T: Into<Box<PushFilter>>>(self, v: T) -> Self
pub fn set_push<T: Into<Box<PushFilter>>>(self, v: T) -> Self
Sets the value of event
to hold a Push.
Note that all the setters affecting event are
mutually exclusive.
§Example
use google_cloud_build_v1::model::PushFilter;
let x = GitHubEventsConfig::new().set_push(PushFilter::default()/* use setters */);
assert!(x.push().is_some());
assert!(x.pull_request().is_none());Trait Implementations§
Source§impl Clone for GitHubEventsConfig
impl Clone for GitHubEventsConfig
Source§fn clone(&self) -> GitHubEventsConfig
fn clone(&self) -> GitHubEventsConfig
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 GitHubEventsConfig
impl Debug for GitHubEventsConfig
Source§impl Default for GitHubEventsConfig
impl Default for GitHubEventsConfig
Source§fn default() -> GitHubEventsConfig
fn default() -> GitHubEventsConfig
Source§impl Message for GitHubEventsConfig
impl Message for GitHubEventsConfig
Source§impl PartialEq for GitHubEventsConfig
impl PartialEq for GitHubEventsConfig
impl StructuralPartialEq for GitHubEventsConfig
Auto Trait Implementations§
impl Freeze for GitHubEventsConfig
impl RefUnwindSafe for GitHubEventsConfig
impl Send for GitHubEventsConfig
impl Sync for GitHubEventsConfig
impl Unpin for GitHubEventsConfig
impl UnsafeUnpin for GitHubEventsConfig
impl UnwindSafe for GitHubEventsConfig
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