#[non_exhaustive]pub struct PreCheckResponse {
pub message: Option<String>,
pub message_type: Option<MessageType>,
pub actions_required: Vec<String>,
/* private fields */
}Expand description
Structured PreCheckResponse containing message, type, and required actions.
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.message: Option<String>The message to be displayed to the user.
message_type: Option<MessageType>The type of message whether it is an info, warning, or error.
actions_required: Vec<String>The actions that the user needs to take. Use repeated for multiple actions.
Implementations§
Source§impl PreCheckResponse
impl PreCheckResponse
pub fn new() -> Self
Sourcepub fn set_message<T>(self, v: T) -> Self
pub fn set_message<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_message<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_message<T>(self, v: Option<T>) -> Self
Sourcepub fn set_message_type<T>(self, v: T) -> Selfwhere
T: Into<MessageType>,
pub fn set_message_type<T>(self, v: T) -> Selfwhere
T: Into<MessageType>,
Sets the value of message_type.
§Example
ⓘ
use google_cloud_sql_v1::model::pre_check_response::MessageType;
let x0 = PreCheckResponse::new().set_message_type(MessageType::Info);
let x1 = PreCheckResponse::new().set_message_type(MessageType::Warning);
let x2 = PreCheckResponse::new().set_message_type(MessageType::Error);Sourcepub fn set_or_clear_message_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<MessageType>,
pub fn set_or_clear_message_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<MessageType>,
Sets or clears the value of message_type.
§Example
ⓘ
use google_cloud_sql_v1::model::pre_check_response::MessageType;
let x0 = PreCheckResponse::new().set_or_clear_message_type(Some(MessageType::Info));
let x1 = PreCheckResponse::new().set_or_clear_message_type(Some(MessageType::Warning));
let x2 = PreCheckResponse::new().set_or_clear_message_type(Some(MessageType::Error));
let x_none = PreCheckResponse::new().set_or_clear_message_type(None::<MessageType>);Sourcepub fn set_actions_required<T, V>(self, v: T) -> Self
pub fn set_actions_required<T, V>(self, v: T) -> Self
Sets the value of actions_required.
§Example
ⓘ
let x = PreCheckResponse::new().set_actions_required(["a", "b", "c"]);Trait Implementations§
Source§impl Clone for PreCheckResponse
impl Clone for PreCheckResponse
Source§fn clone(&self) -> PreCheckResponse
fn clone(&self) -> PreCheckResponse
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 PreCheckResponse
impl Debug for PreCheckResponse
Source§impl Default for PreCheckResponse
impl Default for PreCheckResponse
Source§fn default() -> PreCheckResponse
fn default() -> PreCheckResponse
Returns the “default value” for a type. Read more
Source§impl Message for PreCheckResponse
impl Message for PreCheckResponse
Source§impl PartialEq for PreCheckResponse
impl PartialEq for PreCheckResponse
impl StructuralPartialEq for PreCheckResponse
Auto Trait Implementations§
impl Freeze for PreCheckResponse
impl RefUnwindSafe for PreCheckResponse
impl Send for PreCheckResponse
impl Sync for PreCheckResponse
impl Unpin for PreCheckResponse
impl UnwindSafe for PreCheckResponse
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