#[allow(unused_imports)]
use super::*;
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::AddOnWidgetSet {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__used_widgets,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for AddOnWidgetSet")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"usedWidgets" => Ok(__FieldTag::__used_widgets),
"used_widgets" => Ok(__FieldTag::__used_widgets),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::AddOnWidgetSet;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct AddOnWidgetSet")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__used_widgets => {
if !fields.insert(__FieldTag::__used_widgets) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for used_widgets",
));
}
result.used_widgets = map
.next_value::<std::option::Option<
std::vec::Vec<crate::model::add_on_widget_set::WidgetType>,
>>()?
.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::MenuItemExtensionPoint {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__run_function,
__label,
__logo_url,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for MenuItemExtensionPoint")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"runFunction" => Ok(__FieldTag::__run_function),
"run_function" => Ok(__FieldTag::__run_function),
"label" => Ok(__FieldTag::__label),
"logoUrl" => Ok(__FieldTag::__logo_url),
"logo_url" => Ok(__FieldTag::__logo_url),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::MenuItemExtensionPoint;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct MenuItemExtensionPoint")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__run_function => {
if !fields.insert(__FieldTag::__run_function) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for run_function",
));
}
result.run_function = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__label => {
if !fields.insert(__FieldTag::__label) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for label",
));
}
result.label = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__logo_url => {
if !fields.insert(__FieldTag::__logo_url) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for logo_url",
));
}
result.logo_url = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::HomepageExtensionPoint {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__run_function,
__enabled,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for HomepageExtensionPoint")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"runFunction" => Ok(__FieldTag::__run_function),
"run_function" => Ok(__FieldTag::__run_function),
"enabled" => Ok(__FieldTag::__enabled),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::HomepageExtensionPoint;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct HomepageExtensionPoint")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__run_function => {
if !fields.insert(__FieldTag::__run_function) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for run_function",
));
}
result.run_function = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__enabled => {
if !fields.insert(__FieldTag::__enabled) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for enabled",
));
}
result.enabled =
map.next_value::<std::option::Option<wkt::BoolValue>>()?;
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::UniversalActionExtensionPoint {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__label,
__open_link,
__run_function,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for UniversalActionExtensionPoint")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"label" => Ok(__FieldTag::__label),
"openLink" => Ok(__FieldTag::__open_link),
"open_link" => Ok(__FieldTag::__open_link),
"runFunction" => Ok(__FieldTag::__run_function),
"run_function" => Ok(__FieldTag::__run_function),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::UniversalActionExtensionPoint;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct UniversalActionExtensionPoint")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__label => {
if !fields.insert(__FieldTag::__label) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for label",
));
}
result.label = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__open_link => {
if !fields.insert(__FieldTag::__open_link) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for open_link",
));
}
if result.action_type.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `action_type`, a oneof with full ID .google.apps.script.type.UniversalActionExtensionPoint.open_link, latest field was openLink",
));
}
result.action_type = std::option::Option::Some(
crate::model::universal_action_extension_point::ActionType::OpenLink(
map.next_value::<std::option::Option<std::string::String>>()?.unwrap_or_default()
),
);
}
__FieldTag::__run_function => {
if !fields.insert(__FieldTag::__run_function) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for run_function",
));
}
if result.action_type.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `action_type`, a oneof with full ID .google.apps.script.type.UniversalActionExtensionPoint.run_function, latest field was runFunction",
));
}
result.action_type = std::option::Option::Some(
crate::model::universal_action_extension_point::ActionType::RunFunction(
map.next_value::<std::option::Option<std::string::String>>()?.unwrap_or_default()
),
);
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::CommonAddOnManifest {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__name,
__logo_url,
__layout_properties,
__add_on_widget_set,
__use_locale_from_app,
__homepage_trigger,
__universal_actions,
__open_link_url_prefixes,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for CommonAddOnManifest")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"name" => Ok(__FieldTag::__name),
"logoUrl" => Ok(__FieldTag::__logo_url),
"logo_url" => Ok(__FieldTag::__logo_url),
"layoutProperties" => Ok(__FieldTag::__layout_properties),
"layout_properties" => Ok(__FieldTag::__layout_properties),
"addOnWidgetSet" => Ok(__FieldTag::__add_on_widget_set),
"add_on_widget_set" => Ok(__FieldTag::__add_on_widget_set),
"useLocaleFromApp" => Ok(__FieldTag::__use_locale_from_app),
"use_locale_from_app" => Ok(__FieldTag::__use_locale_from_app),
"homepageTrigger" => Ok(__FieldTag::__homepage_trigger),
"homepage_trigger" => Ok(__FieldTag::__homepage_trigger),
"universalActions" => Ok(__FieldTag::__universal_actions),
"universal_actions" => Ok(__FieldTag::__universal_actions),
"openLinkUrlPrefixes" => Ok(__FieldTag::__open_link_url_prefixes),
"open_link_url_prefixes" => Ok(__FieldTag::__open_link_url_prefixes),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::CommonAddOnManifest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct CommonAddOnManifest")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__name => {
if !fields.insert(__FieldTag::__name) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for name",
));
}
result.name = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__logo_url => {
if !fields.insert(__FieldTag::__logo_url) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for logo_url",
));
}
result.logo_url = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__layout_properties => {
if !fields.insert(__FieldTag::__layout_properties) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for layout_properties",
));
}
result.layout_properties = map
.next_value::<std::option::Option<crate::model::LayoutProperties>>(
)?;
}
__FieldTag::__add_on_widget_set => {
if !fields.insert(__FieldTag::__add_on_widget_set) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for add_on_widget_set",
));
}
result.add_on_widget_set = map
.next_value::<std::option::Option<crate::model::AddOnWidgetSet>>(
)?;
}
__FieldTag::__use_locale_from_app => {
if !fields.insert(__FieldTag::__use_locale_from_app) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for use_locale_from_app",
));
}
result.use_locale_from_app = map
.next_value::<std::option::Option<bool>>()?
.unwrap_or_default();
}
__FieldTag::__homepage_trigger => {
if !fields.insert(__FieldTag::__homepage_trigger) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for homepage_trigger",
));
}
result.homepage_trigger = map.next_value::<std::option::Option<crate::model::HomepageExtensionPoint>>()?
;
}
__FieldTag::__universal_actions => {
if !fields.insert(__FieldTag::__universal_actions) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for universal_actions",
));
}
result.universal_actions = map
.next_value::<std::option::Option<
std::vec::Vec<crate::model::UniversalActionExtensionPoint>,
>>()?
.unwrap_or_default();
}
__FieldTag::__open_link_url_prefixes => {
if !fields.insert(__FieldTag::__open_link_url_prefixes) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for open_link_url_prefixes",
));
}
result.open_link_url_prefixes =
map.next_value::<std::option::Option<wkt::ListValue>>()?;
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::LayoutProperties {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__primary_color,
__secondary_color,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for LayoutProperties")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"primaryColor" => Ok(__FieldTag::__primary_color),
"primary_color" => Ok(__FieldTag::__primary_color),
"secondaryColor" => Ok(__FieldTag::__secondary_color),
"secondary_color" => Ok(__FieldTag::__secondary_color),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::LayoutProperties;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct LayoutProperties")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__primary_color => {
if !fields.insert(__FieldTag::__primary_color) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for primary_color",
));
}
result.primary_color = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__secondary_color => {
if !fields.insert(__FieldTag::__secondary_color) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for secondary_color",
));
}
result.secondary_color = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::HttpOptions {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__authorization_header,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for HttpOptions")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"authorizationHeader" => Ok(__FieldTag::__authorization_header),
"authorization_header" => Ok(__FieldTag::__authorization_header),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::HttpOptions;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct HttpOptions")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__authorization_header => {
if !fields.insert(__FieldTag::__authorization_header) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for authorization_header",
));
}
result.authorization_header = map.next_value::<std::option::Option<crate::model::HttpAuthorizationHeader>>()?.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}