#[non_exhaustive]pub struct UpdateRequest {
pub instance: String,
pub minimal_action: Option<MinimalAction>,
pub most_disruptive_allowed_action: Option<MostDisruptiveAllowedAction>,
pub project: String,
pub request_id: Option<String>,
pub zone: String,
pub body: Option<Instance>,
/* private fields */
}instances only.Expand description
Synthetic request message for the update() method.
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.instance: StringName of the instance resource to update.
minimal_action: Option<MinimalAction>Specifies the action to take when updating an instance even if the updated properties do not require it. If not specified, then Compute Engine acts based on the minimum action that the updated properties require.
most_disruptive_allowed_action: Option<MostDisruptiveAllowedAction>Specifies the most disruptive action that can be taken on the instance as part of the update. Compute Engine returns an error if the instance properties require a more disruptive action as part of the instance update. Valid options from lowest to highest are NO_EFFECT, REFRESH, and RESTART.
project: StringProject ID for this request.
request_id: Option<String>An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
zone: StringThe name of the zone for this request.
body: Option<Instance>Synthetic request body field for the update() method.
Implementations§
Source§impl UpdateRequest
impl UpdateRequest
pub fn new() -> Self
Sourcepub fn set_instance<T: Into<String>>(self, v: T) -> Self
pub fn set_instance<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_minimal_action<T>(self, v: T) -> Selfwhere
T: Into<MinimalAction>,
pub fn set_minimal_action<T>(self, v: T) -> Selfwhere
T: Into<MinimalAction>,
Sets the value of minimal_action.
§Example
use google_cloud_compute_v1::model::instances::update_request::MinimalAction;
let x0 = UpdateRequest::new().set_minimal_action(MinimalAction::NoEffect);
let x1 = UpdateRequest::new().set_minimal_action(MinimalAction::Refresh);
let x2 = UpdateRequest::new().set_minimal_action(MinimalAction::Restart);Sourcepub fn set_or_clear_minimal_action<T>(self, v: Option<T>) -> Selfwhere
T: Into<MinimalAction>,
pub fn set_or_clear_minimal_action<T>(self, v: Option<T>) -> Selfwhere
T: Into<MinimalAction>,
Sets or clears the value of minimal_action.
§Example
use google_cloud_compute_v1::model::instances::update_request::MinimalAction;
let x0 = UpdateRequest::new().set_or_clear_minimal_action(Some(MinimalAction::NoEffect));
let x1 = UpdateRequest::new().set_or_clear_minimal_action(Some(MinimalAction::Refresh));
let x2 = UpdateRequest::new().set_or_clear_minimal_action(Some(MinimalAction::Restart));
let x_none = UpdateRequest::new().set_or_clear_minimal_action(None::<MinimalAction>);Sourcepub fn set_most_disruptive_allowed_action<T>(self, v: T) -> Selfwhere
T: Into<MostDisruptiveAllowedAction>,
pub fn set_most_disruptive_allowed_action<T>(self, v: T) -> Selfwhere
T: Into<MostDisruptiveAllowedAction>,
Sets the value of most_disruptive_allowed_action.
§Example
use google_cloud_compute_v1::model::instances::update_request::MostDisruptiveAllowedAction;
let x0 = UpdateRequest::new().set_most_disruptive_allowed_action(MostDisruptiveAllowedAction::NoEffect);
let x1 = UpdateRequest::new().set_most_disruptive_allowed_action(MostDisruptiveAllowedAction::Refresh);
let x2 = UpdateRequest::new().set_most_disruptive_allowed_action(MostDisruptiveAllowedAction::Restart);Sourcepub fn set_or_clear_most_disruptive_allowed_action<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<MostDisruptiveAllowedAction>,
pub fn set_or_clear_most_disruptive_allowed_action<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<MostDisruptiveAllowedAction>,
Sets or clears the value of most_disruptive_allowed_action.
§Example
use google_cloud_compute_v1::model::instances::update_request::MostDisruptiveAllowedAction;
let x0 = UpdateRequest::new().set_or_clear_most_disruptive_allowed_action(Some(MostDisruptiveAllowedAction::NoEffect));
let x1 = UpdateRequest::new().set_or_clear_most_disruptive_allowed_action(Some(MostDisruptiveAllowedAction::Refresh));
let x2 = UpdateRequest::new().set_or_clear_most_disruptive_allowed_action(Some(MostDisruptiveAllowedAction::Restart));
let x_none = UpdateRequest::new().set_or_clear_most_disruptive_allowed_action(None::<MostDisruptiveAllowedAction>);Sourcepub fn set_project<T: Into<String>>(self, v: T) -> Self
pub fn set_project<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_request_id<T>(self, v: T) -> Self
pub fn set_request_id<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_request_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_request_id<T>(self, v: Option<T>) -> Self
Sets or clears the value of request_id.
§Example
let x = UpdateRequest::new().set_or_clear_request_id(Some("example"));
let x = UpdateRequest::new().set_or_clear_request_id(None::<String>);Sourcepub fn set_or_clear_body<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_body<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for UpdateRequest
impl Clone for UpdateRequest
Source§fn clone(&self) -> UpdateRequest
fn clone(&self) -> UpdateRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more