#[non_exhaustive]pub struct RepositoryEventConfig {
pub repository: String,
pub repository_type: RepositoryType,
pub filter: Option<Filter>,
/* private fields */
}Expand description
The configuration of a trigger that creates a build whenever an event from Repo API 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.repository: StringThe resource name of the Repo API resource.
repository_type: RepositoryTypeOutput only. The type of the SCM vendor the repository points to.
filter: Option<Filter>The types of filter to trigger a build.
Implementations§
Source§impl RepositoryEventConfig
impl RepositoryEventConfig
Sourcepub fn set_repository<T: Into<String>>(self, v: T) -> Self
pub fn set_repository<T: Into<String>>(self, v: T) -> Self
Sets the value of repository.
§Example
let x = RepositoryEventConfig::new().set_repository("example");Sourcepub fn set_repository_type<T: Into<RepositoryType>>(self, v: T) -> Self
pub fn set_repository_type<T: Into<RepositoryType>>(self, v: T) -> Self
Sets the value of repository_type.
§Example
use google_cloud_build_v1::model::repository_event_config::RepositoryType;
let x0 = RepositoryEventConfig::new().set_repository_type(RepositoryType::Github);
let x1 = RepositoryEventConfig::new().set_repository_type(RepositoryType::GithubEnterprise);
let x2 = RepositoryEventConfig::new().set_repository_type(RepositoryType::GitlabEnterprise);Sourcepub fn set_filter<T: Into<Option<Filter>>>(self, v: T) -> Self
pub fn set_filter<T: Into<Option<Filter>>>(self, v: T) -> Self
Sets the value of filter.
Note that all the setters affecting filter are mutually
exclusive.
§Example
use google_cloud_build_v1::model::PullRequestFilter;
let x = RepositoryEventConfig::new().set_filter(Some(
google_cloud_build_v1::model::repository_event_config::Filter::PullRequest(PullRequestFilter::default().into())));Sourcepub fn pull_request(&self) -> Option<&Box<PullRequestFilter>>
pub fn pull_request(&self) -> Option<&Box<PullRequestFilter>>
The value of filter
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 filter
to hold a PullRequest.
Note that all the setters affecting filter are
mutually exclusive.
§Example
use google_cloud_build_v1::model::PullRequestFilter;
let x = RepositoryEventConfig::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 filter
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 filter
to hold a Push.
Note that all the setters affecting filter are
mutually exclusive.
§Example
use google_cloud_build_v1::model::PushFilter;
let x = RepositoryEventConfig::new().set_push(PushFilter::default()/* use setters */);
assert!(x.push().is_some());
assert!(x.pull_request().is_none());Trait Implementations§
Source§impl Clone for RepositoryEventConfig
impl Clone for RepositoryEventConfig
Source§fn clone(&self) -> RepositoryEventConfig
fn clone(&self) -> RepositoryEventConfig
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 RepositoryEventConfig
impl Debug for RepositoryEventConfig
Source§impl Default for RepositoryEventConfig
impl Default for RepositoryEventConfig
Source§fn default() -> RepositoryEventConfig
fn default() -> RepositoryEventConfig
Source§impl Message for RepositoryEventConfig
impl Message for RepositoryEventConfig
Source§impl PartialEq for RepositoryEventConfig
impl PartialEq for RepositoryEventConfig
impl StructuralPartialEq for RepositoryEventConfig
Auto Trait Implementations§
impl Freeze for RepositoryEventConfig
impl RefUnwindSafe for RepositoryEventConfig
impl Send for RepositoryEventConfig
impl Sync for RepositoryEventConfig
impl Unpin for RepositoryEventConfig
impl UnsafeUnpin for RepositoryEventConfig
impl UnwindSafe for RepositoryEventConfig
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