#[allow(unused_imports)]
use super::*;
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::ListChildAccountsRequest {
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 {
__parent,
__label_id,
__full_name,
__page_size,
__page_token,
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 ListChildAccountsRequest")
}
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 {
"parent" => Ok(__FieldTag::__parent),
"labelId" => Ok(__FieldTag::__label_id),
"label_id" => Ok(__FieldTag::__label_id),
"fullName" => Ok(__FieldTag::__full_name),
"full_name" => Ok(__FieldTag::__full_name),
"pageSize" => Ok(__FieldTag::__page_size),
"page_size" => Ok(__FieldTag::__page_size),
"pageToken" => Ok(__FieldTag::__page_token),
"page_token" => Ok(__FieldTag::__page_token),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ListChildAccountsRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListChildAccountsRequest")
}
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::__parent => {
if !fields.insert(__FieldTag::__parent) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for parent",
));
}
result.parent = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__label_id => {
if !fields.insert(__FieldTag::__label_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for label_id",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.label_id = map.next_value::<__With>()?.0;
}
__FieldTag::__full_name => {
if !fields.insert(__FieldTag::__full_name) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for full_name",
));
}
result.full_name =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__page_size => {
if !fields.insert(__FieldTag::__page_size) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for page_size",
));
}
struct __With(std::option::Option<i32>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
}
}
result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__page_token => {
if !fields.insert(__FieldTag::__page_token) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for page_token",
));
}
result.page_token = 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::ListChildAccountsResponse {
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 {
__accounts,
__next_page_token,
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 ListChildAccountsResponse")
}
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 {
"accounts" => Ok(__FieldTag::__accounts),
"nextPageToken" => Ok(__FieldTag::__next_page_token),
"next_page_token" => Ok(__FieldTag::__next_page_token),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ListChildAccountsResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListChildAccountsResponse")
}
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::__accounts => {
if !fields.insert(__FieldTag::__accounts) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for accounts",
));
}
result.accounts = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Account>>>()?.unwrap_or_default();
}
__FieldTag::__next_page_token => {
if !fields.insert(__FieldTag::__next_page_token) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for next_page_token",
));
}
result.next_page_token = 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::GetAccountRequest {
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,
__parent,
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 GetAccountRequest")
}
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),
"parent" => Ok(__FieldTag::__parent),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::GetAccountRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GetAccountRequest")
}
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::__parent => {
if !fields.insert(__FieldTag::__parent) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for parent",
));
}
result.parent =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__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::UpdateAccountLabelsRequest {
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,
__label_ids,
__parent,
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 UpdateAccountLabelsRequest")
}
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),
"labelIds" => Ok(__FieldTag::__label_ids),
"label_ids" => Ok(__FieldTag::__label_ids),
"parent" => Ok(__FieldTag::__parent),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::UpdateAccountLabelsRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct UpdateAccountLabelsRequest")
}
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::__label_ids => {
if !fields.insert(__FieldTag::__label_ids) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for label_ids",
));
}
struct __With(std::option::Option<std::vec::Vec<i64>>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::<
std::option::Option<std::vec::Vec<wkt::internal::I64>>,
>::deserialize(deserializer)
.map(__With)
}
}
result.label_ids = map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__parent => {
if !fields.insert(__FieldTag::__parent) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for parent",
));
}
result.parent =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__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::Account {
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,
__full_name,
__display_name,
__homepage_uri,
__parent,
__label_ids,
__automatic_label_ids,
__account_type,
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 Account")
}
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),
"fullName" => Ok(__FieldTag::__full_name),
"full_name" => Ok(__FieldTag::__full_name),
"displayName" => Ok(__FieldTag::__display_name),
"display_name" => Ok(__FieldTag::__display_name),
"homepageUri" => Ok(__FieldTag::__homepage_uri),
"homepage_uri" => Ok(__FieldTag::__homepage_uri),
"parent" => Ok(__FieldTag::__parent),
"labelIds" => Ok(__FieldTag::__label_ids),
"label_ids" => Ok(__FieldTag::__label_ids),
"automaticLabelIds" => Ok(__FieldTag::__automatic_label_ids),
"automatic_label_ids" => Ok(__FieldTag::__automatic_label_ids),
"accountType" => Ok(__FieldTag::__account_type),
"account_type" => Ok(__FieldTag::__account_type),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::Account;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct Account")
}
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::__full_name => {
if !fields.insert(__FieldTag::__full_name) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for full_name",
));
}
result.full_name = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__display_name => {
if !fields.insert(__FieldTag::__display_name) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for display_name",
));
}
result.display_name =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__homepage_uri => {
if !fields.insert(__FieldTag::__homepage_uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for homepage_uri",
));
}
result.homepage_uri =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__parent => {
if !fields.insert(__FieldTag::__parent) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for parent",
));
}
result.parent =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__label_ids => {
if !fields.insert(__FieldTag::__label_ids) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for label_ids",
));
}
struct __With(std::option::Option<std::vec::Vec<i64>>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::<
std::option::Option<std::vec::Vec<wkt::internal::I64>>,
>::deserialize(deserializer)
.map(__With)
}
}
result.label_ids = map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__automatic_label_ids => {
if !fields.insert(__FieldTag::__automatic_label_ids) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for automatic_label_ids",
));
}
struct __With(std::option::Option<std::vec::Vec<i64>>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::<
std::option::Option<std::vec::Vec<wkt::internal::I64>>,
>::deserialize(deserializer)
.map(__With)
}
}
result.automatic_label_ids =
map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__account_type => {
if !fields.insert(__FieldTag::__account_type) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for account_type",
));
}
result.account_type = map.next_value::<std::option::Option<crate::model::account::AccountType>>()?.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::AccountLabel {
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,
__label_id,
__account_id,
__display_name,
__description,
__label_type,
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 AccountLabel")
}
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),
"labelId" => Ok(__FieldTag::__label_id),
"label_id" => Ok(__FieldTag::__label_id),
"accountId" => Ok(__FieldTag::__account_id),
"account_id" => Ok(__FieldTag::__account_id),
"displayName" => Ok(__FieldTag::__display_name),
"display_name" => Ok(__FieldTag::__display_name),
"description" => Ok(__FieldTag::__description),
"labelType" => Ok(__FieldTag::__label_type),
"label_type" => Ok(__FieldTag::__label_type),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::AccountLabel;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct AccountLabel")
}
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::__label_id => {
if !fields.insert(__FieldTag::__label_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for label_id",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.label_id = map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__account_id => {
if !fields.insert(__FieldTag::__account_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for account_id",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.account_id = map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__display_name => {
if !fields.insert(__FieldTag::__display_name) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for display_name",
));
}
result.display_name =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__description => {
if !fields.insert(__FieldTag::__description) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for description",
));
}
result.description =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__label_type => {
if !fields.insert(__FieldTag::__label_type) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for label_type",
));
}
result.label_type = map.next_value::<std::option::Option<crate::model::account_label::LabelType>>()?.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::ListAccountLabelsRequest {
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 {
__parent,
__page_size,
__page_token,
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 ListAccountLabelsRequest")
}
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 {
"parent" => Ok(__FieldTag::__parent),
"pageSize" => Ok(__FieldTag::__page_size),
"page_size" => Ok(__FieldTag::__page_size),
"pageToken" => Ok(__FieldTag::__page_token),
"page_token" => Ok(__FieldTag::__page_token),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ListAccountLabelsRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListAccountLabelsRequest")
}
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::__parent => {
if !fields.insert(__FieldTag::__parent) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for parent",
));
}
result.parent = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__page_size => {
if !fields.insert(__FieldTag::__page_size) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for page_size",
));
}
struct __With(std::option::Option<i32>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
}
}
result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__page_token => {
if !fields.insert(__FieldTag::__page_token) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for page_token",
));
}
result.page_token = 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::ListAccountLabelsResponse {
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 {
__account_labels,
__next_page_token,
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 ListAccountLabelsResponse")
}
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 {
"accountLabels" => Ok(__FieldTag::__account_labels),
"account_labels" => Ok(__FieldTag::__account_labels),
"nextPageToken" => Ok(__FieldTag::__next_page_token),
"next_page_token" => Ok(__FieldTag::__next_page_token),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ListAccountLabelsResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListAccountLabelsResponse")
}
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::__account_labels => {
if !fields.insert(__FieldTag::__account_labels) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for account_labels",
));
}
result.account_labels = map.next_value::<std::option::Option<std::vec::Vec<crate::model::AccountLabel>>>()?.unwrap_or_default();
}
__FieldTag::__next_page_token => {
if !fields.insert(__FieldTag::__next_page_token) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for next_page_token",
));
}
result.next_page_token = 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::CreateAccountLabelRequest {
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 {
__parent,
__account_label,
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 CreateAccountLabelRequest")
}
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 {
"parent" => Ok(__FieldTag::__parent),
"accountLabel" => Ok(__FieldTag::__account_label),
"account_label" => Ok(__FieldTag::__account_label),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::CreateAccountLabelRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct CreateAccountLabelRequest")
}
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::__parent => {
if !fields.insert(__FieldTag::__parent) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for parent",
));
}
result.parent = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__account_label => {
if !fields.insert(__FieldTag::__account_label) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for account_label",
));
}
result.account_label = map
.next_value::<std::option::Option<crate::model::AccountLabel>>()?;
}
__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::UpdateAccountLabelRequest {
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 {
__account_label,
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 UpdateAccountLabelRequest")
}
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 {
"accountLabel" => Ok(__FieldTag::__account_label),
"account_label" => Ok(__FieldTag::__account_label),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::UpdateAccountLabelRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct UpdateAccountLabelRequest")
}
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::__account_label => {
if !fields.insert(__FieldTag::__account_label) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for account_label",
));
}
result.account_label = map
.next_value::<std::option::Option<crate::model::AccountLabel>>()?;
}
__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::DeleteAccountLabelRequest {
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,
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 DeleteAccountLabelRequest")
}
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),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::DeleteAccountLabelRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct DeleteAccountLabelRequest")
}
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::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::Attributes {
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 {
__cpp_link,
__cpp_mobile_link,
__cpp_ads_redirect,
__low_price,
__high_price,
__number_of_offers,
__headline_offer_condition,
__headline_offer_price,
__headline_offer_link,
__headline_offer_mobile_link,
__headline_offer_shipping_price,
__title,
__image_link,
__additional_image_links,
__description,
__brand,
__mpn,
__gtin,
__product_types,
__google_product_category,
__adult,
__multipack,
__is_bundle,
__age_group,
__color,
__gender,
__material,
__pattern,
__size,
__size_system,
__size_types,
__item_group_id,
__product_details,
__product_weight,
__product_length,
__product_width,
__product_height,
__product_highlights,
__certifications,
__expiration_date,
__included_destinations,
__excluded_destinations,
__pause,
__custom_label_0,
__custom_label_1,
__custom_label_2,
__custom_label_3,
__custom_label_4,
__headline_offer_installment,
__headline_offer_subscription_cost,
__review_count,
__min_rating,
__max_rating,
__rating,
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 Attributes")
}
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 {
"cppLink" => Ok(__FieldTag::__cpp_link),
"cpp_link" => Ok(__FieldTag::__cpp_link),
"cppMobileLink" => Ok(__FieldTag::__cpp_mobile_link),
"cpp_mobile_link" => Ok(__FieldTag::__cpp_mobile_link),
"cppAdsRedirect" => Ok(__FieldTag::__cpp_ads_redirect),
"cpp_ads_redirect" => Ok(__FieldTag::__cpp_ads_redirect),
"lowPrice" => Ok(__FieldTag::__low_price),
"low_price" => Ok(__FieldTag::__low_price),
"highPrice" => Ok(__FieldTag::__high_price),
"high_price" => Ok(__FieldTag::__high_price),
"numberOfOffers" => Ok(__FieldTag::__number_of_offers),
"number_of_offers" => Ok(__FieldTag::__number_of_offers),
"headlineOfferCondition" => Ok(__FieldTag::__headline_offer_condition),
"headline_offer_condition" => {
Ok(__FieldTag::__headline_offer_condition)
}
"headlineOfferPrice" => Ok(__FieldTag::__headline_offer_price),
"headline_offer_price" => Ok(__FieldTag::__headline_offer_price),
"headlineOfferLink" => Ok(__FieldTag::__headline_offer_link),
"headline_offer_link" => Ok(__FieldTag::__headline_offer_link),
"headlineOfferMobileLink" => {
Ok(__FieldTag::__headline_offer_mobile_link)
}
"headline_offer_mobile_link" => {
Ok(__FieldTag::__headline_offer_mobile_link)
}
"headlineOfferShippingPrice" => {
Ok(__FieldTag::__headline_offer_shipping_price)
}
"headline_offer_shipping_price" => {
Ok(__FieldTag::__headline_offer_shipping_price)
}
"title" => Ok(__FieldTag::__title),
"imageLink" => Ok(__FieldTag::__image_link),
"image_link" => Ok(__FieldTag::__image_link),
"additionalImageLinks" => Ok(__FieldTag::__additional_image_links),
"additional_image_links" => Ok(__FieldTag::__additional_image_links),
"description" => Ok(__FieldTag::__description),
"brand" => Ok(__FieldTag::__brand),
"mpn" => Ok(__FieldTag::__mpn),
"gtin" => Ok(__FieldTag::__gtin),
"productTypes" => Ok(__FieldTag::__product_types),
"product_types" => Ok(__FieldTag::__product_types),
"googleProductCategory" => Ok(__FieldTag::__google_product_category),
"google_product_category" => Ok(__FieldTag::__google_product_category),
"adult" => Ok(__FieldTag::__adult),
"multipack" => Ok(__FieldTag::__multipack),
"isBundle" => Ok(__FieldTag::__is_bundle),
"is_bundle" => Ok(__FieldTag::__is_bundle),
"ageGroup" => Ok(__FieldTag::__age_group),
"age_group" => Ok(__FieldTag::__age_group),
"color" => Ok(__FieldTag::__color),
"gender" => Ok(__FieldTag::__gender),
"material" => Ok(__FieldTag::__material),
"pattern" => Ok(__FieldTag::__pattern),
"size" => Ok(__FieldTag::__size),
"sizeSystem" => Ok(__FieldTag::__size_system),
"size_system" => Ok(__FieldTag::__size_system),
"sizeTypes" => Ok(__FieldTag::__size_types),
"size_types" => Ok(__FieldTag::__size_types),
"itemGroupId" => Ok(__FieldTag::__item_group_id),
"item_group_id" => Ok(__FieldTag::__item_group_id),
"productDetails" => Ok(__FieldTag::__product_details),
"product_details" => Ok(__FieldTag::__product_details),
"productWeight" => Ok(__FieldTag::__product_weight),
"product_weight" => Ok(__FieldTag::__product_weight),
"productLength" => Ok(__FieldTag::__product_length),
"product_length" => Ok(__FieldTag::__product_length),
"productWidth" => Ok(__FieldTag::__product_width),
"product_width" => Ok(__FieldTag::__product_width),
"productHeight" => Ok(__FieldTag::__product_height),
"product_height" => Ok(__FieldTag::__product_height),
"productHighlights" => Ok(__FieldTag::__product_highlights),
"product_highlights" => Ok(__FieldTag::__product_highlights),
"certifications" => Ok(__FieldTag::__certifications),
"expirationDate" => Ok(__FieldTag::__expiration_date),
"expiration_date" => Ok(__FieldTag::__expiration_date),
"includedDestinations" => Ok(__FieldTag::__included_destinations),
"included_destinations" => Ok(__FieldTag::__included_destinations),
"excludedDestinations" => Ok(__FieldTag::__excluded_destinations),
"excluded_destinations" => Ok(__FieldTag::__excluded_destinations),
"pause" => Ok(__FieldTag::__pause),
"customLabel0" => Ok(__FieldTag::__custom_label_0),
"custom_label_0" => Ok(__FieldTag::__custom_label_0),
"customLabel1" => Ok(__FieldTag::__custom_label_1),
"custom_label_1" => Ok(__FieldTag::__custom_label_1),
"customLabel2" => Ok(__FieldTag::__custom_label_2),
"custom_label_2" => Ok(__FieldTag::__custom_label_2),
"customLabel3" => Ok(__FieldTag::__custom_label_3),
"custom_label_3" => Ok(__FieldTag::__custom_label_3),
"customLabel4" => Ok(__FieldTag::__custom_label_4),
"custom_label_4" => Ok(__FieldTag::__custom_label_4),
"headlineOfferInstallment" => {
Ok(__FieldTag::__headline_offer_installment)
}
"headline_offer_installment" => {
Ok(__FieldTag::__headline_offer_installment)
}
"headlineOfferSubscriptionCost" => {
Ok(__FieldTag::__headline_offer_subscription_cost)
}
"headline_offer_subscription_cost" => {
Ok(__FieldTag::__headline_offer_subscription_cost)
}
"reviewCount" => Ok(__FieldTag::__review_count),
"review_count" => Ok(__FieldTag::__review_count),
"minRating" => Ok(__FieldTag::__min_rating),
"min_rating" => Ok(__FieldTag::__min_rating),
"maxRating" => Ok(__FieldTag::__max_rating),
"max_rating" => Ok(__FieldTag::__max_rating),
"rating" => Ok(__FieldTag::__rating),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::Attributes;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct Attributes")
}
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::__cpp_link => {
if !fields.insert(__FieldTag::__cpp_link) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for cpp_link",
));
}
result.cpp_link =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__cpp_mobile_link => {
if !fields.insert(__FieldTag::__cpp_mobile_link) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for cpp_mobile_link",
));
}
result.cpp_mobile_link =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__cpp_ads_redirect => {
if !fields.insert(__FieldTag::__cpp_ads_redirect) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for cpp_ads_redirect",
));
}
result.cpp_ads_redirect =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__low_price => {
if !fields.insert(__FieldTag::__low_price) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for low_price",
));
}
result.low_price = map.next_value::<std::option::Option<google_shopping_type::model::Price>>()?
;
}
__FieldTag::__high_price => {
if !fields.insert(__FieldTag::__high_price) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for high_price",
));
}
result.high_price = map.next_value::<std::option::Option<google_shopping_type::model::Price>>()?
;
}
__FieldTag::__number_of_offers => {
if !fields.insert(__FieldTag::__number_of_offers) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for number_of_offers",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.number_of_offers = map.next_value::<__With>()?.0;
}
__FieldTag::__headline_offer_condition => {
if !fields.insert(__FieldTag::__headline_offer_condition) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for headline_offer_condition",
));
}
result.headline_offer_condition =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__headline_offer_price => {
if !fields.insert(__FieldTag::__headline_offer_price) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for headline_offer_price",
));
}
result.headline_offer_price = map.next_value::<std::option::Option<google_shopping_type::model::Price>>()?
;
}
__FieldTag::__headline_offer_link => {
if !fields.insert(__FieldTag::__headline_offer_link) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for headline_offer_link",
));
}
result.headline_offer_link =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__headline_offer_mobile_link => {
if !fields.insert(__FieldTag::__headline_offer_mobile_link) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for headline_offer_mobile_link",
));
}
result.headline_offer_mobile_link =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__headline_offer_shipping_price => {
if !fields.insert(__FieldTag::__headline_offer_shipping_price) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for headline_offer_shipping_price",
));
}
result.headline_offer_shipping_price = map.next_value::<std::option::Option<google_shopping_type::model::Price>>()?
;
}
__FieldTag::__title => {
if !fields.insert(__FieldTag::__title) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for title",
));
}
result.title =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__image_link => {
if !fields.insert(__FieldTag::__image_link) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for image_link",
));
}
result.image_link =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__additional_image_links => {
if !fields.insert(__FieldTag::__additional_image_links) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for additional_image_links",
));
}
result.additional_image_links = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
}
__FieldTag::__description => {
if !fields.insert(__FieldTag::__description) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for description",
));
}
result.description =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__brand => {
if !fields.insert(__FieldTag::__brand) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for brand",
));
}
result.brand =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__mpn => {
if !fields.insert(__FieldTag::__mpn) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for mpn",
));
}
result.mpn =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__gtin => {
if !fields.insert(__FieldTag::__gtin) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for gtin",
));
}
result.gtin =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__product_types => {
if !fields.insert(__FieldTag::__product_types) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for product_types",
));
}
result.product_types = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
}
__FieldTag::__google_product_category => {
if !fields.insert(__FieldTag::__google_product_category) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for google_product_category",
));
}
result.google_product_category =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__adult => {
if !fields.insert(__FieldTag::__adult) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for adult",
));
}
result.adult = map.next_value::<std::option::Option<bool>>()?;
}
__FieldTag::__multipack => {
if !fields.insert(__FieldTag::__multipack) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for multipack",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.multipack = map.next_value::<__With>()?.0;
}
__FieldTag::__is_bundle => {
if !fields.insert(__FieldTag::__is_bundle) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for is_bundle",
));
}
result.is_bundle = map.next_value::<std::option::Option<bool>>()?;
}
__FieldTag::__age_group => {
if !fields.insert(__FieldTag::__age_group) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for age_group",
));
}
result.age_group =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__color => {
if !fields.insert(__FieldTag::__color) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for color",
));
}
result.color =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__gender => {
if !fields.insert(__FieldTag::__gender) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for gender",
));
}
result.gender =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__material => {
if !fields.insert(__FieldTag::__material) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for material",
));
}
result.material =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__pattern => {
if !fields.insert(__FieldTag::__pattern) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for pattern",
));
}
result.pattern =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__size => {
if !fields.insert(__FieldTag::__size) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for size",
));
}
result.size =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__size_system => {
if !fields.insert(__FieldTag::__size_system) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for size_system",
));
}
result.size_system =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__size_types => {
if !fields.insert(__FieldTag::__size_types) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for size_types",
));
}
result.size_types = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
}
__FieldTag::__item_group_id => {
if !fields.insert(__FieldTag::__item_group_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for item_group_id",
));
}
result.item_group_id =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__product_details => {
if !fields.insert(__FieldTag::__product_details) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for product_details",
));
}
result.product_details = map.next_value::<std::option::Option<std::vec::Vec<crate::model::ProductDetail>>>()?.unwrap_or_default();
}
__FieldTag::__product_weight => {
if !fields.insert(__FieldTag::__product_weight) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for product_weight",
));
}
result.product_weight = map
.next_value::<std::option::Option<crate::model::ProductWeight>>()?;
}
__FieldTag::__product_length => {
if !fields.insert(__FieldTag::__product_length) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for product_length",
));
}
result.product_length = map
.next_value::<std::option::Option<crate::model::ProductDimension>>(
)?;
}
__FieldTag::__product_width => {
if !fields.insert(__FieldTag::__product_width) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for product_width",
));
}
result.product_width = map
.next_value::<std::option::Option<crate::model::ProductDimension>>(
)?;
}
__FieldTag::__product_height => {
if !fields.insert(__FieldTag::__product_height) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for product_height",
));
}
result.product_height = map
.next_value::<std::option::Option<crate::model::ProductDimension>>(
)?;
}
__FieldTag::__product_highlights => {
if !fields.insert(__FieldTag::__product_highlights) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for product_highlights",
));
}
result.product_highlights = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
}
__FieldTag::__certifications => {
if !fields.insert(__FieldTag::__certifications) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for certifications",
));
}
result.certifications = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Certification>>>()?.unwrap_or_default();
}
__FieldTag::__expiration_date => {
if !fields.insert(__FieldTag::__expiration_date) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for expiration_date",
));
}
result.expiration_date =
map.next_value::<std::option::Option<wkt::Timestamp>>()?;
}
__FieldTag::__included_destinations => {
if !fields.insert(__FieldTag::__included_destinations) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for included_destinations",
));
}
result.included_destinations = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
}
__FieldTag::__excluded_destinations => {
if !fields.insert(__FieldTag::__excluded_destinations) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for excluded_destinations",
));
}
result.excluded_destinations = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
}
__FieldTag::__pause => {
if !fields.insert(__FieldTag::__pause) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for pause",
));
}
result.pause =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__custom_label_0 => {
if !fields.insert(__FieldTag::__custom_label_0) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for custom_label_0",
));
}
result.custom_label_0 =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__custom_label_1 => {
if !fields.insert(__FieldTag::__custom_label_1) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for custom_label_1",
));
}
result.custom_label_1 =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__custom_label_2 => {
if !fields.insert(__FieldTag::__custom_label_2) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for custom_label_2",
));
}
result.custom_label_2 =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__custom_label_3 => {
if !fields.insert(__FieldTag::__custom_label_3) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for custom_label_3",
));
}
result.custom_label_3 =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__custom_label_4 => {
if !fields.insert(__FieldTag::__custom_label_4) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for custom_label_4",
));
}
result.custom_label_4 =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::__headline_offer_installment => {
if !fields.insert(__FieldTag::__headline_offer_installment) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for headline_offer_installment",
));
}
result.headline_offer_installment = map.next_value::<std::option::Option<crate::model::HeadlineOfferInstallment>>()?
;
}
__FieldTag::__headline_offer_subscription_cost => {
if !fields.insert(__FieldTag::__headline_offer_subscription_cost) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for headline_offer_subscription_cost",
));
}
result.headline_offer_subscription_cost =
map.next_value::<std::option::Option<
crate::model::HeadlineOfferSubscriptionCost,
>>()?;
}
__FieldTag::__review_count => {
if !fields.insert(__FieldTag::__review_count) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for review_count",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.review_count = map.next_value::<__With>()?.0;
}
__FieldTag::__min_rating => {
if !fields.insert(__FieldTag::__min_rating) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for min_rating",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.min_rating = map.next_value::<__With>()?.0;
}
__FieldTag::__max_rating => {
if !fields.insert(__FieldTag::__max_rating) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for max_rating",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.max_rating = map.next_value::<__With>()?.0;
}
__FieldTag::__rating => {
if !fields.insert(__FieldTag::__rating) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for rating",
));
}
struct __With(std::option::Option<f64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::F64> >::deserialize(deserializer).map(__With)
}
}
result.rating = map.next_value::<__With>()?.0;
}
__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::Certification {
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,
__authority,
__code,
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 Certification")
}
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),
"authority" => Ok(__FieldTag::__authority),
"code" => Ok(__FieldTag::__code),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::Certification;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct Certification")
}
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::__authority => {
if !fields.insert(__FieldTag::__authority) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for authority",
));
}
result.authority = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__code => {
if !fields.insert(__FieldTag::__code) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for code",
));
}
result.code = 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::ProductDetail {
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 {
__section_name,
__attribute_name,
__attribute_value,
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 ProductDetail")
}
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 {
"sectionName" => Ok(__FieldTag::__section_name),
"section_name" => Ok(__FieldTag::__section_name),
"attributeName" => Ok(__FieldTag::__attribute_name),
"attribute_name" => Ok(__FieldTag::__attribute_name),
"attributeValue" => Ok(__FieldTag::__attribute_value),
"attribute_value" => Ok(__FieldTag::__attribute_value),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ProductDetail;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ProductDetail")
}
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::__section_name => {
if !fields.insert(__FieldTag::__section_name) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for section_name",
));
}
result.section_name = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__attribute_name => {
if !fields.insert(__FieldTag::__attribute_name) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for attribute_name",
));
}
result.attribute_name = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__attribute_value => {
if !fields.insert(__FieldTag::__attribute_value) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for attribute_value",
));
}
result.attribute_value = 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::ProductDimension {
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 {
__value,
__unit,
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 ProductDimension")
}
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 {
"value" => Ok(__FieldTag::__value),
"unit" => Ok(__FieldTag::__unit),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ProductDimension;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ProductDimension")
}
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::__value => {
if !fields.insert(__FieldTag::__value) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for value",
));
}
struct __With(std::option::Option<f64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::F64> >::deserialize(deserializer).map(__With)
}
}
result.value = map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__unit => {
if !fields.insert(__FieldTag::__unit) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for unit",
));
}
result.unit = 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::ProductWeight {
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 {
__value,
__unit,
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 ProductWeight")
}
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 {
"value" => Ok(__FieldTag::__value),
"unit" => Ok(__FieldTag::__unit),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ProductWeight;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ProductWeight")
}
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::__value => {
if !fields.insert(__FieldTag::__value) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for value",
));
}
struct __With(std::option::Option<f64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::F64> >::deserialize(deserializer).map(__With)
}
}
result.value = map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__unit => {
if !fields.insert(__FieldTag::__unit) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for unit",
));
}
result.unit = 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::CssProductStatus {
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 {
__destination_statuses,
__item_level_issues,
__creation_date,
__last_update_date,
__google_expiration_date,
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 CssProductStatus")
}
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 {
"destinationStatuses" => Ok(__FieldTag::__destination_statuses),
"destination_statuses" => Ok(__FieldTag::__destination_statuses),
"itemLevelIssues" => Ok(__FieldTag::__item_level_issues),
"item_level_issues" => Ok(__FieldTag::__item_level_issues),
"creationDate" => Ok(__FieldTag::__creation_date),
"creation_date" => Ok(__FieldTag::__creation_date),
"lastUpdateDate" => Ok(__FieldTag::__last_update_date),
"last_update_date" => Ok(__FieldTag::__last_update_date),
"googleExpirationDate" => Ok(__FieldTag::__google_expiration_date),
"google_expiration_date" => Ok(__FieldTag::__google_expiration_date),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::CssProductStatus;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct CssProductStatus")
}
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::__destination_statuses => {
if !fields.insert(__FieldTag::__destination_statuses) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for destination_statuses",
));
}
result.destination_statuses = map
.next_value::<std::option::Option<
std::vec::Vec<
crate::model::css_product_status::DestinationStatus,
>,
>>()?
.unwrap_or_default();
}
__FieldTag::__item_level_issues => {
if !fields.insert(__FieldTag::__item_level_issues) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for item_level_issues",
));
}
result.item_level_issues = map
.next_value::<std::option::Option<
std::vec::Vec<crate::model::css_product_status::ItemLevelIssue>,
>>()?
.unwrap_or_default();
}
__FieldTag::__creation_date => {
if !fields.insert(__FieldTag::__creation_date) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for creation_date",
));
}
result.creation_date =
map.next_value::<std::option::Option<wkt::Timestamp>>()?;
}
__FieldTag::__last_update_date => {
if !fields.insert(__FieldTag::__last_update_date) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for last_update_date",
));
}
result.last_update_date =
map.next_value::<std::option::Option<wkt::Timestamp>>()?;
}
__FieldTag::__google_expiration_date => {
if !fields.insert(__FieldTag::__google_expiration_date) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for google_expiration_date",
));
}
result.google_expiration_date =
map.next_value::<std::option::Option<wkt::Timestamp>>()?;
}
__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::css_product_status::DestinationStatus {
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 {
__destination,
__approved_countries,
__pending_countries,
__disapproved_countries,
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 DestinationStatus")
}
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 {
"destination" => Ok(__FieldTag::__destination),
"approvedCountries" => Ok(__FieldTag::__approved_countries),
"approved_countries" => Ok(__FieldTag::__approved_countries),
"pendingCountries" => Ok(__FieldTag::__pending_countries),
"pending_countries" => Ok(__FieldTag::__pending_countries),
"disapprovedCountries" => Ok(__FieldTag::__disapproved_countries),
"disapproved_countries" => Ok(__FieldTag::__disapproved_countries),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::css_product_status::DestinationStatus;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct DestinationStatus")
}
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::__destination => {
if !fields.insert(__FieldTag::__destination) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for destination",
));
}
result.destination = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__approved_countries => {
if !fields.insert(__FieldTag::__approved_countries) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for approved_countries",
));
}
result.approved_countries = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
}
__FieldTag::__pending_countries => {
if !fields.insert(__FieldTag::__pending_countries) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for pending_countries",
));
}
result.pending_countries = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
}
__FieldTag::__disapproved_countries => {
if !fields.insert(__FieldTag::__disapproved_countries) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for disapproved_countries",
));
}
result.disapproved_countries = map.next_value::<std::option::Option<std::vec::Vec<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::css_product_status::ItemLevelIssue {
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 {
__code,
__servability,
__resolution,
__attribute,
__destination,
__description,
__detail,
__documentation,
__applicable_countries,
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 ItemLevelIssue")
}
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 {
"code" => Ok(__FieldTag::__code),
"servability" => Ok(__FieldTag::__servability),
"resolution" => Ok(__FieldTag::__resolution),
"attribute" => Ok(__FieldTag::__attribute),
"destination" => Ok(__FieldTag::__destination),
"description" => Ok(__FieldTag::__description),
"detail" => Ok(__FieldTag::__detail),
"documentation" => Ok(__FieldTag::__documentation),
"applicableCountries" => Ok(__FieldTag::__applicable_countries),
"applicable_countries" => Ok(__FieldTag::__applicable_countries),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::css_product_status::ItemLevelIssue;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ItemLevelIssue")
}
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::__code => {
if !fields.insert(__FieldTag::__code) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for code",
));
}
result.code = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__servability => {
if !fields.insert(__FieldTag::__servability) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for servability",
));
}
result.servability = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__resolution => {
if !fields.insert(__FieldTag::__resolution) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for resolution",
));
}
result.resolution = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__attribute => {
if !fields.insert(__FieldTag::__attribute) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for attribute",
));
}
result.attribute = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__destination => {
if !fields.insert(__FieldTag::__destination) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for destination",
));
}
result.destination = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__description => {
if !fields.insert(__FieldTag::__description) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for description",
));
}
result.description = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__detail => {
if !fields.insert(__FieldTag::__detail) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for detail",
));
}
result.detail = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__documentation => {
if !fields.insert(__FieldTag::__documentation) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for documentation",
));
}
result.documentation = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__applicable_countries => {
if !fields.insert(__FieldTag::__applicable_countries) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for applicable_countries",
));
}
result.applicable_countries = map.next_value::<std::option::Option<std::vec::Vec<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::HeadlineOfferSubscriptionCost {
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 {
__period,
__period_length,
__amount,
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 HeadlineOfferSubscriptionCost")
}
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 {
"period" => Ok(__FieldTag::__period),
"periodLength" => Ok(__FieldTag::__period_length),
"period_length" => Ok(__FieldTag::__period_length),
"amount" => Ok(__FieldTag::__amount),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::HeadlineOfferSubscriptionCost;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct HeadlineOfferSubscriptionCost")
}
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::__period => {
if !fields.insert(__FieldTag::__period) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for period",
));
}
result.period = map.next_value::<std::option::Option<crate::model::SubscriptionPeriod>>()?.unwrap_or_default();
}
__FieldTag::__period_length => {
if !fields.insert(__FieldTag::__period_length) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for period_length",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.period_length =
map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__amount => {
if !fields.insert(__FieldTag::__amount) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for amount",
));
}
result.amount = map.next_value::<std::option::Option<google_shopping_type::model::Price>>()?
;
}
__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::HeadlineOfferInstallment {
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 {
__months,
__amount,
__downpayment,
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 HeadlineOfferInstallment")
}
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 {
"months" => Ok(__FieldTag::__months),
"amount" => Ok(__FieldTag::__amount),
"downpayment" => Ok(__FieldTag::__downpayment),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::HeadlineOfferInstallment;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct HeadlineOfferInstallment")
}
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::__months => {
if !fields.insert(__FieldTag::__months) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for months",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.months = map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__amount => {
if !fields.insert(__FieldTag::__amount) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for amount",
));
}
result.amount = map.next_value::<std::option::Option<google_shopping_type::model::Price>>()?
;
}
__FieldTag::__downpayment => {
if !fields.insert(__FieldTag::__downpayment) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for downpayment",
));
}
result.downpayment = map.next_value::<std::option::Option<google_shopping_type::model::Price>>()?
;
}
__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::CssProductInput {
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,
__final_name,
__raw_provided_id,
__content_language,
__feed_label,
__freshness_time,
__attributes,
__custom_attributes,
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 CssProductInput")
}
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),
"finalName" => Ok(__FieldTag::__final_name),
"final_name" => Ok(__FieldTag::__final_name),
"rawProvidedId" => Ok(__FieldTag::__raw_provided_id),
"raw_provided_id" => Ok(__FieldTag::__raw_provided_id),
"contentLanguage" => Ok(__FieldTag::__content_language),
"content_language" => Ok(__FieldTag::__content_language),
"feedLabel" => Ok(__FieldTag::__feed_label),
"feed_label" => Ok(__FieldTag::__feed_label),
"freshnessTime" => Ok(__FieldTag::__freshness_time),
"freshness_time" => Ok(__FieldTag::__freshness_time),
"attributes" => Ok(__FieldTag::__attributes),
"customAttributes" => Ok(__FieldTag::__custom_attributes),
"custom_attributes" => Ok(__FieldTag::__custom_attributes),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::CssProductInput;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct CssProductInput")
}
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::__final_name => {
if !fields.insert(__FieldTag::__final_name) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for final_name",
));
}
result.final_name = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__raw_provided_id => {
if !fields.insert(__FieldTag::__raw_provided_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for raw_provided_id",
));
}
result.raw_provided_id = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__content_language => {
if !fields.insert(__FieldTag::__content_language) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for content_language",
));
}
result.content_language = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__feed_label => {
if !fields.insert(__FieldTag::__feed_label) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for feed_label",
));
}
result.feed_label = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__freshness_time => {
if !fields.insert(__FieldTag::__freshness_time) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for freshness_time",
));
}
result.freshness_time =
map.next_value::<std::option::Option<wkt::Timestamp>>()?;
}
__FieldTag::__attributes => {
if !fields.insert(__FieldTag::__attributes) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for attributes",
));
}
result.attributes =
map.next_value::<std::option::Option<crate::model::Attributes>>()?;
}
__FieldTag::__custom_attributes => {
if !fields.insert(__FieldTag::__custom_attributes) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for custom_attributes",
));
}
result.custom_attributes = map
.next_value::<std::option::Option<
std::vec::Vec<google_shopping_type::model::CustomAttribute>,
>>()?
.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::InsertCssProductInputRequest {
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 {
__parent,
__css_product_input,
__feed_id,
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 InsertCssProductInputRequest")
}
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 {
"parent" => Ok(__FieldTag::__parent),
"cssProductInput" => Ok(__FieldTag::__css_product_input),
"css_product_input" => Ok(__FieldTag::__css_product_input),
"feedId" => Ok(__FieldTag::__feed_id),
"feed_id" => Ok(__FieldTag::__feed_id),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::InsertCssProductInputRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct InsertCssProductInputRequest")
}
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::__parent => {
if !fields.insert(__FieldTag::__parent) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for parent",
));
}
result.parent = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__css_product_input => {
if !fields.insert(__FieldTag::__css_product_input) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for css_product_input",
));
}
result.css_product_input = map
.next_value::<std::option::Option<crate::model::CssProductInput>>(
)?;
}
__FieldTag::__feed_id => {
if !fields.insert(__FieldTag::__feed_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for feed_id",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.feed_id = map.next_value::<__With>()?.0.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::UpdateCssProductInputRequest {
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 {
__css_product_input,
__update_mask,
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 UpdateCssProductInputRequest")
}
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 {
"cssProductInput" => Ok(__FieldTag::__css_product_input),
"css_product_input" => Ok(__FieldTag::__css_product_input),
"updateMask" => Ok(__FieldTag::__update_mask),
"update_mask" => Ok(__FieldTag::__update_mask),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::UpdateCssProductInputRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct UpdateCssProductInputRequest")
}
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::__css_product_input => {
if !fields.insert(__FieldTag::__css_product_input) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for css_product_input",
));
}
result.css_product_input = map
.next_value::<std::option::Option<crate::model::CssProductInput>>(
)?;
}
__FieldTag::__update_mask => {
if !fields.insert(__FieldTag::__update_mask) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for update_mask",
));
}
result.update_mask =
map.next_value::<std::option::Option<wkt::FieldMask>>()?;
}
__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::DeleteCssProductInputRequest {
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,
__supplemental_feed_id,
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 DeleteCssProductInputRequest")
}
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),
"supplementalFeedId" => Ok(__FieldTag::__supplemental_feed_id),
"supplemental_feed_id" => Ok(__FieldTag::__supplemental_feed_id),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::DeleteCssProductInputRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct DeleteCssProductInputRequest")
}
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::__supplemental_feed_id => {
if !fields.insert(__FieldTag::__supplemental_feed_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for supplemental_feed_id",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.supplemental_feed_id = map.next_value::<__With>()?.0;
}
__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::GetCssProductRequest {
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,
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 GetCssProductRequest")
}
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),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::GetCssProductRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GetCssProductRequest")
}
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::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::CssProduct {
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,
__raw_provided_id,
__content_language,
__feed_label,
__attributes,
__custom_attributes,
__css_product_status,
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 CssProduct")
}
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),
"rawProvidedId" => Ok(__FieldTag::__raw_provided_id),
"raw_provided_id" => Ok(__FieldTag::__raw_provided_id),
"contentLanguage" => Ok(__FieldTag::__content_language),
"content_language" => Ok(__FieldTag::__content_language),
"feedLabel" => Ok(__FieldTag::__feed_label),
"feed_label" => Ok(__FieldTag::__feed_label),
"attributes" => Ok(__FieldTag::__attributes),
"customAttributes" => Ok(__FieldTag::__custom_attributes),
"custom_attributes" => Ok(__FieldTag::__custom_attributes),
"cssProductStatus" => Ok(__FieldTag::__css_product_status),
"css_product_status" => Ok(__FieldTag::__css_product_status),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::CssProduct;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct CssProduct")
}
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::__raw_provided_id => {
if !fields.insert(__FieldTag::__raw_provided_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for raw_provided_id",
));
}
result.raw_provided_id = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__content_language => {
if !fields.insert(__FieldTag::__content_language) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for content_language",
));
}
result.content_language = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__feed_label => {
if !fields.insert(__FieldTag::__feed_label) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for feed_label",
));
}
result.feed_label = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__attributes => {
if !fields.insert(__FieldTag::__attributes) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for attributes",
));
}
result.attributes =
map.next_value::<std::option::Option<crate::model::Attributes>>()?;
}
__FieldTag::__custom_attributes => {
if !fields.insert(__FieldTag::__custom_attributes) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for custom_attributes",
));
}
result.custom_attributes = map
.next_value::<std::option::Option<
std::vec::Vec<google_shopping_type::model::CustomAttribute>,
>>()?
.unwrap_or_default();
}
__FieldTag::__css_product_status => {
if !fields.insert(__FieldTag::__css_product_status) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for css_product_status",
));
}
result.css_product_status = map
.next_value::<std::option::Option<crate::model::CssProductStatus>>(
)?;
}
__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::ListCssProductsRequest {
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 {
__parent,
__page_size,
__page_token,
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 ListCssProductsRequest")
}
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 {
"parent" => Ok(__FieldTag::__parent),
"pageSize" => Ok(__FieldTag::__page_size),
"page_size" => Ok(__FieldTag::__page_size),
"pageToken" => Ok(__FieldTag::__page_token),
"page_token" => Ok(__FieldTag::__page_token),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ListCssProductsRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListCssProductsRequest")
}
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::__parent => {
if !fields.insert(__FieldTag::__parent) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for parent",
));
}
result.parent = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__page_size => {
if !fields.insert(__FieldTag::__page_size) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for page_size",
));
}
struct __With(std::option::Option<i32>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
}
}
result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__page_token => {
if !fields.insert(__FieldTag::__page_token) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for page_token",
));
}
result.page_token = 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::ListCssProductsResponse {
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 {
__css_products,
__next_page_token,
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 ListCssProductsResponse")
}
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 {
"cssProducts" => Ok(__FieldTag::__css_products),
"css_products" => Ok(__FieldTag::__css_products),
"nextPageToken" => Ok(__FieldTag::__next_page_token),
"next_page_token" => Ok(__FieldTag::__next_page_token),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ListCssProductsResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListCssProductsResponse")
}
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::__css_products => {
if !fields.insert(__FieldTag::__css_products) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for css_products",
));
}
result.css_products = map.next_value::<std::option::Option<std::vec::Vec<crate::model::CssProduct>>>()?.unwrap_or_default();
}
__FieldTag::__next_page_token => {
if !fields.insert(__FieldTag::__next_page_token) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for next_page_token",
));
}
result.next_page_token = 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::QuotaGroup {
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,
__quota_usage,
__quota_limit,
__quota_minute_limit,
__method_details,
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 QuotaGroup")
}
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),
"quotaUsage" => Ok(__FieldTag::__quota_usage),
"quota_usage" => Ok(__FieldTag::__quota_usage),
"quotaLimit" => Ok(__FieldTag::__quota_limit),
"quota_limit" => Ok(__FieldTag::__quota_limit),
"quotaMinuteLimit" => Ok(__FieldTag::__quota_minute_limit),
"quota_minute_limit" => Ok(__FieldTag::__quota_minute_limit),
"methodDetails" => Ok(__FieldTag::__method_details),
"method_details" => Ok(__FieldTag::__method_details),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::QuotaGroup;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct QuotaGroup")
}
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::__quota_usage => {
if !fields.insert(__FieldTag::__quota_usage) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for quota_usage",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.quota_usage = map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__quota_limit => {
if !fields.insert(__FieldTag::__quota_limit) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for quota_limit",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.quota_limit = map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__quota_minute_limit => {
if !fields.insert(__FieldTag::__quota_minute_limit) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for quota_minute_limit",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.quota_minute_limit =
map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__method_details => {
if !fields.insert(__FieldTag::__method_details) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for method_details",
));
}
result.method_details = map.next_value::<std::option::Option<std::vec::Vec<crate::model::MethodDetails>>>()?.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::MethodDetails {
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 {
__method,
__version,
__subapi,
__path,
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 MethodDetails")
}
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 {
"method" => Ok(__FieldTag::__method),
"version" => Ok(__FieldTag::__version),
"subapi" => Ok(__FieldTag::__subapi),
"path" => Ok(__FieldTag::__path),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::MethodDetails;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct MethodDetails")
}
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::__method => {
if !fields.insert(__FieldTag::__method) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for method",
));
}
result.method = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__version => {
if !fields.insert(__FieldTag::__version) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for version",
));
}
result.version = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__subapi => {
if !fields.insert(__FieldTag::__subapi) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for subapi",
));
}
result.subapi = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__path => {
if !fields.insert(__FieldTag::__path) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for path",
));
}
result.path = 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::ListQuotaGroupsRequest {
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 {
__parent,
__page_size,
__page_token,
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 ListQuotaGroupsRequest")
}
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 {
"parent" => Ok(__FieldTag::__parent),
"pageSize" => Ok(__FieldTag::__page_size),
"page_size" => Ok(__FieldTag::__page_size),
"pageToken" => Ok(__FieldTag::__page_token),
"page_token" => Ok(__FieldTag::__page_token),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ListQuotaGroupsRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListQuotaGroupsRequest")
}
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::__parent => {
if !fields.insert(__FieldTag::__parent) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for parent",
));
}
result.parent = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__page_size => {
if !fields.insert(__FieldTag::__page_size) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for page_size",
));
}
struct __With(std::option::Option<i32>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
}
}
result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__page_token => {
if !fields.insert(__FieldTag::__page_token) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for page_token",
));
}
result.page_token = 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::ListQuotaGroupsResponse {
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 {
__quota_groups,
__next_page_token,
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 ListQuotaGroupsResponse")
}
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 {
"quotaGroups" => Ok(__FieldTag::__quota_groups),
"quota_groups" => Ok(__FieldTag::__quota_groups),
"nextPageToken" => Ok(__FieldTag::__next_page_token),
"next_page_token" => Ok(__FieldTag::__next_page_token),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ListQuotaGroupsResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListQuotaGroupsResponse")
}
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::__quota_groups => {
if !fields.insert(__FieldTag::__quota_groups) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for quota_groups",
));
}
result.quota_groups = map.next_value::<std::option::Option<std::vec::Vec<crate::model::QuotaGroup>>>()?.unwrap_or_default();
}
__FieldTag::__next_page_token => {
if !fields.insert(__FieldTag::__next_page_token) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for next_page_token",
));
}
result.next_page_token = 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)
}
}