1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
#[cfg(any(feature = "google-apps-script-type-calendar"))]
pub mod calendar;
#[cfg(any(feature = "google-apps-script-type-docs"))]
pub mod docs;
#[cfg(any(feature = "google-apps-script-type-drive"))]
pub mod drive;
#[cfg(any(feature = "google-apps-script-type-gmail"))]
pub mod gmail;
#[cfg(any(feature = "google-apps-script-type-sheets"))]
pub mod sheets;
#[cfg(any(feature = "google-apps-script-type-slides"))]
pub mod slides;
// This file is @generated by prost-build.
/// The widget subset used by an add-on.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddOnWidgetSet {
/// The list of widgets used in an add-on.
#[prost(enumeration = "add_on_widget_set::WidgetType", repeated, tag = "1")]
pub used_widgets: ::prost::alloc::vec::Vec<i32>,
}
/// Nested message and enum types in `AddOnWidgetSet`.
pub mod add_on_widget_set {
/// The Widget type. DEFAULT is the basic widget set.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum WidgetType {
/// The default widget set.
Unspecified = 0,
/// The date picker.
DatePicker = 1,
/// Styled buttons include filled buttons and disabled buttons.
StyledButtons = 2,
/// Persistent forms allow persisting form values during actions.
PersistentForms = 3,
/// Fixed footer in card.
FixedFooter = 4,
/// Update the subject and recipients of a draft.
UpdateSubjectAndRecipients = 5,
/// The grid widget.
GridWidget = 6,
/// A Gmail add-on action that applies to the addon compose UI.
AddonComposeUiAction = 7,
}
impl WidgetType {
/// 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.
pub fn as_str_name(&self) -> &'static str {
match self {
WidgetType::Unspecified => "WIDGET_TYPE_UNSPECIFIED",
WidgetType::DatePicker => "DATE_PICKER",
WidgetType::StyledButtons => "STYLED_BUTTONS",
WidgetType::PersistentForms => "PERSISTENT_FORMS",
WidgetType::FixedFooter => "FIXED_FOOTER",
WidgetType::UpdateSubjectAndRecipients => "UPDATE_SUBJECT_AND_RECIPIENTS",
WidgetType::GridWidget => "GRID_WIDGET",
WidgetType::AddonComposeUiAction => "ADDON_COMPOSE_UI_ACTION",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"WIDGET_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"DATE_PICKER" => Some(Self::DatePicker),
"STYLED_BUTTONS" => Some(Self::StyledButtons),
"PERSISTENT_FORMS" => Some(Self::PersistentForms),
"FIXED_FOOTER" => Some(Self::FixedFooter),
"UPDATE_SUBJECT_AND_RECIPIENTS" => Some(Self::UpdateSubjectAndRecipients),
"GRID_WIDGET" => Some(Self::GridWidget),
"ADDON_COMPOSE_UI_ACTION" => Some(Self::AddonComposeUiAction),
_ => None,
}
}
}
}
/// Common format for declaring a menu item, or button, that appears within a
/// host app.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MenuItemExtensionPoint {
/// Required. The endpoint to execute when this extension point is
/// activated.
#[prost(string, tag = "1")]
pub run_function: ::prost::alloc::string::String,
/// Required. User-visible text describing the action taken by activating this
/// extension point. For example, "Insert invoice".
#[prost(string, tag = "2")]
pub label: ::prost::alloc::string::String,
/// The URL for the logo image shown in the add-on toolbar.
///
/// If not set, defaults to the add-on's primary logo URL.
#[prost(string, tag = "3")]
pub logo_url: ::prost::alloc::string::String,
}
/// Common format for declaring an add-on's home-page view.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HomepageExtensionPoint {
/// Required. The endpoint to execute when this extension point is
/// activated.
#[prost(string, tag = "1")]
pub run_function: ::prost::alloc::string::String,
/// Optional. If set to `false`, disable the home-page view in this context.
///
/// Defaults to `true` if unset.
///
/// If an add-ons custom home-page view is disabled, an autogenerated overview
/// card will be provided for users instead.
#[prost(message, optional, tag = "2")]
pub enabled: ::core::option::Option<bool>,
}
/// Format for declaring a universal action menu item extension point.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UniversalActionExtensionPoint {
/// Required. User-visible text describing the action taken by activating this
/// extension point, for example, "Add a new contact".
#[prost(string, tag = "1")]
pub label: ::prost::alloc::string::String,
/// Required. The action type supported on a universal action menu item. It
/// could be either a link to open or an endpoint to execute.
#[prost(oneof = "universal_action_extension_point::ActionType", tags = "2, 3")]
pub action_type: ::core::option::Option<
universal_action_extension_point::ActionType,
>,
}
/// Nested message and enum types in `UniversalActionExtensionPoint`.
pub mod universal_action_extension_point {
/// Required. The action type supported on a universal action menu item. It
/// could be either a link to open or an endpoint to execute.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ActionType {
/// URL to be opened by the UniversalAction.
#[prost(string, tag = "2")]
OpenLink(::prost::alloc::string::String),
/// Endpoint to be run by the UniversalAction.
#[prost(string, tag = "3")]
RunFunction(::prost::alloc::string::String),
}
}
/// Add-on configuration that is shared across all add-on host applications.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommonAddOnManifest {
/// Required. The display name of the add-on.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. The URL for the logo image shown in the add-on toolbar.
#[prost(string, tag = "2")]
pub logo_url: ::prost::alloc::string::String,
/// Common layout properties for the add-on cards.
#[prost(message, optional, tag = "3")]
pub layout_properties: ::core::option::Option<LayoutProperties>,
/// The widgets used in the add-on. If this field is not specified,
/// it indicates that default set is used.
#[prost(message, optional, tag = "4")]
pub add_on_widget_set: ::core::option::Option<AddOnWidgetSet>,
/// Whether to pass locale information from host app.
#[prost(bool, tag = "5")]
pub use_locale_from_app: bool,
/// Defines an endpoint that will be executed in any context, in
/// any host. Any cards generated by this function will always be available to
/// the user, but may be eclipsed by contextual content when this add-on
/// declares more targeted triggers.
#[prost(message, optional, tag = "6")]
pub homepage_trigger: ::core::option::Option<HomepageExtensionPoint>,
/// Defines a list of extension points in the universal action menu which
/// serves as a setting menu for the add-on. The extension point can be
/// link URL to open or an endpoint to execute as a form
/// submission.
#[prost(message, repeated, tag = "7")]
pub universal_actions: ::prost::alloc::vec::Vec<UniversalActionExtensionPoint>,
/// An OpenLink action
/// can only use a URL with an HTTPS, MAILTO or TEL scheme. For HTTPS links,
/// the URL must also
/// [match](/gmail/add-ons/concepts/manifests#whitelisting_urls) one of the
/// prefixes specified in this whitelist. If the prefix omits the scheme, HTTPS
/// is assumed. Notice that HTTP links are automatically rewritten to HTTPS
/// links.
#[prost(message, optional, tag = "8")]
pub open_link_url_prefixes: ::core::option::Option<::prost_types::ListValue>,
}
/// Card layout properties shared across all add-on host applications.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LayoutProperties {
/// The primary color of the add-on. It sets the color of toolbar. If no
/// primary color is set explicitly, the default value provided by the
/// framework is used.
#[prost(string, tag = "1")]
pub primary_color: ::prost::alloc::string::String,
/// The secondary color of the add-on. It sets the color of buttons.
/// If primary color is set but no secondary color is set, the
/// secondary color is the same as the primary color. If neither primary
/// color nor secondary color is set, the default value provided by the
/// framework is used.
#[prost(string, tag = "2")]
pub secondary_color: ::prost::alloc::string::String,
}
/// Options for sending requests to add-on HTTP endpoints
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HttpOptions {
/// Configuration for the token sent in the HTTP Authorization header
#[prost(enumeration = "HttpAuthorizationHeader", tag = "1")]
pub authorization_header: i32,
}
/// Authorization header sent in add-on HTTP requests
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum HttpAuthorizationHeader {
/// Default value, equivalent to `SYSTEM_ID_TOKEN`
Unspecified = 0,
/// Send an ID token for the project-specific Google Workspace Add-ons system
/// service account (default)
SystemIdToken = 1,
/// Send an ID token for the end user
UserIdToken = 2,
/// Do not send an Authentication header
None = 3,
}
impl HttpAuthorizationHeader {
/// 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.
pub fn as_str_name(&self) -> &'static str {
match self {
HttpAuthorizationHeader::Unspecified => {
"HTTP_AUTHORIZATION_HEADER_UNSPECIFIED"
}
HttpAuthorizationHeader::SystemIdToken => "SYSTEM_ID_TOKEN",
HttpAuthorizationHeader::UserIdToken => "USER_ID_TOKEN",
HttpAuthorizationHeader::None => "NONE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"HTTP_AUTHORIZATION_HEADER_UNSPECIFIED" => Some(Self::Unspecified),
"SYSTEM_ID_TOKEN" => Some(Self::SystemIdToken),
"USER_ID_TOKEN" => Some(Self::UserIdToken),
"NONE" => Some(Self::None),
_ => None,
}
}
}