#[non_exhaustive]pub struct SubmitBuildRequest {
pub parent: String,
pub image_uri: String,
pub service_account: String,
pub worker_pool: String,
pub tags: Vec<String>,
pub machine_type: String,
pub release_track: LaunchStage,
pub client: String,
pub source: Option<Source>,
pub build_type: Option<BuildType>,
/* private fields */
}Expand description
Request message for submitting a Build.
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.parent: StringRequired. The project and location to build in. Location must be a region,
e.g., ‘us-central1’ or ‘global’ if the global builder is to be used.
Format:
projects/{project}/locations/{location}
image_uri: StringRequired. Artifact Registry URI to store the built image.
service_account: StringOptional. The service account to use for the build. If not set, the default Cloud Build service account for the project will be used.
worker_pool: StringOptional. Name of the Cloud Build Custom Worker Pool that should be used to
build the function. The format of this field is
projects/{project}/locations/{region}/workerPools/{workerPool} where
{project} and {region} are the project id and region respectively where
the worker pool is defined and {workerPool} is the short name of the
worker pool.
Optional. Additional tags to annotate the build.
machine_type: StringOptional. The machine type from default pool to use for the build. If left blank, cloudbuild will use a sensible default. Currently only E2_HIGHCPU_8 is supported. If worker_pool is set, this field will be ignored.
release_track: LaunchStageOptional. The release track of the client that initiated the build request.
client: StringOptional. The client that initiated the build request.
source: Option<Source>Location of source.
build_type: Option<BuildType>Build type must be one of the following.
Implementations§
Source§impl SubmitBuildRequest
impl SubmitBuildRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_image_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_image_uri<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_service_account<T: Into<String>>(self, v: T) -> Self
pub fn set_service_account<T: Into<String>>(self, v: T) -> Self
Sets the value of service_account.
§Example
let x = SubmitBuildRequest::new().set_service_account("example");Sourcepub fn set_worker_pool<T: Into<String>>(self, v: T) -> Self
pub fn set_worker_pool<T: Into<String>>(self, v: T) -> Self
Sets the value of worker_pool.
§Example
let x = SubmitBuildRequest::new().set_worker_pool("example");Sourcepub fn set_machine_type<T: Into<String>>(self, v: T) -> Self
pub fn set_machine_type<T: Into<String>>(self, v: T) -> Self
Sets the value of machine_type.
§Example
let x = SubmitBuildRequest::new().set_machine_type("example");Sourcepub fn set_release_track<T: Into<LaunchStage>>(self, v: T) -> Self
pub fn set_release_track<T: Into<LaunchStage>>(self, v: T) -> Self
Sets the value of release_track.
§Example
use api::model::LaunchStage;
let x0 = SubmitBuildRequest::new().set_release_track(LaunchStage::Unimplemented);
let x1 = SubmitBuildRequest::new().set_release_track(LaunchStage::Prelaunch);
let x2 = SubmitBuildRequest::new().set_release_track(LaunchStage::EarlyAccess);Sourcepub fn set_client<T: Into<String>>(self, v: T) -> Self
pub fn set_client<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Sets the value of source.
Note that all the setters affecting source are mutually
exclusive.
§Example
use google_cloud_run_v2::model::StorageSource;
let x = SubmitBuildRequest::new().set_source(Some(
google_cloud_run_v2::model::submit_build_request::Source::StorageSource(StorageSource::default().into())));Sourcepub fn storage_source(&self) -> Option<&Box<StorageSource>>
pub fn storage_source(&self) -> Option<&Box<StorageSource>>
The value of source
if it holds a StorageSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_storage_source<T: Into<Box<StorageSource>>>(self, v: T) -> Self
pub fn set_storage_source<T: Into<Box<StorageSource>>>(self, v: T) -> Self
Sets the value of source
to hold a StorageSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_run_v2::model::StorageSource;
let x = SubmitBuildRequest::new().set_storage_source(StorageSource::default()/* use setters */);
assert!(x.storage_source().is_some());Sourcepub fn set_build_type<T: Into<Option<BuildType>>>(self, v: T) -> Self
pub fn set_build_type<T: Into<Option<BuildType>>>(self, v: T) -> Self
Sets the value of build_type.
Note that all the setters affecting build_type are mutually
exclusive.
§Example
use google_cloud_run_v2::model::submit_build_request::BuildpacksBuild;
let x = SubmitBuildRequest::new().set_build_type(Some(
google_cloud_run_v2::model::submit_build_request::BuildType::BuildpackBuild(BuildpacksBuild::default().into())));Sourcepub fn buildpack_build(&self) -> Option<&Box<BuildpacksBuild>>
pub fn buildpack_build(&self) -> Option<&Box<BuildpacksBuild>>
The value of build_type
if it holds a BuildpackBuild, None if the field is not set or
holds a different branch.
Sourcepub fn set_buildpack_build<T: Into<Box<BuildpacksBuild>>>(self, v: T) -> Self
pub fn set_buildpack_build<T: Into<Box<BuildpacksBuild>>>(self, v: T) -> Self
Sets the value of build_type
to hold a BuildpackBuild.
Note that all the setters affecting build_type are
mutually exclusive.
§Example
use google_cloud_run_v2::model::submit_build_request::BuildpacksBuild;
let x = SubmitBuildRequest::new().set_buildpack_build(BuildpacksBuild::default()/* use setters */);
assert!(x.buildpack_build().is_some());
assert!(x.docker_build().is_none());Sourcepub fn docker_build(&self) -> Option<&Box<DockerBuild>>
pub fn docker_build(&self) -> Option<&Box<DockerBuild>>
The value of build_type
if it holds a DockerBuild, None if the field is not set or
holds a different branch.
Sourcepub fn set_docker_build<T: Into<Box<DockerBuild>>>(self, v: T) -> Self
pub fn set_docker_build<T: Into<Box<DockerBuild>>>(self, v: T) -> Self
Sets the value of build_type
to hold a DockerBuild.
Note that all the setters affecting build_type are
mutually exclusive.
§Example
use google_cloud_run_v2::model::submit_build_request::DockerBuild;
let x = SubmitBuildRequest::new().set_docker_build(DockerBuild::default()/* use setters */);
assert!(x.docker_build().is_some());
assert!(x.buildpack_build().is_none());Trait Implementations§
Source§impl Clone for SubmitBuildRequest
impl Clone for SubmitBuildRequest
Source§fn clone(&self) -> SubmitBuildRequest
fn clone(&self) -> SubmitBuildRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more