#[non_exhaustive]pub struct ActionResponse {
pub type: ResponseType,
pub url: String,
pub dialog_action: Option<DialogAction>,
pub updated_widget: Option<UpdatedWidget>,
/* private fields */
}Expand description
Parameters that a Chat app can use to configure how its response is posted.
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.type: ResponseTypeInput only. The type of Chat app response.
url: StringInput only. URL for users to authenticate or configure. (Only for
REQUEST_CONFIG response types.)
dialog_action: Option<DialogAction>Input only. A response to an interaction event related to a
dialog. Must be
accompanied by ResponseType.Dialog.
updated_widget: Option<UpdatedWidget>Input only. The response of the updated widget.
Implementations§
Source§impl ActionResponse
impl ActionResponse
Sourcepub fn set_type<T: Into<ResponseType>>(self, v: T) -> Self
pub fn set_type<T: Into<ResponseType>>(self, v: T) -> Self
Sets the value of r#type.
§Example
ⓘ
use google_chat_v1::model::action_response::ResponseType;
let x0 = ActionResponse::new().set_type(ResponseType::NewMessage);
let x1 = ActionResponse::new().set_type(ResponseType::UpdateMessage);
let x2 = ActionResponse::new().set_type(ResponseType::UpdateUserMessageCards);Sourcepub fn set_dialog_action<T>(self, v: T) -> Selfwhere
T: Into<DialogAction>,
pub fn set_dialog_action<T>(self, v: T) -> Selfwhere
T: Into<DialogAction>,
Sets the value of dialog_action.
§Example
ⓘ
use google_chat_v1::model::DialogAction;
let x = ActionResponse::new().set_dialog_action(DialogAction::default()/* use setters */);Sourcepub fn set_or_clear_dialog_action<T>(self, v: Option<T>) -> Selfwhere
T: Into<DialogAction>,
pub fn set_or_clear_dialog_action<T>(self, v: Option<T>) -> Selfwhere
T: Into<DialogAction>,
Sets or clears the value of dialog_action.
§Example
ⓘ
use google_chat_v1::model::DialogAction;
let x = ActionResponse::new().set_or_clear_dialog_action(Some(DialogAction::default()/* use setters */));
let x = ActionResponse::new().set_or_clear_dialog_action(None::<DialogAction>);Sourcepub fn set_updated_widget<T>(self, v: T) -> Selfwhere
T: Into<UpdatedWidget>,
pub fn set_updated_widget<T>(self, v: T) -> Selfwhere
T: Into<UpdatedWidget>,
Sets the value of updated_widget.
§Example
ⓘ
use google_chat_v1::model::action_response::UpdatedWidget;
let x = ActionResponse::new().set_updated_widget(UpdatedWidget::default()/* use setters */);Sourcepub fn set_or_clear_updated_widget<T>(self, v: Option<T>) -> Selfwhere
T: Into<UpdatedWidget>,
pub fn set_or_clear_updated_widget<T>(self, v: Option<T>) -> Selfwhere
T: Into<UpdatedWidget>,
Sets or clears the value of updated_widget.
§Example
ⓘ
use google_chat_v1::model::action_response::UpdatedWidget;
let x = ActionResponse::new().set_or_clear_updated_widget(Some(UpdatedWidget::default()/* use setters */));
let x = ActionResponse::new().set_or_clear_updated_widget(None::<UpdatedWidget>);Trait Implementations§
Source§impl Clone for ActionResponse
impl Clone for ActionResponse
Source§fn clone(&self) -> ActionResponse
fn clone(&self) -> ActionResponse
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 ActionResponse
impl Debug for ActionResponse
Source§impl Default for ActionResponse
impl Default for ActionResponse
Source§fn default() -> ActionResponse
fn default() -> ActionResponse
Returns the “default value” for a type. Read more
Source§impl Message for ActionResponse
impl Message for ActionResponse
Source§impl PartialEq for ActionResponse
impl PartialEq for ActionResponse
impl StructuralPartialEq for ActionResponse
Auto Trait Implementations§
impl Freeze for ActionResponse
impl RefUnwindSafe for ActionResponse
impl Send for ActionResponse
impl Sync for ActionResponse
impl Unpin for ActionResponse
impl UnsafeUnpin for ActionResponse
impl UnwindSafe for ActionResponse
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