#[non_exhaustive]pub struct CreateDeploymentRequest {
pub parent: String,
pub deployment_id: String,
pub deployment: Option<Deployment>,
/* private fields */
}Expand description
The CreateDeployment method’s request.
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.parent: StringRequired. The parent resource for the deployment resource.
Format: projects/{project}/locations/{location}
deployment_id: StringOptional. The ID to use for the deployment resource, which will become the final component of the deployment’s resource name. This field is optional.
- If provided, the same will be used. The service will throw an error if the specified id is already used by another deployment resource in the API hub.
- If not provided, a system generated id will be used.
This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/.
deployment: Option<Deployment>Required. The deployment resource to create.
Implementations§
Source§impl CreateDeploymentRequest
impl CreateDeploymentRequest
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_deployment_id<T: Into<String>>(self, v: T) -> Self
pub fn set_deployment_id<T: Into<String>>(self, v: T) -> Self
Sets the value of deployment_id.
§Example
ⓘ
let x = CreateDeploymentRequest::new().set_deployment_id("example");Sourcepub fn set_deployment<T>(self, v: T) -> Selfwhere
T: Into<Deployment>,
pub fn set_deployment<T>(self, v: T) -> Selfwhere
T: Into<Deployment>,
Sets the value of deployment.
§Example
ⓘ
use google_cloud_apihub_v1::model::Deployment;
let x = CreateDeploymentRequest::new().set_deployment(Deployment::default()/* use setters */);Sourcepub fn set_or_clear_deployment<T>(self, v: Option<T>) -> Selfwhere
T: Into<Deployment>,
pub fn set_or_clear_deployment<T>(self, v: Option<T>) -> Selfwhere
T: Into<Deployment>,
Sets or clears the value of deployment.
§Example
ⓘ
use google_cloud_apihub_v1::model::Deployment;
let x = CreateDeploymentRequest::new().set_or_clear_deployment(Some(Deployment::default()/* use setters */));
let x = CreateDeploymentRequest::new().set_or_clear_deployment(None::<Deployment>);Trait Implementations§
Source§impl Clone for CreateDeploymentRequest
impl Clone for CreateDeploymentRequest
Source§fn clone(&self) -> CreateDeploymentRequest
fn clone(&self) -> CreateDeploymentRequest
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 CreateDeploymentRequest
impl Debug for CreateDeploymentRequest
Source§impl Default for CreateDeploymentRequest
impl Default for CreateDeploymentRequest
Source§fn default() -> CreateDeploymentRequest
fn default() -> CreateDeploymentRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateDeploymentRequest
impl Message for CreateDeploymentRequest
Source§impl PartialEq for CreateDeploymentRequest
impl PartialEq for CreateDeploymentRequest
impl StructuralPartialEq for CreateDeploymentRequest
Auto Trait Implementations§
impl Freeze for CreateDeploymentRequest
impl RefUnwindSafe for CreateDeploymentRequest
impl Send for CreateDeploymentRequest
impl Sync for CreateDeploymentRequest
impl Unpin for CreateDeploymentRequest
impl UnsafeUnpin for CreateDeploymentRequest
impl UnwindSafe for CreateDeploymentRequest
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