#[non_exhaustive]pub struct Warning {
pub code: Option<Code>,
pub data: Vec<Data>,
pub message: Option<String>,
/* private fields */
}Available on crate feature
instance-group-managers only.Expand description
The message type for the warning field.
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.code: Option<Code>[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
data: Vec<Data>[Output Only] Metadata about this warning in key: value format. For example:
“data”: [ { “key”: “scope”, “value”: “zones/us-east1-d” }
message: Option<String>[Output Only] A human-readable description of the warning code.
Implementations§
Source§impl Warning
impl Warning
pub fn new() -> Self
Sourcepub fn set_code<T>(self, v: T) -> Self
pub fn set_code<T>(self, v: T) -> Self
Sets the value of code.
§Example
ⓘ
use google_cloud_compute_v1::model::instance_group_manager_list::warning::Code;
let x0 = Warning::new().set_code(Code::DeprecatedResourceUsed);
let x1 = Warning::new().set_code(Code::DeprecatedTypeUsed);
let x2 = Warning::new().set_code(Code::DiskSizeLargerThanImageSize);Sourcepub fn set_or_clear_code<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_code<T>(self, v: Option<T>) -> Self
Sets or clears the value of code.
§Example
ⓘ
use google_cloud_compute_v1::model::instance_group_manager_list::warning::Code;
let x0 = Warning::new().set_or_clear_code(Some(Code::DeprecatedResourceUsed));
let x1 = Warning::new().set_or_clear_code(Some(Code::DeprecatedTypeUsed));
let x2 = Warning::new().set_or_clear_code(Some(Code::DiskSizeLargerThanImageSize));
let x_none = Warning::new().set_or_clear_code(None::<Code>);Sourcepub fn set_message<T>(self, v: T) -> Self
pub fn set_message<T>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for Warning
Auto Trait Implementations§
impl Freeze for Warning
impl RefUnwindSafe for Warning
impl Send for Warning
impl Sync for Warning
impl Unpin for Warning
impl UnwindSafe for Warning
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