#[non_exhaustive]pub struct GitSourceDependency {
pub repository: Option<GitSourceRepository>,
pub revision: String,
pub recurse_submodules: bool,
pub depth: i64,
pub dest_path: String,
/* private fields */
}Expand description
Represents a git repository as a build dependency.
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.repository: Option<GitSourceRepository>Required. The kind of repo (url or dev connect).
revision: StringRequired. The revision that we will fetch the repo at.
recurse_submodules: boolOptional. True if submodules should be fetched too (default false).
depth: i64Optional. How much history should be fetched for the build (default 1, -1 for all history).
dest_path: StringRequired. Where should the files be placed on the worker.
Implementations§
Source§impl GitSourceDependency
impl GitSourceDependency
pub fn new() -> Self
Sourcepub fn set_repository<T>(self, v: T) -> Selfwhere
T: Into<GitSourceRepository>,
pub fn set_repository<T>(self, v: T) -> Selfwhere
T: Into<GitSourceRepository>,
Sets the value of repository.
§Example
ⓘ
use google_cloud_build_v1::model::dependency::GitSourceRepository;
let x = GitSourceDependency::new().set_repository(GitSourceRepository::default()/* use setters */);Sourcepub fn set_or_clear_repository<T>(self, v: Option<T>) -> Selfwhere
T: Into<GitSourceRepository>,
pub fn set_or_clear_repository<T>(self, v: Option<T>) -> Selfwhere
T: Into<GitSourceRepository>,
Sets or clears the value of repository.
§Example
ⓘ
use google_cloud_build_v1::model::dependency::GitSourceRepository;
let x = GitSourceDependency::new().set_or_clear_repository(Some(GitSourceRepository::default()/* use setters */));
let x = GitSourceDependency::new().set_or_clear_repository(None::<GitSourceRepository>);Sourcepub fn set_revision<T: Into<String>>(self, v: T) -> Self
pub fn set_revision<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_recurse_submodules<T: Into<bool>>(self, v: T) -> Self
pub fn set_recurse_submodules<T: Into<bool>>(self, v: T) -> Self
Sets the value of recurse_submodules.
§Example
ⓘ
let x = GitSourceDependency::new().set_recurse_submodules(true);Trait Implementations§
Source§impl Clone for GitSourceDependency
impl Clone for GitSourceDependency
Source§fn clone(&self) -> GitSourceDependency
fn clone(&self) -> GitSourceDependency
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 GitSourceDependency
impl Debug for GitSourceDependency
Source§impl Default for GitSourceDependency
impl Default for GitSourceDependency
Source§fn default() -> GitSourceDependency
fn default() -> GitSourceDependency
Returns the “default value” for a type. Read more
Source§impl Message for GitSourceDependency
impl Message for GitSourceDependency
Source§impl PartialEq for GitSourceDependency
impl PartialEq for GitSourceDependency
impl StructuralPartialEq for GitSourceDependency
Auto Trait Implementations§
impl Freeze for GitSourceDependency
impl RefUnwindSafe for GitSourceDependency
impl Send for GitSourceDependency
impl Sync for GitSourceDependency
impl Unpin for GitSourceDependency
impl UnsafeUnpin for GitSourceDependency
impl UnwindSafe for GitSourceDependency
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