Struct google_api_proto::google::apps::card::v1::SelectionInput
source · pub struct SelectionInput {
pub name: String,
pub label: String,
pub type: i32,
pub items: Vec<SelectionItem>,
pub on_change_action: Option<Action>,
pub multi_select_max_selected_items: i32,
pub multi_select_min_query_length: i32,
pub multi_select_data_source: Option<MultiSelectDataSource>,
}
Expand description
A widget that creates one or more UI items that users can select. For example, a dropdown menu or checkboxes. You can use this widget to collect data that can be predicted or enumerated. For an example in Google Chat apps, see Add selectable UI elements.
Chat apps can process the value of items that users select or input. For details about working with form inputs, see Receive form data.
To collect undefined or abstract data from users, use the [TextInput][google.apps.card.v1.TextInput] widget.
Fields§
§name: String
The name that identifies the selection input in a form input event.
For details about working with form inputs, see Receive form data.
label: String
The text that appears above the selection input field in the user interface.
Specify text that helps the user enter the information your app needs. For example, if users are selecting the urgency of a work ticket from a drop-down menu, the label might be “Urgency” or “Select urgency”.
type: i32
The type of items that are displayed to users in a SelectionInput
widget.
Selection types support different types of interactions. For example, users
can select one or more checkboxes, but they can only select one value from
a dropdown menu.
items: Vec<SelectionItem>
An array of selectable items. For example, an array of radio buttons or checkboxes. Supports up to 100 items.
on_change_action: Option<Action>
If specified, the form is submitted when the selection changes. If not specified, you must specify a separate button that submits the form.
For details about working with form inputs, see Receive form data.
multi_select_max_selected_items: i32
For multiselect menus, the maximum number of items that a user can select. Minimum value is 1 item. If unspecified, defaults to 3 items.
multi_select_min_query_length: i32
For multiselect menus, the number of text characters that a user inputs before the app queries autocomplete and displays suggested items in the menu.
If unspecified, defaults to 0 characters for static data sources and 3 characters for external data sources.
multi_select_data_source: Option<MultiSelectDataSource>
For a multiselect menu, the data source that populates selection items.
Implementations§
source§impl SelectionInput
impl SelectionInput
sourcepub fn type(&self) -> SelectionType
pub fn type(&self) -> SelectionType
Returns the enum value of type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_type(&mut self, value: SelectionType)
pub fn set_type(&mut self, value: SelectionType)
Sets type
to the provided enum value.
Trait Implementations§
source§impl Clone for SelectionInput
impl Clone for SelectionInput
source§fn clone(&self) -> SelectionInput
fn clone(&self) -> SelectionInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SelectionInput
impl Debug for SelectionInput
source§impl Default for SelectionInput
impl Default for SelectionInput
source§impl Message for SelectionInput
impl Message for SelectionInput
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for SelectionInput
impl PartialEq for SelectionInput
source§fn eq(&self, other: &SelectionInput) -> bool
fn eq(&self, other: &SelectionInput) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for SelectionInput
Auto Trait Implementations§
impl Freeze for SelectionInput
impl RefUnwindSafe for SelectionInput
impl Send for SelectionInput
impl Sync for SelectionInput
impl Unpin for SelectionInput
impl UnwindSafe for SelectionInput
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request