#[non_exhaustive]pub struct MigrationWarning {
pub code: WarningCode,
pub warning_message: Option<LocalizedMessage>,
pub action_item: Option<LocalizedMessage>,
pub help_links: Vec<Link>,
pub warning_time: Option<Timestamp>,
/* private fields */
}Expand description
Represents migration resource warning information that can be used with google.rpc.Status message. MigrationWarning is used to present the user with warning information in migration operations.
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: WarningCodeThe warning code.
warning_message: Option<LocalizedMessage>Output only. The localized warning message.
action_item: Option<LocalizedMessage>Output only. Suggested action for solving the warning.
help_links: Vec<Link>Output only. URL(s) pointing to additional information on handling the current warning.
warning_time: Option<Timestamp>The time the warning occurred.
Implementations§
Source§impl MigrationWarning
impl MigrationWarning
Sourcepub fn set_code<T: Into<WarningCode>>(self, v: T) -> Self
pub fn set_code<T: Into<WarningCode>>(self, v: T) -> Self
Sourcepub fn set_warning_message<T>(self, v: T) -> Selfwhere
T: Into<LocalizedMessage>,
pub fn set_warning_message<T>(self, v: T) -> Selfwhere
T: Into<LocalizedMessage>,
Sets the value of warning_message.
§Example
ⓘ
use google_cloud_rpc::model::LocalizedMessage;
let x = MigrationWarning::new().set_warning_message(LocalizedMessage::default()/* use setters */);Sourcepub fn set_or_clear_warning_message<T>(self, v: Option<T>) -> Selfwhere
T: Into<LocalizedMessage>,
pub fn set_or_clear_warning_message<T>(self, v: Option<T>) -> Selfwhere
T: Into<LocalizedMessage>,
Sets or clears the value of warning_message.
§Example
ⓘ
use google_cloud_rpc::model::LocalizedMessage;
let x = MigrationWarning::new().set_or_clear_warning_message(Some(LocalizedMessage::default()/* use setters */));
let x = MigrationWarning::new().set_or_clear_warning_message(None::<LocalizedMessage>);Sourcepub fn set_action_item<T>(self, v: T) -> Selfwhere
T: Into<LocalizedMessage>,
pub fn set_action_item<T>(self, v: T) -> Selfwhere
T: Into<LocalizedMessage>,
Sets the value of action_item.
§Example
ⓘ
use google_cloud_rpc::model::LocalizedMessage;
let x = MigrationWarning::new().set_action_item(LocalizedMessage::default()/* use setters */);Sourcepub fn set_or_clear_action_item<T>(self, v: Option<T>) -> Selfwhere
T: Into<LocalizedMessage>,
pub fn set_or_clear_action_item<T>(self, v: Option<T>) -> Selfwhere
T: Into<LocalizedMessage>,
Sets or clears the value of action_item.
§Example
ⓘ
use google_cloud_rpc::model::LocalizedMessage;
let x = MigrationWarning::new().set_or_clear_action_item(Some(LocalizedMessage::default()/* use setters */));
let x = MigrationWarning::new().set_or_clear_action_item(None::<LocalizedMessage>);Sourcepub fn set_help_links<T, V>(self, v: T) -> Self
pub fn set_help_links<T, V>(self, v: T) -> Self
Sets the value of help_links.
§Example
ⓘ
use google_cloud_rpc::model::help::Link;
let x = MigrationWarning::new()
.set_help_links([
Link::default()/* use setters */,
Link::default()/* use (different) setters */,
]);Sourcepub fn set_warning_time<T>(self, v: T) -> Self
pub fn set_warning_time<T>(self, v: T) -> Self
Sets the value of warning_time.
§Example
ⓘ
use wkt::Timestamp;
let x = MigrationWarning::new().set_warning_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_warning_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_warning_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of warning_time.
§Example
ⓘ
use wkt::Timestamp;
let x = MigrationWarning::new().set_or_clear_warning_time(Some(Timestamp::default()/* use setters */));
let x = MigrationWarning::new().set_or_clear_warning_time(None::<Timestamp>);Trait Implementations§
Source§impl Clone for MigrationWarning
impl Clone for MigrationWarning
Source§fn clone(&self) -> MigrationWarning
fn clone(&self) -> MigrationWarning
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MigrationWarning
impl Debug for MigrationWarning
Source§impl Default for MigrationWarning
impl Default for MigrationWarning
Source§fn default() -> MigrationWarning
fn default() -> MigrationWarning
Returns the “default value” for a type. Read more
Source§impl Message for MigrationWarning
impl Message for MigrationWarning
Source§impl PartialEq for MigrationWarning
impl PartialEq for MigrationWarning
Source§fn eq(&self, other: &MigrationWarning) -> bool
fn eq(&self, other: &MigrationWarning) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MigrationWarning
Auto Trait Implementations§
impl Freeze for MigrationWarning
impl RefUnwindSafe for MigrationWarning
impl Send for MigrationWarning
impl Sync for MigrationWarning
impl Unpin for MigrationWarning
impl UnsafeUnpin for MigrationWarning
impl UnwindSafe for MigrationWarning
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