#[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
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 google_cloud_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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SubmitBuildRequest
impl Debug for SubmitBuildRequest
Source§impl Default for SubmitBuildRequest
impl Default for SubmitBuildRequest
Source§fn default() -> SubmitBuildRequest
fn default() -> SubmitBuildRequest
Source§impl Message for SubmitBuildRequest
impl Message for SubmitBuildRequest
Source§impl PartialEq for SubmitBuildRequest
impl PartialEq for SubmitBuildRequest
impl StructuralPartialEq for SubmitBuildRequest
Auto Trait Implementations§
impl Freeze for SubmitBuildRequest
impl RefUnwindSafe for SubmitBuildRequest
impl Send for SubmitBuildRequest
impl Sync for SubmitBuildRequest
impl Unpin for SubmitBuildRequest
impl UnsafeUnpin for SubmitBuildRequest
impl UnwindSafe for SubmitBuildRequest
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