Enum google_api_proto::google::apps::card::v1::selection_input::SelectionType
source · #[repr(i32)]pub enum SelectionType {
CheckBox = 0,
RadioButton = 1,
Switch = 2,
Dropdown = 3,
MultiSelect = 4,
}
Expand description
The format for the items that users can select. Different options support different types of interactions. For example, users can select multiple checkboxes, but can only select one item from a dropdown menu.
Each selection input supports one type of selection. Mixing checkboxes and switches, for example, isn’t supported.
Variants§
CheckBox = 0
A set of checkboxes. Users can select one or more checkboxes.
RadioButton = 1
A set of radio buttons. Users can select one radio button.
Switch = 2
A set of switches. Users can turn on one or more switches.
Dropdown = 3
A dropdown menu. Users can select one item from the menu.
MultiSelect = 4
A multiselect menu for static or dynamic data. From the menu bar, users select one or more items. Users can also input values to populate dynamic data. For example, users can start typing the name of a Google Chat space and the widget autosuggests the space.
To populate items for a multiselect menu, you can use one of the following types of data sources:
- Static data: Items are specified as
SelectionItem
objects in the widget. Up to 100 items. - Google Workspace data: Items are populated using data from Google Workspace, such as Google Workspace users or Google Chat spaces.
- External data: Items are populated from an external data source outside of Google Workspace.
For examples of how to implement multiselect menus, see Add a multiselect menu.
Google Workspace Add-ons and Chat apps: Multiselect for Google Workspace Add-ons are in Developer Preview.
Implementations§
source§impl SelectionType
impl SelectionType
source§impl SelectionType
impl SelectionType
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for SelectionType
impl Clone for SelectionType
source§fn clone(&self) -> SelectionType
fn clone(&self) -> SelectionType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SelectionType
impl Debug for SelectionType
source§impl Default for SelectionType
impl Default for SelectionType
source§fn default() -> SelectionType
fn default() -> SelectionType
source§impl From<SelectionType> for i32
impl From<SelectionType> for i32
source§fn from(value: SelectionType) -> i32
fn from(value: SelectionType) -> i32
source§impl Hash for SelectionType
impl Hash for SelectionType
source§impl Ord for SelectionType
impl Ord for SelectionType
source§fn cmp(&self, other: &SelectionType) -> Ordering
fn cmp(&self, other: &SelectionType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for SelectionType
impl PartialEq for SelectionType
source§fn eq(&self, other: &SelectionType) -> bool
fn eq(&self, other: &SelectionType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SelectionType
impl PartialOrd for SelectionType
source§fn partial_cmp(&self, other: &SelectionType) -> Option<Ordering>
fn partial_cmp(&self, other: &SelectionType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for SelectionType
impl TryFrom<i32> for SelectionType
§type Error = DecodeError
type Error = DecodeError
source§fn try_from(value: i32) -> Result<SelectionType, DecodeError>
fn try_from(value: i32) -> Result<SelectionType, DecodeError>
impl Copy for SelectionType
impl Eq for SelectionType
impl StructuralPartialEq for SelectionType
Auto Trait Implementations§
impl Freeze for SelectionType
impl RefUnwindSafe for SelectionType
impl Send for SelectionType
impl Sync for SelectionType
impl Unpin for SelectionType
impl UnwindSafe for SelectionType
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§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