#
google_cloud_pubsub/generated/gapic/model/
deserialize.rs

    1// Copyright 2025 Google LLC
    2//
    3// Licensed under the Apache License, Version 2.0 (the "License");
    4// you may not use this file except in compliance with the License.
    5// You may obtain a copy of the License at
    6//
    7//     https://www.apache.org/licenses/LICENSE-2.0
    8//
    9// Unless required by applicable law or agreed to in writing, software
    10// distributed under the License is distributed on an "AS IS" BASIS,
    11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12// See the License for the specific language governing permissions and
    13// limitations under the License.
    14//
    15// Code generated by sidekick. DO NOT EDIT.
    16
    17#[allow(unused_imports)]
    18use super::*;
    19
    20#[doc(hidden)]
    21impl<'de> serde::de::Deserialize<'de> for super::MessageStoragePolicy {
    22    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    23    where
    24        D: serde::Deserializer<'de>,
    25    {
    26        #[allow(non_camel_case_types)]
    27        #[doc(hidden)]
    28        #[derive(PartialEq, Eq, Hash)]
    29        enum __FieldTag {
    30            __allowed_persistence_regions,
    31            __enforce_in_transit,
    32            Unknown(std::string::String),
    33        }
    34        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    35            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    36            where
    37                D: serde::Deserializer<'de>,
    38            {
    39                struct Visitor;
    40                impl<'de> serde::de::Visitor<'de> for Visitor {
    41                    type Value = __FieldTag;
    42                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    43                        formatter.write_str("a field name for MessageStoragePolicy")
    44                    }
    45                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    46                    where
    47                        E: serde::de::Error,
    48                    {
    49                        use std::result::Result::Ok;
    50                        use std::string::ToString;
    51                        match value {
    52                            "allowedPersistenceRegions" => {
    53                                Ok(__FieldTag::__allowed_persistence_regions)
    54                            }
    55                            "allowed_persistence_regions" => {
    56                                Ok(__FieldTag::__allowed_persistence_regions)
    57                            }
    58                            "enforceInTransit" => Ok(__FieldTag::__enforce_in_transit),
    59                            "enforce_in_transit" => Ok(__FieldTag::__enforce_in_transit),
    60                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    61                        }
    62                    }
    63                }
    64                deserializer.deserialize_identifier(Visitor)
    65            }
    66        }
    67        struct Visitor;
    68        impl<'de> serde::de::Visitor<'de> for Visitor {
    69            type Value = super::MessageStoragePolicy;
    70            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    71                formatter.write_str("struct MessageStoragePolicy")
    72            }
    73            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    74            where
    75                A: serde::de::MapAccess<'de>,
    76            {
    77                #[allow(unused_imports)]
    78                use serde::de::Error;
    79                use std::option::Option::Some;
    80                let mut fields = std::collections::HashSet::new();
    81                let mut result = Self::Value::new();
    82                while let Some(tag) = map.next_key::<__FieldTag>()? {
    83                    #[allow(clippy::match_single_binding)]
    84                    match tag {
    85                        __FieldTag::__allowed_persistence_regions => {
    86                            if !fields.insert(__FieldTag::__allowed_persistence_regions) {
    87                                return std::result::Result::Err(A::Error::duplicate_field(
    88                                    "multiple values for allowed_persistence_regions",
    89                                ));
    90                            }
    91                            result.allowed_persistence_regions = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
    92                        }
    93                        __FieldTag::__enforce_in_transit => {
    94                            if !fields.insert(__FieldTag::__enforce_in_transit) {
    95                                return std::result::Result::Err(A::Error::duplicate_field(
    96                                    "multiple values for enforce_in_transit",
    97                                ));
    98                            }
    99                            result.enforce_in_transit = map
    100                                .next_value::<std::option::Option<bool>>()?
    101                                .unwrap_or_default();
    102                        }
    103                        __FieldTag::Unknown(key) => {
    104                            let value = map.next_value::<serde_json::Value>()?;
    105                            result._unknown_fields.insert(key, value);
    106                        }
    107                    }
    108                }
    109                std::result::Result::Ok(result)
    110            }
    111        }
    112        deserializer.deserialize_any(Visitor)
    113    }
    114}
    115
    116#[doc(hidden)]
    117impl<'de> serde::de::Deserialize<'de> for super::SchemaSettings {
    118    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    119    where
    120        D: serde::Deserializer<'de>,
    121    {
    122        #[allow(non_camel_case_types)]
    123        #[doc(hidden)]
    124        #[derive(PartialEq, Eq, Hash)]
    125        enum __FieldTag {
    126            __schema,
    127            __encoding,
    128            __first_revision_id,
    129            __last_revision_id,
    130            Unknown(std::string::String),
    131        }
    132        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    133            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    134            where
    135                D: serde::Deserializer<'de>,
    136            {
    137                struct Visitor;
    138                impl<'de> serde::de::Visitor<'de> for Visitor {
    139                    type Value = __FieldTag;
    140                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    141                        formatter.write_str("a field name for SchemaSettings")
    142                    }
    143                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    144                    where
    145                        E: serde::de::Error,
    146                    {
    147                        use std::result::Result::Ok;
    148                        use std::string::ToString;
    149                        match value {
    150                            "schema" => Ok(__FieldTag::__schema),
    151                            "encoding" => Ok(__FieldTag::__encoding),
    152                            "firstRevisionId" => Ok(__FieldTag::__first_revision_id),
    153                            "first_revision_id" => Ok(__FieldTag::__first_revision_id),
    154                            "lastRevisionId" => Ok(__FieldTag::__last_revision_id),
    155                            "last_revision_id" => Ok(__FieldTag::__last_revision_id),
    156                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    157                        }
    158                    }
    159                }
    160                deserializer.deserialize_identifier(Visitor)
    161            }
    162        }
    163        struct Visitor;
    164        impl<'de> serde::de::Visitor<'de> for Visitor {
    165            type Value = super::SchemaSettings;
    166            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    167                formatter.write_str("struct SchemaSettings")
    168            }
    169            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    170            where
    171                A: serde::de::MapAccess<'de>,
    172            {
    173                #[allow(unused_imports)]
    174                use serde::de::Error;
    175                use std::option::Option::Some;
    176                let mut fields = std::collections::HashSet::new();
    177                let mut result = Self::Value::new();
    178                while let Some(tag) = map.next_key::<__FieldTag>()? {
    179                    #[allow(clippy::match_single_binding)]
    180                    match tag {
    181                        __FieldTag::__schema => {
    182                            if !fields.insert(__FieldTag::__schema) {
    183                                return std::result::Result::Err(A::Error::duplicate_field(
    184                                    "multiple values for schema",
    185                                ));
    186                            }
    187                            result.schema = map
    188                                .next_value::<std::option::Option<std::string::String>>()?
    189                                .unwrap_or_default();
    190                        }
    191                        __FieldTag::__encoding => {
    192                            if !fields.insert(__FieldTag::__encoding) {
    193                                return std::result::Result::Err(A::Error::duplicate_field(
    194                                    "multiple values for encoding",
    195                                ));
    196                            }
    197                            result.encoding = map
    198                                .next_value::<std::option::Option<crate::model::Encoding>>()?
    199                                .unwrap_or_default();
    200                        }
    201                        __FieldTag::__first_revision_id => {
    202                            if !fields.insert(__FieldTag::__first_revision_id) {
    203                                return std::result::Result::Err(A::Error::duplicate_field(
    204                                    "multiple values for first_revision_id",
    205                                ));
    206                            }
    207                            result.first_revision_id = map
    208                                .next_value::<std::option::Option<std::string::String>>()?
    209                                .unwrap_or_default();
    210                        }
    211                        __FieldTag::__last_revision_id => {
    212                            if !fields.insert(__FieldTag::__last_revision_id) {
    213                                return std::result::Result::Err(A::Error::duplicate_field(
    214                                    "multiple values for last_revision_id",
    215                                ));
    216                            }
    217                            result.last_revision_id = map
    218                                .next_value::<std::option::Option<std::string::String>>()?
    219                                .unwrap_or_default();
    220                        }
    221                        __FieldTag::Unknown(key) => {
    222                            let value = map.next_value::<serde_json::Value>()?;
    223                            result._unknown_fields.insert(key, value);
    224                        }
    225                    }
    226                }
    227                std::result::Result::Ok(result)
    228            }
    229        }
    230        deserializer.deserialize_any(Visitor)
    231    }
    232}
    233
    234#[doc(hidden)]
    235impl<'de> serde::de::Deserialize<'de> for super::IngestionDataSourceSettings {
    236    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    237    where
    238        D: serde::Deserializer<'de>,
    239    {
    240        #[allow(non_camel_case_types)]
    241        #[doc(hidden)]
    242        #[derive(PartialEq, Eq, Hash)]
    243        enum __FieldTag {
    244            __aws_kinesis,
    245            __cloud_storage,
    246            __azure_event_hubs,
    247            __aws_msk,
    248            __confluent_cloud,
    249            __platform_logs_settings,
    250            Unknown(std::string::String),
    251        }
    252        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    253            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    254            where
    255                D: serde::Deserializer<'de>,
    256            {
    257                struct Visitor;
    258                impl<'de> serde::de::Visitor<'de> for Visitor {
    259                    type Value = __FieldTag;
    260                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    261                        formatter.write_str("a field name for IngestionDataSourceSettings")
    262                    }
    263                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    264                    where
    265                        E: serde::de::Error,
    266                    {
    267                        use std::result::Result::Ok;
    268                        use std::string::ToString;
    269                        match value {
    270                            "awsKinesis" => Ok(__FieldTag::__aws_kinesis),
    271                            "aws_kinesis" => Ok(__FieldTag::__aws_kinesis),
    272                            "cloudStorage" => Ok(__FieldTag::__cloud_storage),
    273                            "cloud_storage" => Ok(__FieldTag::__cloud_storage),
    274                            "azureEventHubs" => Ok(__FieldTag::__azure_event_hubs),
    275                            "azure_event_hubs" => Ok(__FieldTag::__azure_event_hubs),
    276                            "awsMsk" => Ok(__FieldTag::__aws_msk),
    277                            "aws_msk" => Ok(__FieldTag::__aws_msk),
    278                            "confluentCloud" => Ok(__FieldTag::__confluent_cloud),
    279                            "confluent_cloud" => Ok(__FieldTag::__confluent_cloud),
    280                            "platformLogsSettings" => Ok(__FieldTag::__platform_logs_settings),
    281                            "platform_logs_settings" => Ok(__FieldTag::__platform_logs_settings),
    282                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    283                        }
    284                    }
    285                }
    286                deserializer.deserialize_identifier(Visitor)
    287            }
    288        }
    289        struct Visitor;
    290        impl<'de> serde::de::Visitor<'de> for Visitor {
    291            type Value = super::IngestionDataSourceSettings;
    292            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    293                formatter.write_str("struct IngestionDataSourceSettings")
    294            }
    295            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    296            where
    297                A: serde::de::MapAccess<'de>,
    298            {
    299                #[allow(unused_imports)]
    300                use serde::de::Error;
    301                use std::option::Option::Some;
    302                let mut fields = std::collections::HashSet::new();
    303                let mut result = Self::Value::new();
    304                while let Some(tag) = map.next_key::<__FieldTag>()? {
    305                    #[allow(clippy::match_single_binding)]
    306                    match tag {
    307                        __FieldTag::__aws_kinesis => {
    308                            if !fields.insert(__FieldTag::__aws_kinesis) {
    309                                return std::result::Result::Err(A::Error::duplicate_field(
    310                                    "multiple values for aws_kinesis",
    311                                ));
    312                            }
    313                            if result.source.is_some() {
    314                                return std::result::Result::Err(A::Error::duplicate_field(
    315                                    "multiple values for `source`, a oneof with full ID .google.pubsub.v1.IngestionDataSourceSettings.aws_kinesis, latest field was awsKinesis",
    316                                ));
    317                            }
    318                            result.source = std::option::Option::Some(
    319                                crate::model::ingestion_data_source_settings::Source::AwsKinesis(
    320                                    map.next_value::<std::option::Option<std::boxed::Box<crate::model::ingestion_data_source_settings::AwsKinesis>>>()?.unwrap_or_default()
    321                                ),
    322                            );
    323                        }
    324                        __FieldTag::__cloud_storage => {
    325                            if !fields.insert(__FieldTag::__cloud_storage) {
    326                                return std::result::Result::Err(A::Error::duplicate_field(
    327                                    "multiple values for cloud_storage",
    328                                ));
    329                            }
    330                            if result.source.is_some() {
    331                                return std::result::Result::Err(A::Error::duplicate_field(
    332                                    "multiple values for `source`, a oneof with full ID .google.pubsub.v1.IngestionDataSourceSettings.cloud_storage, latest field was cloudStorage",
    333                                ));
    334                            }
    335                            result.source = std::option::Option::Some(
    336                                crate::model::ingestion_data_source_settings::Source::CloudStorage(
    337                                    map.next_value::<std::option::Option<std::boxed::Box<crate::model::ingestion_data_source_settings::CloudStorage>>>()?.unwrap_or_default()
    338                                ),
    339                            );
    340                        }
    341                        __FieldTag::__azure_event_hubs => {
    342                            if !fields.insert(__FieldTag::__azure_event_hubs) {
    343                                return std::result::Result::Err(A::Error::duplicate_field(
    344                                    "multiple values for azure_event_hubs",
    345                                ));
    346                            }
    347                            if result.source.is_some() {
    348                                return std::result::Result::Err(A::Error::duplicate_field(
    349                                    "multiple values for `source`, a oneof with full ID .google.pubsub.v1.IngestionDataSourceSettings.azure_event_hubs, latest field was azureEventHubs",
    350                                ));
    351                            }
    352                            result.source = std::option::Option::Some(
    353                                crate::model::ingestion_data_source_settings::Source::AzureEventHubs(
    354                                    map.next_value::<std::option::Option<std::boxed::Box<crate::model::ingestion_data_source_settings::AzureEventHubs>>>()?.unwrap_or_default()
    355                                ),
    356                            );
    357                        }
    358                        __FieldTag::__aws_msk => {
    359                            if !fields.insert(__FieldTag::__aws_msk) {
    360                                return std::result::Result::Err(A::Error::duplicate_field(
    361                                    "multiple values for aws_msk",
    362                                ));
    363                            }
    364                            if result.source.is_some() {
    365                                return std::result::Result::Err(A::Error::duplicate_field(
    366                                    "multiple values for `source`, a oneof with full ID .google.pubsub.v1.IngestionDataSourceSettings.aws_msk, latest field was awsMsk",
    367                                ));
    368                            }
    369                            result.source = std::option::Option::Some(
    370                                crate::model::ingestion_data_source_settings::Source::AwsMsk(
    371                                    map.next_value::<std::option::Option<
    372                                        std::boxed::Box<
    373                                            crate::model::ingestion_data_source_settings::AwsMsk,
    374                                        >,
    375                                    >>()?
    376                                    .unwrap_or_default(),
    377                                ),
    378                            );
    379                        }
    380                        __FieldTag::__confluent_cloud => {
    381                            if !fields.insert(__FieldTag::__confluent_cloud) {
    382                                return std::result::Result::Err(A::Error::duplicate_field(
    383                                    "multiple values for confluent_cloud",
    384                                ));
    385                            }
    386                            if result.source.is_some() {
    387                                return std::result::Result::Err(A::Error::duplicate_field(
    388                                    "multiple values for `source`, a oneof with full ID .google.pubsub.v1.IngestionDataSourceSettings.confluent_cloud, latest field was confluentCloud",
    389                                ));
    390                            }
    391                            result.source = std::option::Option::Some(
    392                                crate::model::ingestion_data_source_settings::Source::ConfluentCloud(
    393                                    map.next_value::<std::option::Option<std::boxed::Box<crate::model::ingestion_data_source_settings::ConfluentCloud>>>()?.unwrap_or_default()
    394                                ),
    395                            );
    396                        }
    397                        __FieldTag::__platform_logs_settings => {
    398                            if !fields.insert(__FieldTag::__platform_logs_settings) {
    399                                return std::result::Result::Err(A::Error::duplicate_field(
    400                                    "multiple values for platform_logs_settings",
    401                                ));
    402                            }
    403                            result.platform_logs_settings = map.next_value::<std::option::Option<crate::model::PlatformLogsSettings>>()?
    404                                ;
    405                        }
    406                        __FieldTag::Unknown(key) => {
    407                            let value = map.next_value::<serde_json::Value>()?;
    408                            result._unknown_fields.insert(key, value);
    409                        }
    410                    }
    411                }
    412                std::result::Result::Ok(result)
    413            }
    414        }
    415        deserializer.deserialize_any(Visitor)
    416    }
    417}
    418
    419#[doc(hidden)]
    420impl<'de> serde::de::Deserialize<'de> for super::ingestion_data_source_settings::AwsKinesis {
    421    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    422    where
    423        D: serde::Deserializer<'de>,
    424    {
    425        #[allow(non_camel_case_types)]
    426        #[doc(hidden)]
    427        #[derive(PartialEq, Eq, Hash)]
    428        enum __FieldTag {
    429            __state,
    430            __stream_arn,
    431            __consumer_arn,
    432            __aws_role_arn,
    433            __gcp_service_account,
    434            Unknown(std::string::String),
    435        }
    436        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    437            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    438            where
    439                D: serde::Deserializer<'de>,
    440            {
    441                struct Visitor;
    442                impl<'de> serde::de::Visitor<'de> for Visitor {
    443                    type Value = __FieldTag;
    444                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    445                        formatter.write_str("a field name for AwsKinesis")
    446                    }
    447                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    448                    where
    449                        E: serde::de::Error,
    450                    {
    451                        use std::result::Result::Ok;
    452                        use std::string::ToString;
    453                        match value {
    454                            "state" => Ok(__FieldTag::__state),
    455                            "streamArn" => Ok(__FieldTag::__stream_arn),
    456                            "stream_arn" => Ok(__FieldTag::__stream_arn),
    457                            "consumerArn" => Ok(__FieldTag::__consumer_arn),
    458                            "consumer_arn" => Ok(__FieldTag::__consumer_arn),
    459                            "awsRoleArn" => Ok(__FieldTag::__aws_role_arn),
    460                            "aws_role_arn" => Ok(__FieldTag::__aws_role_arn),
    461                            "gcpServiceAccount" => Ok(__FieldTag::__gcp_service_account),
    462                            "gcp_service_account" => Ok(__FieldTag::__gcp_service_account),
    463                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    464                        }
    465                    }
    466                }
    467                deserializer.deserialize_identifier(Visitor)
    468            }
    469        }
    470        struct Visitor;
    471        impl<'de> serde::de::Visitor<'de> for Visitor {
    472            type Value = super::ingestion_data_source_settings::AwsKinesis;
    473            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    474                formatter.write_str("struct AwsKinesis")
    475            }
    476            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    477            where
    478                A: serde::de::MapAccess<'de>,
    479            {
    480                #[allow(unused_imports)]
    481                use serde::de::Error;
    482                use std::option::Option::Some;
    483                let mut fields = std::collections::HashSet::new();
    484                let mut result = Self::Value::new();
    485                while let Some(tag) = map.next_key::<__FieldTag>()? {
    486                    #[allow(clippy::match_single_binding)]
    487                    match tag {
    488                        __FieldTag::__state => {
    489                            if !fields.insert(__FieldTag::__state) {
    490                                return std::result::Result::Err(A::Error::duplicate_field(
    491                                    "multiple values for state",
    492                                ));
    493                            }
    494                            result.state = map.next_value::<std::option::Option<crate::model::ingestion_data_source_settings::aws_kinesis::State>>()?.unwrap_or_default();
    495                        }
    496                        __FieldTag::__stream_arn => {
    497                            if !fields.insert(__FieldTag::__stream_arn) {
    498                                return std::result::Result::Err(A::Error::duplicate_field(
    499                                    "multiple values for stream_arn",
    500                                ));
    501                            }
    502                            result.stream_arn = map
    503                                .next_value::<std::option::Option<std::string::String>>()?
    504                                .unwrap_or_default();
    505                        }
    506                        __FieldTag::__consumer_arn => {
    507                            if !fields.insert(__FieldTag::__consumer_arn) {
    508                                return std::result::Result::Err(A::Error::duplicate_field(
    509                                    "multiple values for consumer_arn",
    510                                ));
    511                            }
    512                            result.consumer_arn = map
    513                                .next_value::<std::option::Option<std::string::String>>()?
    514                                .unwrap_or_default();
    515                        }
    516                        __FieldTag::__aws_role_arn => {
    517                            if !fields.insert(__FieldTag::__aws_role_arn) {
    518                                return std::result::Result::Err(A::Error::duplicate_field(
    519                                    "multiple values for aws_role_arn",
    520                                ));
    521                            }
    522                            result.aws_role_arn = map
    523                                .next_value::<std::option::Option<std::string::String>>()?
    524                                .unwrap_or_default();
    525                        }
    526                        __FieldTag::__gcp_service_account => {
    527                            if !fields.insert(__FieldTag::__gcp_service_account) {
    528                                return std::result::Result::Err(A::Error::duplicate_field(
    529                                    "multiple values for gcp_service_account",
    530                                ));
    531                            }
    532                            result.gcp_service_account = map
    533                                .next_value::<std::option::Option<std::string::String>>()?
    534                                .unwrap_or_default();
    535                        }
    536                        __FieldTag::Unknown(key) => {
    537                            let value = map.next_value::<serde_json::Value>()?;
    538                            result._unknown_fields.insert(key, value);
    539                        }
    540                    }
    541                }
    542                std::result::Result::Ok(result)
    543            }
    544        }
    545        deserializer.deserialize_any(Visitor)
    546    }
    547}
    548
    549#[doc(hidden)]
    550impl<'de> serde::de::Deserialize<'de> for super::ingestion_data_source_settings::CloudStorage {
    551    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    552    where
    553        D: serde::Deserializer<'de>,
    554    {
    555        #[allow(non_camel_case_types)]
    556        #[doc(hidden)]
    557        #[derive(PartialEq, Eq, Hash)]
    558        enum __FieldTag {
    559            __state,
    560            __bucket,
    561            __text_format,
    562            __avro_format,
    563            __pubsub_avro_format,
    564            __minimum_object_create_time,
    565            __match_glob,
    566            Unknown(std::string::String),
    567        }
    568        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    569            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    570            where
    571                D: serde::Deserializer<'de>,
    572            {
    573                struct Visitor;
    574                impl<'de> serde::de::Visitor<'de> for Visitor {
    575                    type Value = __FieldTag;
    576                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    577                        formatter.write_str("a field name for CloudStorage")
    578                    }
    579                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    580                    where
    581                        E: serde::de::Error,
    582                    {
    583                        use std::result::Result::Ok;
    584                        use std::string::ToString;
    585                        match value {
    586                            "state" => Ok(__FieldTag::__state),
    587                            "bucket" => Ok(__FieldTag::__bucket),
    588                            "textFormat" => Ok(__FieldTag::__text_format),
    589                            "text_format" => Ok(__FieldTag::__text_format),
    590                            "avroFormat" => Ok(__FieldTag::__avro_format),
    591                            "avro_format" => Ok(__FieldTag::__avro_format),
    592                            "pubsubAvroFormat" => Ok(__FieldTag::__pubsub_avro_format),
    593                            "pubsub_avro_format" => Ok(__FieldTag::__pubsub_avro_format),
    594                            "minimumObjectCreateTime" => {
    595                                Ok(__FieldTag::__minimum_object_create_time)
    596                            }
    597                            "minimum_object_create_time" => {
    598                                Ok(__FieldTag::__minimum_object_create_time)
    599                            }
    600                            "matchGlob" => Ok(__FieldTag::__match_glob),
    601                            "match_glob" => Ok(__FieldTag::__match_glob),
    602                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    603                        }
    604                    }
    605                }
    606                deserializer.deserialize_identifier(Visitor)
    607            }
    608        }
    609        struct Visitor;
    610        impl<'de> serde::de::Visitor<'de> for Visitor {
    611            type Value = super::ingestion_data_source_settings::CloudStorage;
    612            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    613                formatter.write_str("struct CloudStorage")
    614            }
    615            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    616            where
    617                A: serde::de::MapAccess<'de>,
    618            {
    619                #[allow(unused_imports)]
    620                use serde::de::Error;
    621                use std::option::Option::Some;
    622                let mut fields = std::collections::HashSet::new();
    623                let mut result = Self::Value::new();
    624                while let Some(tag) = map.next_key::<__FieldTag>()? {
    625                    #[allow(clippy::match_single_binding)]
    626                    match tag {
    627                        __FieldTag::__state => {
    628                            if !fields.insert(__FieldTag::__state) {
    629                                return std::result::Result::Err(A::Error::duplicate_field(
    630                                    "multiple values for state",
    631                                ));
    632                            }
    633                            result.state = map.next_value::<std::option::Option<crate::model::ingestion_data_source_settings::cloud_storage::State>>()?.unwrap_or_default();
    634                        }
    635                        __FieldTag::__bucket => {
    636                            if !fields.insert(__FieldTag::__bucket) {
    637                                return std::result::Result::Err(A::Error::duplicate_field(
    638                                    "multiple values for bucket",
    639                                ));
    640                            }
    641                            result.bucket = map
    642                                .next_value::<std::option::Option<std::string::String>>()?
    643                                .unwrap_or_default();
    644                        }
    645                        __FieldTag::__text_format => {
    646                            if !fields.insert(__FieldTag::__text_format) {
    647                                return std::result::Result::Err(A::Error::duplicate_field(
    648                                    "multiple values for text_format",
    649                                ));
    650                            }
    651                            if result.input_format.is_some() {
    652                                return std::result::Result::Err(A::Error::duplicate_field(
    653                                    "multiple values for `input_format`, a oneof with full ID .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.text_format, latest field was textFormat",
    654                                ));
    655                            }
    656                            result.input_format = std::option::Option::Some(
    657                                crate::model::ingestion_data_source_settings::cloud_storage::InputFormat::TextFormat(
    658                                    map.next_value::<std::option::Option<std::boxed::Box<crate::model::ingestion_data_source_settings::cloud_storage::TextFormat>>>()?.unwrap_or_default()
    659                                ),
    660                            );
    661                        }
    662                        __FieldTag::__avro_format => {
    663                            if !fields.insert(__FieldTag::__avro_format) {
    664                                return std::result::Result::Err(A::Error::duplicate_field(
    665                                    "multiple values for avro_format",
    666                                ));
    667                            }
    668                            if result.input_format.is_some() {
    669                                return std::result::Result::Err(A::Error::duplicate_field(
    670                                    "multiple values for `input_format`, a oneof with full ID .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.avro_format, latest field was avroFormat",
    671                                ));
    672                            }
    673                            result.input_format = std::option::Option::Some(
    674                                crate::model::ingestion_data_source_settings::cloud_storage::InputFormat::AvroFormat(
    675                                    map.next_value::<std::option::Option<std::boxed::Box<crate::model::ingestion_data_source_settings::cloud_storage::AvroFormat>>>()?.unwrap_or_default()
    676                                ),
    677                            );
    678                        }
    679                        __FieldTag::__pubsub_avro_format => {
    680                            if !fields.insert(__FieldTag::__pubsub_avro_format) {
    681                                return std::result::Result::Err(A::Error::duplicate_field(
    682                                    "multiple values for pubsub_avro_format",
    683                                ));
    684                            }
    685                            if result.input_format.is_some() {
    686                                return std::result::Result::Err(A::Error::duplicate_field(
    687                                    "multiple values for `input_format`, a oneof with full ID .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.pubsub_avro_format, latest field was pubsubAvroFormat",
    688                                ));
    689                            }
    690                            result.input_format = std::option::Option::Some(
    691                                crate::model::ingestion_data_source_settings::cloud_storage::InputFormat::PubsubAvroFormat(
    692                                    map.next_value::<std::option::Option<std::boxed::Box<crate::model::ingestion_data_source_settings::cloud_storage::PubSubAvroFormat>>>()?.unwrap_or_default()
    693                                ),
    694                            );
    695                        }
    696                        __FieldTag::__minimum_object_create_time => {
    697                            if !fields.insert(__FieldTag::__minimum_object_create_time) {
    698                                return std::result::Result::Err(A::Error::duplicate_field(
    699                                    "multiple values for minimum_object_create_time",
    700                                ));
    701                            }
    702                            result.minimum_object_create_time =
    703                                map.next_value::<std::option::Option<wkt::Timestamp>>()?;
    704                        }
    705                        __FieldTag::__match_glob => {
    706                            if !fields.insert(__FieldTag::__match_glob) {
    707                                return std::result::Result::Err(A::Error::duplicate_field(
    708                                    "multiple values for match_glob",
    709                                ));
    710                            }
    711                            result.match_glob = map
    712                                .next_value::<std::option::Option<std::string::String>>()?
    713                                .unwrap_or_default();
    714                        }
    715                        __FieldTag::Unknown(key) => {
    716                            let value = map.next_value::<serde_json::Value>()?;
    717                            result._unknown_fields.insert(key, value);
    718                        }
    719                    }
    720                }
    721                std::result::Result::Ok(result)
    722            }
    723        }
    724        deserializer.deserialize_any(Visitor)
    725    }
    726}
    727
    728#[doc(hidden)]
    729impl<'de> serde::de::Deserialize<'de>
    730    for super::ingestion_data_source_settings::cloud_storage::TextFormat
    731{
    732    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    733    where
    734        D: serde::Deserializer<'de>,
    735    {
    736        #[allow(non_camel_case_types)]
    737        #[doc(hidden)]
    738        #[derive(PartialEq, Eq, Hash)]
    739        enum __FieldTag {
    740            __delimiter,
    741            Unknown(std::string::String),
    742        }
    743        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    744            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    745            where
    746                D: serde::Deserializer<'de>,
    747            {
    748                struct Visitor;
    749                impl<'de> serde::de::Visitor<'de> for Visitor {
    750                    type Value = __FieldTag;
    751                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    752                        formatter.write_str("a field name for TextFormat")
    753                    }
    754                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    755                    where
    756                        E: serde::de::Error,
    757                    {
    758                        use std::result::Result::Ok;
    759                        use std::string::ToString;
    760                        match value {
    761                            "delimiter" => Ok(__FieldTag::__delimiter),
    762                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    763                        }
    764                    }
    765                }
    766                deserializer.deserialize_identifier(Visitor)
    767            }
    768        }
    769        struct Visitor;
    770        impl<'de> serde::de::Visitor<'de> for Visitor {
    771            type Value = super::ingestion_data_source_settings::cloud_storage::TextFormat;
    772            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    773                formatter.write_str("struct TextFormat")
    774            }
    775            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    776            where
    777                A: serde::de::MapAccess<'de>,
    778            {
    779                #[allow(unused_imports)]
    780                use serde::de::Error;
    781                use std::option::Option::Some;
    782                let mut fields = std::collections::HashSet::new();
    783                let mut result = Self::Value::new();
    784                while let Some(tag) = map.next_key::<__FieldTag>()? {
    785                    #[allow(clippy::match_single_binding)]
    786                    match tag {
    787                        __FieldTag::__delimiter => {
    788                            if !fields.insert(__FieldTag::__delimiter) {
    789                                return std::result::Result::Err(A::Error::duplicate_field(
    790                                    "multiple values for delimiter",
    791                                ));
    792                            }
    793                            result.delimiter =
    794                                map.next_value::<std::option::Option<std::string::String>>()?;
    795                        }
    796                        __FieldTag::Unknown(key) => {
    797                            let value = map.next_value::<serde_json::Value>()?;
    798                            result._unknown_fields.insert(key, value);
    799                        }
    800                    }
    801                }
    802                std::result::Result::Ok(result)
    803            }
    804        }
    805        deserializer.deserialize_any(Visitor)
    806    }
    807}
    808
    809#[doc(hidden)]
    810impl<'de> serde::de::Deserialize<'de>
    811    for super::ingestion_data_source_settings::cloud_storage::AvroFormat
    812{
    813    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    814    where
    815        D: serde::Deserializer<'de>,
    816    {
    817        #[allow(non_camel_case_types)]
    818        #[doc(hidden)]
    819        #[derive(PartialEq, Eq, Hash)]
    820        enum __FieldTag {
    821            Unknown(std::string::String),
    822        }
    823        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    824            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    825            where
    826                D: serde::Deserializer<'de>,
    827            {
    828                struct Visitor;
    829                impl<'de> serde::de::Visitor<'de> for Visitor {
    830                    type Value = __FieldTag;
    831                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    832                        formatter.write_str("a field name for AvroFormat")
    833                    }
    834                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    835                    where
    836                        E: serde::de::Error,
    837                    {
    838                        use std::result::Result::Ok;
    839                        use std::string::ToString;
    840                        Ok(__FieldTag::Unknown(value.to_string()))
    841                    }
    842                }
    843                deserializer.deserialize_identifier(Visitor)
    844            }
    845        }
    846        struct Visitor;
    847        impl<'de> serde::de::Visitor<'de> for Visitor {
    848            type Value = super::ingestion_data_source_settings::cloud_storage::AvroFormat;
    849            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    850                formatter.write_str("struct AvroFormat")
    851            }
    852            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    853            where
    854                A: serde::de::MapAccess<'de>,
    855            {
    856                #[allow(unused_imports)]
    857                use serde::de::Error;
    858                use std::option::Option::Some;
    859                let mut result = Self::Value::new();
    860                while let Some(tag) = map.next_key::<__FieldTag>()? {
    861                    #[allow(clippy::match_single_binding)]
    862                    match tag {
    863                        __FieldTag::Unknown(key) => {
    864                            let value = map.next_value::<serde_json::Value>()?;
    865                            result._unknown_fields.insert(key, value);
    866                        }
    867                    }
    868                }
    869                std::result::Result::Ok(result)
    870            }
    871        }
    872        deserializer.deserialize_any(Visitor)
    873    }
    874}
    875
    876#[doc(hidden)]
    877impl<'de> serde::de::Deserialize<'de>
    878    for super::ingestion_data_source_settings::cloud_storage::PubSubAvroFormat
    879{
    880    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    881    where
    882        D: serde::Deserializer<'de>,
    883    {
    884        #[allow(non_camel_case_types)]
    885        #[doc(hidden)]
    886        #[derive(PartialEq, Eq, Hash)]
    887        enum __FieldTag {
    888            Unknown(std::string::String),
    889        }
    890        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    891            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    892            where
    893                D: serde::Deserializer<'de>,
    894            {
    895                struct Visitor;
    896                impl<'de> serde::de::Visitor<'de> for Visitor {
    897                    type Value = __FieldTag;
    898                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    899                        formatter.write_str("a field name for PubSubAvroFormat")
    900                    }
    901                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    902                    where
    903                        E: serde::de::Error,
    904                    {
    905                        use std::result::Result::Ok;
    906                        use std::string::ToString;
    907                        Ok(__FieldTag::Unknown(value.to_string()))
    908                    }
    909                }
    910                deserializer.deserialize_identifier(Visitor)
    911            }
    912        }
    913        struct Visitor;
    914        impl<'de> serde::de::Visitor<'de> for Visitor {
    915            type Value = super::ingestion_data_source_settings::cloud_storage::PubSubAvroFormat;
    916            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    917                formatter.write_str("struct PubSubAvroFormat")
    918            }
    919            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    920            where
    921                A: serde::de::MapAccess<'de>,
    922            {
    923                #[allow(unused_imports)]
    924                use serde::de::Error;
    925                use std::option::Option::Some;
    926                let mut result = Self::Value::new();
    927                while let Some(tag) = map.next_key::<__FieldTag>()? {
    928                    #[allow(clippy::match_single_binding)]
    929                    match tag {
    930                        __FieldTag::Unknown(key) => {
    931                            let value = map.next_value::<serde_json::Value>()?;
    932                            result._unknown_fields.insert(key, value);
    933                        }
    934                    }
    935                }
    936                std::result::Result::Ok(result)
    937            }
    938        }
    939        deserializer.deserialize_any(Visitor)
    940    }
    941}
    942
    943#[doc(hidden)]
    944impl<'de> serde::de::Deserialize<'de> for super::ingestion_data_source_settings::AzureEventHubs {
    945    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    946    where
    947        D: serde::Deserializer<'de>,
    948    {
    949        #[allow(non_camel_case_types)]
    950        #[doc(hidden)]
    951        #[derive(PartialEq, Eq, Hash)]
    952        enum __FieldTag {
    953            __state,
    954            __resource_group,
    955            __namespace,
    956            __event_hub,
    957            __client_id,
    958            __tenant_id,
    959            __subscription_id,
    960            __gcp_service_account,
    961            Unknown(std::string::String),
    962        }
    963        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    964            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    965            where
    966                D: serde::Deserializer<'de>,
    967            {
    968                struct Visitor;
    969                impl<'de> serde::de::Visitor<'de> for Visitor {
    970                    type Value = __FieldTag;
    971                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    972                        formatter.write_str("a field name for AzureEventHubs")
    973                    }
    974                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    975                    where
    976                        E: serde::de::Error,
    977                    {
    978                        use std::result::Result::Ok;
    979                        use std::string::ToString;
    980                        match value {
    981                            "state" => Ok(__FieldTag::__state),
    982                            "resourceGroup" => Ok(__FieldTag::__resource_group),
    983                            "resource_group" => Ok(__FieldTag::__resource_group),
    984                            "namespace" => Ok(__FieldTag::__namespace),
    985                            "eventHub" => Ok(__FieldTag::__event_hub),
    986                            "event_hub" => Ok(__FieldTag::__event_hub),
    987                            "clientId" => Ok(__FieldTag::__client_id),
    988                            "client_id" => Ok(__FieldTag::__client_id),
    989                            "tenantId" => Ok(__FieldTag::__tenant_id),
    990                            "tenant_id" => Ok(__FieldTag::__tenant_id),
    991                            "subscriptionId" => Ok(__FieldTag::__subscription_id),
    992                            "subscription_id" => Ok(__FieldTag::__subscription_id),
    993                            "gcpServiceAccount" => Ok(__FieldTag::__gcp_service_account),
    994                            "gcp_service_account" => Ok(__FieldTag::__gcp_service_account),
    995                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    996                        }
    997                    }
    998                }
    999                deserializer.deserialize_identifier(Visitor)
    1000            }
    1001        }
    1002        struct Visitor;
    1003        impl<'de> serde::de::Visitor<'de> for Visitor {
    1004            type Value = super::ingestion_data_source_settings::AzureEventHubs;
    1005            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    1006                formatter.write_str("struct AzureEventHubs")
    1007            }
    1008            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    1009            where
    1010                A: serde::de::MapAccess<'de>,
    1011            {
    1012                #[allow(unused_imports)]
    1013                use serde::de::Error;
    1014                use std::option::Option::Some;
    1015                let mut fields = std::collections::HashSet::new();
    1016                let mut result = Self::Value::new();
    1017                while let Some(tag) = map.next_key::<__FieldTag>()? {
    1018                    #[allow(clippy::match_single_binding)]
    1019                    match tag {
    1020                        __FieldTag::__state => {
    1021                            if !fields.insert(__FieldTag::__state) {
    1022                                return std::result::Result::Err(A::Error::duplicate_field(
    1023                                    "multiple values for state",
    1024                                ));
    1025                            }
    1026                            result.state = map.next_value::<std::option::Option<crate::model::ingestion_data_source_settings::azure_event_hubs::State>>()?.unwrap_or_default();
    1027                        }
    1028                        __FieldTag::__resource_group => {
    1029                            if !fields.insert(__FieldTag::__resource_group) {
    1030                                return std::result::Result::Err(A::Error::duplicate_field(
    1031                                    "multiple values for resource_group",
    1032                                ));
    1033                            }
    1034                            result.resource_group = map
    1035                                .next_value::<std::option::Option<std::string::String>>()?
    1036                                .unwrap_or_default();
    1037                        }
    1038                        __FieldTag::__namespace => {
    1039                            if !fields.insert(__FieldTag::__namespace) {
    1040                                return std::result::Result::Err(A::Error::duplicate_field(
    1041                                    "multiple values for namespace",
    1042                                ));
    1043                            }
    1044                            result.namespace = map
    1045                                .next_value::<std::option::Option<std::string::String>>()?
    1046                                .unwrap_or_default();
    1047                        }
    1048                        __FieldTag::__event_hub => {
    1049                            if !fields.insert(__FieldTag::__event_hub) {
    1050                                return std::result::Result::Err(A::Error::duplicate_field(
    1051                                    "multiple values for event_hub",
    1052                                ));
    1053                            }
    1054                            result.event_hub = map
    1055                                .next_value::<std::option::Option<std::string::String>>()?
    1056                                .unwrap_or_default();
    1057                        }
    1058                        __FieldTag::__client_id => {
    1059                            if !fields.insert(__FieldTag::__client_id) {
    1060                                return std::result::Result::Err(A::Error::duplicate_field(
    1061                                    "multiple values for client_id",
    1062                                ));
    1063                            }
    1064                            result.client_id = map
    1065                                .next_value::<std::option::Option<std::string::String>>()?
    1066                                .unwrap_or_default();
    1067                        }
    1068                        __FieldTag::__tenant_id => {
    1069                            if !fields.insert(__FieldTag::__tenant_id) {
    1070                                return std::result::Result::Err(A::Error::duplicate_field(
    1071                                    "multiple values for tenant_id",
    1072                                ));
    1073                            }
    1074                            result.tenant_id = map
    1075                                .next_value::<std::option::Option<std::string::String>>()?
    1076                                .unwrap_or_default();
    1077                        }
    1078                        __FieldTag::__subscription_id => {
    1079                            if !fields.insert(__FieldTag::__subscription_id) {
    1080                                return std::result::Result::Err(A::Error::duplicate_field(
    1081                                    "multiple values for subscription_id",
    1082                                ));
    1083                            }
    1084                            result.subscription_id = map
    1085                                .next_value::<std::option::Option<std::string::String>>()?
    1086                                .unwrap_or_default();
    1087                        }
    1088                        __FieldTag::__gcp_service_account => {
    1089                            if !fields.insert(__FieldTag::__gcp_service_account) {
    1090                                return std::result::Result::Err(A::Error::duplicate_field(
    1091                                    "multiple values for gcp_service_account",
    1092                                ));
    1093                            }
    1094                            result.gcp_service_account = map
    1095                                .next_value::<std::option::Option<std::string::String>>()?
    1096                                .unwrap_or_default();
    1097                        }
    1098                        __FieldTag::Unknown(key) => {
    1099                            let value = map.next_value::<serde_json::Value>()?;
    1100                            result._unknown_fields.insert(key, value);
    1101                        }
    1102                    }
    1103                }
    1104                std::result::Result::Ok(result)
    1105            }
    1106        }
    1107        deserializer.deserialize_any(Visitor)
    1108    }
    1109}
    1110
    1111#[doc(hidden)]
    1112impl<'de> serde::de::Deserialize<'de> for super::ingestion_data_source_settings::AwsMsk {
    1113    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    1114    where
    1115        D: serde::Deserializer<'de>,
    1116    {
    1117        #[allow(non_camel_case_types)]
    1118        #[doc(hidden)]
    1119        #[derive(PartialEq, Eq, Hash)]
    1120        enum __FieldTag {
    1121            __state,
    1122            __cluster_arn,
    1123            __topic,
    1124            __aws_role_arn,
    1125            __gcp_service_account,
    1126            Unknown(std::string::String),
    1127        }
    1128        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    1129            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    1130            where
    1131                D: serde::Deserializer<'de>,
    1132            {
    1133                struct Visitor;
    1134                impl<'de> serde::de::Visitor<'de> for Visitor {
    1135                    type Value = __FieldTag;
    1136                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    1137                        formatter.write_str("a field name for AwsMsk")
    1138                    }
    1139                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    1140                    where
    1141                        E: serde::de::Error,
    1142                    {
    1143                        use std::result::Result::Ok;
    1144                        use std::string::ToString;
    1145                        match value {
    1146                            "state" => Ok(__FieldTag::__state),
    1147                            "clusterArn" => Ok(__FieldTag::__cluster_arn),
    1148                            "cluster_arn" => Ok(__FieldTag::__cluster_arn),
    1149                            "topic" => Ok(__FieldTag::__topic),
    1150                            "awsRoleArn" => Ok(__FieldTag::__aws_role_arn),
    1151                            "aws_role_arn" => Ok(__FieldTag::__aws_role_arn),
    1152                            "gcpServiceAccount" => Ok(__FieldTag::__gcp_service_account),
    1153                            "gcp_service_account" => Ok(__FieldTag::__gcp_service_account),
    1154                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    1155                        }
    1156                    }
    1157                }
    1158                deserializer.deserialize_identifier(Visitor)
    1159            }
    1160        }
    1161        struct Visitor;
    1162        impl<'de> serde::de::Visitor<'de> for Visitor {
    1163            type Value = super::ingestion_data_source_settings::AwsMsk;
    1164            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    1165                formatter.write_str("struct AwsMsk")
    1166            }
    1167            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    1168            where
    1169                A: serde::de::MapAccess<'de>,
    1170            {
    1171                #[allow(unused_imports)]
    1172                use serde::de::Error;
    1173                use std::option::Option::Some;
    1174                let mut fields = std::collections::HashSet::new();
    1175                let mut result = Self::Value::new();
    1176                while let Some(tag) = map.next_key::<__FieldTag>()? {
    1177                    #[allow(clippy::match_single_binding)]
    1178                    match tag {
    1179                        __FieldTag::__state => {
    1180                            if !fields.insert(__FieldTag::__state) {
    1181                                return std::result::Result::Err(A::Error::duplicate_field(
    1182                                    "multiple values for state",
    1183                                ));
    1184                            }
    1185                            result.state = map
    1186                                .next_value::<std::option::Option<
    1187                                    crate::model::ingestion_data_source_settings::aws_msk::State,
    1188                                >>()?
    1189                                .unwrap_or_default();
    1190                        }
    1191                        __FieldTag::__cluster_arn => {
    1192                            if !fields.insert(__FieldTag::__cluster_arn) {
    1193                                return std::result::Result::Err(A::Error::duplicate_field(
    1194                                    "multiple values for cluster_arn",
    1195                                ));
    1196                            }
    1197                            result.cluster_arn = map
    1198                                .next_value::<std::option::Option<std::string::String>>()?
    1199                                .unwrap_or_default();
    1200                        }
    1201                        __FieldTag::__topic => {
    1202                            if !fields.insert(__FieldTag::__topic) {
    1203                                return std::result::Result::Err(A::Error::duplicate_field(
    1204                                    "multiple values for topic",
    1205                                ));
    1206                            }
    1207                            result.topic = map
    1208                                .next_value::<std::option::Option<std::string::String>>()?
    1209                                .unwrap_or_default();
    1210                        }
    1211                        __FieldTag::__aws_role_arn => {
    1212                            if !fields.insert(__FieldTag::__aws_role_arn) {
    1213                                return std::result::Result::Err(A::Error::duplicate_field(
    1214                                    "multiple values for aws_role_arn",
    1215                                ));
    1216                            }
    1217                            result.aws_role_arn = map
    1218                                .next_value::<std::option::Option<std::string::String>>()?
    1219                                .unwrap_or_default();
    1220                        }
    1221                        __FieldTag::__gcp_service_account => {
    1222                            if !fields.insert(__FieldTag::__gcp_service_account) {
    1223                                return std::result::Result::Err(A::Error::duplicate_field(
    1224                                    "multiple values for gcp_service_account",
    1225                                ));
    1226                            }
    1227                            result.gcp_service_account = map
    1228                                .next_value::<std::option::Option<std::string::String>>()?
    1229                                .unwrap_or_default();
    1230                        }
    1231                        __FieldTag::Unknown(key) => {
    1232                            let value = map.next_value::<serde_json::Value>()?;
    1233                            result._unknown_fields.insert(key, value);
    1234                        }
    1235                    }
    1236                }
    1237                std::result::Result::Ok(result)
    1238            }
    1239        }
    1240        deserializer.deserialize_any(Visitor)
    1241    }
    1242}
    1243
    1244#[doc(hidden)]
    1245impl<'de> serde::de::Deserialize<'de> for super::ingestion_data_source_settings::ConfluentCloud {
    1246    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    1247    where
    1248        D: serde::Deserializer<'de>,
    1249    {
    1250        #[allow(non_camel_case_types)]
    1251        #[doc(hidden)]
    1252        #[derive(PartialEq, Eq, Hash)]
    1253        enum __FieldTag {
    1254            __state,
    1255            __bootstrap_server,
    1256            __cluster_id,
    1257            __topic,
    1258            __identity_pool_id,
    1259            __gcp_service_account,
    1260            Unknown(std::string::String),
    1261        }
    1262        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    1263            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    1264            where
    1265                D: serde::Deserializer<'de>,
    1266            {
    1267                struct Visitor;
    1268                impl<'de> serde::de::Visitor<'de> for Visitor {
    1269                    type Value = __FieldTag;
    1270                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    1271                        formatter.write_str("a field name for ConfluentCloud")
    1272                    }
    1273                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    1274                    where
    1275                        E: serde::de::Error,
    1276                    {
    1277                        use std::result::Result::Ok;
    1278                        use std::string::ToString;
    1279                        match value {
    1280                            "state" => Ok(__FieldTag::__state),
    1281                            "bootstrapServer" => Ok(__FieldTag::__bootstrap_server),
    1282                            "bootstrap_server" => Ok(__FieldTag::__bootstrap_server),
    1283                            "clusterId" => Ok(__FieldTag::__cluster_id),
    1284                            "cluster_id" => Ok(__FieldTag::__cluster_id),
    1285                            "topic" => Ok(__FieldTag::__topic),
    1286                            "identityPoolId" => Ok(__FieldTag::__identity_pool_id),
    1287                            "identity_pool_id" => Ok(__FieldTag::__identity_pool_id),
    1288                            "gcpServiceAccount" => Ok(__FieldTag::__gcp_service_account),
    1289                            "gcp_service_account" => Ok(__FieldTag::__gcp_service_account),
    1290                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    1291                        }
    1292                    }
    1293                }
    1294                deserializer.deserialize_identifier(Visitor)
    1295            }
    1296        }
    1297        struct Visitor;
    1298        impl<'de> serde::de::Visitor<'de> for Visitor {
    1299            type Value = super::ingestion_data_source_settings::ConfluentCloud;
    1300            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    1301                formatter.write_str("struct ConfluentCloud")
    1302            }
    1303            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    1304            where
    1305                A: serde::de::MapAccess<'de>,
    1306            {
    1307                #[allow(unused_imports)]
    1308                use serde::de::Error;
    1309                use std::option::Option::Some;
    1310                let mut fields = std::collections::HashSet::new();
    1311                let mut result = Self::Value::new();
    1312                while let Some(tag) = map.next_key::<__FieldTag>()? {
    1313                    #[allow(clippy::match_single_binding)]
    1314                    match tag {
    1315                        __FieldTag::__state => {
    1316                            if !fields.insert(__FieldTag::__state) {
    1317                                return std::result::Result::Err(A::Error::duplicate_field(
    1318                                    "multiple values for state",
    1319                                ));
    1320                            }
    1321                            result.state = map.next_value::<std::option::Option<crate::model::ingestion_data_source_settings::confluent_cloud::State>>()?.unwrap_or_default();
    1322                        }
    1323                        __FieldTag::__bootstrap_server => {
    1324                            if !fields.insert(__FieldTag::__bootstrap_server) {
    1325                                return std::result::Result::Err(A::Error::duplicate_field(
    1326                                    "multiple values for bootstrap_server",
    1327                                ));
    1328                            }
    1329                            result.bootstrap_server = map
    1330                                .next_value::<std::option::Option<std::string::String>>()?
    1331                                .unwrap_or_default();
    1332                        }
    1333                        __FieldTag::__cluster_id => {
    1334                            if !fields.insert(__FieldTag::__cluster_id) {
    1335                                return std::result::Result::Err(A::Error::duplicate_field(
    1336                                    "multiple values for cluster_id",
    1337                                ));
    1338                            }
    1339                            result.cluster_id = map
    1340                                .next_value::<std::option::Option<std::string::String>>()?
    1341                                .unwrap_or_default();
    1342                        }
    1343                        __FieldTag::__topic => {
    1344                            if !fields.insert(__FieldTag::__topic) {
    1345                                return std::result::Result::Err(A::Error::duplicate_field(
    1346                                    "multiple values for topic",
    1347                                ));
    1348                            }
    1349                            result.topic = map
    1350                                .next_value::<std::option::Option<std::string::String>>()?
    1351                                .unwrap_or_default();
    1352                        }
    1353                        __FieldTag::__identity_pool_id => {
    1354                            if !fields.insert(__FieldTag::__identity_pool_id) {
    1355                                return std::result::Result::Err(A::Error::duplicate_field(
    1356                                    "multiple values for identity_pool_id",
    1357                                ));
    1358                            }
    1359                            result.identity_pool_id = map
    1360                                .next_value::<std::option::Option<std::string::String>>()?
    1361                                .unwrap_or_default();
    1362                        }
    1363                        __FieldTag::__gcp_service_account => {
    1364                            if !fields.insert(__FieldTag::__gcp_service_account) {
    1365                                return std::result::Result::Err(A::Error::duplicate_field(
    1366                                    "multiple values for gcp_service_account",
    1367                                ));
    1368                            }
    1369                            result.gcp_service_account = map
    1370                                .next_value::<std::option::Option<std::string::String>>()?
    1371                                .unwrap_or_default();
    1372                        }
    1373                        __FieldTag::Unknown(key) => {
    1374                            let value = map.next_value::<serde_json::Value>()?;
    1375                            result._unknown_fields.insert(key, value);
    1376                        }
    1377                    }
    1378                }
    1379                std::result::Result::Ok(result)
    1380            }
    1381        }
    1382        deserializer.deserialize_any(Visitor)
    1383    }
    1384}
    1385
    1386#[doc(hidden)]
    1387impl<'de> serde::de::Deserialize<'de> for super::PlatformLogsSettings {
    1388    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    1389    where
    1390        D: serde::Deserializer<'de>,
    1391    {
    1392        #[allow(non_camel_case_types)]
    1393        #[doc(hidden)]
    1394        #[derive(PartialEq, Eq, Hash)]
    1395        enum __FieldTag {
    1396            __severity,
    1397            Unknown(std::string::String),
    1398        }
    1399        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    1400            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    1401            where
    1402                D: serde::Deserializer<'de>,
    1403            {
    1404                struct Visitor;
    1405                impl<'de> serde::de::Visitor<'de> for Visitor {
    1406                    type Value = __FieldTag;
    1407                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    1408                        formatter.write_str("a field name for PlatformLogsSettings")
    1409                    }
    1410                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    1411                    where
    1412                        E: serde::de::Error,
    1413                    {
    1414                        use std::result::Result::Ok;
    1415                        use std::string::ToString;
    1416                        match value {
    1417                            "severity" => Ok(__FieldTag::__severity),
    1418                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    1419                        }
    1420                    }
    1421                }
    1422                deserializer.deserialize_identifier(Visitor)
    1423            }
    1424        }
    1425        struct Visitor;
    1426        impl<'de> serde::de::Visitor<'de> for Visitor {
    1427            type Value = super::PlatformLogsSettings;
    1428            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    1429                formatter.write_str("struct PlatformLogsSettings")
    1430            }
    1431            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    1432            where
    1433                A: serde::de::MapAccess<'de>,
    1434            {
    1435                #[allow(unused_imports)]
    1436                use serde::de::Error;
    1437                use std::option::Option::Some;
    1438                let mut fields = std::collections::HashSet::new();
    1439                let mut result = Self::Value::new();
    1440                while let Some(tag) = map.next_key::<__FieldTag>()? {
    1441                    #[allow(clippy::match_single_binding)]
    1442                    match tag {
    1443                        __FieldTag::__severity => {
    1444                            if !fields.insert(__FieldTag::__severity) {
    1445                                return std::result::Result::Err(A::Error::duplicate_field(
    1446                                    "multiple values for severity",
    1447                                ));
    1448                            }
    1449                            result.severity =
    1450                                map.next_value::<std::option::Option<
    1451                                    crate::model::platform_logs_settings::Severity,
    1452                                >>()?
    1453                                .unwrap_or_default();
    1454                        }
    1455                        __FieldTag::Unknown(key) => {
    1456                            let value = map.next_value::<serde_json::Value>()?;
    1457                            result._unknown_fields.insert(key, value);
    1458                        }
    1459                    }
    1460                }
    1461                std::result::Result::Ok(result)
    1462            }
    1463        }
    1464        deserializer.deserialize_any(Visitor)
    1465    }
    1466}
    1467
    1468#[doc(hidden)]
    1469impl<'de> serde::de::Deserialize<'de> for super::JavaScriptUDF {
    1470    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    1471    where
    1472        D: serde::Deserializer<'de>,
    1473    {
    1474        #[allow(non_camel_case_types)]
    1475        #[doc(hidden)]
    1476        #[derive(PartialEq, Eq, Hash)]
    1477        enum __FieldTag {
    1478            __function_name,
    1479            __code,
    1480            Unknown(std::string::String),
    1481        }
    1482        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    1483            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    1484            where
    1485                D: serde::Deserializer<'de>,
    1486            {
    1487                struct Visitor;
    1488                impl<'de> serde::de::Visitor<'de> for Visitor {
    1489                    type Value = __FieldTag;
    1490                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    1491                        formatter.write_str("a field name for JavaScriptUDF")
    1492                    }
    1493                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    1494                    where
    1495                        E: serde::de::Error,
    1496                    {
    1497                        use std::result::Result::Ok;
    1498                        use std::string::ToString;
    1499                        match value {
    1500                            "functionName" => Ok(__FieldTag::__function_name),
    1501                            "function_name" => Ok(__FieldTag::__function_name),
    1502                            "code" => Ok(__FieldTag::__code),
    1503                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    1504                        }
    1505                    }
    1506                }
    1507                deserializer.deserialize_identifier(Visitor)
    1508            }
    1509        }
    1510        struct Visitor;
    1511        impl<'de> serde::de::Visitor<'de> for Visitor {
    1512            type Value = super::JavaScriptUDF;
    1513            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    1514                formatter.write_str("struct JavaScriptUDF")
    1515            }
    1516            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    1517            where
    1518                A: serde::de::MapAccess<'de>,
    1519            {
    1520                #[allow(unused_imports)]
    1521                use serde::de::Error;
    1522                use std::option::Option::Some;
    1523                let mut fields = std::collections::HashSet::new();
    1524                let mut result = Self::Value::new();
    1525                while let Some(tag) = map.next_key::<__FieldTag>()? {
    1526                    #[allow(clippy::match_single_binding)]
    1527                    match tag {
    1528                        __FieldTag::__function_name => {
    1529                            if !fields.insert(__FieldTag::__function_name) {
    1530                                return std::result::Result::Err(A::Error::duplicate_field(
    1531                                    "multiple values for function_name",
    1532                                ));
    1533                            }
    1534                            result.function_name = map
    1535                                .next_value::<std::option::Option<std::string::String>>()?
    1536                                .unwrap_or_default();
    1537                        }
    1538                        __FieldTag::__code => {
    1539                            if !fields.insert(__FieldTag::__code) {
    1540                                return std::result::Result::Err(A::Error::duplicate_field(
    1541                                    "multiple values for code",
    1542                                ));
    1543                            }
    1544                            result.code = map
    1545                                .next_value::<std::option::Option<std::string::String>>()?
    1546                                .unwrap_or_default();
    1547                        }
    1548                        __FieldTag::Unknown(key) => {
    1549                            let value = map.next_value::<serde_json::Value>()?;
    1550                            result._unknown_fields.insert(key, value);
    1551                        }
    1552                    }
    1553                }
    1554                std::result::Result::Ok(result)
    1555            }
    1556        }
    1557        deserializer.deserialize_any(Visitor)
    1558    }
    1559}
    1560
    1561#[doc(hidden)]
    1562impl<'de> serde::de::Deserialize<'de> for super::MessageTransform {
    1563    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    1564    where
    1565        D: serde::Deserializer<'de>,
    1566    {
    1567        #[allow(non_camel_case_types)]
    1568        #[doc(hidden)]
    1569        #[derive(PartialEq, Eq, Hash)]
    1570        enum __FieldTag {
    1571            __javascript_udf,
    1572            __enabled,
    1573            __disabled,
    1574            Unknown(std::string::String),
    1575        }
    1576        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    1577            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    1578            where
    1579                D: serde::Deserializer<'de>,
    1580            {
    1581                struct Visitor;
    1582                impl<'de> serde::de::Visitor<'de> for Visitor {
    1583                    type Value = __FieldTag;
    1584                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    1585                        formatter.write_str("a field name for MessageTransform")
    1586                    }
    1587                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    1588                    where
    1589                        E: serde::de::Error,
    1590                    {
    1591                        use std::result::Result::Ok;
    1592                        use std::string::ToString;
    1593                        match value {
    1594                            "javascriptUdf" => Ok(__FieldTag::__javascript_udf),
    1595                            "javascript_udf" => Ok(__FieldTag::__javascript_udf),
    1596                            "enabled" => Ok(__FieldTag::__enabled),
    1597                            "disabled" => Ok(__FieldTag::__disabled),
    1598                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    1599                        }
    1600                    }
    1601                }
    1602                deserializer.deserialize_identifier(Visitor)
    1603            }
    1604        }
    1605        struct Visitor;
    1606        impl<'de> serde::de::Visitor<'de> for Visitor {
    1607            type Value = super::MessageTransform;
    1608            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    1609                formatter.write_str("struct MessageTransform")
    1610            }
    1611            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    1612            where
    1613                A: serde::de::MapAccess<'de>,
    1614            {
    1615                #[allow(unused_imports)]
    1616                use serde::de::Error;
    1617                use std::option::Option::Some;
    1618                let mut fields = std::collections::HashSet::new();
    1619                let mut result = Self::Value::new();
    1620                while let Some(tag) = map.next_key::<__FieldTag>()? {
    1621                    #[allow(clippy::match_single_binding)]
    1622                    match tag {
    1623                        __FieldTag::__javascript_udf => {
    1624                            if !fields.insert(__FieldTag::__javascript_udf) {
    1625                                return std::result::Result::Err(A::Error::duplicate_field(
    1626                                    "multiple values for javascript_udf",
    1627                                ));
    1628                            }
    1629                            if result.transform.is_some() {
    1630                                return std::result::Result::Err(A::Error::duplicate_field(
    1631                                    "multiple values for `transform`, a oneof with full ID .google.pubsub.v1.MessageTransform.javascript_udf, latest field was javascriptUdf",
    1632                                ));
    1633                            }
    1634                            result.transform = std::option::Option::Some(
    1635                                crate::model::message_transform::Transform::JavascriptUdf(
    1636                                    map.next_value::<std::option::Option<
    1637                                        std::boxed::Box<crate::model::JavaScriptUDF>,
    1638                                    >>()?
    1639                                    .unwrap_or_default(),
    1640                                ),
    1641                            );
    1642                        }
    1643                        __FieldTag::__enabled => {
    1644                            if !fields.insert(__FieldTag::__enabled) {
    1645                                return std::result::Result::Err(A::Error::duplicate_field(
    1646                                    "multiple values for enabled",
    1647                                ));
    1648                            }
    1649                            result.enabled = map
    1650                                .next_value::<std::option::Option<bool>>()?
    1651                                .unwrap_or_default();
    1652                        }
    1653                        __FieldTag::__disabled => {
    1654                            if !fields.insert(__FieldTag::__disabled) {
    1655                                return std::result::Result::Err(A::Error::duplicate_field(
    1656                                    "multiple values for disabled",
    1657                                ));
    1658                            }
    1659                            result.disabled = map
    1660                                .next_value::<std::option::Option<bool>>()?
    1661                                .unwrap_or_default();
    1662                        }
    1663                        __FieldTag::Unknown(key) => {
    1664                            let value = map.next_value::<serde_json::Value>()?;
    1665                            result._unknown_fields.insert(key, value);
    1666                        }
    1667                    }
    1668                }
    1669                std::result::Result::Ok(result)
    1670            }
    1671        }
    1672        deserializer.deserialize_any(Visitor)
    1673    }
    1674}
    1675
    1676#[doc(hidden)]
    1677impl<'de> serde::de::Deserialize<'de> for super::Topic {
    1678    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    1679    where
    1680        D: serde::Deserializer<'de>,
    1681    {
    1682        #[allow(non_camel_case_types)]
    1683        #[doc(hidden)]
    1684        #[derive(PartialEq, Eq, Hash)]
    1685        enum __FieldTag {
    1686            __name,
    1687            __labels,
    1688            __message_storage_policy,
    1689            __kms_key_name,
    1690            __schema_settings,
    1691            __satisfies_pzs,
    1692            __message_retention_duration,
    1693            __state,
    1694            __ingestion_data_source_settings,
    1695            __message_transforms,
    1696            __tags,
    1697            Unknown(std::string::String),
    1698        }
    1699        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    1700            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    1701            where
    1702                D: serde::Deserializer<'de>,
    1703            {
    1704                struct Visitor;
    1705                impl<'de> serde::de::Visitor<'de> for Visitor {
    1706                    type Value = __FieldTag;
    1707                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    1708                        formatter.write_str("a field name for Topic")
    1709                    }
    1710                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    1711                    where
    1712                        E: serde::de::Error,
    1713                    {
    1714                        use std::result::Result::Ok;
    1715                        use std::string::ToString;
    1716                        match value {
    1717                            "name" => Ok(__FieldTag::__name),
    1718                            "labels" => Ok(__FieldTag::__labels),
    1719                            "messageStoragePolicy" => Ok(__FieldTag::__message_storage_policy),
    1720                            "message_storage_policy" => Ok(__FieldTag::__message_storage_policy),
    1721                            "kmsKeyName" => Ok(__FieldTag::__kms_key_name),
    1722                            "kms_key_name" => Ok(__FieldTag::__kms_key_name),
    1723                            "schemaSettings" => Ok(__FieldTag::__schema_settings),
    1724                            "schema_settings" => Ok(__FieldTag::__schema_settings),
    1725                            "satisfiesPzs" => Ok(__FieldTag::__satisfies_pzs),
    1726                            "satisfies_pzs" => Ok(__FieldTag::__satisfies_pzs),
    1727                            "messageRetentionDuration" => {
    1728                                Ok(__FieldTag::__message_retention_duration)
    1729                            }
    1730                            "message_retention_duration" => {
    1731                                Ok(__FieldTag::__message_retention_duration)
    1732                            }
    1733                            "state" => Ok(__FieldTag::__state),
    1734                            "ingestionDataSourceSettings" => {
    1735                                Ok(__FieldTag::__ingestion_data_source_settings)
    1736                            }
    1737                            "ingestion_data_source_settings" => {
    1738                                Ok(__FieldTag::__ingestion_data_source_settings)
    1739                            }
    1740                            "messageTransforms" => Ok(__FieldTag::__message_transforms),
    1741                            "message_transforms" => Ok(__FieldTag::__message_transforms),
    1742                            "tags" => Ok(__FieldTag::__tags),
    1743                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    1744                        }
    1745                    }
    1746                }
    1747                deserializer.deserialize_identifier(Visitor)
    1748            }
    1749        }
    1750        struct Visitor;
    1751        impl<'de> serde::de::Visitor<'de> for Visitor {
    1752            type Value = super::Topic;
    1753            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    1754                formatter.write_str("struct Topic")
    1755            }
    1756            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    1757            where
    1758                A: serde::de::MapAccess<'de>,
    1759            {
    1760                #[allow(unused_imports)]
    1761                use serde::de::Error;
    1762                use std::option::Option::Some;
    1763                let mut fields = std::collections::HashSet::new();
    1764                let mut result = Self::Value::new();
    1765                while let Some(tag) = map.next_key::<__FieldTag>()? {
    1766                    #[allow(clippy::match_single_binding)]
    1767                    match tag {
    1768                        __FieldTag::__name => {
    1769                            if !fields.insert(__FieldTag::__name) {
    1770                                return std::result::Result::Err(A::Error::duplicate_field(
    1771                                    "multiple values for name",
    1772                                ));
    1773                            }
    1774                            result.name = map
    1775                                .next_value::<std::option::Option<std::string::String>>()?
    1776                                .unwrap_or_default();
    1777                        }
    1778                        __FieldTag::__labels => {
    1779                            if !fields.insert(__FieldTag::__labels) {
    1780                                return std::result::Result::Err(A::Error::duplicate_field(
    1781                                    "multiple values for labels",
    1782                                ));
    1783                            }
    1784                            result.labels = map
    1785                                .next_value::<std::option::Option<
    1786                                    std::collections::HashMap<
    1787                                        std::string::String,
    1788                                        std::string::String,
    1789                                    >,
    1790                                >>()?
    1791                                .unwrap_or_default();
    1792                        }
    1793                        __FieldTag::__message_storage_policy => {
    1794                            if !fields.insert(__FieldTag::__message_storage_policy) {
    1795                                return std::result::Result::Err(A::Error::duplicate_field(
    1796                                    "multiple values for message_storage_policy",
    1797                                ));
    1798                            }
    1799                            result.message_storage_policy = map.next_value::<std::option::Option<crate::model::MessageStoragePolicy>>()?
    1800                                ;
    1801                        }
    1802                        __FieldTag::__kms_key_name => {
    1803                            if !fields.insert(__FieldTag::__kms_key_name) {
    1804                                return std::result::Result::Err(A::Error::duplicate_field(
    1805                                    "multiple values for kms_key_name",
    1806                                ));
    1807                            }
    1808                            result.kms_key_name = map
    1809                                .next_value::<std::option::Option<std::string::String>>()?
    1810                                .unwrap_or_default();
    1811                        }
    1812                        __FieldTag::__schema_settings => {
    1813                            if !fields.insert(__FieldTag::__schema_settings) {
    1814                                return std::result::Result::Err(A::Error::duplicate_field(
    1815                                    "multiple values for schema_settings",
    1816                                ));
    1817                            }
    1818                            result.schema_settings = map
    1819                                .next_value::<std::option::Option<crate::model::SchemaSettings>>(
    1820                                )?;
    1821                        }
    1822                        __FieldTag::__satisfies_pzs => {
    1823                            if !fields.insert(__FieldTag::__satisfies_pzs) {
    1824                                return std::result::Result::Err(A::Error::duplicate_field(
    1825                                    "multiple values for satisfies_pzs",
    1826                                ));
    1827                            }
    1828                            result.satisfies_pzs = map
    1829                                .next_value::<std::option::Option<bool>>()?
    1830                                .unwrap_or_default();
    1831                        }
    1832                        __FieldTag::__message_retention_duration => {
    1833                            if !fields.insert(__FieldTag::__message_retention_duration) {
    1834                                return std::result::Result::Err(A::Error::duplicate_field(
    1835                                    "multiple values for message_retention_duration",
    1836                                ));
    1837                            }
    1838                            result.message_retention_duration =
    1839                                map.next_value::<std::option::Option<wkt::Duration>>()?;
    1840                        }
    1841                        __FieldTag::__state => {
    1842                            if !fields.insert(__FieldTag::__state) {
    1843                                return std::result::Result::Err(A::Error::duplicate_field(
    1844                                    "multiple values for state",
    1845                                ));
    1846                            }
    1847                            result.state = map
    1848                                .next_value::<std::option::Option<crate::model::topic::State>>()?
    1849                                .unwrap_or_default();
    1850                        }
    1851                        __FieldTag::__ingestion_data_source_settings => {
    1852                            if !fields.insert(__FieldTag::__ingestion_data_source_settings) {
    1853                                return std::result::Result::Err(A::Error::duplicate_field(
    1854                                    "multiple values for ingestion_data_source_settings",
    1855                                ));
    1856                            }
    1857                            result.ingestion_data_source_settings = map.next_value::<std::option::Option<crate::model::IngestionDataSourceSettings>>()?
    1858                                ;
    1859                        }
    1860                        __FieldTag::__message_transforms => {
    1861                            if !fields.insert(__FieldTag::__message_transforms) {
    1862                                return std::result::Result::Err(A::Error::duplicate_field(
    1863                                    "multiple values for message_transforms",
    1864                                ));
    1865                            }
    1866                            result.message_transforms =
    1867                                map.next_value::<std::option::Option<
    1868                                    std::vec::Vec<crate::model::MessageTransform>,
    1869                                >>()?
    1870                                .unwrap_or_default();
    1871                        }
    1872                        __FieldTag::__tags => {
    1873                            if !fields.insert(__FieldTag::__tags) {
    1874                                return std::result::Result::Err(A::Error::duplicate_field(
    1875                                    "multiple values for tags",
    1876                                ));
    1877                            }
    1878                            result.tags = map
    1879                                .next_value::<std::option::Option<
    1880                                    std::collections::HashMap<
    1881                                        std::string::String,
    1882                                        std::string::String,
    1883                                    >,
    1884                                >>()?
    1885                                .unwrap_or_default();
    1886                        }
    1887                        __FieldTag::Unknown(key) => {
    1888                            let value = map.next_value::<serde_json::Value>()?;
    1889                            result._unknown_fields.insert(key, value);
    1890                        }
    1891                    }
    1892                }
    1893                std::result::Result::Ok(result)
    1894            }
    1895        }
    1896        deserializer.deserialize_any(Visitor)
    1897    }
    1898}
    1899
    1900#[doc(hidden)]
    1901impl<'de> serde::de::Deserialize<'de> for super::GetTopicRequest {
    1902    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    1903    where
    1904        D: serde::Deserializer<'de>,
    1905    {
    1906        #[allow(non_camel_case_types)]
    1907        #[doc(hidden)]
    1908        #[derive(PartialEq, Eq, Hash)]
    1909        enum __FieldTag {
    1910            __topic,
    1911            Unknown(std::string::String),
    1912        }
    1913        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    1914            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    1915            where
    1916                D: serde::Deserializer<'de>,
    1917            {
    1918                struct Visitor;
    1919                impl<'de> serde::de::Visitor<'de> for Visitor {
    1920                    type Value = __FieldTag;
    1921                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    1922                        formatter.write_str("a field name for GetTopicRequest")
    1923                    }
    1924                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    1925                    where
    1926                        E: serde::de::Error,
    1927                    {
    1928                        use std::result::Result::Ok;
    1929                        use std::string::ToString;
    1930                        match value {
    1931                            "topic" => Ok(__FieldTag::__topic),
    1932                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    1933                        }
    1934                    }
    1935                }
    1936                deserializer.deserialize_identifier(Visitor)
    1937            }
    1938        }
    1939        struct Visitor;
    1940        impl<'de> serde::de::Visitor<'de> for Visitor {
    1941            type Value = super::GetTopicRequest;
    1942            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    1943                formatter.write_str("struct GetTopicRequest")
    1944            }
    1945            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    1946            where
    1947                A: serde::de::MapAccess<'de>,
    1948            {
    1949                #[allow(unused_imports)]
    1950                use serde::de::Error;
    1951                use std::option::Option::Some;
    1952                let mut fields = std::collections::HashSet::new();
    1953                let mut result = Self::Value::new();
    1954                while let Some(tag) = map.next_key::<__FieldTag>()? {
    1955                    #[allow(clippy::match_single_binding)]
    1956                    match tag {
    1957                        __FieldTag::__topic => {
    1958                            if !fields.insert(__FieldTag::__topic) {
    1959                                return std::result::Result::Err(A::Error::duplicate_field(
    1960                                    "multiple values for topic",
    1961                                ));
    1962                            }
    1963                            result.topic = map
    1964                                .next_value::<std::option::Option<std::string::String>>()?
    1965                                .unwrap_or_default();
    1966                        }
    1967                        __FieldTag::Unknown(key) => {
    1968                            let value = map.next_value::<serde_json::Value>()?;
    1969                            result._unknown_fields.insert(key, value);
    1970                        }
    1971                    }
    1972                }
    1973                std::result::Result::Ok(result)
    1974            }
    1975        }
    1976        deserializer.deserialize_any(Visitor)
    1977    }
    1978}
    1979
    1980#[doc(hidden)]
    1981impl<'de> serde::de::Deserialize<'de> for super::UpdateTopicRequest {
    1982    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    1983    where
    1984        D: serde::Deserializer<'de>,
    1985    {
    1986        #[allow(non_camel_case_types)]
    1987        #[doc(hidden)]
    1988        #[derive(PartialEq, Eq, Hash)]
    1989        enum __FieldTag {
    1990            __topic,
    1991            __update_mask,
    1992            Unknown(std::string::String),
    1993        }
    1994        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    1995            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    1996            where
    1997                D: serde::Deserializer<'de>,
    1998            {
    1999                struct Visitor;
    2000                impl<'de> serde::de::Visitor<'de> for Visitor {
    2001                    type Value = __FieldTag;
    2002                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2003                        formatter.write_str("a field name for UpdateTopicRequest")
    2004                    }
    2005                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    2006                    where
    2007                        E: serde::de::Error,
    2008                    {
    2009                        use std::result::Result::Ok;
    2010                        use std::string::ToString;
    2011                        match value {
    2012                            "topic" => Ok(__FieldTag::__topic),
    2013                            "updateMask" => Ok(__FieldTag::__update_mask),
    2014                            "update_mask" => Ok(__FieldTag::__update_mask),
    2015                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    2016                        }
    2017                    }
    2018                }
    2019                deserializer.deserialize_identifier(Visitor)
    2020            }
    2021        }
    2022        struct Visitor;
    2023        impl<'de> serde::de::Visitor<'de> for Visitor {
    2024            type Value = super::UpdateTopicRequest;
    2025            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2026                formatter.write_str("struct UpdateTopicRequest")
    2027            }
    2028            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    2029            where
    2030                A: serde::de::MapAccess<'de>,
    2031            {
    2032                #[allow(unused_imports)]
    2033                use serde::de::Error;
    2034                use std::option::Option::Some;
    2035                let mut fields = std::collections::HashSet::new();
    2036                let mut result = Self::Value::new();
    2037                while let Some(tag) = map.next_key::<__FieldTag>()? {
    2038                    #[allow(clippy::match_single_binding)]
    2039                    match tag {
    2040                        __FieldTag::__topic => {
    2041                            if !fields.insert(__FieldTag::__topic) {
    2042                                return std::result::Result::Err(A::Error::duplicate_field(
    2043                                    "multiple values for topic",
    2044                                ));
    2045                            }
    2046                            result.topic =
    2047                                map.next_value::<std::option::Option<crate::model::Topic>>()?;
    2048                        }
    2049                        __FieldTag::__update_mask => {
    2050                            if !fields.insert(__FieldTag::__update_mask) {
    2051                                return std::result::Result::Err(A::Error::duplicate_field(
    2052                                    "multiple values for update_mask",
    2053                                ));
    2054                            }
    2055                            result.update_mask =
    2056                                map.next_value::<std::option::Option<wkt::FieldMask>>()?;
    2057                        }
    2058                        __FieldTag::Unknown(key) => {
    2059                            let value = map.next_value::<serde_json::Value>()?;
    2060                            result._unknown_fields.insert(key, value);
    2061                        }
    2062                    }
    2063                }
    2064                std::result::Result::Ok(result)
    2065            }
    2066        }
    2067        deserializer.deserialize_any(Visitor)
    2068    }
    2069}
    2070
    2071#[doc(hidden)]
    2072impl<'de> serde::de::Deserialize<'de> for super::ListTopicsRequest {
    2073    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2074    where
    2075        D: serde::Deserializer<'de>,
    2076    {
    2077        #[allow(non_camel_case_types)]
    2078        #[doc(hidden)]
    2079        #[derive(PartialEq, Eq, Hash)]
    2080        enum __FieldTag {
    2081            __project,
    2082            __page_size,
    2083            __page_token,
    2084            Unknown(std::string::String),
    2085        }
    2086        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    2087            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2088            where
    2089                D: serde::Deserializer<'de>,
    2090            {
    2091                struct Visitor;
    2092                impl<'de> serde::de::Visitor<'de> for Visitor {
    2093                    type Value = __FieldTag;
    2094                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2095                        formatter.write_str("a field name for ListTopicsRequest")
    2096                    }
    2097                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    2098                    where
    2099                        E: serde::de::Error,
    2100                    {
    2101                        use std::result::Result::Ok;
    2102                        use std::string::ToString;
    2103                        match value {
    2104                            "project" => Ok(__FieldTag::__project),
    2105                            "pageSize" => Ok(__FieldTag::__page_size),
    2106                            "page_size" => Ok(__FieldTag::__page_size),
    2107                            "pageToken" => Ok(__FieldTag::__page_token),
    2108                            "page_token" => Ok(__FieldTag::__page_token),
    2109                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    2110                        }
    2111                    }
    2112                }
    2113                deserializer.deserialize_identifier(Visitor)
    2114            }
    2115        }
    2116        struct Visitor;
    2117        impl<'de> serde::de::Visitor<'de> for Visitor {
    2118            type Value = super::ListTopicsRequest;
    2119            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2120                formatter.write_str("struct ListTopicsRequest")
    2121            }
    2122            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    2123            where
    2124                A: serde::de::MapAccess<'de>,
    2125            {
    2126                #[allow(unused_imports)]
    2127                use serde::de::Error;
    2128                use std::option::Option::Some;
    2129                let mut fields = std::collections::HashSet::new();
    2130                let mut result = Self::Value::new();
    2131                while let Some(tag) = map.next_key::<__FieldTag>()? {
    2132                    #[allow(clippy::match_single_binding)]
    2133                    match tag {
    2134                        __FieldTag::__project => {
    2135                            if !fields.insert(__FieldTag::__project) {
    2136                                return std::result::Result::Err(A::Error::duplicate_field(
    2137                                    "multiple values for project",
    2138                                ));
    2139                            }
    2140                            result.project = map
    2141                                .next_value::<std::option::Option<std::string::String>>()?
    2142                                .unwrap_or_default();
    2143                        }
    2144                        __FieldTag::__page_size => {
    2145                            if !fields.insert(__FieldTag::__page_size) {
    2146                                return std::result::Result::Err(A::Error::duplicate_field(
    2147                                    "multiple values for page_size",
    2148                                ));
    2149                            }
    2150                            struct __With(std::option::Option<i32>);
    2151                            impl<'de> serde::de::Deserialize<'de> for __With {
    2152                                fn deserialize<D>(
    2153                                    deserializer: D,
    2154                                ) -> std::result::Result<Self, D::Error>
    2155                                where
    2156                                    D: serde::de::Deserializer<'de>,
    2157                                {
    2158                                    serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
    2159                                }
    2160                            }
    2161                            result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
    2162                        }
    2163                        __FieldTag::__page_token => {
    2164                            if !fields.insert(__FieldTag::__page_token) {
    2165                                return std::result::Result::Err(A::Error::duplicate_field(
    2166                                    "multiple values for page_token",
    2167                                ));
    2168                            }
    2169                            result.page_token = map
    2170                                .next_value::<std::option::Option<std::string::String>>()?
    2171                                .unwrap_or_default();
    2172                        }
    2173                        __FieldTag::Unknown(key) => {
    2174                            let value = map.next_value::<serde_json::Value>()?;
    2175                            result._unknown_fields.insert(key, value);
    2176                        }
    2177                    }
    2178                }
    2179                std::result::Result::Ok(result)
    2180            }
    2181        }
    2182        deserializer.deserialize_any(Visitor)
    2183    }
    2184}
    2185
    2186#[doc(hidden)]
    2187impl<'de> serde::de::Deserialize<'de> for super::ListTopicsResponse {
    2188    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2189    where
    2190        D: serde::Deserializer<'de>,
    2191    {
    2192        #[allow(non_camel_case_types)]
    2193        #[doc(hidden)]
    2194        #[derive(PartialEq, Eq, Hash)]
    2195        enum __FieldTag {
    2196            __topics,
    2197            __next_page_token,
    2198            Unknown(std::string::String),
    2199        }
    2200        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    2201            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2202            where
    2203                D: serde::Deserializer<'de>,
    2204            {
    2205                struct Visitor;
    2206                impl<'de> serde::de::Visitor<'de> for Visitor {
    2207                    type Value = __FieldTag;
    2208                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2209                        formatter.write_str("a field name for ListTopicsResponse")
    2210                    }
    2211                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    2212                    where
    2213                        E: serde::de::Error,
    2214                    {
    2215                        use std::result::Result::Ok;
    2216                        use std::string::ToString;
    2217                        match value {
    2218                            "topics" => Ok(__FieldTag::__topics),
    2219                            "nextPageToken" => Ok(__FieldTag::__next_page_token),
    2220                            "next_page_token" => Ok(__FieldTag::__next_page_token),
    2221                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    2222                        }
    2223                    }
    2224                }
    2225                deserializer.deserialize_identifier(Visitor)
    2226            }
    2227        }
    2228        struct Visitor;
    2229        impl<'de> serde::de::Visitor<'de> for Visitor {
    2230            type Value = super::ListTopicsResponse;
    2231            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2232                formatter.write_str("struct ListTopicsResponse")
    2233            }
    2234            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    2235            where
    2236                A: serde::de::MapAccess<'de>,
    2237            {
    2238                #[allow(unused_imports)]
    2239                use serde::de::Error;
    2240                use std::option::Option::Some;
    2241                let mut fields = std::collections::HashSet::new();
    2242                let mut result = Self::Value::new();
    2243                while let Some(tag) = map.next_key::<__FieldTag>()? {
    2244                    #[allow(clippy::match_single_binding)]
    2245                    match tag {
    2246                        __FieldTag::__topics => {
    2247                            if !fields.insert(__FieldTag::__topics) {
    2248                                return std::result::Result::Err(A::Error::duplicate_field(
    2249                                    "multiple values for topics",
    2250                                ));
    2251                            }
    2252                            result.topics = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Topic>>>()?.unwrap_or_default();
    2253                        }
    2254                        __FieldTag::__next_page_token => {
    2255                            if !fields.insert(__FieldTag::__next_page_token) {
    2256                                return std::result::Result::Err(A::Error::duplicate_field(
    2257                                    "multiple values for next_page_token",
    2258                                ));
    2259                            }
    2260                            result.next_page_token = map
    2261                                .next_value::<std::option::Option<std::string::String>>()?
    2262                                .unwrap_or_default();
    2263                        }
    2264                        __FieldTag::Unknown(key) => {
    2265                            let value = map.next_value::<serde_json::Value>()?;
    2266                            result._unknown_fields.insert(key, value);
    2267                        }
    2268                    }
    2269                }
    2270                std::result::Result::Ok(result)
    2271            }
    2272        }
    2273        deserializer.deserialize_any(Visitor)
    2274    }
    2275}
    2276
    2277#[doc(hidden)]
    2278impl<'de> serde::de::Deserialize<'de> for super::ListTopicSubscriptionsRequest {
    2279    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2280    where
    2281        D: serde::Deserializer<'de>,
    2282    {
    2283        #[allow(non_camel_case_types)]
    2284        #[doc(hidden)]
    2285        #[derive(PartialEq, Eq, Hash)]
    2286        enum __FieldTag {
    2287            __topic,
    2288            __page_size,
    2289            __page_token,
    2290            Unknown(std::string::String),
    2291        }
    2292        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    2293            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2294            where
    2295                D: serde::Deserializer<'de>,
    2296            {
    2297                struct Visitor;
    2298                impl<'de> serde::de::Visitor<'de> for Visitor {
    2299                    type Value = __FieldTag;
    2300                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2301                        formatter.write_str("a field name for ListTopicSubscriptionsRequest")
    2302                    }
    2303                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    2304                    where
    2305                        E: serde::de::Error,
    2306                    {
    2307                        use std::result::Result::Ok;
    2308                        use std::string::ToString;
    2309                        match value {
    2310                            "topic" => Ok(__FieldTag::__topic),
    2311                            "pageSize" => Ok(__FieldTag::__page_size),
    2312                            "page_size" => Ok(__FieldTag::__page_size),
    2313                            "pageToken" => Ok(__FieldTag::__page_token),
    2314                            "page_token" => Ok(__FieldTag::__page_token),
    2315                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    2316                        }
    2317                    }
    2318                }
    2319                deserializer.deserialize_identifier(Visitor)
    2320            }
    2321        }
    2322        struct Visitor;
    2323        impl<'de> serde::de::Visitor<'de> for Visitor {
    2324            type Value = super::ListTopicSubscriptionsRequest;
    2325            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2326                formatter.write_str("struct ListTopicSubscriptionsRequest")
    2327            }
    2328            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    2329            where
    2330                A: serde::de::MapAccess<'de>,
    2331            {
    2332                #[allow(unused_imports)]
    2333                use serde::de::Error;
    2334                use std::option::Option::Some;
    2335                let mut fields = std::collections::HashSet::new();
    2336                let mut result = Self::Value::new();
    2337                while let Some(tag) = map.next_key::<__FieldTag>()? {
    2338                    #[allow(clippy::match_single_binding)]
    2339                    match tag {
    2340                        __FieldTag::__topic => {
    2341                            if !fields.insert(__FieldTag::__topic) {
    2342                                return std::result::Result::Err(A::Error::duplicate_field(
    2343                                    "multiple values for topic",
    2344                                ));
    2345                            }
    2346                            result.topic = map
    2347                                .next_value::<std::option::Option<std::string::String>>()?
    2348                                .unwrap_or_default();
    2349                        }
    2350                        __FieldTag::__page_size => {
    2351                            if !fields.insert(__FieldTag::__page_size) {
    2352                                return std::result::Result::Err(A::Error::duplicate_field(
    2353                                    "multiple values for page_size",
    2354                                ));
    2355                            }
    2356                            struct __With(std::option::Option<i32>);
    2357                            impl<'de> serde::de::Deserialize<'de> for __With {
    2358                                fn deserialize<D>(
    2359                                    deserializer: D,
    2360                                ) -> std::result::Result<Self, D::Error>
    2361                                where
    2362                                    D: serde::de::Deserializer<'de>,
    2363                                {
    2364                                    serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
    2365                                }
    2366                            }
    2367                            result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
    2368                        }
    2369                        __FieldTag::__page_token => {
    2370                            if !fields.insert(__FieldTag::__page_token) {
    2371                                return std::result::Result::Err(A::Error::duplicate_field(
    2372                                    "multiple values for page_token",
    2373                                ));
    2374                            }
    2375                            result.page_token = map
    2376                                .next_value::<std::option::Option<std::string::String>>()?
    2377                                .unwrap_or_default();
    2378                        }
    2379                        __FieldTag::Unknown(key) => {
    2380                            let value = map.next_value::<serde_json::Value>()?;
    2381                            result._unknown_fields.insert(key, value);
    2382                        }
    2383                    }
    2384                }
    2385                std::result::Result::Ok(result)
    2386            }
    2387        }
    2388        deserializer.deserialize_any(Visitor)
    2389    }
    2390}
    2391
    2392#[doc(hidden)]
    2393impl<'de> serde::de::Deserialize<'de> for super::ListTopicSubscriptionsResponse {
    2394    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2395    where
    2396        D: serde::Deserializer<'de>,
    2397    {
    2398        #[allow(non_camel_case_types)]
    2399        #[doc(hidden)]
    2400        #[derive(PartialEq, Eq, Hash)]
    2401        enum __FieldTag {
    2402            __subscriptions,
    2403            __next_page_token,
    2404            Unknown(std::string::String),
    2405        }
    2406        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    2407            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2408            where
    2409                D: serde::Deserializer<'de>,
    2410            {
    2411                struct Visitor;
    2412                impl<'de> serde::de::Visitor<'de> for Visitor {
    2413                    type Value = __FieldTag;
    2414                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2415                        formatter.write_str("a field name for ListTopicSubscriptionsResponse")
    2416                    }
    2417                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    2418                    where
    2419                        E: serde::de::Error,
    2420                    {
    2421                        use std::result::Result::Ok;
    2422                        use std::string::ToString;
    2423                        match value {
    2424                            "subscriptions" => Ok(__FieldTag::__subscriptions),
    2425                            "nextPageToken" => Ok(__FieldTag::__next_page_token),
    2426                            "next_page_token" => Ok(__FieldTag::__next_page_token),
    2427                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    2428                        }
    2429                    }
    2430                }
    2431                deserializer.deserialize_identifier(Visitor)
    2432            }
    2433        }
    2434        struct Visitor;
    2435        impl<'de> serde::de::Visitor<'de> for Visitor {
    2436            type Value = super::ListTopicSubscriptionsResponse;
    2437            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2438                formatter.write_str("struct ListTopicSubscriptionsResponse")
    2439            }
    2440            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    2441            where
    2442                A: serde::de::MapAccess<'de>,
    2443            {
    2444                #[allow(unused_imports)]
    2445                use serde::de::Error;
    2446                use std::option::Option::Some;
    2447                let mut fields = std::collections::HashSet::new();
    2448                let mut result = Self::Value::new();
    2449                while let Some(tag) = map.next_key::<__FieldTag>()? {
    2450                    #[allow(clippy::match_single_binding)]
    2451                    match tag {
    2452                        __FieldTag::__subscriptions => {
    2453                            if !fields.insert(__FieldTag::__subscriptions) {
    2454                                return std::result::Result::Err(A::Error::duplicate_field(
    2455                                    "multiple values for subscriptions",
    2456                                ));
    2457                            }
    2458                            result.subscriptions = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
    2459                        }
    2460                        __FieldTag::__next_page_token => {
    2461                            if !fields.insert(__FieldTag::__next_page_token) {
    2462                                return std::result::Result::Err(A::Error::duplicate_field(
    2463                                    "multiple values for next_page_token",
    2464                                ));
    2465                            }
    2466                            result.next_page_token = map
    2467                                .next_value::<std::option::Option<std::string::String>>()?
    2468                                .unwrap_or_default();
    2469                        }
    2470                        __FieldTag::Unknown(key) => {
    2471                            let value = map.next_value::<serde_json::Value>()?;
    2472                            result._unknown_fields.insert(key, value);
    2473                        }
    2474                    }
    2475                }
    2476                std::result::Result::Ok(result)
    2477            }
    2478        }
    2479        deserializer.deserialize_any(Visitor)
    2480    }
    2481}
    2482
    2483#[doc(hidden)]
    2484impl<'de> serde::de::Deserialize<'de> for super::ListTopicSnapshotsRequest {
    2485    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2486    where
    2487        D: serde::Deserializer<'de>,
    2488    {
    2489        #[allow(non_camel_case_types)]
    2490        #[doc(hidden)]
    2491        #[derive(PartialEq, Eq, Hash)]
    2492        enum __FieldTag {
    2493            __topic,
    2494            __page_size,
    2495            __page_token,
    2496            Unknown(std::string::String),
    2497        }
    2498        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    2499            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2500            where
    2501                D: serde::Deserializer<'de>,
    2502            {
    2503                struct Visitor;
    2504                impl<'de> serde::de::Visitor<'de> for Visitor {
    2505                    type Value = __FieldTag;
    2506                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2507                        formatter.write_str("a field name for ListTopicSnapshotsRequest")
    2508                    }
    2509                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    2510                    where
    2511                        E: serde::de::Error,
    2512                    {
    2513                        use std::result::Result::Ok;
    2514                        use std::string::ToString;
    2515                        match value {
    2516                            "topic" => Ok(__FieldTag::__topic),
    2517                            "pageSize" => Ok(__FieldTag::__page_size),
    2518                            "page_size" => Ok(__FieldTag::__page_size),
    2519                            "pageToken" => Ok(__FieldTag::__page_token),
    2520                            "page_token" => Ok(__FieldTag::__page_token),
    2521                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    2522                        }
    2523                    }
    2524                }
    2525                deserializer.deserialize_identifier(Visitor)
    2526            }
    2527        }
    2528        struct Visitor;
    2529        impl<'de> serde::de::Visitor<'de> for Visitor {
    2530            type Value = super::ListTopicSnapshotsRequest;
    2531            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2532                formatter.write_str("struct ListTopicSnapshotsRequest")
    2533            }
    2534            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    2535            where
    2536                A: serde::de::MapAccess<'de>,
    2537            {
    2538                #[allow(unused_imports)]
    2539                use serde::de::Error;
    2540                use std::option::Option::Some;
    2541                let mut fields = std::collections::HashSet::new();
    2542                let mut result = Self::Value::new();
    2543                while let Some(tag) = map.next_key::<__FieldTag>()? {
    2544                    #[allow(clippy::match_single_binding)]
    2545                    match tag {
    2546                        __FieldTag::__topic => {
    2547                            if !fields.insert(__FieldTag::__topic) {
    2548                                return std::result::Result::Err(A::Error::duplicate_field(
    2549                                    "multiple values for topic",
    2550                                ));
    2551                            }
    2552                            result.topic = map
    2553                                .next_value::<std::option::Option<std::string::String>>()?
    2554                                .unwrap_or_default();
    2555                        }
    2556                        __FieldTag::__page_size => {
    2557                            if !fields.insert(__FieldTag::__page_size) {
    2558                                return std::result::Result::Err(A::Error::duplicate_field(
    2559                                    "multiple values for page_size",
    2560                                ));
    2561                            }
    2562                            struct __With(std::option::Option<i32>);
    2563                            impl<'de> serde::de::Deserialize<'de> for __With {
    2564                                fn deserialize<D>(
    2565                                    deserializer: D,
    2566                                ) -> std::result::Result<Self, D::Error>
    2567                                where
    2568                                    D: serde::de::Deserializer<'de>,
    2569                                {
    2570                                    serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
    2571                                }
    2572                            }
    2573                            result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
    2574                        }
    2575                        __FieldTag::__page_token => {
    2576                            if !fields.insert(__FieldTag::__page_token) {
    2577                                return std::result::Result::Err(A::Error::duplicate_field(
    2578                                    "multiple values for page_token",
    2579                                ));
    2580                            }
    2581                            result.page_token = map
    2582                                .next_value::<std::option::Option<std::string::String>>()?
    2583                                .unwrap_or_default();
    2584                        }
    2585                        __FieldTag::Unknown(key) => {
    2586                            let value = map.next_value::<serde_json::Value>()?;
    2587                            result._unknown_fields.insert(key, value);
    2588                        }
    2589                    }
    2590                }
    2591                std::result::Result::Ok(result)
    2592            }
    2593        }
    2594        deserializer.deserialize_any(Visitor)
    2595    }
    2596}
    2597
    2598#[doc(hidden)]
    2599impl<'de> serde::de::Deserialize<'de> for super::ListTopicSnapshotsResponse {
    2600    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2601    where
    2602        D: serde::Deserializer<'de>,
    2603    {
    2604        #[allow(non_camel_case_types)]
    2605        #[doc(hidden)]
    2606        #[derive(PartialEq, Eq, Hash)]
    2607        enum __FieldTag {
    2608            __snapshots,
    2609            __next_page_token,
    2610            Unknown(std::string::String),
    2611        }
    2612        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    2613            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2614            where
    2615                D: serde::Deserializer<'de>,
    2616            {
    2617                struct Visitor;
    2618                impl<'de> serde::de::Visitor<'de> for Visitor {
    2619                    type Value = __FieldTag;
    2620                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2621                        formatter.write_str("a field name for ListTopicSnapshotsResponse")
    2622                    }
    2623                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    2624                    where
    2625                        E: serde::de::Error,
    2626                    {
    2627                        use std::result::Result::Ok;
    2628                        use std::string::ToString;
    2629                        match value {
    2630                            "snapshots" => Ok(__FieldTag::__snapshots),
    2631                            "nextPageToken" => Ok(__FieldTag::__next_page_token),
    2632                            "next_page_token" => Ok(__FieldTag::__next_page_token),
    2633                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    2634                        }
    2635                    }
    2636                }
    2637                deserializer.deserialize_identifier(Visitor)
    2638            }
    2639        }
    2640        struct Visitor;
    2641        impl<'de> serde::de::Visitor<'de> for Visitor {
    2642            type Value = super::ListTopicSnapshotsResponse;
    2643            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2644                formatter.write_str("struct ListTopicSnapshotsResponse")
    2645            }
    2646            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    2647            where
    2648                A: serde::de::MapAccess<'de>,
    2649            {
    2650                #[allow(unused_imports)]
    2651                use serde::de::Error;
    2652                use std::option::Option::Some;
    2653                let mut fields = std::collections::HashSet::new();
    2654                let mut result = Self::Value::new();
    2655                while let Some(tag) = map.next_key::<__FieldTag>()? {
    2656                    #[allow(clippy::match_single_binding)]
    2657                    match tag {
    2658                        __FieldTag::__snapshots => {
    2659                            if !fields.insert(__FieldTag::__snapshots) {
    2660                                return std::result::Result::Err(A::Error::duplicate_field(
    2661                                    "multiple values for snapshots",
    2662                                ));
    2663                            }
    2664                            result.snapshots = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
    2665                        }
    2666                        __FieldTag::__next_page_token => {
    2667                            if !fields.insert(__FieldTag::__next_page_token) {
    2668                                return std::result::Result::Err(A::Error::duplicate_field(
    2669                                    "multiple values for next_page_token",
    2670                                ));
    2671                            }
    2672                            result.next_page_token = map
    2673                                .next_value::<std::option::Option<std::string::String>>()?
    2674                                .unwrap_or_default();
    2675                        }
    2676                        __FieldTag::Unknown(key) => {
    2677                            let value = map.next_value::<serde_json::Value>()?;
    2678                            result._unknown_fields.insert(key, value);
    2679                        }
    2680                    }
    2681                }
    2682                std::result::Result::Ok(result)
    2683            }
    2684        }
    2685        deserializer.deserialize_any(Visitor)
    2686    }
    2687}
    2688
    2689#[doc(hidden)]
    2690impl<'de> serde::de::Deserialize<'de> for super::DeleteTopicRequest {
    2691    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2692    where
    2693        D: serde::Deserializer<'de>,
    2694    {
    2695        #[allow(non_camel_case_types)]
    2696        #[doc(hidden)]
    2697        #[derive(PartialEq, Eq, Hash)]
    2698        enum __FieldTag {
    2699            __topic,
    2700            Unknown(std::string::String),
    2701        }
    2702        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    2703            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2704            where
    2705                D: serde::Deserializer<'de>,
    2706            {
    2707                struct Visitor;
    2708                impl<'de> serde::de::Visitor<'de> for Visitor {
    2709                    type Value = __FieldTag;
    2710                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2711                        formatter.write_str("a field name for DeleteTopicRequest")
    2712                    }
    2713                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    2714                    where
    2715                        E: serde::de::Error,
    2716                    {
    2717                        use std::result::Result::Ok;
    2718                        use std::string::ToString;
    2719                        match value {
    2720                            "topic" => Ok(__FieldTag::__topic),
    2721                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    2722                        }
    2723                    }
    2724                }
    2725                deserializer.deserialize_identifier(Visitor)
    2726            }
    2727        }
    2728        struct Visitor;
    2729        impl<'de> serde::de::Visitor<'de> for Visitor {
    2730            type Value = super::DeleteTopicRequest;
    2731            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2732                formatter.write_str("struct DeleteTopicRequest")
    2733            }
    2734            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    2735            where
    2736                A: serde::de::MapAccess<'de>,
    2737            {
    2738                #[allow(unused_imports)]
    2739                use serde::de::Error;
    2740                use std::option::Option::Some;
    2741                let mut fields = std::collections::HashSet::new();
    2742                let mut result = Self::Value::new();
    2743                while let Some(tag) = map.next_key::<__FieldTag>()? {
    2744                    #[allow(clippy::match_single_binding)]
    2745                    match tag {
    2746                        __FieldTag::__topic => {
    2747                            if !fields.insert(__FieldTag::__topic) {
    2748                                return std::result::Result::Err(A::Error::duplicate_field(
    2749                                    "multiple values for topic",
    2750                                ));
    2751                            }
    2752                            result.topic = map
    2753                                .next_value::<std::option::Option<std::string::String>>()?
    2754                                .unwrap_or_default();
    2755                        }
    2756                        __FieldTag::Unknown(key) => {
    2757                            let value = map.next_value::<serde_json::Value>()?;
    2758                            result._unknown_fields.insert(key, value);
    2759                        }
    2760                    }
    2761                }
    2762                std::result::Result::Ok(result)
    2763            }
    2764        }
    2765        deserializer.deserialize_any(Visitor)
    2766    }
    2767}
    2768
    2769#[doc(hidden)]
    2770impl<'de> serde::de::Deserialize<'de> for super::DetachSubscriptionRequest {
    2771    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2772    where
    2773        D: serde::Deserializer<'de>,
    2774    {
    2775        #[allow(non_camel_case_types)]
    2776        #[doc(hidden)]
    2777        #[derive(PartialEq, Eq, Hash)]
    2778        enum __FieldTag {
    2779            __subscription,
    2780            Unknown(std::string::String),
    2781        }
    2782        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    2783            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2784            where
    2785                D: serde::Deserializer<'de>,
    2786            {
    2787                struct Visitor;
    2788                impl<'de> serde::de::Visitor<'de> for Visitor {
    2789                    type Value = __FieldTag;
    2790                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2791                        formatter.write_str("a field name for DetachSubscriptionRequest")
    2792                    }
    2793                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    2794                    where
    2795                        E: serde::de::Error,
    2796                    {
    2797                        use std::result::Result::Ok;
    2798                        use std::string::ToString;
    2799                        match value {
    2800                            "subscription" => Ok(__FieldTag::__subscription),
    2801                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    2802                        }
    2803                    }
    2804                }
    2805                deserializer.deserialize_identifier(Visitor)
    2806            }
    2807        }
    2808        struct Visitor;
    2809        impl<'de> serde::de::Visitor<'de> for Visitor {
    2810            type Value = super::DetachSubscriptionRequest;
    2811            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2812                formatter.write_str("struct DetachSubscriptionRequest")
    2813            }
    2814            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    2815            where
    2816                A: serde::de::MapAccess<'de>,
    2817            {
    2818                #[allow(unused_imports)]
    2819                use serde::de::Error;
    2820                use std::option::Option::Some;
    2821                let mut fields = std::collections::HashSet::new();
    2822                let mut result = Self::Value::new();
    2823                while let Some(tag) = map.next_key::<__FieldTag>()? {
    2824                    #[allow(clippy::match_single_binding)]
    2825                    match tag {
    2826                        __FieldTag::__subscription => {
    2827                            if !fields.insert(__FieldTag::__subscription) {
    2828                                return std::result::Result::Err(A::Error::duplicate_field(
    2829                                    "multiple values for subscription",
    2830                                ));
    2831                            }
    2832                            result.subscription = map
    2833                                .next_value::<std::option::Option<std::string::String>>()?
    2834                                .unwrap_or_default();
    2835                        }
    2836                        __FieldTag::Unknown(key) => {
    2837                            let value = map.next_value::<serde_json::Value>()?;
    2838                            result._unknown_fields.insert(key, value);
    2839                        }
    2840                    }
    2841                }
    2842                std::result::Result::Ok(result)
    2843            }
    2844        }
    2845        deserializer.deserialize_any(Visitor)
    2846    }
    2847}
    2848
    2849#[doc(hidden)]
    2850impl<'de> serde::de::Deserialize<'de> for super::DetachSubscriptionResponse {
    2851    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2852    where
    2853        D: serde::Deserializer<'de>,
    2854    {
    2855        #[allow(non_camel_case_types)]
    2856        #[doc(hidden)]
    2857        #[derive(PartialEq, Eq, Hash)]
    2858        enum __FieldTag {
    2859            Unknown(std::string::String),
    2860        }
    2861        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    2862            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2863            where
    2864                D: serde::Deserializer<'de>,
    2865            {
    2866                struct Visitor;
    2867                impl<'de> serde::de::Visitor<'de> for Visitor {
    2868                    type Value = __FieldTag;
    2869                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2870                        formatter.write_str("a field name for DetachSubscriptionResponse")
    2871                    }
    2872                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    2873                    where
    2874                        E: serde::de::Error,
    2875                    {
    2876                        use std::result::Result::Ok;
    2877                        use std::string::ToString;
    2878                        Ok(__FieldTag::Unknown(value.to_string()))
    2879                    }
    2880                }
    2881                deserializer.deserialize_identifier(Visitor)
    2882            }
    2883        }
    2884        struct Visitor;
    2885        impl<'de> serde::de::Visitor<'de> for Visitor {
    2886            type Value = super::DetachSubscriptionResponse;
    2887            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2888                formatter.write_str("struct DetachSubscriptionResponse")
    2889            }
    2890            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    2891            where
    2892                A: serde::de::MapAccess<'de>,
    2893            {
    2894                #[allow(unused_imports)]
    2895                use serde::de::Error;
    2896                use std::option::Option::Some;
    2897                let mut result = Self::Value::new();
    2898                while let Some(tag) = map.next_key::<__FieldTag>()? {
    2899                    #[allow(clippy::match_single_binding)]
    2900                    match tag {
    2901                        __FieldTag::Unknown(key) => {
    2902                            let value = map.next_value::<serde_json::Value>()?;
    2903                            result._unknown_fields.insert(key, value);
    2904                        }
    2905                    }
    2906                }
    2907                std::result::Result::Ok(result)
    2908            }
    2909        }
    2910        deserializer.deserialize_any(Visitor)
    2911    }
    2912}
    2913
    2914#[doc(hidden)]
    2915impl<'de> serde::de::Deserialize<'de> for super::Subscription {
    2916    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2917    where
    2918        D: serde::Deserializer<'de>,
    2919    {
    2920        #[allow(non_camel_case_types)]
    2921        #[doc(hidden)]
    2922        #[derive(PartialEq, Eq, Hash)]
    2923        enum __FieldTag {
    2924            __name,
    2925            __topic,
    2926            __push_config,
    2927            __bigquery_config,
    2928            __cloud_storage_config,
    2929            __ack_deadline_seconds,
    2930            __retain_acked_messages,
    2931            __message_retention_duration,
    2932            __labels,
    2933            __enable_message_ordering,
    2934            __expiration_policy,
    2935            __filter,
    2936            __dead_letter_policy,
    2937            __retry_policy,
    2938            __detached,
    2939            __enable_exactly_once_delivery,
    2940            __topic_message_retention_duration,
    2941            __state,
    2942            __analytics_hub_subscription_info,
    2943            __message_transforms,
    2944            __tags,
    2945            Unknown(std::string::String),
    2946        }
    2947        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    2948            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    2949            where
    2950                D: serde::Deserializer<'de>,
    2951            {
    2952                struct Visitor;
    2953                impl<'de> serde::de::Visitor<'de> for Visitor {
    2954                    type Value = __FieldTag;
    2955                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    2956                        formatter.write_str("a field name for Subscription")
    2957                    }
    2958                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    2959                    where
    2960                        E: serde::de::Error,
    2961                    {
    2962                        use std::result::Result::Ok;
    2963                        use std::string::ToString;
    2964                        match value {
    2965                            "name" => Ok(__FieldTag::__name),
    2966                            "topic" => Ok(__FieldTag::__topic),
    2967                            "pushConfig" => Ok(__FieldTag::__push_config),
    2968                            "push_config" => Ok(__FieldTag::__push_config),
    2969                            "bigqueryConfig" => Ok(__FieldTag::__bigquery_config),
    2970                            "bigquery_config" => Ok(__FieldTag::__bigquery_config),
    2971                            "cloudStorageConfig" => Ok(__FieldTag::__cloud_storage_config),
    2972                            "cloud_storage_config" => Ok(__FieldTag::__cloud_storage_config),
    2973                            "ackDeadlineSeconds" => Ok(__FieldTag::__ack_deadline_seconds),
    2974                            "ack_deadline_seconds" => Ok(__FieldTag::__ack_deadline_seconds),
    2975                            "retainAckedMessages" => Ok(__FieldTag::__retain_acked_messages),
    2976                            "retain_acked_messages" => Ok(__FieldTag::__retain_acked_messages),
    2977                            "messageRetentionDuration" => {
    2978                                Ok(__FieldTag::__message_retention_duration)
    2979                            }
    2980                            "message_retention_duration" => {
    2981                                Ok(__FieldTag::__message_retention_duration)
    2982                            }
    2983                            "labels" => Ok(__FieldTag::__labels),
    2984                            "enableMessageOrdering" => Ok(__FieldTag::__enable_message_ordering),
    2985                            "enable_message_ordering" => Ok(__FieldTag::__enable_message_ordering),
    2986                            "expirationPolicy" => Ok(__FieldTag::__expiration_policy),
    2987                            "expiration_policy" => Ok(__FieldTag::__expiration_policy),
    2988                            "filter" => Ok(__FieldTag::__filter),
    2989                            "deadLetterPolicy" => Ok(__FieldTag::__dead_letter_policy),
    2990                            "dead_letter_policy" => Ok(__FieldTag::__dead_letter_policy),
    2991                            "retryPolicy" => Ok(__FieldTag::__retry_policy),
    2992                            "retry_policy" => Ok(__FieldTag::__retry_policy),
    2993                            "detached" => Ok(__FieldTag::__detached),
    2994                            "enableExactlyOnceDelivery" => {
    2995                                Ok(__FieldTag::__enable_exactly_once_delivery)
    2996                            }
    2997                            "enable_exactly_once_delivery" => {
    2998                                Ok(__FieldTag::__enable_exactly_once_delivery)
    2999                            }
    3000                            "topicMessageRetentionDuration" => {
    3001                                Ok(__FieldTag::__topic_message_retention_duration)
    3002                            }
    3003                            "topic_message_retention_duration" => {
    3004                                Ok(__FieldTag::__topic_message_retention_duration)
    3005                            }
    3006                            "state" => Ok(__FieldTag::__state),
    3007                            "analyticsHubSubscriptionInfo" => {
    3008                                Ok(__FieldTag::__analytics_hub_subscription_info)
    3009                            }
    3010                            "analytics_hub_subscription_info" => {
    3011                                Ok(__FieldTag::__analytics_hub_subscription_info)
    3012                            }
    3013                            "messageTransforms" => Ok(__FieldTag::__message_transforms),
    3014                            "message_transforms" => Ok(__FieldTag::__message_transforms),
    3015                            "tags" => Ok(__FieldTag::__tags),
    3016                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    3017                        }
    3018                    }
    3019                }
    3020                deserializer.deserialize_identifier(Visitor)
    3021            }
    3022        }
    3023        struct Visitor;
    3024        impl<'de> serde::de::Visitor<'de> for Visitor {
    3025            type Value = super::Subscription;
    3026            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    3027                formatter.write_str("struct Subscription")
    3028            }
    3029            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    3030            where
    3031                A: serde::de::MapAccess<'de>,
    3032            {
    3033                #[allow(unused_imports)]
    3034                use serde::de::Error;
    3035                use std::option::Option::Some;
    3036                let mut fields = std::collections::HashSet::new();
    3037                let mut result = Self::Value::new();
    3038                while let Some(tag) = map.next_key::<__FieldTag>()? {
    3039                    #[allow(clippy::match_single_binding)]
    3040                    match tag {
    3041                        __FieldTag::__name => {
    3042                            if !fields.insert(__FieldTag::__name) {
    3043                                return std::result::Result::Err(A::Error::duplicate_field(
    3044                                    "multiple values for name",
    3045                                ));
    3046                            }
    3047                            result.name = map
    3048                                .next_value::<std::option::Option<std::string::String>>()?
    3049                                .unwrap_or_default();
    3050                        }
    3051                        __FieldTag::__topic => {
    3052                            if !fields.insert(__FieldTag::__topic) {
    3053                                return std::result::Result::Err(A::Error::duplicate_field(
    3054                                    "multiple values for topic",
    3055                                ));
    3056                            }
    3057                            result.topic = map
    3058                                .next_value::<std::option::Option<std::string::String>>()?
    3059                                .unwrap_or_default();
    3060                        }
    3061                        __FieldTag::__push_config => {
    3062                            if !fields.insert(__FieldTag::__push_config) {
    3063                                return std::result::Result::Err(A::Error::duplicate_field(
    3064                                    "multiple values for push_config",
    3065                                ));
    3066                            }
    3067                            result.push_config =
    3068                                map.next_value::<std::option::Option<crate::model::PushConfig>>()?;
    3069                        }
    3070                        __FieldTag::__bigquery_config => {
    3071                            if !fields.insert(__FieldTag::__bigquery_config) {
    3072                                return std::result::Result::Err(A::Error::duplicate_field(
    3073                                    "multiple values for bigquery_config",
    3074                                ));
    3075                            }
    3076                            result.bigquery_config = map
    3077                                .next_value::<std::option::Option<crate::model::BigQueryConfig>>(
    3078                                )?;
    3079                        }
    3080                        __FieldTag::__cloud_storage_config => {
    3081                            if !fields.insert(__FieldTag::__cloud_storage_config) {
    3082                                return std::result::Result::Err(A::Error::duplicate_field(
    3083                                    "multiple values for cloud_storage_config",
    3084                                ));
    3085                            }
    3086                            result.cloud_storage_config = map.next_value::<std::option::Option<crate::model::CloudStorageConfig>>()?
    3087                                ;
    3088                        }
    3089                        __FieldTag::__ack_deadline_seconds => {
    3090                            if !fields.insert(__FieldTag::__ack_deadline_seconds) {
    3091                                return std::result::Result::Err(A::Error::duplicate_field(
    3092                                    "multiple values for ack_deadline_seconds",
    3093                                ));
    3094                            }
    3095                            struct __With(std::option::Option<i32>);
    3096                            impl<'de> serde::de::Deserialize<'de> for __With {
    3097                                fn deserialize<D>(
    3098                                    deserializer: D,
    3099                                ) -> std::result::Result<Self, D::Error>
    3100                                where
    3101                                    D: serde::de::Deserializer<'de>,
    3102                                {
    3103                                    serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
    3104                                }
    3105                            }
    3106                            result.ack_deadline_seconds =
    3107                                map.next_value::<__With>()?.0.unwrap_or_default();
    3108                        }
    3109                        __FieldTag::__retain_acked_messages => {
    3110                            if !fields.insert(__FieldTag::__retain_acked_messages) {
    3111                                return std::result::Result::Err(A::Error::duplicate_field(
    3112                                    "multiple values for retain_acked_messages",
    3113                                ));
    3114                            }
    3115                            result.retain_acked_messages = map
    3116                                .next_value::<std::option::Option<bool>>()?
    3117                                .unwrap_or_default();
    3118                        }
    3119                        __FieldTag::__message_retention_duration => {
    3120                            if !fields.insert(__FieldTag::__message_retention_duration) {
    3121                                return std::result::Result::Err(A::Error::duplicate_field(
    3122                                    "multiple values for message_retention_duration",
    3123                                ));
    3124                            }
    3125                            result.message_retention_duration =
    3126                                map.next_value::<std::option::Option<wkt::Duration>>()?;
    3127                        }
    3128                        __FieldTag::__labels => {
    3129                            if !fields.insert(__FieldTag::__labels) {
    3130                                return std::result::Result::Err(A::Error::duplicate_field(
    3131                                    "multiple values for labels",
    3132                                ));
    3133                            }
    3134                            result.labels = map
    3135                                .next_value::<std::option::Option<
    3136                                    std::collections::HashMap<
    3137                                        std::string::String,
    3138                                        std::string::String,
    3139                                    >,
    3140                                >>()?
    3141                                .unwrap_or_default();
    3142                        }
    3143                        __FieldTag::__enable_message_ordering => {
    3144                            if !fields.insert(__FieldTag::__enable_message_ordering) {
    3145                                return std::result::Result::Err(A::Error::duplicate_field(
    3146                                    "multiple values for enable_message_ordering",
    3147                                ));
    3148                            }
    3149                            result.enable_message_ordering = map
    3150                                .next_value::<std::option::Option<bool>>()?
    3151                                .unwrap_or_default();
    3152                        }
    3153                        __FieldTag::__expiration_policy => {
    3154                            if !fields.insert(__FieldTag::__expiration_policy) {
    3155                                return std::result::Result::Err(A::Error::duplicate_field(
    3156                                    "multiple values for expiration_policy",
    3157                                ));
    3158                            }
    3159                            result.expiration_policy = map
    3160                                .next_value::<std::option::Option<crate::model::ExpirationPolicy>>(
    3161                                )?;
    3162                        }
    3163                        __FieldTag::__filter => {
    3164                            if !fields.insert(__FieldTag::__filter) {
    3165                                return std::result::Result::Err(A::Error::duplicate_field(
    3166                                    "multiple values for filter",
    3167                                ));
    3168                            }
    3169                            result.filter = map
    3170                                .next_value::<std::option::Option<std::string::String>>()?
    3171                                .unwrap_or_default();
    3172                        }
    3173                        __FieldTag::__dead_letter_policy => {
    3174                            if !fields.insert(__FieldTag::__dead_letter_policy) {
    3175                                return std::result::Result::Err(A::Error::duplicate_field(
    3176                                    "multiple values for dead_letter_policy",
    3177                                ));
    3178                            }
    3179                            result.dead_letter_policy = map
    3180                                .next_value::<std::option::Option<crate::model::DeadLetterPolicy>>(
    3181                                )?;
    3182                        }
    3183                        __FieldTag::__retry_policy => {
    3184                            if !fields.insert(__FieldTag::__retry_policy) {
    3185                                return std::result::Result::Err(A::Error::duplicate_field(
    3186                                    "multiple values for retry_policy",
    3187                                ));
    3188                            }
    3189                            result.retry_policy =
    3190                                map.next_value::<std::option::Option<crate::model::RetryPolicy>>()?;
    3191                        }
    3192                        __FieldTag::__detached => {
    3193                            if !fields.insert(__FieldTag::__detached) {
    3194                                return std::result::Result::Err(A::Error::duplicate_field(
    3195                                    "multiple values for detached",
    3196                                ));
    3197                            }
    3198                            result.detached = map
    3199                                .next_value::<std::option::Option<bool>>()?
    3200                                .unwrap_or_default();
    3201                        }
    3202                        __FieldTag::__enable_exactly_once_delivery => {
    3203                            if !fields.insert(__FieldTag::__enable_exactly_once_delivery) {
    3204                                return std::result::Result::Err(A::Error::duplicate_field(
    3205                                    "multiple values for enable_exactly_once_delivery",
    3206                                ));
    3207                            }
    3208                            result.enable_exactly_once_delivery = map
    3209                                .next_value::<std::option::Option<bool>>()?
    3210                                .unwrap_or_default();
    3211                        }
    3212                        __FieldTag::__topic_message_retention_duration => {
    3213                            if !fields.insert(__FieldTag::__topic_message_retention_duration) {
    3214                                return std::result::Result::Err(A::Error::duplicate_field(
    3215                                    "multiple values for topic_message_retention_duration",
    3216                                ));
    3217                            }
    3218                            result.topic_message_retention_duration =
    3219                                map.next_value::<std::option::Option<wkt::Duration>>()?;
    3220                        }
    3221                        __FieldTag::__state => {
    3222                            if !fields.insert(__FieldTag::__state) {
    3223                                return std::result::Result::Err(A::Error::duplicate_field(
    3224                                    "multiple values for state",
    3225                                ));
    3226                            }
    3227                            result.state = map.next_value::<std::option::Option<crate::model::subscription::State>>()?.unwrap_or_default();
    3228                        }
    3229                        __FieldTag::__analytics_hub_subscription_info => {
    3230                            if !fields.insert(__FieldTag::__analytics_hub_subscription_info) {
    3231                                return std::result::Result::Err(A::Error::duplicate_field(
    3232                                    "multiple values for analytics_hub_subscription_info",
    3233                                ));
    3234                            }
    3235                            result.analytics_hub_subscription_info = map
    3236                                .next_value::<std::option::Option<
    3237                                    crate::model::subscription::AnalyticsHubSubscriptionInfo,
    3238                                >>()?;
    3239                        }
    3240                        __FieldTag::__message_transforms => {
    3241                            if !fields.insert(__FieldTag::__message_transforms) {
    3242                                return std::result::Result::Err(A::Error::duplicate_field(
    3243                                    "multiple values for message_transforms",
    3244                                ));
    3245                            }
    3246                            result.message_transforms =
    3247                                map.next_value::<std::option::Option<
    3248                                    std::vec::Vec<crate::model::MessageTransform>,
    3249                                >>()?
    3250                                .unwrap_or_default();
    3251                        }
    3252                        __FieldTag::__tags => {
    3253                            if !fields.insert(__FieldTag::__tags) {
    3254                                return std::result::Result::Err(A::Error::duplicate_field(
    3255                                    "multiple values for tags",
    3256                                ));
    3257                            }
    3258                            result.tags = map
    3259                                .next_value::<std::option::Option<
    3260                                    std::collections::HashMap<
    3261                                        std::string::String,
    3262                                        std::string::String,
    3263                                    >,
    3264                                >>()?
    3265                                .unwrap_or_default();
    3266                        }
    3267                        __FieldTag::Unknown(key) => {
    3268                            let value = map.next_value::<serde_json::Value>()?;
    3269                            result._unknown_fields.insert(key, value);
    3270                        }
    3271                    }
    3272                }
    3273                std::result::Result::Ok(result)
    3274            }
    3275        }
    3276        deserializer.deserialize_any(Visitor)
    3277    }
    3278}
    3279
    3280#[doc(hidden)]
    3281impl<'de> serde::de::Deserialize<'de> for super::subscription::AnalyticsHubSubscriptionInfo {
    3282    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    3283    where
    3284        D: serde::Deserializer<'de>,
    3285    {
    3286        #[allow(non_camel_case_types)]
    3287        #[doc(hidden)]
    3288        #[derive(PartialEq, Eq, Hash)]
    3289        enum __FieldTag {
    3290            __listing,
    3291            __subscription,
    3292            Unknown(std::string::String),
    3293        }
    3294        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    3295            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    3296            where
    3297                D: serde::Deserializer<'de>,
    3298            {
    3299                struct Visitor;
    3300                impl<'de> serde::de::Visitor<'de> for Visitor {
    3301                    type Value = __FieldTag;
    3302                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    3303                        formatter.write_str("a field name for AnalyticsHubSubscriptionInfo")
    3304                    }
    3305                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    3306                    where
    3307                        E: serde::de::Error,
    3308                    {
    3309                        use std::result::Result::Ok;
    3310                        use std::string::ToString;
    3311                        match value {
    3312                            "listing" => Ok(__FieldTag::__listing),
    3313                            "subscription" => Ok(__FieldTag::__subscription),
    3314                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    3315                        }
    3316                    }
    3317                }
    3318                deserializer.deserialize_identifier(Visitor)
    3319            }
    3320        }
    3321        struct Visitor;
    3322        impl<'de> serde::de::Visitor<'de> for Visitor {
    3323            type Value = super::subscription::AnalyticsHubSubscriptionInfo;
    3324            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    3325                formatter.write_str("struct AnalyticsHubSubscriptionInfo")
    3326            }
    3327            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    3328            where
    3329                A: serde::de::MapAccess<'de>,
    3330            {
    3331                #[allow(unused_imports)]
    3332                use serde::de::Error;
    3333                use std::option::Option::Some;
    3334                let mut fields = std::collections::HashSet::new();
    3335                let mut result = Self::Value::new();
    3336                while let Some(tag) = map.next_key::<__FieldTag>()? {
    3337                    #[allow(clippy::match_single_binding)]
    3338                    match tag {
    3339                        __FieldTag::__listing => {
    3340                            if !fields.insert(__FieldTag::__listing) {
    3341                                return std::result::Result::Err(A::Error::duplicate_field(
    3342                                    "multiple values for listing",
    3343                                ));
    3344                            }
    3345                            result.listing = map
    3346                                .next_value::<std::option::Option<std::string::String>>()?
    3347                                .unwrap_or_default();
    3348                        }
    3349                        __FieldTag::__subscription => {
    3350                            if !fields.insert(__FieldTag::__subscription) {
    3351                                return std::result::Result::Err(A::Error::duplicate_field(
    3352                                    "multiple values for subscription",
    3353                                ));
    3354                            }
    3355                            result.subscription = map
    3356                                .next_value::<std::option::Option<std::string::String>>()?
    3357                                .unwrap_or_default();
    3358                        }
    3359                        __FieldTag::Unknown(key) => {
    3360                            let value = map.next_value::<serde_json::Value>()?;
    3361                            result._unknown_fields.insert(key, value);
    3362                        }
    3363                    }
    3364                }
    3365                std::result::Result::Ok(result)
    3366            }
    3367        }
    3368        deserializer.deserialize_any(Visitor)
    3369    }
    3370}
    3371
    3372#[doc(hidden)]
    3373impl<'de> serde::de::Deserialize<'de> for super::RetryPolicy {
    3374    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    3375    where
    3376        D: serde::Deserializer<'de>,
    3377    {
    3378        #[allow(non_camel_case_types)]
    3379        #[doc(hidden)]
    3380        #[derive(PartialEq, Eq, Hash)]
    3381        enum __FieldTag {
    3382            __minimum_backoff,
    3383            __maximum_backoff,
    3384            Unknown(std::string::String),
    3385        }
    3386        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    3387            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    3388            where
    3389                D: serde::Deserializer<'de>,
    3390            {
    3391                struct Visitor;
    3392                impl<'de> serde::de::Visitor<'de> for Visitor {
    3393                    type Value = __FieldTag;
    3394                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    3395                        formatter.write_str("a field name for RetryPolicy")
    3396                    }
    3397                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    3398                    where
    3399                        E: serde::de::Error,
    3400                    {
    3401                        use std::result::Result::Ok;
    3402                        use std::string::ToString;
    3403                        match value {
    3404                            "minimumBackoff" => Ok(__FieldTag::__minimum_backoff),
    3405                            "minimum_backoff" => Ok(__FieldTag::__minimum_backoff),
    3406                            "maximumBackoff" => Ok(__FieldTag::__maximum_backoff),
    3407                            "maximum_backoff" => Ok(__FieldTag::__maximum_backoff),
    3408                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    3409                        }
    3410                    }
    3411                }
    3412                deserializer.deserialize_identifier(Visitor)
    3413            }
    3414        }
    3415        struct Visitor;
    3416        impl<'de> serde::de::Visitor<'de> for Visitor {
    3417            type Value = super::RetryPolicy;
    3418            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    3419                formatter.write_str("struct RetryPolicy")
    3420            }
    3421            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    3422            where
    3423                A: serde::de::MapAccess<'de>,
    3424            {
    3425                #[allow(unused_imports)]
    3426                use serde::de::Error;
    3427                use std::option::Option::Some;
    3428                let mut fields = std::collections::HashSet::new();
    3429                let mut result = Self::Value::new();
    3430                while let Some(tag) = map.next_key::<__FieldTag>()? {
    3431                    #[allow(clippy::match_single_binding)]
    3432                    match tag {
    3433                        __FieldTag::__minimum_backoff => {
    3434                            if !fields.insert(__FieldTag::__minimum_backoff) {
    3435                                return std::result::Result::Err(A::Error::duplicate_field(
    3436                                    "multiple values for minimum_backoff",
    3437                                ));
    3438                            }
    3439                            result.minimum_backoff =
    3440                                map.next_value::<std::option::Option<wkt::Duration>>()?;
    3441                        }
    3442                        __FieldTag::__maximum_backoff => {
    3443                            if !fields.insert(__FieldTag::__maximum_backoff) {
    3444                                return std::result::Result::Err(A::Error::duplicate_field(
    3445                                    "multiple values for maximum_backoff",
    3446                                ));
    3447                            }
    3448                            result.maximum_backoff =
    3449                                map.next_value::<std::option::Option<wkt::Duration>>()?;
    3450                        }
    3451                        __FieldTag::Unknown(key) => {
    3452                            let value = map.next_value::<serde_json::Value>()?;
    3453                            result._unknown_fields.insert(key, value);
    3454                        }
    3455                    }
    3456                }
    3457                std::result::Result::Ok(result)
    3458            }
    3459        }
    3460        deserializer.deserialize_any(Visitor)
    3461    }
    3462}
    3463
    3464#[doc(hidden)]
    3465impl<'de> serde::de::Deserialize<'de> for super::DeadLetterPolicy {
    3466    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    3467    where
    3468        D: serde::Deserializer<'de>,
    3469    {
    3470        #[allow(non_camel_case_types)]
    3471        #[doc(hidden)]
    3472        #[derive(PartialEq, Eq, Hash)]
    3473        enum __FieldTag {
    3474            __dead_letter_topic,
    3475            __max_delivery_attempts,
    3476            Unknown(std::string::String),
    3477        }
    3478        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    3479            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    3480            where
    3481                D: serde::Deserializer<'de>,
    3482            {
    3483                struct Visitor;
    3484                impl<'de> serde::de::Visitor<'de> for Visitor {
    3485                    type Value = __FieldTag;
    3486                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    3487                        formatter.write_str("a field name for DeadLetterPolicy")
    3488                    }
    3489                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    3490                    where
    3491                        E: serde::de::Error,
    3492                    {
    3493                        use std::result::Result::Ok;
    3494                        use std::string::ToString;
    3495                        match value {
    3496                            "deadLetterTopic" => Ok(__FieldTag::__dead_letter_topic),
    3497                            "dead_letter_topic" => Ok(__FieldTag::__dead_letter_topic),
    3498                            "maxDeliveryAttempts" => Ok(__FieldTag::__max_delivery_attempts),
    3499                            "max_delivery_attempts" => Ok(__FieldTag::__max_delivery_attempts),
    3500                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    3501                        }
    3502                    }
    3503                }
    3504                deserializer.deserialize_identifier(Visitor)
    3505            }
    3506        }
    3507        struct Visitor;
    3508        impl<'de> serde::de::Visitor<'de> for Visitor {
    3509            type Value = super::DeadLetterPolicy;
    3510            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    3511                formatter.write_str("struct DeadLetterPolicy")
    3512            }
    3513            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    3514            where
    3515                A: serde::de::MapAccess<'de>,
    3516            {
    3517                #[allow(unused_imports)]
    3518                use serde::de::Error;
    3519                use std::option::Option::Some;
    3520                let mut fields = std::collections::HashSet::new();
    3521                let mut result = Self::Value::new();
    3522                while let Some(tag) = map.next_key::<__FieldTag>()? {
    3523                    #[allow(clippy::match_single_binding)]
    3524                    match tag {
    3525                        __FieldTag::__dead_letter_topic => {
    3526                            if !fields.insert(__FieldTag::__dead_letter_topic) {
    3527                                return std::result::Result::Err(A::Error::duplicate_field(
    3528                                    "multiple values for dead_letter_topic",
    3529                                ));
    3530                            }
    3531                            result.dead_letter_topic = map
    3532                                .next_value::<std::option::Option<std::string::String>>()?
    3533                                .unwrap_or_default();
    3534                        }
    3535                        __FieldTag::__max_delivery_attempts => {
    3536                            if !fields.insert(__FieldTag::__max_delivery_attempts) {
    3537                                return std::result::Result::Err(A::Error::duplicate_field(
    3538                                    "multiple values for max_delivery_attempts",
    3539                                ));
    3540                            }
    3541                            struct __With(std::option::Option<i32>);
    3542                            impl<'de> serde::de::Deserialize<'de> for __With {
    3543                                fn deserialize<D>(
    3544                                    deserializer: D,
    3545                                ) -> std::result::Result<Self, D::Error>
    3546                                where
    3547                                    D: serde::de::Deserializer<'de>,
    3548                                {
    3549                                    serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
    3550                                }
    3551                            }
    3552                            result.max_delivery_attempts =
    3553                                map.next_value::<__With>()?.0.unwrap_or_default();
    3554                        }
    3555                        __FieldTag::Unknown(key) => {
    3556                            let value = map.next_value::<serde_json::Value>()?;
    3557                            result._unknown_fields.insert(key, value);
    3558                        }
    3559                    }
    3560                }
    3561                std::result::Result::Ok(result)
    3562            }
    3563        }
    3564        deserializer.deserialize_any(Visitor)
    3565    }
    3566}
    3567
    3568#[doc(hidden)]
    3569impl<'de> serde::de::Deserialize<'de> for super::ExpirationPolicy {
    3570    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    3571    where
    3572        D: serde::Deserializer<'de>,
    3573    {
    3574        #[allow(non_camel_case_types)]
    3575        #[doc(hidden)]
    3576        #[derive(PartialEq, Eq, Hash)]
    3577        enum __FieldTag {
    3578            __ttl,
    3579            Unknown(std::string::String),
    3580        }
    3581        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    3582            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    3583            where
    3584                D: serde::Deserializer<'de>,
    3585            {
    3586                struct Visitor;
    3587                impl<'de> serde::de::Visitor<'de> for Visitor {
    3588                    type Value = __FieldTag;
    3589                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    3590                        formatter.write_str("a field name for ExpirationPolicy")
    3591                    }
    3592                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    3593                    where
    3594                        E: serde::de::Error,
    3595                    {
    3596                        use std::result::Result::Ok;
    3597                        use std::string::ToString;
    3598                        match value {
    3599                            "ttl" => Ok(__FieldTag::__ttl),
    3600                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    3601                        }
    3602                    }
    3603                }
    3604                deserializer.deserialize_identifier(Visitor)
    3605            }
    3606        }
    3607        struct Visitor;
    3608        impl<'de> serde::de::Visitor<'de> for Visitor {
    3609            type Value = super::ExpirationPolicy;
    3610            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    3611                formatter.write_str("struct ExpirationPolicy")
    3612            }
    3613            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    3614            where
    3615                A: serde::de::MapAccess<'de>,
    3616            {
    3617                #[allow(unused_imports)]
    3618                use serde::de::Error;
    3619                use std::option::Option::Some;
    3620                let mut fields = std::collections::HashSet::new();
    3621                let mut result = Self::Value::new();
    3622                while let Some(tag) = map.next_key::<__FieldTag>()? {
    3623                    #[allow(clippy::match_single_binding)]
    3624                    match tag {
    3625                        __FieldTag::__ttl => {
    3626                            if !fields.insert(__FieldTag::__ttl) {
    3627                                return std::result::Result::Err(A::Error::duplicate_field(
    3628                                    "multiple values for ttl",
    3629                                ));
    3630                            }
    3631                            result.ttl = map.next_value::<std::option::Option<wkt::Duration>>()?;
    3632                        }
    3633                        __FieldTag::Unknown(key) => {
    3634                            let value = map.next_value::<serde_json::Value>()?;
    3635                            result._unknown_fields.insert(key, value);
    3636                        }
    3637                    }
    3638                }
    3639                std::result::Result::Ok(result)
    3640            }
    3641        }
    3642        deserializer.deserialize_any(Visitor)
    3643    }
    3644}
    3645
    3646#[doc(hidden)]
    3647impl<'de> serde::de::Deserialize<'de> for super::PushConfig {
    3648    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    3649    where
    3650        D: serde::Deserializer<'de>,
    3651    {
    3652        #[allow(non_camel_case_types)]
    3653        #[doc(hidden)]
    3654        #[derive(PartialEq, Eq, Hash)]
    3655        enum __FieldTag {
    3656            __push_endpoint,
    3657            __attributes,
    3658            __oidc_token,
    3659            __pubsub_wrapper,
    3660            __no_wrapper,
    3661            Unknown(std::string::String),
    3662        }
    3663        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    3664            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    3665            where
    3666                D: serde::Deserializer<'de>,
    3667            {
    3668                struct Visitor;
    3669                impl<'de> serde::de::Visitor<'de> for Visitor {
    3670                    type Value = __FieldTag;
    3671                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    3672                        formatter.write_str("a field name for PushConfig")
    3673                    }
    3674                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    3675                    where
    3676                        E: serde::de::Error,
    3677                    {
    3678                        use std::result::Result::Ok;
    3679                        use std::string::ToString;
    3680                        match value {
    3681                            "pushEndpoint" => Ok(__FieldTag::__push_endpoint),
    3682                            "push_endpoint" => Ok(__FieldTag::__push_endpoint),
    3683                            "attributes" => Ok(__FieldTag::__attributes),
    3684                            "oidcToken" => Ok(__FieldTag::__oidc_token),
    3685                            "oidc_token" => Ok(__FieldTag::__oidc_token),
    3686                            "pubsubWrapper" => Ok(__FieldTag::__pubsub_wrapper),
    3687                            "pubsub_wrapper" => Ok(__FieldTag::__pubsub_wrapper),
    3688                            "noWrapper" => Ok(__FieldTag::__no_wrapper),
    3689                            "no_wrapper" => Ok(__FieldTag::__no_wrapper),
    3690                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    3691                        }
    3692                    }
    3693                }
    3694                deserializer.deserialize_identifier(Visitor)
    3695            }
    3696        }
    3697        struct Visitor;
    3698        impl<'de> serde::de::Visitor<'de> for Visitor {
    3699            type Value = super::PushConfig;
    3700            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    3701                formatter.write_str("struct PushConfig")
    3702            }
    3703            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    3704            where
    3705                A: serde::de::MapAccess<'de>,
    3706            {
    3707                #[allow(unused_imports)]
    3708                use serde::de::Error;
    3709                use std::option::Option::Some;
    3710                let mut fields = std::collections::HashSet::new();
    3711                let mut result = Self::Value::new();
    3712                while let Some(tag) = map.next_key::<__FieldTag>()? {
    3713                    #[allow(clippy::match_single_binding)]
    3714                    match tag {
    3715                        __FieldTag::__push_endpoint => {
    3716                            if !fields.insert(__FieldTag::__push_endpoint) {
    3717                                return std::result::Result::Err(A::Error::duplicate_field(
    3718                                    "multiple values for push_endpoint",
    3719                                ));
    3720                            }
    3721                            result.push_endpoint = map
    3722                                .next_value::<std::option::Option<std::string::String>>()?
    3723                                .unwrap_or_default();
    3724                        }
    3725                        __FieldTag::__attributes => {
    3726                            if !fields.insert(__FieldTag::__attributes) {
    3727                                return std::result::Result::Err(A::Error::duplicate_field(
    3728                                    "multiple values for attributes",
    3729                                ));
    3730                            }
    3731                            result.attributes = map
    3732                                .next_value::<std::option::Option<
    3733                                    std::collections::HashMap<
    3734                                        std::string::String,
    3735                                        std::string::String,
    3736                                    >,
    3737                                >>()?
    3738                                .unwrap_or_default();
    3739                        }
    3740                        __FieldTag::__oidc_token => {
    3741                            if !fields.insert(__FieldTag::__oidc_token) {
    3742                                return std::result::Result::Err(A::Error::duplicate_field(
    3743                                    "multiple values for oidc_token",
    3744                                ));
    3745                            }
    3746                            if result.authentication_method.is_some() {
    3747                                return std::result::Result::Err(A::Error::duplicate_field(
    3748                                    "multiple values for `authentication_method`, a oneof with full ID .google.pubsub.v1.PushConfig.oidc_token, latest field was oidcToken",
    3749                                ));
    3750                            }
    3751                            result.authentication_method = std::option::Option::Some(
    3752                                crate::model::push_config::AuthenticationMethod::OidcToken(
    3753                                    map.next_value::<std::option::Option<
    3754                                        std::boxed::Box<crate::model::push_config::OidcToken>,
    3755                                    >>()?
    3756                                    .unwrap_or_default(),
    3757                                ),
    3758                            );
    3759                        }
    3760                        __FieldTag::__pubsub_wrapper => {
    3761                            if !fields.insert(__FieldTag::__pubsub_wrapper) {
    3762                                return std::result::Result::Err(A::Error::duplicate_field(
    3763                                    "multiple values for pubsub_wrapper",
    3764                                ));
    3765                            }
    3766                            if result.wrapper.is_some() {
    3767                                return std::result::Result::Err(A::Error::duplicate_field(
    3768                                    "multiple values for `wrapper`, a oneof with full ID .google.pubsub.v1.PushConfig.pubsub_wrapper, latest field was pubsubWrapper",
    3769                                ));
    3770                            }
    3771                            result.wrapper = std::option::Option::Some(
    3772                                crate::model::push_config::Wrapper::PubsubWrapper(
    3773                                    map.next_value::<std::option::Option<
    3774                                        std::boxed::Box<crate::model::push_config::PubsubWrapper>,
    3775                                    >>()?
    3776                                    .unwrap_or_default(),
    3777                                ),
    3778                            );
    3779                        }
    3780                        __FieldTag::__no_wrapper => {
    3781                            if !fields.insert(__FieldTag::__no_wrapper) {
    3782                                return std::result::Result::Err(A::Error::duplicate_field(
    3783                                    "multiple values for no_wrapper",
    3784                                ));
    3785                            }
    3786                            if result.wrapper.is_some() {
    3787                                return std::result::Result::Err(A::Error::duplicate_field(
    3788                                    "multiple values for `wrapper`, a oneof with full ID .google.pubsub.v1.PushConfig.no_wrapper, latest field was noWrapper",
    3789                                ));
    3790                            }
    3791                            result.wrapper = std::option::Option::Some(
    3792                                crate::model::push_config::Wrapper::NoWrapper(
    3793                                    map.next_value::<std::option::Option<
    3794                                        std::boxed::Box<crate::model::push_config::NoWrapper>,
    3795                                    >>()?
    3796                                    .unwrap_or_default(),
    3797                                ),
    3798                            );
    3799                        }
    3800                        __FieldTag::Unknown(key) => {
    3801                            let value = map.next_value::<serde_json::Value>()?;
    3802                            result._unknown_fields.insert(key, value);
    3803                        }
    3804                    }
    3805                }
    3806                std::result::Result::Ok(result)
    3807            }
    3808        }
    3809        deserializer.deserialize_any(Visitor)
    3810    }
    3811}
    3812
    3813#[doc(hidden)]
    3814impl<'de> serde::de::Deserialize<'de> for super::push_config::OidcToken {
    3815    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    3816    where
    3817        D: serde::Deserializer<'de>,
    3818    {
    3819        #[allow(non_camel_case_types)]
    3820        #[doc(hidden)]
    3821        #[derive(PartialEq, Eq, Hash)]
    3822        enum __FieldTag {
    3823            __service_account_email,
    3824            __audience,
    3825            Unknown(std::string::String),
    3826        }
    3827        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    3828            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    3829            where
    3830                D: serde::Deserializer<'de>,
    3831            {
    3832                struct Visitor;
    3833                impl<'de> serde::de::Visitor<'de> for Visitor {
    3834                    type Value = __FieldTag;
    3835                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    3836                        formatter.write_str("a field name for OidcToken")
    3837                    }
    3838                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    3839                    where
    3840                        E: serde::de::Error,
    3841                    {
    3842                        use std::result::Result::Ok;
    3843                        use std::string::ToString;
    3844                        match value {
    3845                            "serviceAccountEmail" => Ok(__FieldTag::__service_account_email),
    3846                            "service_account_email" => Ok(__FieldTag::__service_account_email),
    3847                            "audience" => Ok(__FieldTag::__audience),
    3848                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    3849                        }
    3850                    }
    3851                }
    3852                deserializer.deserialize_identifier(Visitor)
    3853            }
    3854        }
    3855        struct Visitor;
    3856        impl<'de> serde::de::Visitor<'de> for Visitor {
    3857            type Value = super::push_config::OidcToken;
    3858            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    3859                formatter.write_str("struct OidcToken")
    3860            }
    3861            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    3862            where
    3863                A: serde::de::MapAccess<'de>,
    3864            {
    3865                #[allow(unused_imports)]
    3866                use serde::de::Error;
    3867                use std::option::Option::Some;
    3868                let mut fields = std::collections::HashSet::new();
    3869                let mut result = Self::Value::new();
    3870                while let Some(tag) = map.next_key::<__FieldTag>()? {
    3871                    #[allow(clippy::match_single_binding)]
    3872                    match tag {
    3873                        __FieldTag::__service_account_email => {
    3874                            if !fields.insert(__FieldTag::__service_account_email) {
    3875                                return std::result::Result::Err(A::Error::duplicate_field(
    3876                                    "multiple values for service_account_email",
    3877                                ));
    3878                            }
    3879                            result.service_account_email = map
    3880                                .next_value::<std::option::Option<std::string::String>>()?
    3881                                .unwrap_or_default();
    3882                        }
    3883                        __FieldTag::__audience => {
    3884                            if !fields.insert(__FieldTag::__audience) {
    3885                                return std::result::Result::Err(A::Error::duplicate_field(
    3886                                    "multiple values for audience",
    3887                                ));
    3888                            }
    3889                            result.audience = map
    3890                                .next_value::<std::option::Option<std::string::String>>()?
    3891                                .unwrap_or_default();
    3892                        }
    3893                        __FieldTag::Unknown(key) => {
    3894                            let value = map.next_value::<serde_json::Value>()?;
    3895                            result._unknown_fields.insert(key, value);
    3896                        }
    3897                    }
    3898                }
    3899                std::result::Result::Ok(result)
    3900            }
    3901        }
    3902        deserializer.deserialize_any(Visitor)
    3903    }
    3904}
    3905
    3906#[doc(hidden)]
    3907impl<'de> serde::de::Deserialize<'de> for super::push_config::PubsubWrapper {
    3908    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    3909    where
    3910        D: serde::Deserializer<'de>,
    3911    {
    3912        #[allow(non_camel_case_types)]
    3913        #[doc(hidden)]
    3914        #[derive(PartialEq, Eq, Hash)]
    3915        enum __FieldTag {
    3916            Unknown(std::string::String),
    3917        }
    3918        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    3919            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    3920            where
    3921                D: serde::Deserializer<'de>,
    3922            {
    3923                struct Visitor;
    3924                impl<'de> serde::de::Visitor<'de> for Visitor {
    3925                    type Value = __FieldTag;
    3926                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    3927                        formatter.write_str("a field name for PubsubWrapper")
    3928                    }
    3929                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    3930                    where
    3931                        E: serde::de::Error,
    3932                    {
    3933                        use std::result::Result::Ok;
    3934                        use std::string::ToString;
    3935                        Ok(__FieldTag::Unknown(value.to_string()))
    3936                    }
    3937                }
    3938                deserializer.deserialize_identifier(Visitor)
    3939            }
    3940        }
    3941        struct Visitor;
    3942        impl<'de> serde::de::Visitor<'de> for Visitor {
    3943            type Value = super::push_config::PubsubWrapper;
    3944            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    3945                formatter.write_str("struct PubsubWrapper")
    3946            }
    3947            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    3948            where
    3949                A: serde::de::MapAccess<'de>,
    3950            {
    3951                #[allow(unused_imports)]
    3952                use serde::de::Error;
    3953                use std::option::Option::Some;
    3954                let mut result = Self::Value::new();
    3955                while let Some(tag) = map.next_key::<__FieldTag>()? {
    3956                    #[allow(clippy::match_single_binding)]
    3957                    match tag {
    3958                        __FieldTag::Unknown(key) => {
    3959                            let value = map.next_value::<serde_json::Value>()?;
    3960                            result._unknown_fields.insert(key, value);
    3961                        }
    3962                    }
    3963                }
    3964                std::result::Result::Ok(result)
    3965            }
    3966        }
    3967        deserializer.deserialize_any(Visitor)
    3968    }
    3969}
    3970
    3971#[doc(hidden)]
    3972impl<'de> serde::de::Deserialize<'de> for super::push_config::NoWrapper {
    3973    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    3974    where
    3975        D: serde::Deserializer<'de>,
    3976    {
    3977        #[allow(non_camel_case_types)]
    3978        #[doc(hidden)]
    3979        #[derive(PartialEq, Eq, Hash)]
    3980        enum __FieldTag {
    3981            __write_metadata,
    3982            Unknown(std::string::String),
    3983        }
    3984        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    3985            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    3986            where
    3987                D: serde::Deserializer<'de>,
    3988            {
    3989                struct Visitor;
    3990                impl<'de> serde::de::Visitor<'de> for Visitor {
    3991                    type Value = __FieldTag;
    3992                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    3993                        formatter.write_str("a field name for NoWrapper")
    3994                    }
    3995                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    3996                    where
    3997                        E: serde::de::Error,
    3998                    {
    3999                        use std::result::Result::Ok;
    4000                        use std::string::ToString;
    4001                        match value {
    4002                            "writeMetadata" => Ok(__FieldTag::__write_metadata),
    4003                            "write_metadata" => Ok(__FieldTag::__write_metadata),
    4004                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    4005                        }
    4006                    }
    4007                }
    4008                deserializer.deserialize_identifier(Visitor)
    4009            }
    4010        }
    4011        struct Visitor;
    4012        impl<'de> serde::de::Visitor<'de> for Visitor {
    4013            type Value = super::push_config::NoWrapper;
    4014            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    4015                formatter.write_str("struct NoWrapper")
    4016            }
    4017            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    4018            where
    4019                A: serde::de::MapAccess<'de>,
    4020            {
    4021                #[allow(unused_imports)]
    4022                use serde::de::Error;
    4023                use std::option::Option::Some;
    4024                let mut fields = std::collections::HashSet::new();
    4025                let mut result = Self::Value::new();
    4026                while let Some(tag) = map.next_key::<__FieldTag>()? {
    4027                    #[allow(clippy::match_single_binding)]
    4028                    match tag {
    4029                        __FieldTag::__write_metadata => {
    4030                            if !fields.insert(__FieldTag::__write_metadata) {
    4031                                return std::result::Result::Err(A::Error::duplicate_field(
    4032                                    "multiple values for write_metadata",
    4033                                ));
    4034                            }
    4035                            result.write_metadata = map
    4036                                .next_value::<std::option::Option<bool>>()?
    4037                                .unwrap_or_default();
    4038                        }
    4039                        __FieldTag::Unknown(key) => {
    4040                            let value = map.next_value::<serde_json::Value>()?;
    4041                            result._unknown_fields.insert(key, value);
    4042                        }
    4043                    }
    4044                }
    4045                std::result::Result::Ok(result)
    4046            }
    4047        }
    4048        deserializer.deserialize_any(Visitor)
    4049    }
    4050}
    4051
    4052#[doc(hidden)]
    4053impl<'de> serde::de::Deserialize<'de> for super::BigQueryConfig {
    4054    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    4055    where
    4056        D: serde::Deserializer<'de>,
    4057    {
    4058        #[allow(non_camel_case_types)]
    4059        #[doc(hidden)]
    4060        #[derive(PartialEq, Eq, Hash)]
    4061        enum __FieldTag {
    4062            __table,
    4063            __use_topic_schema,
    4064            __write_metadata,
    4065            __drop_unknown_fields,
    4066            __state,
    4067            __use_table_schema,
    4068            __service_account_email,
    4069            Unknown(std::string::String),
    4070        }
    4071        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    4072            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    4073            where
    4074                D: serde::Deserializer<'de>,
    4075            {
    4076                struct Visitor;
    4077                impl<'de> serde::de::Visitor<'de> for Visitor {
    4078                    type Value = __FieldTag;
    4079                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    4080                        formatter.write_str("a field name for BigQueryConfig")
    4081                    }
    4082                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    4083                    where
    4084                        E: serde::de::Error,
    4085                    {
    4086                        use std::result::Result::Ok;
    4087                        use std::string::ToString;
    4088                        match value {
    4089                            "table" => Ok(__FieldTag::__table),
    4090                            "useTopicSchema" => Ok(__FieldTag::__use_topic_schema),
    4091                            "use_topic_schema" => Ok(__FieldTag::__use_topic_schema),
    4092                            "writeMetadata" => Ok(__FieldTag::__write_metadata),
    4093                            "write_metadata" => Ok(__FieldTag::__write_metadata),
    4094                            "dropUnknownFields" => Ok(__FieldTag::__drop_unknown_fields),
    4095                            "drop_unknown_fields" => Ok(__FieldTag::__drop_unknown_fields),
    4096                            "state" => Ok(__FieldTag::__state),
    4097                            "useTableSchema" => Ok(__FieldTag::__use_table_schema),
    4098                            "use_table_schema" => Ok(__FieldTag::__use_table_schema),
    4099                            "serviceAccountEmail" => Ok(__FieldTag::__service_account_email),
    4100                            "service_account_email" => Ok(__FieldTag::__service_account_email),
    4101                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    4102                        }
    4103                    }
    4104                }
    4105                deserializer.deserialize_identifier(Visitor)
    4106            }
    4107        }
    4108        struct Visitor;
    4109        impl<'de> serde::de::Visitor<'de> for Visitor {
    4110            type Value = super::BigQueryConfig;
    4111            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    4112                formatter.write_str("struct BigQueryConfig")
    4113            }
    4114            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    4115            where
    4116                A: serde::de::MapAccess<'de>,
    4117            {
    4118                #[allow(unused_imports)]
    4119                use serde::de::Error;
    4120                use std::option::Option::Some;
    4121                let mut fields = std::collections::HashSet::new();
    4122                let mut result = Self::Value::new();
    4123                while let Some(tag) = map.next_key::<__FieldTag>()? {
    4124                    #[allow(clippy::match_single_binding)]
    4125                    match tag {
    4126                        __FieldTag::__table => {
    4127                            if !fields.insert(__FieldTag::__table) {
    4128                                return std::result::Result::Err(A::Error::duplicate_field(
    4129                                    "multiple values for table",
    4130                                ));
    4131                            }
    4132                            result.table = map
    4133                                .next_value::<std::option::Option<std::string::String>>()?
    4134                                .unwrap_or_default();
    4135                        }
    4136                        __FieldTag::__use_topic_schema => {
    4137                            if !fields.insert(__FieldTag::__use_topic_schema) {
    4138                                return std::result::Result::Err(A::Error::duplicate_field(
    4139                                    "multiple values for use_topic_schema",
    4140                                ));
    4141                            }
    4142                            result.use_topic_schema = map
    4143                                .next_value::<std::option::Option<bool>>()?
    4144                                .unwrap_or_default();
    4145                        }
    4146                        __FieldTag::__write_metadata => {
    4147                            if !fields.insert(__FieldTag::__write_metadata) {
    4148                                return std::result::Result::Err(A::Error::duplicate_field(
    4149                                    "multiple values for write_metadata",
    4150                                ));
    4151                            }
    4152                            result.write_metadata = map
    4153                                .next_value::<std::option::Option<bool>>()?
    4154                                .unwrap_or_default();
    4155                        }
    4156                        __FieldTag::__drop_unknown_fields => {
    4157                            if !fields.insert(__FieldTag::__drop_unknown_fields) {
    4158                                return std::result::Result::Err(A::Error::duplicate_field(
    4159                                    "multiple values for drop_unknown_fields",
    4160                                ));
    4161                            }
    4162                            result.drop_unknown_fields = map
    4163                                .next_value::<std::option::Option<bool>>()?
    4164                                .unwrap_or_default();
    4165                        }
    4166                        __FieldTag::__state => {
    4167                            if !fields.insert(__FieldTag::__state) {
    4168                                return std::result::Result::Err(A::Error::duplicate_field(
    4169                                    "multiple values for state",
    4170                                ));
    4171                            }
    4172                            result.state = map.next_value::<std::option::Option<crate::model::big_query_config::State>>()?.unwrap_or_default();
    4173                        }
    4174                        __FieldTag::__use_table_schema => {
    4175                            if !fields.insert(__FieldTag::__use_table_schema) {
    4176                                return std::result::Result::Err(A::Error::duplicate_field(
    4177                                    "multiple values for use_table_schema",
    4178                                ));
    4179                            }
    4180                            result.use_table_schema = map
    4181                                .next_value::<std::option::Option<bool>>()?
    4182                                .unwrap_or_default();
    4183                        }
    4184                        __FieldTag::__service_account_email => {
    4185                            if !fields.insert(__FieldTag::__service_account_email) {
    4186                                return std::result::Result::Err(A::Error::duplicate_field(
    4187                                    "multiple values for service_account_email",
    4188                                ));
    4189                            }
    4190                            result.service_account_email = map
    4191                                .next_value::<std::option::Option<std::string::String>>()?
    4192                                .unwrap_or_default();
    4193                        }
    4194                        __FieldTag::Unknown(key) => {
    4195                            let value = map.next_value::<serde_json::Value>()?;
    4196                            result._unknown_fields.insert(key, value);
    4197                        }
    4198                    }
    4199                }
    4200                std::result::Result::Ok(result)
    4201            }
    4202        }
    4203        deserializer.deserialize_any(Visitor)
    4204    }
    4205}
    4206
    4207#[doc(hidden)]
    4208impl<'de> serde::de::Deserialize<'de> for super::CloudStorageConfig {
    4209    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    4210    where
    4211        D: serde::Deserializer<'de>,
    4212    {
    4213        #[allow(non_camel_case_types)]
    4214        #[doc(hidden)]
    4215        #[derive(PartialEq, Eq, Hash)]
    4216        enum __FieldTag {
    4217            __bucket,
    4218            __filename_prefix,
    4219            __filename_suffix,
    4220            __filename_datetime_format,
    4221            __text_config,
    4222            __avro_config,
    4223            __max_duration,
    4224            __max_bytes,
    4225            __max_messages,
    4226            __state,
    4227            __service_account_email,
    4228            Unknown(std::string::String),
    4229        }
    4230        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    4231            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    4232            where
    4233                D: serde::Deserializer<'de>,
    4234            {
    4235                struct Visitor;
    4236                impl<'de> serde::de::Visitor<'de> for Visitor {
    4237                    type Value = __FieldTag;
    4238                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    4239                        formatter.write_str("a field name for CloudStorageConfig")
    4240                    }
    4241                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    4242                    where
    4243                        E: serde::de::Error,
    4244                    {
    4245                        use std::result::Result::Ok;
    4246                        use std::string::ToString;
    4247                        match value {
    4248                            "bucket" => Ok(__FieldTag::__bucket),
    4249                            "filenamePrefix" => Ok(__FieldTag::__filename_prefix),
    4250                            "filename_prefix" => Ok(__FieldTag::__filename_prefix),
    4251                            "filenameSuffix" => Ok(__FieldTag::__filename_suffix),
    4252                            "filename_suffix" => Ok(__FieldTag::__filename_suffix),
    4253                            "filenameDatetimeFormat" => Ok(__FieldTag::__filename_datetime_format),
    4254                            "filename_datetime_format" => {
    4255                                Ok(__FieldTag::__filename_datetime_format)
    4256                            }
    4257                            "textConfig" => Ok(__FieldTag::__text_config),
    4258                            "text_config" => Ok(__FieldTag::__text_config),
    4259                            "avroConfig" => Ok(__FieldTag::__avro_config),
    4260                            "avro_config" => Ok(__FieldTag::__avro_config),
    4261                            "maxDuration" => Ok(__FieldTag::__max_duration),
    4262                            "max_duration" => Ok(__FieldTag::__max_duration),
    4263                            "maxBytes" => Ok(__FieldTag::__max_bytes),
    4264                            "max_bytes" => Ok(__FieldTag::__max_bytes),
    4265                            "maxMessages" => Ok(__FieldTag::__max_messages),
    4266                            "max_messages" => Ok(__FieldTag::__max_messages),
    4267                            "state" => Ok(__FieldTag::__state),
    4268                            "serviceAccountEmail" => Ok(__FieldTag::__service_account_email),
    4269                            "service_account_email" => Ok(__FieldTag::__service_account_email),
    4270                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    4271                        }
    4272                    }
    4273                }
    4274                deserializer.deserialize_identifier(Visitor)
    4275            }
    4276        }
    4277        struct Visitor;
    4278        impl<'de> serde::de::Visitor<'de> for Visitor {
    4279            type Value = super::CloudStorageConfig;
    4280            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    4281                formatter.write_str("struct CloudStorageConfig")
    4282            }
    4283            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    4284            where
    4285                A: serde::de::MapAccess<'de>,
    4286            {
    4287                #[allow(unused_imports)]
    4288                use serde::de::Error;
    4289                use std::option::Option::Some;
    4290                let mut fields = std::collections::HashSet::new();
    4291                let mut result = Self::Value::new();
    4292                while let Some(tag) = map.next_key::<__FieldTag>()? {
    4293                    #[allow(clippy::match_single_binding)]
    4294                    match tag {
    4295                        __FieldTag::__bucket => {
    4296                            if !fields.insert(__FieldTag::__bucket) {
    4297                                return std::result::Result::Err(A::Error::duplicate_field(
    4298                                    "multiple values for bucket",
    4299                                ));
    4300                            }
    4301                            result.bucket = map
    4302                                .next_value::<std::option::Option<std::string::String>>()?
    4303                                .unwrap_or_default();
    4304                        }
    4305                        __FieldTag::__filename_prefix => {
    4306                            if !fields.insert(__FieldTag::__filename_prefix) {
    4307                                return std::result::Result::Err(A::Error::duplicate_field(
    4308                                    "multiple values for filename_prefix",
    4309                                ));
    4310                            }
    4311                            result.filename_prefix = map
    4312                                .next_value::<std::option::Option<std::string::String>>()?
    4313                                .unwrap_or_default();
    4314                        }
    4315                        __FieldTag::__filename_suffix => {
    4316                            if !fields.insert(__FieldTag::__filename_suffix) {
    4317                                return std::result::Result::Err(A::Error::duplicate_field(
    4318                                    "multiple values for filename_suffix",
    4319                                ));
    4320                            }
    4321                            result.filename_suffix = map
    4322                                .next_value::<std::option::Option<std::string::String>>()?
    4323                                .unwrap_or_default();
    4324                        }
    4325                        __FieldTag::__filename_datetime_format => {
    4326                            if !fields.insert(__FieldTag::__filename_datetime_format) {
    4327                                return std::result::Result::Err(A::Error::duplicate_field(
    4328                                    "multiple values for filename_datetime_format",
    4329                                ));
    4330                            }
    4331                            result.filename_datetime_format = map
    4332                                .next_value::<std::option::Option<std::string::String>>()?
    4333                                .unwrap_or_default();
    4334                        }
    4335                        __FieldTag::__text_config => {
    4336                            if !fields.insert(__FieldTag::__text_config) {
    4337                                return std::result::Result::Err(A::Error::duplicate_field(
    4338                                    "multiple values for text_config",
    4339                                ));
    4340                            }
    4341                            if result.output_format.is_some() {
    4342                                return std::result::Result::Err(A::Error::duplicate_field(
    4343                                    "multiple values for `output_format`, a oneof with full ID .google.pubsub.v1.CloudStorageConfig.text_config, latest field was textConfig",
    4344                                ));
    4345                            }
    4346                            result.output_format = std::option::Option::Some(
    4347                                crate::model::cloud_storage_config::OutputFormat::TextConfig(
    4348                                    map.next_value::<std::option::Option<
    4349                                        std::boxed::Box<
    4350                                            crate::model::cloud_storage_config::TextConfig,
    4351                                        >,
    4352                                    >>()?
    4353                                    .unwrap_or_default(),
    4354                                ),
    4355                            );
    4356                        }
    4357                        __FieldTag::__avro_config => {
    4358                            if !fields.insert(__FieldTag::__avro_config) {
    4359                                return std::result::Result::Err(A::Error::duplicate_field(
    4360                                    "multiple values for avro_config",
    4361                                ));
    4362                            }
    4363                            if result.output_format.is_some() {
    4364                                return std::result::Result::Err(A::Error::duplicate_field(
    4365                                    "multiple values for `output_format`, a oneof with full ID .google.pubsub.v1.CloudStorageConfig.avro_config, latest field was avroConfig",
    4366                                ));
    4367                            }
    4368                            result.output_format = std::option::Option::Some(
    4369                                crate::model::cloud_storage_config::OutputFormat::AvroConfig(
    4370                                    map.next_value::<std::option::Option<
    4371                                        std::boxed::Box<
    4372                                            crate::model::cloud_storage_config::AvroConfig,
    4373                                        >,
    4374                                    >>()?
    4375                                    .unwrap_or_default(),
    4376                                ),
    4377                            );
    4378                        }
    4379                        __FieldTag::__max_duration => {
    4380                            if !fields.insert(__FieldTag::__max_duration) {
    4381                                return std::result::Result::Err(A::Error::duplicate_field(
    4382                                    "multiple values for max_duration",
    4383                                ));
    4384                            }
    4385                            result.max_duration =
    4386                                map.next_value::<std::option::Option<wkt::Duration>>()?;
    4387                        }
    4388                        __FieldTag::__max_bytes => {
    4389                            if !fields.insert(__FieldTag::__max_bytes) {
    4390                                return std::result::Result::Err(A::Error::duplicate_field(
    4391                                    "multiple values for max_bytes",
    4392                                ));
    4393                            }
    4394                            struct __With(std::option::Option<i64>);
    4395                            impl<'de> serde::de::Deserialize<'de> for __With {
    4396                                fn deserialize<D>(
    4397                                    deserializer: D,
    4398                                ) -> std::result::Result<Self, D::Error>
    4399                                where
    4400                                    D: serde::de::Deserializer<'de>,
    4401                                {
    4402                                    serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
    4403                                }
    4404                            }
    4405                            result.max_bytes = map.next_value::<__With>()?.0.unwrap_or_default();
    4406                        }
    4407                        __FieldTag::__max_messages => {
    4408                            if !fields.insert(__FieldTag::__max_messages) {
    4409                                return std::result::Result::Err(A::Error::duplicate_field(
    4410                                    "multiple values for max_messages",
    4411                                ));
    4412                            }
    4413                            struct __With(std::option::Option<i64>);
    4414                            impl<'de> serde::de::Deserialize<'de> for __With {
    4415                                fn deserialize<D>(
    4416                                    deserializer: D,
    4417                                ) -> std::result::Result<Self, D::Error>
    4418                                where
    4419                                    D: serde::de::Deserializer<'de>,
    4420                                {
    4421                                    serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
    4422                                }
    4423                            }
    4424                            result.max_messages = map.next_value::<__With>()?.0.unwrap_or_default();
    4425                        }
    4426                        __FieldTag::__state => {
    4427                            if !fields.insert(__FieldTag::__state) {
    4428                                return std::result::Result::Err(A::Error::duplicate_field(
    4429                                    "multiple values for state",
    4430                                ));
    4431                            }
    4432                            result.state = map.next_value::<std::option::Option<crate::model::cloud_storage_config::State>>()?.unwrap_or_default();
    4433                        }
    4434                        __FieldTag::__service_account_email => {
    4435                            if !fields.insert(__FieldTag::__service_account_email) {
    4436                                return std::result::Result::Err(A::Error::duplicate_field(
    4437                                    "multiple values for service_account_email",
    4438                                ));
    4439                            }
    4440                            result.service_account_email = map
    4441                                .next_value::<std::option::Option<std::string::String>>()?
    4442                                .unwrap_or_default();
    4443                        }
    4444                        __FieldTag::Unknown(key) => {
    4445                            let value = map.next_value::<serde_json::Value>()?;
    4446                            result._unknown_fields.insert(key, value);
    4447                        }
    4448                    }
    4449                }
    4450                std::result::Result::Ok(result)
    4451            }
    4452        }
    4453        deserializer.deserialize_any(Visitor)
    4454    }
    4455}
    4456
    4457#[doc(hidden)]
    4458impl<'de> serde::de::Deserialize<'de> for super::cloud_storage_config::TextConfig {
    4459    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    4460    where
    4461        D: serde::Deserializer<'de>,
    4462    {
    4463        #[allow(non_camel_case_types)]
    4464        #[doc(hidden)]
    4465        #[derive(PartialEq, Eq, Hash)]
    4466        enum __FieldTag {
    4467            Unknown(std::string::String),
    4468        }
    4469        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    4470            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    4471            where
    4472                D: serde::Deserializer<'de>,
    4473            {
    4474                struct Visitor;
    4475                impl<'de> serde::de::Visitor<'de> for Visitor {
    4476                    type Value = __FieldTag;
    4477                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    4478                        formatter.write_str("a field name for TextConfig")
    4479                    }
    4480                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    4481                    where
    4482                        E: serde::de::Error,
    4483                    {
    4484                        use std::result::Result::Ok;
    4485                        use std::string::ToString;
    4486                        Ok(__FieldTag::Unknown(value.to_string()))
    4487                    }
    4488                }
    4489                deserializer.deserialize_identifier(Visitor)
    4490            }
    4491        }
    4492        struct Visitor;
    4493        impl<'de> serde::de::Visitor<'de> for Visitor {
    4494            type Value = super::cloud_storage_config::TextConfig;
    4495            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    4496                formatter.write_str("struct TextConfig")
    4497            }
    4498            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    4499            where
    4500                A: serde::de::MapAccess<'de>,
    4501            {
    4502                #[allow(unused_imports)]
    4503                use serde::de::Error;
    4504                use std::option::Option::Some;
    4505                let mut result = Self::Value::new();
    4506                while let Some(tag) = map.next_key::<__FieldTag>()? {
    4507                    #[allow(clippy::match_single_binding)]
    4508                    match tag {
    4509                        __FieldTag::Unknown(key) => {
    4510                            let value = map.next_value::<serde_json::Value>()?;
    4511                            result._unknown_fields.insert(key, value);
    4512                        }
    4513                    }
    4514                }
    4515                std::result::Result::Ok(result)
    4516            }
    4517        }
    4518        deserializer.deserialize_any(Visitor)
    4519    }
    4520}
    4521
    4522#[doc(hidden)]
    4523impl<'de> serde::de::Deserialize<'de> for super::cloud_storage_config::AvroConfig {
    4524    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    4525    where
    4526        D: serde::Deserializer<'de>,
    4527    {
    4528        #[allow(non_camel_case_types)]
    4529        #[doc(hidden)]
    4530        #[derive(PartialEq, Eq, Hash)]
    4531        enum __FieldTag {
    4532            __write_metadata,
    4533            __use_topic_schema,
    4534            Unknown(std::string::String),
    4535        }
    4536        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    4537            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    4538            where
    4539                D: serde::Deserializer<'de>,
    4540            {
    4541                struct Visitor;
    4542                impl<'de> serde::de::Visitor<'de> for Visitor {
    4543                    type Value = __FieldTag;
    4544                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    4545                        formatter.write_str("a field name for AvroConfig")
    4546                    }
    4547                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    4548                    where
    4549                        E: serde::de::Error,
    4550                    {
    4551                        use std::result::Result::Ok;
    4552                        use std::string::ToString;
    4553                        match value {
    4554                            "writeMetadata" => Ok(__FieldTag::__write_metadata),
    4555                            "write_metadata" => Ok(__FieldTag::__write_metadata),
    4556                            "useTopicSchema" => Ok(__FieldTag::__use_topic_schema),
    4557                            "use_topic_schema" => Ok(__FieldTag::__use_topic_schema),
    4558                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    4559                        }
    4560                    }
    4561                }
    4562                deserializer.deserialize_identifier(Visitor)
    4563            }
    4564        }
    4565        struct Visitor;
    4566        impl<'de> serde::de::Visitor<'de> for Visitor {
    4567            type Value = super::cloud_storage_config::AvroConfig;
    4568            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    4569                formatter.write_str("struct AvroConfig")
    4570            }
    4571            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    4572            where
    4573                A: serde::de::MapAccess<'de>,
    4574            {
    4575                #[allow(unused_imports)]
    4576                use serde::de::Error;
    4577                use std::option::Option::Some;
    4578                let mut fields = std::collections::HashSet::new();
    4579                let mut result = Self::Value::new();
    4580                while let Some(tag) = map.next_key::<__FieldTag>()? {
    4581                    #[allow(clippy::match_single_binding)]
    4582                    match tag {
    4583                        __FieldTag::__write_metadata => {
    4584                            if !fields.insert(__FieldTag::__write_metadata) {
    4585                                return std::result::Result::Err(A::Error::duplicate_field(
    4586                                    "multiple values for write_metadata",
    4587                                ));
    4588                            }
    4589                            result.write_metadata = map
    4590                                .next_value::<std::option::Option<bool>>()?
    4591                                .unwrap_or_default();
    4592                        }
    4593                        __FieldTag::__use_topic_schema => {
    4594                            if !fields.insert(__FieldTag::__use_topic_schema) {
    4595                                return std::result::Result::Err(A::Error::duplicate_field(
    4596                                    "multiple values for use_topic_schema",
    4597                                ));
    4598                            }
    4599                            result.use_topic_schema = map
    4600                                .next_value::<std::option::Option<bool>>()?
    4601                                .unwrap_or_default();
    4602                        }
    4603                        __FieldTag::Unknown(key) => {
    4604                            let value = map.next_value::<serde_json::Value>()?;
    4605                            result._unknown_fields.insert(key, value);
    4606                        }
    4607                    }
    4608                }
    4609                std::result::Result::Ok(result)
    4610            }
    4611        }
    4612        deserializer.deserialize_any(Visitor)
    4613    }
    4614}
    4615
    4616#[doc(hidden)]
    4617impl<'de> serde::de::Deserialize<'de> for super::GetSubscriptionRequest {
    4618    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    4619    where
    4620        D: serde::Deserializer<'de>,
    4621    {
    4622        #[allow(non_camel_case_types)]
    4623        #[doc(hidden)]
    4624        #[derive(PartialEq, Eq, Hash)]
    4625        enum __FieldTag {
    4626            __subscription,
    4627            Unknown(std::string::String),
    4628        }
    4629        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    4630            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    4631            where
    4632                D: serde::Deserializer<'de>,
    4633            {
    4634                struct Visitor;
    4635                impl<'de> serde::de::Visitor<'de> for Visitor {
    4636                    type Value = __FieldTag;
    4637                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    4638                        formatter.write_str("a field name for GetSubscriptionRequest")
    4639                    }
    4640                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    4641                    where
    4642                        E: serde::de::Error,
    4643                    {
    4644                        use std::result::Result::Ok;
    4645                        use std::string::ToString;
    4646                        match value {
    4647                            "subscription" => Ok(__FieldTag::__subscription),
    4648                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    4649                        }
    4650                    }
    4651                }
    4652                deserializer.deserialize_identifier(Visitor)
    4653            }
    4654        }
    4655        struct Visitor;
    4656        impl<'de> serde::de::Visitor<'de> for Visitor {
    4657            type Value = super::GetSubscriptionRequest;
    4658            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    4659                formatter.write_str("struct GetSubscriptionRequest")
    4660            }
    4661            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    4662            where
    4663                A: serde::de::MapAccess<'de>,
    4664            {
    4665                #[allow(unused_imports)]
    4666                use serde::de::Error;
    4667                use std::option::Option::Some;
    4668                let mut fields = std::collections::HashSet::new();
    4669                let mut result = Self::Value::new();
    4670                while let Some(tag) = map.next_key::<__FieldTag>()? {
    4671                    #[allow(clippy::match_single_binding)]
    4672                    match tag {
    4673                        __FieldTag::__subscription => {
    4674                            if !fields.insert(__FieldTag::__subscription) {
    4675                                return std::result::Result::Err(A::Error::duplicate_field(
    4676                                    "multiple values for subscription",
    4677                                ));
    4678                            }
    4679                            result.subscription = map
    4680                                .next_value::<std::option::Option<std::string::String>>()?
    4681                                .unwrap_or_default();
    4682                        }
    4683                        __FieldTag::Unknown(key) => {
    4684                            let value = map.next_value::<serde_json::Value>()?;
    4685                            result._unknown_fields.insert(key, value);
    4686                        }
    4687                    }
    4688                }
    4689                std::result::Result::Ok(result)
    4690            }
    4691        }
    4692        deserializer.deserialize_any(Visitor)
    4693    }
    4694}
    4695
    4696#[doc(hidden)]
    4697impl<'de> serde::de::Deserialize<'de> for super::UpdateSubscriptionRequest {
    4698    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    4699    where
    4700        D: serde::Deserializer<'de>,
    4701    {
    4702        #[allow(non_camel_case_types)]
    4703        #[doc(hidden)]
    4704        #[derive(PartialEq, Eq, Hash)]
    4705        enum __FieldTag {
    4706            __subscription,
    4707            __update_mask,
    4708            Unknown(std::string::String),
    4709        }
    4710        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    4711            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    4712            where
    4713                D: serde::Deserializer<'de>,
    4714            {
    4715                struct Visitor;
    4716                impl<'de> serde::de::Visitor<'de> for Visitor {
    4717                    type Value = __FieldTag;
    4718                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    4719                        formatter.write_str("a field name for UpdateSubscriptionRequest")
    4720                    }
    4721                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    4722                    where
    4723                        E: serde::de::Error,
    4724                    {
    4725                        use std::result::Result::Ok;
    4726                        use std::string::ToString;
    4727                        match value {
    4728                            "subscription" => Ok(__FieldTag::__subscription),
    4729                            "updateMask" => Ok(__FieldTag::__update_mask),
    4730                            "update_mask" => Ok(__FieldTag::__update_mask),
    4731                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    4732                        }
    4733                    }
    4734                }
    4735                deserializer.deserialize_identifier(Visitor)
    4736            }
    4737        }
    4738        struct Visitor;
    4739        impl<'de> serde::de::Visitor<'de> for Visitor {
    4740            type Value = super::UpdateSubscriptionRequest;
    4741            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    4742                formatter.write_str("struct UpdateSubscriptionRequest")
    4743            }
    4744            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    4745            where
    4746                A: serde::de::MapAccess<'de>,
    4747            {
    4748                #[allow(unused_imports)]
    4749                use serde::de::Error;
    4750                use std::option::Option::Some;
    4751                let mut fields = std::collections::HashSet::new();
    4752                let mut result = Self::Value::new();
    4753                while let Some(tag) = map.next_key::<__FieldTag>()? {
    4754                    #[allow(clippy::match_single_binding)]
    4755                    match tag {
    4756                        __FieldTag::__subscription => {
    4757                            if !fields.insert(__FieldTag::__subscription) {
    4758                                return std::result::Result::Err(A::Error::duplicate_field(
    4759                                    "multiple values for subscription",
    4760                                ));
    4761                            }
    4762                            result.subscription = map
    4763                                .next_value::<std::option::Option<crate::model::Subscription>>()?;
    4764                        }
    4765                        __FieldTag::__update_mask => {
    4766                            if !fields.insert(__FieldTag::__update_mask) {
    4767                                return std::result::Result::Err(A::Error::duplicate_field(
    4768                                    "multiple values for update_mask",
    4769                                ));
    4770                            }
    4771                            result.update_mask =
    4772                                map.next_value::<std::option::Option<wkt::FieldMask>>()?;
    4773                        }
    4774                        __FieldTag::Unknown(key) => {
    4775                            let value = map.next_value::<serde_json::Value>()?;
    4776                            result._unknown_fields.insert(key, value);
    4777                        }
    4778                    }
    4779                }
    4780                std::result::Result::Ok(result)
    4781            }
    4782        }
    4783        deserializer.deserialize_any(Visitor)
    4784    }
    4785}
    4786
    4787#[doc(hidden)]
    4788impl<'de> serde::de::Deserialize<'de> for super::ListSubscriptionsRequest {
    4789    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    4790    where
    4791        D: serde::Deserializer<'de>,
    4792    {
    4793        #[allow(non_camel_case_types)]
    4794        #[doc(hidden)]
    4795        #[derive(PartialEq, Eq, Hash)]
    4796        enum __FieldTag {
    4797            __project,
    4798            __page_size,
    4799            __page_token,
    4800            Unknown(std::string::String),
    4801        }
    4802        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    4803            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    4804            where
    4805                D: serde::Deserializer<'de>,
    4806            {
    4807                struct Visitor;
    4808                impl<'de> serde::de::Visitor<'de> for Visitor {
    4809                    type Value = __FieldTag;
    4810                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    4811                        formatter.write_str("a field name for ListSubscriptionsRequest")
    4812                    }
    4813                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    4814                    where
    4815                        E: serde::de::Error,
    4816                    {
    4817                        use std::result::Result::Ok;
    4818                        use std::string::ToString;
    4819                        match value {
    4820                            "project" => Ok(__FieldTag::__project),
    4821                            "pageSize" => Ok(__FieldTag::__page_size),
    4822                            "page_size" => Ok(__FieldTag::__page_size),
    4823                            "pageToken" => Ok(__FieldTag::__page_token),
    4824                            "page_token" => Ok(__FieldTag::__page_token),
    4825                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    4826                        }
    4827                    }
    4828                }
    4829                deserializer.deserialize_identifier(Visitor)
    4830            }
    4831        }
    4832        struct Visitor;
    4833        impl<'de> serde::de::Visitor<'de> for Visitor {
    4834            type Value = super::ListSubscriptionsRequest;
    4835            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    4836                formatter.write_str("struct ListSubscriptionsRequest")
    4837            }
    4838            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    4839            where
    4840                A: serde::de::MapAccess<'de>,
    4841            {
    4842                #[allow(unused_imports)]
    4843                use serde::de::Error;
    4844                use std::option::Option::Some;
    4845                let mut fields = std::collections::HashSet::new();
    4846                let mut result = Self::Value::new();
    4847                while let Some(tag) = map.next_key::<__FieldTag>()? {
    4848                    #[allow(clippy::match_single_binding)]
    4849                    match tag {
    4850                        __FieldTag::__project => {
    4851                            if !fields.insert(__FieldTag::__project) {
    4852                                return std::result::Result::Err(A::Error::duplicate_field(
    4853                                    "multiple values for project",
    4854                                ));
    4855                            }
    4856                            result.project = map
    4857                                .next_value::<std::option::Option<std::string::String>>()?
    4858                                .unwrap_or_default();
    4859                        }
    4860                        __FieldTag::__page_size => {
    4861                            if !fields.insert(__FieldTag::__page_size) {
    4862                                return std::result::Result::Err(A::Error::duplicate_field(
    4863                                    "multiple values for page_size",
    4864                                ));
    4865                            }
    4866                            struct __With(std::option::Option<i32>);
    4867                            impl<'de> serde::de::Deserialize<'de> for __With {
    4868                                fn deserialize<D>(
    4869                                    deserializer: D,
    4870                                ) -> std::result::Result<Self, D::Error>
    4871                                where
    4872                                    D: serde::de::Deserializer<'de>,
    4873                                {
    4874                                    serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
    4875                                }
    4876                            }
    4877                            result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
    4878                        }
    4879                        __FieldTag::__page_token => {
    4880                            if !fields.insert(__FieldTag::__page_token) {
    4881                                return std::result::Result::Err(A::Error::duplicate_field(
    4882                                    "multiple values for page_token",
    4883                                ));
    4884                            }
    4885                            result.page_token = map
    4886                                .next_value::<std::option::Option<std::string::String>>()?
    4887                                .unwrap_or_default();
    4888                        }
    4889                        __FieldTag::Unknown(key) => {
    4890                            let value = map.next_value::<serde_json::Value>()?;
    4891                            result._unknown_fields.insert(key, value);
    4892                        }
    4893                    }
    4894                }
    4895                std::result::Result::Ok(result)
    4896            }
    4897        }
    4898        deserializer.deserialize_any(Visitor)
    4899    }
    4900}
    4901
    4902#[doc(hidden)]
    4903impl<'de> serde::de::Deserialize<'de> for super::ListSubscriptionsResponse {
    4904    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    4905    where
    4906        D: serde::Deserializer<'de>,
    4907    {
    4908        #[allow(non_camel_case_types)]
    4909        #[doc(hidden)]
    4910        #[derive(PartialEq, Eq, Hash)]
    4911        enum __FieldTag {
    4912            __subscriptions,
    4913            __next_page_token,
    4914            Unknown(std::string::String),
    4915        }
    4916        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    4917            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    4918            where
    4919                D: serde::Deserializer<'de>,
    4920            {
    4921                struct Visitor;
    4922                impl<'de> serde::de::Visitor<'de> for Visitor {
    4923                    type Value = __FieldTag;
    4924                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    4925                        formatter.write_str("a field name for ListSubscriptionsResponse")
    4926                    }
    4927                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    4928                    where
    4929                        E: serde::de::Error,
    4930                    {
    4931                        use std::result::Result::Ok;
    4932                        use std::string::ToString;
    4933                        match value {
    4934                            "subscriptions" => Ok(__FieldTag::__subscriptions),
    4935                            "nextPageToken" => Ok(__FieldTag::__next_page_token),
    4936                            "next_page_token" => Ok(__FieldTag::__next_page_token),
    4937                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    4938                        }
    4939                    }
    4940                }
    4941                deserializer.deserialize_identifier(Visitor)
    4942            }
    4943        }
    4944        struct Visitor;
    4945        impl<'de> serde::de::Visitor<'de> for Visitor {
    4946            type Value = super::ListSubscriptionsResponse;
    4947            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    4948                formatter.write_str("struct ListSubscriptionsResponse")
    4949            }
    4950            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    4951            where
    4952                A: serde::de::MapAccess<'de>,
    4953            {
    4954                #[allow(unused_imports)]
    4955                use serde::de::Error;
    4956                use std::option::Option::Some;
    4957                let mut fields = std::collections::HashSet::new();
    4958                let mut result = Self::Value::new();
    4959                while let Some(tag) = map.next_key::<__FieldTag>()? {
    4960                    #[allow(clippy::match_single_binding)]
    4961                    match tag {
    4962                        __FieldTag::__subscriptions => {
    4963                            if !fields.insert(__FieldTag::__subscriptions) {
    4964                                return std::result::Result::Err(A::Error::duplicate_field(
    4965                                    "multiple values for subscriptions",
    4966                                ));
    4967                            }
    4968                            result.subscriptions = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Subscription>>>()?.unwrap_or_default();
    4969                        }
    4970                        __FieldTag::__next_page_token => {
    4971                            if !fields.insert(__FieldTag::__next_page_token) {
    4972                                return std::result::Result::Err(A::Error::duplicate_field(
    4973                                    "multiple values for next_page_token",
    4974                                ));
    4975                            }
    4976                            result.next_page_token = map
    4977                                .next_value::<std::option::Option<std::string::String>>()?
    4978                                .unwrap_or_default();
    4979                        }
    4980                        __FieldTag::Unknown(key) => {
    4981                            let value = map.next_value::<serde_json::Value>()?;
    4982                            result._unknown_fields.insert(key, value);
    4983                        }
    4984                    }
    4985                }
    4986                std::result::Result::Ok(result)
    4987            }
    4988        }
    4989        deserializer.deserialize_any(Visitor)
    4990    }
    4991}
    4992
    4993#[doc(hidden)]
    4994impl<'de> serde::de::Deserialize<'de> for super::DeleteSubscriptionRequest {
    4995    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    4996    where
    4997        D: serde::Deserializer<'de>,
    4998    {
    4999        #[allow(non_camel_case_types)]
    5000        #[doc(hidden)]
    5001        #[derive(PartialEq, Eq, Hash)]
    5002        enum __FieldTag {
    5003            __subscription,
    5004            Unknown(std::string::String),
    5005        }
    5006        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    5007            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5008            where
    5009                D: serde::Deserializer<'de>,
    5010            {
    5011                struct Visitor;
    5012                impl<'de> serde::de::Visitor<'de> for Visitor {
    5013                    type Value = __FieldTag;
    5014                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5015                        formatter.write_str("a field name for DeleteSubscriptionRequest")
    5016                    }
    5017                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    5018                    where
    5019                        E: serde::de::Error,
    5020                    {
    5021                        use std::result::Result::Ok;
    5022                        use std::string::ToString;
    5023                        match value {
    5024                            "subscription" => Ok(__FieldTag::__subscription),
    5025                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    5026                        }
    5027                    }
    5028                }
    5029                deserializer.deserialize_identifier(Visitor)
    5030            }
    5031        }
    5032        struct Visitor;
    5033        impl<'de> serde::de::Visitor<'de> for Visitor {
    5034            type Value = super::DeleteSubscriptionRequest;
    5035            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5036                formatter.write_str("struct DeleteSubscriptionRequest")
    5037            }
    5038            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    5039            where
    5040                A: serde::de::MapAccess<'de>,
    5041            {
    5042                #[allow(unused_imports)]
    5043                use serde::de::Error;
    5044                use std::option::Option::Some;
    5045                let mut fields = std::collections::HashSet::new();
    5046                let mut result = Self::Value::new();
    5047                while let Some(tag) = map.next_key::<__FieldTag>()? {
    5048                    #[allow(clippy::match_single_binding)]
    5049                    match tag {
    5050                        __FieldTag::__subscription => {
    5051                            if !fields.insert(__FieldTag::__subscription) {
    5052                                return std::result::Result::Err(A::Error::duplicate_field(
    5053                                    "multiple values for subscription",
    5054                                ));
    5055                            }
    5056                            result.subscription = map
    5057                                .next_value::<std::option::Option<std::string::String>>()?
    5058                                .unwrap_or_default();
    5059                        }
    5060                        __FieldTag::Unknown(key) => {
    5061                            let value = map.next_value::<serde_json::Value>()?;
    5062                            result._unknown_fields.insert(key, value);
    5063                        }
    5064                    }
    5065                }
    5066                std::result::Result::Ok(result)
    5067            }
    5068        }
    5069        deserializer.deserialize_any(Visitor)
    5070    }
    5071}
    5072
    5073#[doc(hidden)]
    5074impl<'de> serde::de::Deserialize<'de> for super::ModifyPushConfigRequest {
    5075    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5076    where
    5077        D: serde::Deserializer<'de>,
    5078    {
    5079        #[allow(non_camel_case_types)]
    5080        #[doc(hidden)]
    5081        #[derive(PartialEq, Eq, Hash)]
    5082        enum __FieldTag {
    5083            __subscription,
    5084            __push_config,
    5085            Unknown(std::string::String),
    5086        }
    5087        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    5088            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5089            where
    5090                D: serde::Deserializer<'de>,
    5091            {
    5092                struct Visitor;
    5093                impl<'de> serde::de::Visitor<'de> for Visitor {
    5094                    type Value = __FieldTag;
    5095                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5096                        formatter.write_str("a field name for ModifyPushConfigRequest")
    5097                    }
    5098                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    5099                    where
    5100                        E: serde::de::Error,
    5101                    {
    5102                        use std::result::Result::Ok;
    5103                        use std::string::ToString;
    5104                        match value {
    5105                            "subscription" => Ok(__FieldTag::__subscription),
    5106                            "pushConfig" => Ok(__FieldTag::__push_config),
    5107                            "push_config" => Ok(__FieldTag::__push_config),
    5108                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    5109                        }
    5110                    }
    5111                }
    5112                deserializer.deserialize_identifier(Visitor)
    5113            }
    5114        }
    5115        struct Visitor;
    5116        impl<'de> serde::de::Visitor<'de> for Visitor {
    5117            type Value = super::ModifyPushConfigRequest;
    5118            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5119                formatter.write_str("struct ModifyPushConfigRequest")
    5120            }
    5121            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    5122            where
    5123                A: serde::de::MapAccess<'de>,
    5124            {
    5125                #[allow(unused_imports)]
    5126                use serde::de::Error;
    5127                use std::option::Option::Some;
    5128                let mut fields = std::collections::HashSet::new();
    5129                let mut result = Self::Value::new();
    5130                while let Some(tag) = map.next_key::<__FieldTag>()? {
    5131                    #[allow(clippy::match_single_binding)]
    5132                    match tag {
    5133                        __FieldTag::__subscription => {
    5134                            if !fields.insert(__FieldTag::__subscription) {
    5135                                return std::result::Result::Err(A::Error::duplicate_field(
    5136                                    "multiple values for subscription",
    5137                                ));
    5138                            }
    5139                            result.subscription = map
    5140                                .next_value::<std::option::Option<std::string::String>>()?
    5141                                .unwrap_or_default();
    5142                        }
    5143                        __FieldTag::__push_config => {
    5144                            if !fields.insert(__FieldTag::__push_config) {
    5145                                return std::result::Result::Err(A::Error::duplicate_field(
    5146                                    "multiple values for push_config",
    5147                                ));
    5148                            }
    5149                            result.push_config =
    5150                                map.next_value::<std::option::Option<crate::model::PushConfig>>()?;
    5151                        }
    5152                        __FieldTag::Unknown(key) => {
    5153                            let value = map.next_value::<serde_json::Value>()?;
    5154                            result._unknown_fields.insert(key, value);
    5155                        }
    5156                    }
    5157                }
    5158                std::result::Result::Ok(result)
    5159            }
    5160        }
    5161        deserializer.deserialize_any(Visitor)
    5162    }
    5163}
    5164
    5165#[doc(hidden)]
    5166impl<'de> serde::de::Deserialize<'de> for super::CreateSnapshotRequest {
    5167    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5168    where
    5169        D: serde::Deserializer<'de>,
    5170    {
    5171        #[allow(non_camel_case_types)]
    5172        #[doc(hidden)]
    5173        #[derive(PartialEq, Eq, Hash)]
    5174        enum __FieldTag {
    5175            __name,
    5176            __subscription,
    5177            __labels,
    5178            __tags,
    5179            Unknown(std::string::String),
    5180        }
    5181        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    5182            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5183            where
    5184                D: serde::Deserializer<'de>,
    5185            {
    5186                struct Visitor;
    5187                impl<'de> serde::de::Visitor<'de> for Visitor {
    5188                    type Value = __FieldTag;
    5189                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5190                        formatter.write_str("a field name for CreateSnapshotRequest")
    5191                    }
    5192                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    5193                    where
    5194                        E: serde::de::Error,
    5195                    {
    5196                        use std::result::Result::Ok;
    5197                        use std::string::ToString;
    5198                        match value {
    5199                            "name" => Ok(__FieldTag::__name),
    5200                            "subscription" => Ok(__FieldTag::__subscription),
    5201                            "labels" => Ok(__FieldTag::__labels),
    5202                            "tags" => Ok(__FieldTag::__tags),
    5203                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    5204                        }
    5205                    }
    5206                }
    5207                deserializer.deserialize_identifier(Visitor)
    5208            }
    5209        }
    5210        struct Visitor;
    5211        impl<'de> serde::de::Visitor<'de> for Visitor {
    5212            type Value = super::CreateSnapshotRequest;
    5213            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5214                formatter.write_str("struct CreateSnapshotRequest")
    5215            }
    5216            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    5217            where
    5218                A: serde::de::MapAccess<'de>,
    5219            {
    5220                #[allow(unused_imports)]
    5221                use serde::de::Error;
    5222                use std::option::Option::Some;
    5223                let mut fields = std::collections::HashSet::new();
    5224                let mut result = Self::Value::new();
    5225                while let Some(tag) = map.next_key::<__FieldTag>()? {
    5226                    #[allow(clippy::match_single_binding)]
    5227                    match tag {
    5228                        __FieldTag::__name => {
    5229                            if !fields.insert(__FieldTag::__name) {
    5230                                return std::result::Result::Err(A::Error::duplicate_field(
    5231                                    "multiple values for name",
    5232                                ));
    5233                            }
    5234                            result.name = map
    5235                                .next_value::<std::option::Option<std::string::String>>()?
    5236                                .unwrap_or_default();
    5237                        }
    5238                        __FieldTag::__subscription => {
    5239                            if !fields.insert(__FieldTag::__subscription) {
    5240                                return std::result::Result::Err(A::Error::duplicate_field(
    5241                                    "multiple values for subscription",
    5242                                ));
    5243                            }
    5244                            result.subscription = map
    5245                                .next_value::<std::option::Option<std::string::String>>()?
    5246                                .unwrap_or_default();
    5247                        }
    5248                        __FieldTag::__labels => {
    5249                            if !fields.insert(__FieldTag::__labels) {
    5250                                return std::result::Result::Err(A::Error::duplicate_field(
    5251                                    "multiple values for labels",
    5252                                ));
    5253                            }
    5254                            result.labels = map
    5255                                .next_value::<std::option::Option<
    5256                                    std::collections::HashMap<
    5257                                        std::string::String,
    5258                                        std::string::String,
    5259                                    >,
    5260                                >>()?
    5261                                .unwrap_or_default();
    5262                        }
    5263                        __FieldTag::__tags => {
    5264                            if !fields.insert(__FieldTag::__tags) {
    5265                                return std::result::Result::Err(A::Error::duplicate_field(
    5266                                    "multiple values for tags",
    5267                                ));
    5268                            }
    5269                            result.tags = map
    5270                                .next_value::<std::option::Option<
    5271                                    std::collections::HashMap<
    5272                                        std::string::String,
    5273                                        std::string::String,
    5274                                    >,
    5275                                >>()?
    5276                                .unwrap_or_default();
    5277                        }
    5278                        __FieldTag::Unknown(key) => {
    5279                            let value = map.next_value::<serde_json::Value>()?;
    5280                            result._unknown_fields.insert(key, value);
    5281                        }
    5282                    }
    5283                }
    5284                std::result::Result::Ok(result)
    5285            }
    5286        }
    5287        deserializer.deserialize_any(Visitor)
    5288    }
    5289}
    5290
    5291#[doc(hidden)]
    5292impl<'de> serde::de::Deserialize<'de> for super::UpdateSnapshotRequest {
    5293    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5294    where
    5295        D: serde::Deserializer<'de>,
    5296    {
    5297        #[allow(non_camel_case_types)]
    5298        #[doc(hidden)]
    5299        #[derive(PartialEq, Eq, Hash)]
    5300        enum __FieldTag {
    5301            __snapshot,
    5302            __update_mask,
    5303            Unknown(std::string::String),
    5304        }
    5305        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    5306            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5307            where
    5308                D: serde::Deserializer<'de>,
    5309            {
    5310                struct Visitor;
    5311                impl<'de> serde::de::Visitor<'de> for Visitor {
    5312                    type Value = __FieldTag;
    5313                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5314                        formatter.write_str("a field name for UpdateSnapshotRequest")
    5315                    }
    5316                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    5317                    where
    5318                        E: serde::de::Error,
    5319                    {
    5320                        use std::result::Result::Ok;
    5321                        use std::string::ToString;
    5322                        match value {
    5323                            "snapshot" => Ok(__FieldTag::__snapshot),
    5324                            "updateMask" => Ok(__FieldTag::__update_mask),
    5325                            "update_mask" => Ok(__FieldTag::__update_mask),
    5326                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    5327                        }
    5328                    }
    5329                }
    5330                deserializer.deserialize_identifier(Visitor)
    5331            }
    5332        }
    5333        struct Visitor;
    5334        impl<'de> serde::de::Visitor<'de> for Visitor {
    5335            type Value = super::UpdateSnapshotRequest;
    5336            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5337                formatter.write_str("struct UpdateSnapshotRequest")
    5338            }
    5339            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    5340            where
    5341                A: serde::de::MapAccess<'de>,
    5342            {
    5343                #[allow(unused_imports)]
    5344                use serde::de::Error;
    5345                use std::option::Option::Some;
    5346                let mut fields = std::collections::HashSet::new();
    5347                let mut result = Self::Value::new();
    5348                while let Some(tag) = map.next_key::<__FieldTag>()? {
    5349                    #[allow(clippy::match_single_binding)]
    5350                    match tag {
    5351                        __FieldTag::__snapshot => {
    5352                            if !fields.insert(__FieldTag::__snapshot) {
    5353                                return std::result::Result::Err(A::Error::duplicate_field(
    5354                                    "multiple values for snapshot",
    5355                                ));
    5356                            }
    5357                            result.snapshot =
    5358                                map.next_value::<std::option::Option<crate::model::Snapshot>>()?;
    5359                        }
    5360                        __FieldTag::__update_mask => {
    5361                            if !fields.insert(__FieldTag::__update_mask) {
    5362                                return std::result::Result::Err(A::Error::duplicate_field(
    5363                                    "multiple values for update_mask",
    5364                                ));
    5365                            }
    5366                            result.update_mask =
    5367                                map.next_value::<std::option::Option<wkt::FieldMask>>()?;
    5368                        }
    5369                        __FieldTag::Unknown(key) => {
    5370                            let value = map.next_value::<serde_json::Value>()?;
    5371                            result._unknown_fields.insert(key, value);
    5372                        }
    5373                    }
    5374                }
    5375                std::result::Result::Ok(result)
    5376            }
    5377        }
    5378        deserializer.deserialize_any(Visitor)
    5379    }
    5380}
    5381
    5382#[doc(hidden)]
    5383impl<'de> serde::de::Deserialize<'de> for super::Snapshot {
    5384    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5385    where
    5386        D: serde::Deserializer<'de>,
    5387    {
    5388        #[allow(non_camel_case_types)]
    5389        #[doc(hidden)]
    5390        #[derive(PartialEq, Eq, Hash)]
    5391        enum __FieldTag {
    5392            __name,
    5393            __topic,
    5394            __expire_time,
    5395            __labels,
    5396            Unknown(std::string::String),
    5397        }
    5398        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    5399            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5400            where
    5401                D: serde::Deserializer<'de>,
    5402            {
    5403                struct Visitor;
    5404                impl<'de> serde::de::Visitor<'de> for Visitor {
    5405                    type Value = __FieldTag;
    5406                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5407                        formatter.write_str("a field name for Snapshot")
    5408                    }
    5409                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    5410                    where
    5411                        E: serde::de::Error,
    5412                    {
    5413                        use std::result::Result::Ok;
    5414                        use std::string::ToString;
    5415                        match value {
    5416                            "name" => Ok(__FieldTag::__name),
    5417                            "topic" => Ok(__FieldTag::__topic),
    5418                            "expireTime" => Ok(__FieldTag::__expire_time),
    5419                            "expire_time" => Ok(__FieldTag::__expire_time),
    5420                            "labels" => Ok(__FieldTag::__labels),
    5421                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    5422                        }
    5423                    }
    5424                }
    5425                deserializer.deserialize_identifier(Visitor)
    5426            }
    5427        }
    5428        struct Visitor;
    5429        impl<'de> serde::de::Visitor<'de> for Visitor {
    5430            type Value = super::Snapshot;
    5431            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5432                formatter.write_str("struct Snapshot")
    5433            }
    5434            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    5435            where
    5436                A: serde::de::MapAccess<'de>,
    5437            {
    5438                #[allow(unused_imports)]
    5439                use serde::de::Error;
    5440                use std::option::Option::Some;
    5441                let mut fields = std::collections::HashSet::new();
    5442                let mut result = Self::Value::new();
    5443                while let Some(tag) = map.next_key::<__FieldTag>()? {
    5444                    #[allow(clippy::match_single_binding)]
    5445                    match tag {
    5446                        __FieldTag::__name => {
    5447                            if !fields.insert(__FieldTag::__name) {
    5448                                return std::result::Result::Err(A::Error::duplicate_field(
    5449                                    "multiple values for name",
    5450                                ));
    5451                            }
    5452                            result.name = map
    5453                                .next_value::<std::option::Option<std::string::String>>()?
    5454                                .unwrap_or_default();
    5455                        }
    5456                        __FieldTag::__topic => {
    5457                            if !fields.insert(__FieldTag::__topic) {
    5458                                return std::result::Result::Err(A::Error::duplicate_field(
    5459                                    "multiple values for topic",
    5460                                ));
    5461                            }
    5462                            result.topic = map
    5463                                .next_value::<std::option::Option<std::string::String>>()?
    5464                                .unwrap_or_default();
    5465                        }
    5466                        __FieldTag::__expire_time => {
    5467                            if !fields.insert(__FieldTag::__expire_time) {
    5468                                return std::result::Result::Err(A::Error::duplicate_field(
    5469                                    "multiple values for expire_time",
    5470                                ));
    5471                            }
    5472                            result.expire_time =
    5473                                map.next_value::<std::option::Option<wkt::Timestamp>>()?;
    5474                        }
    5475                        __FieldTag::__labels => {
    5476                            if !fields.insert(__FieldTag::__labels) {
    5477                                return std::result::Result::Err(A::Error::duplicate_field(
    5478                                    "multiple values for labels",
    5479                                ));
    5480                            }
    5481                            result.labels = map
    5482                                .next_value::<std::option::Option<
    5483                                    std::collections::HashMap<
    5484                                        std::string::String,
    5485                                        std::string::String,
    5486                                    >,
    5487                                >>()?
    5488                                .unwrap_or_default();
    5489                        }
    5490                        __FieldTag::Unknown(key) => {
    5491                            let value = map.next_value::<serde_json::Value>()?;
    5492                            result._unknown_fields.insert(key, value);
    5493                        }
    5494                    }
    5495                }
    5496                std::result::Result::Ok(result)
    5497            }
    5498        }
    5499        deserializer.deserialize_any(Visitor)
    5500    }
    5501}
    5502
    5503#[doc(hidden)]
    5504impl<'de> serde::de::Deserialize<'de> for super::GetSnapshotRequest {
    5505    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5506    where
    5507        D: serde::Deserializer<'de>,
    5508    {
    5509        #[allow(non_camel_case_types)]
    5510        #[doc(hidden)]
    5511        #[derive(PartialEq, Eq, Hash)]
    5512        enum __FieldTag {
    5513            __snapshot,
    5514            Unknown(std::string::String),
    5515        }
    5516        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    5517            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5518            where
    5519                D: serde::Deserializer<'de>,
    5520            {
    5521                struct Visitor;
    5522                impl<'de> serde::de::Visitor<'de> for Visitor {
    5523                    type Value = __FieldTag;
    5524                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5525                        formatter.write_str("a field name for GetSnapshotRequest")
    5526                    }
    5527                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    5528                    where
    5529                        E: serde::de::Error,
    5530                    {
    5531                        use std::result::Result::Ok;
    5532                        use std::string::ToString;
    5533                        match value {
    5534                            "snapshot" => Ok(__FieldTag::__snapshot),
    5535                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    5536                        }
    5537                    }
    5538                }
    5539                deserializer.deserialize_identifier(Visitor)
    5540            }
    5541        }
    5542        struct Visitor;
    5543        impl<'de> serde::de::Visitor<'de> for Visitor {
    5544            type Value = super::GetSnapshotRequest;
    5545            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5546                formatter.write_str("struct GetSnapshotRequest")
    5547            }
    5548            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    5549            where
    5550                A: serde::de::MapAccess<'de>,
    5551            {
    5552                #[allow(unused_imports)]
    5553                use serde::de::Error;
    5554                use std::option::Option::Some;
    5555                let mut fields = std::collections::HashSet::new();
    5556                let mut result = Self::Value::new();
    5557                while let Some(tag) = map.next_key::<__FieldTag>()? {
    5558                    #[allow(clippy::match_single_binding)]
    5559                    match tag {
    5560                        __FieldTag::__snapshot => {
    5561                            if !fields.insert(__FieldTag::__snapshot) {
    5562                                return std::result::Result::Err(A::Error::duplicate_field(
    5563                                    "multiple values for snapshot",
    5564                                ));
    5565                            }
    5566                            result.snapshot = map
    5567                                .next_value::<std::option::Option<std::string::String>>()?
    5568                                .unwrap_or_default();
    5569                        }
    5570                        __FieldTag::Unknown(key) => {
    5571                            let value = map.next_value::<serde_json::Value>()?;
    5572                            result._unknown_fields.insert(key, value);
    5573                        }
    5574                    }
    5575                }
    5576                std::result::Result::Ok(result)
    5577            }
    5578        }
    5579        deserializer.deserialize_any(Visitor)
    5580    }
    5581}
    5582
    5583#[doc(hidden)]
    5584impl<'de> serde::de::Deserialize<'de> for super::ListSnapshotsRequest {
    5585    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5586    where
    5587        D: serde::Deserializer<'de>,
    5588    {
    5589        #[allow(non_camel_case_types)]
    5590        #[doc(hidden)]
    5591        #[derive(PartialEq, Eq, Hash)]
    5592        enum __FieldTag {
    5593            __project,
    5594            __page_size,
    5595            __page_token,
    5596            Unknown(std::string::String),
    5597        }
    5598        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    5599            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5600            where
    5601                D: serde::Deserializer<'de>,
    5602            {
    5603                struct Visitor;
    5604                impl<'de> serde::de::Visitor<'de> for Visitor {
    5605                    type Value = __FieldTag;
    5606                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5607                        formatter.write_str("a field name for ListSnapshotsRequest")
    5608                    }
    5609                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    5610                    where
    5611                        E: serde::de::Error,
    5612                    {
    5613                        use std::result::Result::Ok;
    5614                        use std::string::ToString;
    5615                        match value {
    5616                            "project" => Ok(__FieldTag::__project),
    5617                            "pageSize" => Ok(__FieldTag::__page_size),
    5618                            "page_size" => Ok(__FieldTag::__page_size),
    5619                            "pageToken" => Ok(__FieldTag::__page_token),
    5620                            "page_token" => Ok(__FieldTag::__page_token),
    5621                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    5622                        }
    5623                    }
    5624                }
    5625                deserializer.deserialize_identifier(Visitor)
    5626            }
    5627        }
    5628        struct Visitor;
    5629        impl<'de> serde::de::Visitor<'de> for Visitor {
    5630            type Value = super::ListSnapshotsRequest;
    5631            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5632                formatter.write_str("struct ListSnapshotsRequest")
    5633            }
    5634            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    5635            where
    5636                A: serde::de::MapAccess<'de>,
    5637            {
    5638                #[allow(unused_imports)]
    5639                use serde::de::Error;
    5640                use std::option::Option::Some;
    5641                let mut fields = std::collections::HashSet::new();
    5642                let mut result = Self::Value::new();
    5643                while let Some(tag) = map.next_key::<__FieldTag>()? {
    5644                    #[allow(clippy::match_single_binding)]
    5645                    match tag {
    5646                        __FieldTag::__project => {
    5647                            if !fields.insert(__FieldTag::__project) {
    5648                                return std::result::Result::Err(A::Error::duplicate_field(
    5649                                    "multiple values for project",
    5650                                ));
    5651                            }
    5652                            result.project = map
    5653                                .next_value::<std::option::Option<std::string::String>>()?
    5654                                .unwrap_or_default();
    5655                        }
    5656                        __FieldTag::__page_size => {
    5657                            if !fields.insert(__FieldTag::__page_size) {
    5658                                return std::result::Result::Err(A::Error::duplicate_field(
    5659                                    "multiple values for page_size",
    5660                                ));
    5661                            }
    5662                            struct __With(std::option::Option<i32>);
    5663                            impl<'de> serde::de::Deserialize<'de> for __With {
    5664                                fn deserialize<D>(
    5665                                    deserializer: D,
    5666                                ) -> std::result::Result<Self, D::Error>
    5667                                where
    5668                                    D: serde::de::Deserializer<'de>,
    5669                                {
    5670                                    serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
    5671                                }
    5672                            }
    5673                            result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
    5674                        }
    5675                        __FieldTag::__page_token => {
    5676                            if !fields.insert(__FieldTag::__page_token) {
    5677                                return std::result::Result::Err(A::Error::duplicate_field(
    5678                                    "multiple values for page_token",
    5679                                ));
    5680                            }
    5681                            result.page_token = map
    5682                                .next_value::<std::option::Option<std::string::String>>()?
    5683                                .unwrap_or_default();
    5684                        }
    5685                        __FieldTag::Unknown(key) => {
    5686                            let value = map.next_value::<serde_json::Value>()?;
    5687                            result._unknown_fields.insert(key, value);
    5688                        }
    5689                    }
    5690                }
    5691                std::result::Result::Ok(result)
    5692            }
    5693        }
    5694        deserializer.deserialize_any(Visitor)
    5695    }
    5696}
    5697
    5698#[doc(hidden)]
    5699impl<'de> serde::de::Deserialize<'de> for super::ListSnapshotsResponse {
    5700    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5701    where
    5702        D: serde::Deserializer<'de>,
    5703    {
    5704        #[allow(non_camel_case_types)]
    5705        #[doc(hidden)]
    5706        #[derive(PartialEq, Eq, Hash)]
    5707        enum __FieldTag {
    5708            __snapshots,
    5709            __next_page_token,
    5710            Unknown(std::string::String),
    5711        }
    5712        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    5713            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5714            where
    5715                D: serde::Deserializer<'de>,
    5716            {
    5717                struct Visitor;
    5718                impl<'de> serde::de::Visitor<'de> for Visitor {
    5719                    type Value = __FieldTag;
    5720                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5721                        formatter.write_str("a field name for ListSnapshotsResponse")
    5722                    }
    5723                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    5724                    where
    5725                        E: serde::de::Error,
    5726                    {
    5727                        use std::result::Result::Ok;
    5728                        use std::string::ToString;
    5729                        match value {
    5730                            "snapshots" => Ok(__FieldTag::__snapshots),
    5731                            "nextPageToken" => Ok(__FieldTag::__next_page_token),
    5732                            "next_page_token" => Ok(__FieldTag::__next_page_token),
    5733                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    5734                        }
    5735                    }
    5736                }
    5737                deserializer.deserialize_identifier(Visitor)
    5738            }
    5739        }
    5740        struct Visitor;
    5741        impl<'de> serde::de::Visitor<'de> for Visitor {
    5742            type Value = super::ListSnapshotsResponse;
    5743            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5744                formatter.write_str("struct ListSnapshotsResponse")
    5745            }
    5746            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    5747            where
    5748                A: serde::de::MapAccess<'de>,
    5749            {
    5750                #[allow(unused_imports)]
    5751                use serde::de::Error;
    5752                use std::option::Option::Some;
    5753                let mut fields = std::collections::HashSet::new();
    5754                let mut result = Self::Value::new();
    5755                while let Some(tag) = map.next_key::<__FieldTag>()? {
    5756                    #[allow(clippy::match_single_binding)]
    5757                    match tag {
    5758                        __FieldTag::__snapshots => {
    5759                            if !fields.insert(__FieldTag::__snapshots) {
    5760                                return std::result::Result::Err(A::Error::duplicate_field(
    5761                                    "multiple values for snapshots",
    5762                                ));
    5763                            }
    5764                            result.snapshots = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Snapshot>>>()?.unwrap_or_default();
    5765                        }
    5766                        __FieldTag::__next_page_token => {
    5767                            if !fields.insert(__FieldTag::__next_page_token) {
    5768                                return std::result::Result::Err(A::Error::duplicate_field(
    5769                                    "multiple values for next_page_token",
    5770                                ));
    5771                            }
    5772                            result.next_page_token = map
    5773                                .next_value::<std::option::Option<std::string::String>>()?
    5774                                .unwrap_or_default();
    5775                        }
    5776                        __FieldTag::Unknown(key) => {
    5777                            let value = map.next_value::<serde_json::Value>()?;
    5778                            result._unknown_fields.insert(key, value);
    5779                        }
    5780                    }
    5781                }
    5782                std::result::Result::Ok(result)
    5783            }
    5784        }
    5785        deserializer.deserialize_any(Visitor)
    5786    }
    5787}
    5788
    5789#[doc(hidden)]
    5790impl<'de> serde::de::Deserialize<'de> for super::DeleteSnapshotRequest {
    5791    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5792    where
    5793        D: serde::Deserializer<'de>,
    5794    {
    5795        #[allow(non_camel_case_types)]
    5796        #[doc(hidden)]
    5797        #[derive(PartialEq, Eq, Hash)]
    5798        enum __FieldTag {
    5799            __snapshot,
    5800            Unknown(std::string::String),
    5801        }
    5802        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    5803            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5804            where
    5805                D: serde::Deserializer<'de>,
    5806            {
    5807                struct Visitor;
    5808                impl<'de> serde::de::Visitor<'de> for Visitor {
    5809                    type Value = __FieldTag;
    5810                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5811                        formatter.write_str("a field name for DeleteSnapshotRequest")
    5812                    }
    5813                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    5814                    where
    5815                        E: serde::de::Error,
    5816                    {
    5817                        use std::result::Result::Ok;
    5818                        use std::string::ToString;
    5819                        match value {
    5820                            "snapshot" => Ok(__FieldTag::__snapshot),
    5821                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    5822                        }
    5823                    }
    5824                }
    5825                deserializer.deserialize_identifier(Visitor)
    5826            }
    5827        }
    5828        struct Visitor;
    5829        impl<'de> serde::de::Visitor<'de> for Visitor {
    5830            type Value = super::DeleteSnapshotRequest;
    5831            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5832                formatter.write_str("struct DeleteSnapshotRequest")
    5833            }
    5834            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    5835            where
    5836                A: serde::de::MapAccess<'de>,
    5837            {
    5838                #[allow(unused_imports)]
    5839                use serde::de::Error;
    5840                use std::option::Option::Some;
    5841                let mut fields = std::collections::HashSet::new();
    5842                let mut result = Self::Value::new();
    5843                while let Some(tag) = map.next_key::<__FieldTag>()? {
    5844                    #[allow(clippy::match_single_binding)]
    5845                    match tag {
    5846                        __FieldTag::__snapshot => {
    5847                            if !fields.insert(__FieldTag::__snapshot) {
    5848                                return std::result::Result::Err(A::Error::duplicate_field(
    5849                                    "multiple values for snapshot",
    5850                                ));
    5851                            }
    5852                            result.snapshot = map
    5853                                .next_value::<std::option::Option<std::string::String>>()?
    5854                                .unwrap_or_default();
    5855                        }
    5856                        __FieldTag::Unknown(key) => {
    5857                            let value = map.next_value::<serde_json::Value>()?;
    5858                            result._unknown_fields.insert(key, value);
    5859                        }
    5860                    }
    5861                }
    5862                std::result::Result::Ok(result)
    5863            }
    5864        }
    5865        deserializer.deserialize_any(Visitor)
    5866    }
    5867}
    5868
    5869#[doc(hidden)]
    5870impl<'de> serde::de::Deserialize<'de> for super::SeekRequest {
    5871    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5872    where
    5873        D: serde::Deserializer<'de>,
    5874    {
    5875        #[allow(non_camel_case_types)]
    5876        #[doc(hidden)]
    5877        #[derive(PartialEq, Eq, Hash)]
    5878        enum __FieldTag {
    5879            __subscription,
    5880            __time,
    5881            __snapshot,
    5882            Unknown(std::string::String),
    5883        }
    5884        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    5885            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5886            where
    5887                D: serde::Deserializer<'de>,
    5888            {
    5889                struct Visitor;
    5890                impl<'de> serde::de::Visitor<'de> for Visitor {
    5891                    type Value = __FieldTag;
    5892                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5893                        formatter.write_str("a field name for SeekRequest")
    5894                    }
    5895                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    5896                    where
    5897                        E: serde::de::Error,
    5898                    {
    5899                        use std::result::Result::Ok;
    5900                        use std::string::ToString;
    5901                        match value {
    5902                            "subscription" => Ok(__FieldTag::__subscription),
    5903                            "time" => Ok(__FieldTag::__time),
    5904                            "snapshot" => Ok(__FieldTag::__snapshot),
    5905                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    5906                        }
    5907                    }
    5908                }
    5909                deserializer.deserialize_identifier(Visitor)
    5910            }
    5911        }
    5912        struct Visitor;
    5913        impl<'de> serde::de::Visitor<'de> for Visitor {
    5914            type Value = super::SeekRequest;
    5915            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    5916                formatter.write_str("struct SeekRequest")
    5917            }
    5918            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    5919            where
    5920                A: serde::de::MapAccess<'de>,
    5921            {
    5922                #[allow(unused_imports)]
    5923                use serde::de::Error;
    5924                use std::option::Option::Some;
    5925                let mut fields = std::collections::HashSet::new();
    5926                let mut result = Self::Value::new();
    5927                while let Some(tag) = map.next_key::<__FieldTag>()? {
    5928                    #[allow(clippy::match_single_binding)]
    5929                    match tag {
    5930                        __FieldTag::__subscription => {
    5931                            if !fields.insert(__FieldTag::__subscription) {
    5932                                return std::result::Result::Err(A::Error::duplicate_field(
    5933                                    "multiple values for subscription",
    5934                                ));
    5935                            }
    5936                            result.subscription = map
    5937                                .next_value::<std::option::Option<std::string::String>>()?
    5938                                .unwrap_or_default();
    5939                        }
    5940                        __FieldTag::__time => {
    5941                            if !fields.insert(__FieldTag::__time) {
    5942                                return std::result::Result::Err(A::Error::duplicate_field(
    5943                                    "multiple values for time",
    5944                                ));
    5945                            }
    5946                            if result.target.is_some() {
    5947                                return std::result::Result::Err(A::Error::duplicate_field(
    5948                                    "multiple values for `target`, a oneof with full ID .google.pubsub.v1.SeekRequest.time, latest field was time",
    5949                                ));
    5950                            }
    5951                            result.target = std::option::Option::Some(
    5952                                crate::model::seek_request::Target::Time(
    5953                                    map.next_value::<std::option::Option<std::boxed::Box<wkt::Timestamp>>>()?.unwrap_or_default()
    5954                                ),
    5955                            );
    5956                        }
    5957                        __FieldTag::__snapshot => {
    5958                            if !fields.insert(__FieldTag::__snapshot) {
    5959                                return std::result::Result::Err(A::Error::duplicate_field(
    5960                                    "multiple values for snapshot",
    5961                                ));
    5962                            }
    5963                            if result.target.is_some() {
    5964                                return std::result::Result::Err(A::Error::duplicate_field(
    5965                                    "multiple values for `target`, a oneof with full ID .google.pubsub.v1.SeekRequest.snapshot, latest field was snapshot",
    5966                                ));
    5967                            }
    5968                            result.target = std::option::Option::Some(
    5969                                crate::model::seek_request::Target::Snapshot(
    5970                                    map.next_value::<std::option::Option<std::string::String>>()?
    5971                                        .unwrap_or_default(),
    5972                                ),
    5973                            );
    5974                        }
    5975                        __FieldTag::Unknown(key) => {
    5976                            let value = map.next_value::<serde_json::Value>()?;
    5977                            result._unknown_fields.insert(key, value);
    5978                        }
    5979                    }
    5980                }
    5981                std::result::Result::Ok(result)
    5982            }
    5983        }
    5984        deserializer.deserialize_any(Visitor)
    5985    }
    5986}
    5987
    5988#[doc(hidden)]
    5989impl<'de> serde::de::Deserialize<'de> for super::SeekResponse {
    5990    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    5991    where
    5992        D: serde::Deserializer<'de>,
    5993    {
    5994        #[allow(non_camel_case_types)]
    5995        #[doc(hidden)]
    5996        #[derive(PartialEq, Eq, Hash)]
    5997        enum __FieldTag {
    5998            Unknown(std::string::String),
    5999        }
    6000        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    6001            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6002            where
    6003                D: serde::Deserializer<'de>,
    6004            {
    6005                struct Visitor;
    6006                impl<'de> serde::de::Visitor<'de> for Visitor {
    6007                    type Value = __FieldTag;
    6008                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6009                        formatter.write_str("a field name for SeekResponse")
    6010                    }
    6011                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    6012                    where
    6013                        E: serde::de::Error,
    6014                    {
    6015                        use std::result::Result::Ok;
    6016                        use std::string::ToString;
    6017                        Ok(__FieldTag::Unknown(value.to_string()))
    6018                    }
    6019                }
    6020                deserializer.deserialize_identifier(Visitor)
    6021            }
    6022        }
    6023        struct Visitor;
    6024        impl<'de> serde::de::Visitor<'de> for Visitor {
    6025            type Value = super::SeekResponse;
    6026            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6027                formatter.write_str("struct SeekResponse")
    6028            }
    6029            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    6030            where
    6031                A: serde::de::MapAccess<'de>,
    6032            {
    6033                #[allow(unused_imports)]
    6034                use serde::de::Error;
    6035                use std::option::Option::Some;
    6036                let mut result = Self::Value::new();
    6037                while let Some(tag) = map.next_key::<__FieldTag>()? {
    6038                    #[allow(clippy::match_single_binding)]
    6039                    match tag {
    6040                        __FieldTag::Unknown(key) => {
    6041                            let value = map.next_value::<serde_json::Value>()?;
    6042                            result._unknown_fields.insert(key, value);
    6043                        }
    6044                    }
    6045                }
    6046                std::result::Result::Ok(result)
    6047            }
    6048        }
    6049        deserializer.deserialize_any(Visitor)
    6050    }
    6051}
    6052
    6053#[doc(hidden)]
    6054impl<'de> serde::de::Deserialize<'de> for super::Schema {
    6055    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6056    where
    6057        D: serde::Deserializer<'de>,
    6058    {
    6059        #[allow(non_camel_case_types)]
    6060        #[doc(hidden)]
    6061        #[derive(PartialEq, Eq, Hash)]
    6062        enum __FieldTag {
    6063            __name,
    6064            __type,
    6065            __definition,
    6066            __revision_id,
    6067            __revision_create_time,
    6068            Unknown(std::string::String),
    6069        }
    6070        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    6071            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6072            where
    6073                D: serde::Deserializer<'de>,
    6074            {
    6075                struct Visitor;
    6076                impl<'de> serde::de::Visitor<'de> for Visitor {
    6077                    type Value = __FieldTag;
    6078                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6079                        formatter.write_str("a field name for Schema")
    6080                    }
    6081                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    6082                    where
    6083                        E: serde::de::Error,
    6084                    {
    6085                        use std::result::Result::Ok;
    6086                        use std::string::ToString;
    6087                        match value {
    6088                            "name" => Ok(__FieldTag::__name),
    6089                            "type" => Ok(__FieldTag::__type),
    6090                            "definition" => Ok(__FieldTag::__definition),
    6091                            "revisionId" => Ok(__FieldTag::__revision_id),
    6092                            "revision_id" => Ok(__FieldTag::__revision_id),
    6093                            "revisionCreateTime" => Ok(__FieldTag::__revision_create_time),
    6094                            "revision_create_time" => Ok(__FieldTag::__revision_create_time),
    6095                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    6096                        }
    6097                    }
    6098                }
    6099                deserializer.deserialize_identifier(Visitor)
    6100            }
    6101        }
    6102        struct Visitor;
    6103        impl<'de> serde::de::Visitor<'de> for Visitor {
    6104            type Value = super::Schema;
    6105            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6106                formatter.write_str("struct Schema")
    6107            }
    6108            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    6109            where
    6110                A: serde::de::MapAccess<'de>,
    6111            {
    6112                #[allow(unused_imports)]
    6113                use serde::de::Error;
    6114                use std::option::Option::Some;
    6115                let mut fields = std::collections::HashSet::new();
    6116                let mut result = Self::Value::new();
    6117                while let Some(tag) = map.next_key::<__FieldTag>()? {
    6118                    #[allow(clippy::match_single_binding)]
    6119                    match tag {
    6120                        __FieldTag::__name => {
    6121                            if !fields.insert(__FieldTag::__name) {
    6122                                return std::result::Result::Err(A::Error::duplicate_field(
    6123                                    "multiple values for name",
    6124                                ));
    6125                            }
    6126                            result.name = map
    6127                                .next_value::<std::option::Option<std::string::String>>()?
    6128                                .unwrap_or_default();
    6129                        }
    6130                        __FieldTag::__type => {
    6131                            if !fields.insert(__FieldTag::__type) {
    6132                                return std::result::Result::Err(A::Error::duplicate_field(
    6133                                    "multiple values for type",
    6134                                ));
    6135                            }
    6136                            result.r#type = map
    6137                                .next_value::<std::option::Option<crate::model::schema::Type>>()?
    6138                                .unwrap_or_default();
    6139                        }
    6140                        __FieldTag::__definition => {
    6141                            if !fields.insert(__FieldTag::__definition) {
    6142                                return std::result::Result::Err(A::Error::duplicate_field(
    6143                                    "multiple values for definition",
    6144                                ));
    6145                            }
    6146                            result.definition = map
    6147                                .next_value::<std::option::Option<std::string::String>>()?
    6148                                .unwrap_or_default();
    6149                        }
    6150                        __FieldTag::__revision_id => {
    6151                            if !fields.insert(__FieldTag::__revision_id) {
    6152                                return std::result::Result::Err(A::Error::duplicate_field(
    6153                                    "multiple values for revision_id",
    6154                                ));
    6155                            }
    6156                            result.revision_id = map
    6157                                .next_value::<std::option::Option<std::string::String>>()?
    6158                                .unwrap_or_default();
    6159                        }
    6160                        __FieldTag::__revision_create_time => {
    6161                            if !fields.insert(__FieldTag::__revision_create_time) {
    6162                                return std::result::Result::Err(A::Error::duplicate_field(
    6163                                    "multiple values for revision_create_time",
    6164                                ));
    6165                            }
    6166                            result.revision_create_time =
    6167                                map.next_value::<std::option::Option<wkt::Timestamp>>()?;
    6168                        }
    6169                        __FieldTag::Unknown(key) => {
    6170                            let value = map.next_value::<serde_json::Value>()?;
    6171                            result._unknown_fields.insert(key, value);
    6172                        }
    6173                    }
    6174                }
    6175                std::result::Result::Ok(result)
    6176            }
    6177        }
    6178        deserializer.deserialize_any(Visitor)
    6179    }
    6180}
    6181
    6182#[doc(hidden)]
    6183impl<'de> serde::de::Deserialize<'de> for super::CreateSchemaRequest {
    6184    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6185    where
    6186        D: serde::Deserializer<'de>,
    6187    {
    6188        #[allow(non_camel_case_types)]
    6189        #[doc(hidden)]
    6190        #[derive(PartialEq, Eq, Hash)]
    6191        enum __FieldTag {
    6192            __parent,
    6193            __schema,
    6194            __schema_id,
    6195            Unknown(std::string::String),
    6196        }
    6197        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    6198            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6199            where
    6200                D: serde::Deserializer<'de>,
    6201            {
    6202                struct Visitor;
    6203                impl<'de> serde::de::Visitor<'de> for Visitor {
    6204                    type Value = __FieldTag;
    6205                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6206                        formatter.write_str("a field name for CreateSchemaRequest")
    6207                    }
    6208                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    6209                    where
    6210                        E: serde::de::Error,
    6211                    {
    6212                        use std::result::Result::Ok;
    6213                        use std::string::ToString;
    6214                        match value {
    6215                            "parent" => Ok(__FieldTag::__parent),
    6216                            "schema" => Ok(__FieldTag::__schema),
    6217                            "schemaId" => Ok(__FieldTag::__schema_id),
    6218                            "schema_id" => Ok(__FieldTag::__schema_id),
    6219                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    6220                        }
    6221                    }
    6222                }
    6223                deserializer.deserialize_identifier(Visitor)
    6224            }
    6225        }
    6226        struct Visitor;
    6227        impl<'de> serde::de::Visitor<'de> for Visitor {
    6228            type Value = super::CreateSchemaRequest;
    6229            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6230                formatter.write_str("struct CreateSchemaRequest")
    6231            }
    6232            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    6233            where
    6234                A: serde::de::MapAccess<'de>,
    6235            {
    6236                #[allow(unused_imports)]
    6237                use serde::de::Error;
    6238                use std::option::Option::Some;
    6239                let mut fields = std::collections::HashSet::new();
    6240                let mut result = Self::Value::new();
    6241                while let Some(tag) = map.next_key::<__FieldTag>()? {
    6242                    #[allow(clippy::match_single_binding)]
    6243                    match tag {
    6244                        __FieldTag::__parent => {
    6245                            if !fields.insert(__FieldTag::__parent) {
    6246                                return std::result::Result::Err(A::Error::duplicate_field(
    6247                                    "multiple values for parent",
    6248                                ));
    6249                            }
    6250                            result.parent = map
    6251                                .next_value::<std::option::Option<std::string::String>>()?
    6252                                .unwrap_or_default();
    6253                        }
    6254                        __FieldTag::__schema => {
    6255                            if !fields.insert(__FieldTag::__schema) {
    6256                                return std::result::Result::Err(A::Error::duplicate_field(
    6257                                    "multiple values for schema",
    6258                                ));
    6259                            }
    6260                            result.schema =
    6261                                map.next_value::<std::option::Option<crate::model::Schema>>()?;
    6262                        }
    6263                        __FieldTag::__schema_id => {
    6264                            if !fields.insert(__FieldTag::__schema_id) {
    6265                                return std::result::Result::Err(A::Error::duplicate_field(
    6266                                    "multiple values for schema_id",
    6267                                ));
    6268                            }
    6269                            result.schema_id = map
    6270                                .next_value::<std::option::Option<std::string::String>>()?
    6271                                .unwrap_or_default();
    6272                        }
    6273                        __FieldTag::Unknown(key) => {
    6274                            let value = map.next_value::<serde_json::Value>()?;
    6275                            result._unknown_fields.insert(key, value);
    6276                        }
    6277                    }
    6278                }
    6279                std::result::Result::Ok(result)
    6280            }
    6281        }
    6282        deserializer.deserialize_any(Visitor)
    6283    }
    6284}
    6285
    6286#[doc(hidden)]
    6287impl<'de> serde::de::Deserialize<'de> for super::GetSchemaRequest {
    6288    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6289    where
    6290        D: serde::Deserializer<'de>,
    6291    {
    6292        #[allow(non_camel_case_types)]
    6293        #[doc(hidden)]
    6294        #[derive(PartialEq, Eq, Hash)]
    6295        enum __FieldTag {
    6296            __name,
    6297            __view,
    6298            Unknown(std::string::String),
    6299        }
    6300        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    6301            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6302            where
    6303                D: serde::Deserializer<'de>,
    6304            {
    6305                struct Visitor;
    6306                impl<'de> serde::de::Visitor<'de> for Visitor {
    6307                    type Value = __FieldTag;
    6308                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6309                        formatter.write_str("a field name for GetSchemaRequest")
    6310                    }
    6311                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    6312                    where
    6313                        E: serde::de::Error,
    6314                    {
    6315                        use std::result::Result::Ok;
    6316                        use std::string::ToString;
    6317                        match value {
    6318                            "name" => Ok(__FieldTag::__name),
    6319                            "view" => Ok(__FieldTag::__view),
    6320                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    6321                        }
    6322                    }
    6323                }
    6324                deserializer.deserialize_identifier(Visitor)
    6325            }
    6326        }
    6327        struct Visitor;
    6328        impl<'de> serde::de::Visitor<'de> for Visitor {
    6329            type Value = super::GetSchemaRequest;
    6330            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6331                formatter.write_str("struct GetSchemaRequest")
    6332            }
    6333            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    6334            where
    6335                A: serde::de::MapAccess<'de>,
    6336            {
    6337                #[allow(unused_imports)]
    6338                use serde::de::Error;
    6339                use std::option::Option::Some;
    6340                let mut fields = std::collections::HashSet::new();
    6341                let mut result = Self::Value::new();
    6342                while let Some(tag) = map.next_key::<__FieldTag>()? {
    6343                    #[allow(clippy::match_single_binding)]
    6344                    match tag {
    6345                        __FieldTag::__name => {
    6346                            if !fields.insert(__FieldTag::__name) {
    6347                                return std::result::Result::Err(A::Error::duplicate_field(
    6348                                    "multiple values for name",
    6349                                ));
    6350                            }
    6351                            result.name = map
    6352                                .next_value::<std::option::Option<std::string::String>>()?
    6353                                .unwrap_or_default();
    6354                        }
    6355                        __FieldTag::__view => {
    6356                            if !fields.insert(__FieldTag::__view) {
    6357                                return std::result::Result::Err(A::Error::duplicate_field(
    6358                                    "multiple values for view",
    6359                                ));
    6360                            }
    6361                            result.view = map
    6362                                .next_value::<std::option::Option<crate::model::SchemaView>>()?
    6363                                .unwrap_or_default();
    6364                        }
    6365                        __FieldTag::Unknown(key) => {
    6366                            let value = map.next_value::<serde_json::Value>()?;
    6367                            result._unknown_fields.insert(key, value);
    6368                        }
    6369                    }
    6370                }
    6371                std::result::Result::Ok(result)
    6372            }
    6373        }
    6374        deserializer.deserialize_any(Visitor)
    6375    }
    6376}
    6377
    6378#[doc(hidden)]
    6379impl<'de> serde::de::Deserialize<'de> for super::ListSchemasRequest {
    6380    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6381    where
    6382        D: serde::Deserializer<'de>,
    6383    {
    6384        #[allow(non_camel_case_types)]
    6385        #[doc(hidden)]
    6386        #[derive(PartialEq, Eq, Hash)]
    6387        enum __FieldTag {
    6388            __parent,
    6389            __view,
    6390            __page_size,
    6391            __page_token,
    6392            Unknown(std::string::String),
    6393        }
    6394        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    6395            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6396            where
    6397                D: serde::Deserializer<'de>,
    6398            {
    6399                struct Visitor;
    6400                impl<'de> serde::de::Visitor<'de> for Visitor {
    6401                    type Value = __FieldTag;
    6402                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6403                        formatter.write_str("a field name for ListSchemasRequest")
    6404                    }
    6405                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    6406                    where
    6407                        E: serde::de::Error,
    6408                    {
    6409                        use std::result::Result::Ok;
    6410                        use std::string::ToString;
    6411                        match value {
    6412                            "parent" => Ok(__FieldTag::__parent),
    6413                            "view" => Ok(__FieldTag::__view),
    6414                            "pageSize" => Ok(__FieldTag::__page_size),
    6415                            "page_size" => Ok(__FieldTag::__page_size),
    6416                            "pageToken" => Ok(__FieldTag::__page_token),
    6417                            "page_token" => Ok(__FieldTag::__page_token),
    6418                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    6419                        }
    6420                    }
    6421                }
    6422                deserializer.deserialize_identifier(Visitor)
    6423            }
    6424        }
    6425        struct Visitor;
    6426        impl<'de> serde::de::Visitor<'de> for Visitor {
    6427            type Value = super::ListSchemasRequest;
    6428            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6429                formatter.write_str("struct ListSchemasRequest")
    6430            }
    6431            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    6432            where
    6433                A: serde::de::MapAccess<'de>,
    6434            {
    6435                #[allow(unused_imports)]
    6436                use serde::de::Error;
    6437                use std::option::Option::Some;
    6438                let mut fields = std::collections::HashSet::new();
    6439                let mut result = Self::Value::new();
    6440                while let Some(tag) = map.next_key::<__FieldTag>()? {
    6441                    #[allow(clippy::match_single_binding)]
    6442                    match tag {
    6443                        __FieldTag::__parent => {
    6444                            if !fields.insert(__FieldTag::__parent) {
    6445                                return std::result::Result::Err(A::Error::duplicate_field(
    6446                                    "multiple values for parent",
    6447                                ));
    6448                            }
    6449                            result.parent = map
    6450                                .next_value::<std::option::Option<std::string::String>>()?
    6451                                .unwrap_or_default();
    6452                        }
    6453                        __FieldTag::__view => {
    6454                            if !fields.insert(__FieldTag::__view) {
    6455                                return std::result::Result::Err(A::Error::duplicate_field(
    6456                                    "multiple values for view",
    6457                                ));
    6458                            }
    6459                            result.view = map
    6460                                .next_value::<std::option::Option<crate::model::SchemaView>>()?
    6461                                .unwrap_or_default();
    6462                        }
    6463                        __FieldTag::__page_size => {
    6464                            if !fields.insert(__FieldTag::__page_size) {
    6465                                return std::result::Result::Err(A::Error::duplicate_field(
    6466                                    "multiple values for page_size",
    6467                                ));
    6468                            }
    6469                            struct __With(std::option::Option<i32>);
    6470                            impl<'de> serde::de::Deserialize<'de> for __With {
    6471                                fn deserialize<D>(
    6472                                    deserializer: D,
    6473                                ) -> std::result::Result<Self, D::Error>
    6474                                where
    6475                                    D: serde::de::Deserializer<'de>,
    6476                                {
    6477                                    serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
    6478                                }
    6479                            }
    6480                            result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
    6481                        }
    6482                        __FieldTag::__page_token => {
    6483                            if !fields.insert(__FieldTag::__page_token) {
    6484                                return std::result::Result::Err(A::Error::duplicate_field(
    6485                                    "multiple values for page_token",
    6486                                ));
    6487                            }
    6488                            result.page_token = map
    6489                                .next_value::<std::option::Option<std::string::String>>()?
    6490                                .unwrap_or_default();
    6491                        }
    6492                        __FieldTag::Unknown(key) => {
    6493                            let value = map.next_value::<serde_json::Value>()?;
    6494                            result._unknown_fields.insert(key, value);
    6495                        }
    6496                    }
    6497                }
    6498                std::result::Result::Ok(result)
    6499            }
    6500        }
    6501        deserializer.deserialize_any(Visitor)
    6502    }
    6503}
    6504
    6505#[doc(hidden)]
    6506impl<'de> serde::de::Deserialize<'de> for super::ListSchemasResponse {
    6507    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6508    where
    6509        D: serde::Deserializer<'de>,
    6510    {
    6511        #[allow(non_camel_case_types)]
    6512        #[doc(hidden)]
    6513        #[derive(PartialEq, Eq, Hash)]
    6514        enum __FieldTag {
    6515            __schemas,
    6516            __next_page_token,
    6517            Unknown(std::string::String),
    6518        }
    6519        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    6520            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6521            where
    6522                D: serde::Deserializer<'de>,
    6523            {
    6524                struct Visitor;
    6525                impl<'de> serde::de::Visitor<'de> for Visitor {
    6526                    type Value = __FieldTag;
    6527                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6528                        formatter.write_str("a field name for ListSchemasResponse")
    6529                    }
    6530                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    6531                    where
    6532                        E: serde::de::Error,
    6533                    {
    6534                        use std::result::Result::Ok;
    6535                        use std::string::ToString;
    6536                        match value {
    6537                            "schemas" => Ok(__FieldTag::__schemas),
    6538                            "nextPageToken" => Ok(__FieldTag::__next_page_token),
    6539                            "next_page_token" => Ok(__FieldTag::__next_page_token),
    6540                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    6541                        }
    6542                    }
    6543                }
    6544                deserializer.deserialize_identifier(Visitor)
    6545            }
    6546        }
    6547        struct Visitor;
    6548        impl<'de> serde::de::Visitor<'de> for Visitor {
    6549            type Value = super::ListSchemasResponse;
    6550            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6551                formatter.write_str("struct ListSchemasResponse")
    6552            }
    6553            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    6554            where
    6555                A: serde::de::MapAccess<'de>,
    6556            {
    6557                #[allow(unused_imports)]
    6558                use serde::de::Error;
    6559                use std::option::Option::Some;
    6560                let mut fields = std::collections::HashSet::new();
    6561                let mut result = Self::Value::new();
    6562                while let Some(tag) = map.next_key::<__FieldTag>()? {
    6563                    #[allow(clippy::match_single_binding)]
    6564                    match tag {
    6565                        __FieldTag::__schemas => {
    6566                            if !fields.insert(__FieldTag::__schemas) {
    6567                                return std::result::Result::Err(A::Error::duplicate_field(
    6568                                    "multiple values for schemas",
    6569                                ));
    6570                            }
    6571                            result.schemas = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Schema>>>()?.unwrap_or_default();
    6572                        }
    6573                        __FieldTag::__next_page_token => {
    6574                            if !fields.insert(__FieldTag::__next_page_token) {
    6575                                return std::result::Result::Err(A::Error::duplicate_field(
    6576                                    "multiple values for next_page_token",
    6577                                ));
    6578                            }
    6579                            result.next_page_token = map
    6580                                .next_value::<std::option::Option<std::string::String>>()?
    6581                                .unwrap_or_default();
    6582                        }
    6583                        __FieldTag::Unknown(key) => {
    6584                            let value = map.next_value::<serde_json::Value>()?;
    6585                            result._unknown_fields.insert(key, value);
    6586                        }
    6587                    }
    6588                }
    6589                std::result::Result::Ok(result)
    6590            }
    6591        }
    6592        deserializer.deserialize_any(Visitor)
    6593    }
    6594}
    6595
    6596#[doc(hidden)]
    6597impl<'de> serde::de::Deserialize<'de> for super::ListSchemaRevisionsRequest {
    6598    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6599    where
    6600        D: serde::Deserializer<'de>,
    6601    {
    6602        #[allow(non_camel_case_types)]
    6603        #[doc(hidden)]
    6604        #[derive(PartialEq, Eq, Hash)]
    6605        enum __FieldTag {
    6606            __name,
    6607            __view,
    6608            __page_size,
    6609            __page_token,
    6610            Unknown(std::string::String),
    6611        }
    6612        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    6613            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6614            where
    6615                D: serde::Deserializer<'de>,
    6616            {
    6617                struct Visitor;
    6618                impl<'de> serde::de::Visitor<'de> for Visitor {
    6619                    type Value = __FieldTag;
    6620                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6621                        formatter.write_str("a field name for ListSchemaRevisionsRequest")
    6622                    }
    6623                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    6624                    where
    6625                        E: serde::de::Error,
    6626                    {
    6627                        use std::result::Result::Ok;
    6628                        use std::string::ToString;
    6629                        match value {
    6630                            "name" => Ok(__FieldTag::__name),
    6631                            "view" => Ok(__FieldTag::__view),
    6632                            "pageSize" => Ok(__FieldTag::__page_size),
    6633                            "page_size" => Ok(__FieldTag::__page_size),
    6634                            "pageToken" => Ok(__FieldTag::__page_token),
    6635                            "page_token" => Ok(__FieldTag::__page_token),
    6636                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    6637                        }
    6638                    }
    6639                }
    6640                deserializer.deserialize_identifier(Visitor)
    6641            }
    6642        }
    6643        struct Visitor;
    6644        impl<'de> serde::de::Visitor<'de> for Visitor {
    6645            type Value = super::ListSchemaRevisionsRequest;
    6646            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6647                formatter.write_str("struct ListSchemaRevisionsRequest")
    6648            }
    6649            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    6650            where
    6651                A: serde::de::MapAccess<'de>,
    6652            {
    6653                #[allow(unused_imports)]
    6654                use serde::de::Error;
    6655                use std::option::Option::Some;
    6656                let mut fields = std::collections::HashSet::new();
    6657                let mut result = Self::Value::new();
    6658                while let Some(tag) = map.next_key::<__FieldTag>()? {
    6659                    #[allow(clippy::match_single_binding)]
    6660                    match tag {
    6661                        __FieldTag::__name => {
    6662                            if !fields.insert(__FieldTag::__name) {
    6663                                return std::result::Result::Err(A::Error::duplicate_field(
    6664                                    "multiple values for name",
    6665                                ));
    6666                            }
    6667                            result.name = map
    6668                                .next_value::<std::option::Option<std::string::String>>()?
    6669                                .unwrap_or_default();
    6670                        }
    6671                        __FieldTag::__view => {
    6672                            if !fields.insert(__FieldTag::__view) {
    6673                                return std::result::Result::Err(A::Error::duplicate_field(
    6674                                    "multiple values for view",
    6675                                ));
    6676                            }
    6677                            result.view = map
    6678                                .next_value::<std::option::Option<crate::model::SchemaView>>()?
    6679                                .unwrap_or_default();
    6680                        }
    6681                        __FieldTag::__page_size => {
    6682                            if !fields.insert(__FieldTag::__page_size) {
    6683                                return std::result::Result::Err(A::Error::duplicate_field(
    6684                                    "multiple values for page_size",
    6685                                ));
    6686                            }
    6687                            struct __With(std::option::Option<i32>);
    6688                            impl<'de> serde::de::Deserialize<'de> for __With {
    6689                                fn deserialize<D>(
    6690                                    deserializer: D,
    6691                                ) -> std::result::Result<Self, D::Error>
    6692                                where
    6693                                    D: serde::de::Deserializer<'de>,
    6694                                {
    6695                                    serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
    6696                                }
    6697                            }
    6698                            result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
    6699                        }
    6700                        __FieldTag::__page_token => {
    6701                            if !fields.insert(__FieldTag::__page_token) {
    6702                                return std::result::Result::Err(A::Error::duplicate_field(
    6703                                    "multiple values for page_token",
    6704                                ));
    6705                            }
    6706                            result.page_token = map
    6707                                .next_value::<std::option::Option<std::string::String>>()?
    6708                                .unwrap_or_default();
    6709                        }
    6710                        __FieldTag::Unknown(key) => {
    6711                            let value = map.next_value::<serde_json::Value>()?;
    6712                            result._unknown_fields.insert(key, value);
    6713                        }
    6714                    }
    6715                }
    6716                std::result::Result::Ok(result)
    6717            }
    6718        }
    6719        deserializer.deserialize_any(Visitor)
    6720    }
    6721}
    6722
    6723#[doc(hidden)]
    6724impl<'de> serde::de::Deserialize<'de> for super::ListSchemaRevisionsResponse {
    6725    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6726    where
    6727        D: serde::Deserializer<'de>,
    6728    {
    6729        #[allow(non_camel_case_types)]
    6730        #[doc(hidden)]
    6731        #[derive(PartialEq, Eq, Hash)]
    6732        enum __FieldTag {
    6733            __schemas,
    6734            __next_page_token,
    6735            Unknown(std::string::String),
    6736        }
    6737        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    6738            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6739            where
    6740                D: serde::Deserializer<'de>,
    6741            {
    6742                struct Visitor;
    6743                impl<'de> serde::de::Visitor<'de> for Visitor {
    6744                    type Value = __FieldTag;
    6745                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6746                        formatter.write_str("a field name for ListSchemaRevisionsResponse")
    6747                    }
    6748                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    6749                    where
    6750                        E: serde::de::Error,
    6751                    {
    6752                        use std::result::Result::Ok;
    6753                        use std::string::ToString;
    6754                        match value {
    6755                            "schemas" => Ok(__FieldTag::__schemas),
    6756                            "nextPageToken" => Ok(__FieldTag::__next_page_token),
    6757                            "next_page_token" => Ok(__FieldTag::__next_page_token),
    6758                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    6759                        }
    6760                    }
    6761                }
    6762                deserializer.deserialize_identifier(Visitor)
    6763            }
    6764        }
    6765        struct Visitor;
    6766        impl<'de> serde::de::Visitor<'de> for Visitor {
    6767            type Value = super::ListSchemaRevisionsResponse;
    6768            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6769                formatter.write_str("struct ListSchemaRevisionsResponse")
    6770            }
    6771            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    6772            where
    6773                A: serde::de::MapAccess<'de>,
    6774            {
    6775                #[allow(unused_imports)]
    6776                use serde::de::Error;
    6777                use std::option::Option::Some;
    6778                let mut fields = std::collections::HashSet::new();
    6779                let mut result = Self::Value::new();
    6780                while let Some(tag) = map.next_key::<__FieldTag>()? {
    6781                    #[allow(clippy::match_single_binding)]
    6782                    match tag {
    6783                        __FieldTag::__schemas => {
    6784                            if !fields.insert(__FieldTag::__schemas) {
    6785                                return std::result::Result::Err(A::Error::duplicate_field(
    6786                                    "multiple values for schemas",
    6787                                ));
    6788                            }
    6789                            result.schemas = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Schema>>>()?.unwrap_or_default();
    6790                        }
    6791                        __FieldTag::__next_page_token => {
    6792                            if !fields.insert(__FieldTag::__next_page_token) {
    6793                                return std::result::Result::Err(A::Error::duplicate_field(
    6794                                    "multiple values for next_page_token",
    6795                                ));
    6796                            }
    6797                            result.next_page_token = map
    6798                                .next_value::<std::option::Option<std::string::String>>()?
    6799                                .unwrap_or_default();
    6800                        }
    6801                        __FieldTag::Unknown(key) => {
    6802                            let value = map.next_value::<serde_json::Value>()?;
    6803                            result._unknown_fields.insert(key, value);
    6804                        }
    6805                    }
    6806                }
    6807                std::result::Result::Ok(result)
    6808            }
    6809        }
    6810        deserializer.deserialize_any(Visitor)
    6811    }
    6812}
    6813
    6814#[doc(hidden)]
    6815impl<'de> serde::de::Deserialize<'de> for super::CommitSchemaRequest {
    6816    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6817    where
    6818        D: serde::Deserializer<'de>,
    6819    {
    6820        #[allow(non_camel_case_types)]
    6821        #[doc(hidden)]
    6822        #[derive(PartialEq, Eq, Hash)]
    6823        enum __FieldTag {
    6824            __name,
    6825            __schema,
    6826            Unknown(std::string::String),
    6827        }
    6828        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    6829            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6830            where
    6831                D: serde::Deserializer<'de>,
    6832            {
    6833                struct Visitor;
    6834                impl<'de> serde::de::Visitor<'de> for Visitor {
    6835                    type Value = __FieldTag;
    6836                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6837                        formatter.write_str("a field name for CommitSchemaRequest")
    6838                    }
    6839                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    6840                    where
    6841                        E: serde::de::Error,
    6842                    {
    6843                        use std::result::Result::Ok;
    6844                        use std::string::ToString;
    6845                        match value {
    6846                            "name" => Ok(__FieldTag::__name),
    6847                            "schema" => Ok(__FieldTag::__schema),
    6848                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    6849                        }
    6850                    }
    6851                }
    6852                deserializer.deserialize_identifier(Visitor)
    6853            }
    6854        }
    6855        struct Visitor;
    6856        impl<'de> serde::de::Visitor<'de> for Visitor {
    6857            type Value = super::CommitSchemaRequest;
    6858            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6859                formatter.write_str("struct CommitSchemaRequest")
    6860            }
    6861            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    6862            where
    6863                A: serde::de::MapAccess<'de>,
    6864            {
    6865                #[allow(unused_imports)]
    6866                use serde::de::Error;
    6867                use std::option::Option::Some;
    6868                let mut fields = std::collections::HashSet::new();
    6869                let mut result = Self::Value::new();
    6870                while let Some(tag) = map.next_key::<__FieldTag>()? {
    6871                    #[allow(clippy::match_single_binding)]
    6872                    match tag {
    6873                        __FieldTag::__name => {
    6874                            if !fields.insert(__FieldTag::__name) {
    6875                                return std::result::Result::Err(A::Error::duplicate_field(
    6876                                    "multiple values for name",
    6877                                ));
    6878                            }
    6879                            result.name = map
    6880                                .next_value::<std::option::Option<std::string::String>>()?
    6881                                .unwrap_or_default();
    6882                        }
    6883                        __FieldTag::__schema => {
    6884                            if !fields.insert(__FieldTag::__schema) {
    6885                                return std::result::Result::Err(A::Error::duplicate_field(
    6886                                    "multiple values for schema",
    6887                                ));
    6888                            }
    6889                            result.schema =
    6890                                map.next_value::<std::option::Option<crate::model::Schema>>()?;
    6891                        }
    6892                        __FieldTag::Unknown(key) => {
    6893                            let value = map.next_value::<serde_json::Value>()?;
    6894                            result._unknown_fields.insert(key, value);
    6895                        }
    6896                    }
    6897                }
    6898                std::result::Result::Ok(result)
    6899            }
    6900        }
    6901        deserializer.deserialize_any(Visitor)
    6902    }
    6903}
    6904
    6905#[doc(hidden)]
    6906impl<'de> serde::de::Deserialize<'de> for super::RollbackSchemaRequest {
    6907    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6908    where
    6909        D: serde::Deserializer<'de>,
    6910    {
    6911        #[allow(non_camel_case_types)]
    6912        #[doc(hidden)]
    6913        #[derive(PartialEq, Eq, Hash)]
    6914        enum __FieldTag {
    6915            __name,
    6916            __revision_id,
    6917            Unknown(std::string::String),
    6918        }
    6919        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    6920            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    6921            where
    6922                D: serde::Deserializer<'de>,
    6923            {
    6924                struct Visitor;
    6925                impl<'de> serde::de::Visitor<'de> for Visitor {
    6926                    type Value = __FieldTag;
    6927                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6928                        formatter.write_str("a field name for RollbackSchemaRequest")
    6929                    }
    6930                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    6931                    where
    6932                        E: serde::de::Error,
    6933                    {
    6934                        use std::result::Result::Ok;
    6935                        use std::string::ToString;
    6936                        match value {
    6937                            "name" => Ok(__FieldTag::__name),
    6938                            "revisionId" => Ok(__FieldTag::__revision_id),
    6939                            "revision_id" => Ok(__FieldTag::__revision_id),
    6940                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    6941                        }
    6942                    }
    6943                }
    6944                deserializer.deserialize_identifier(Visitor)
    6945            }
    6946        }
    6947        struct Visitor;
    6948        impl<'de> serde::de::Visitor<'de> for Visitor {
    6949            type Value = super::RollbackSchemaRequest;
    6950            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    6951                formatter.write_str("struct RollbackSchemaRequest")
    6952            }
    6953            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    6954            where
    6955                A: serde::de::MapAccess<'de>,
    6956            {
    6957                #[allow(unused_imports)]
    6958                use serde::de::Error;
    6959                use std::option::Option::Some;
    6960                let mut fields = std::collections::HashSet::new();
    6961                let mut result = Self::Value::new();
    6962                while let Some(tag) = map.next_key::<__FieldTag>()? {
    6963                    #[allow(clippy::match_single_binding)]
    6964                    match tag {
    6965                        __FieldTag::__name => {
    6966                            if !fields.insert(__FieldTag::__name) {
    6967                                return std::result::Result::Err(A::Error::duplicate_field(
    6968                                    "multiple values for name",
    6969                                ));
    6970                            }
    6971                            result.name = map
    6972                                .next_value::<std::option::Option<std::string::String>>()?
    6973                                .unwrap_or_default();
    6974                        }
    6975                        __FieldTag::__revision_id => {
    6976                            if !fields.insert(__FieldTag::__revision_id) {
    6977                                return std::result::Result::Err(A::Error::duplicate_field(
    6978                                    "multiple values for revision_id",
    6979                                ));
    6980                            }
    6981                            result.revision_id = map
    6982                                .next_value::<std::option::Option<std::string::String>>()?
    6983                                .unwrap_or_default();
    6984                        }
    6985                        __FieldTag::Unknown(key) => {
    6986                            let value = map.next_value::<serde_json::Value>()?;
    6987                            result._unknown_fields.insert(key, value);
    6988                        }
    6989                    }
    6990                }
    6991                std::result::Result::Ok(result)
    6992            }
    6993        }
    6994        deserializer.deserialize_any(Visitor)
    6995    }
    6996}
    6997
    6998#[doc(hidden)]
    6999impl<'de> serde::de::Deserialize<'de> for super::DeleteSchemaRevisionRequest {
    7000    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    7001    where
    7002        D: serde::Deserializer<'de>,
    7003    {
    7004        #[allow(non_camel_case_types)]
    7005        #[doc(hidden)]
    7006        #[derive(PartialEq, Eq, Hash)]
    7007        enum __FieldTag {
    7008            __name,
    7009            __revision_id,
    7010            Unknown(std::string::String),
    7011        }
    7012        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    7013            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    7014            where
    7015                D: serde::Deserializer<'de>,
    7016            {
    7017                struct Visitor;
    7018                impl<'de> serde::de::Visitor<'de> for Visitor {
    7019                    type Value = __FieldTag;
    7020                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    7021                        formatter.write_str("a field name for DeleteSchemaRevisionRequest")
    7022                    }
    7023                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    7024                    where
    7025                        E: serde::de::Error,
    7026                    {
    7027                        use std::result::Result::Ok;
    7028                        use std::string::ToString;
    7029                        match value {
    7030                            "name" => Ok(__FieldTag::__name),
    7031                            "revisionId" => Ok(__FieldTag::__revision_id),
    7032                            "revision_id" => Ok(__FieldTag::__revision_id),
    7033                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    7034                        }
    7035                    }
    7036                }
    7037                deserializer.deserialize_identifier(Visitor)
    7038            }
    7039        }
    7040        struct Visitor;
    7041        impl<'de> serde::de::Visitor<'de> for Visitor {
    7042            type Value = super::DeleteSchemaRevisionRequest;
    7043            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    7044                formatter.write_str("struct DeleteSchemaRevisionRequest")
    7045            }
    7046            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    7047            where
    7048                A: serde::de::MapAccess<'de>,
    7049            {
    7050                #[allow(unused_imports)]
    7051                use serde::de::Error;
    7052                use std::option::Option::Some;
    7053                let mut fields = std::collections::HashSet::new();
    7054                let mut result = Self::Value::new();
    7055                while let Some(tag) = map.next_key::<__FieldTag>()? {
    7056                    #[allow(clippy::match_single_binding)]
    7057                    match tag {
    7058                        __FieldTag::__name => {
    7059                            if !fields.insert(__FieldTag::__name) {
    7060                                return std::result::Result::Err(A::Error::duplicate_field(
    7061                                    "multiple values for name",
    7062                                ));
    7063                            }
    7064                            result.name = map
    7065                                .next_value::<std::option::Option<std::string::String>>()?
    7066                                .unwrap_or_default();
    7067                        }
    7068                        __FieldTag::__revision_id => {
    7069                            if !fields.insert(__FieldTag::__revision_id) {
    7070                                return std::result::Result::Err(A::Error::duplicate_field(
    7071                                    "multiple values for revision_id",
    7072                                ));
    7073                            }
    7074                            result.revision_id = map
    7075                                .next_value::<std::option::Option<std::string::String>>()?
    7076                                .unwrap_or_default();
    7077                        }
    7078                        __FieldTag::Unknown(key) => {
    7079                            let value = map.next_value::<serde_json::Value>()?;
    7080                            result._unknown_fields.insert(key, value);
    7081                        }
    7082                    }
    7083                }
    7084                std::result::Result::Ok(result)
    7085            }
    7086        }
    7087        deserializer.deserialize_any(Visitor)
    7088    }
    7089}
    7090
    7091#[doc(hidden)]
    7092impl<'de> serde::de::Deserialize<'de> for super::DeleteSchemaRequest {
    7093    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    7094    where
    7095        D: serde::Deserializer<'de>,
    7096    {
    7097        #[allow(non_camel_case_types)]
    7098        #[doc(hidden)]
    7099        #[derive(PartialEq, Eq, Hash)]
    7100        enum __FieldTag {
    7101            __name,
    7102            Unknown(std::string::String),
    7103        }
    7104        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    7105            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    7106            where
    7107                D: serde::Deserializer<'de>,
    7108            {
    7109                struct Visitor;
    7110                impl<'de> serde::de::Visitor<'de> for Visitor {
    7111                    type Value = __FieldTag;
    7112                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    7113                        formatter.write_str("a field name for DeleteSchemaRequest")
    7114                    }
    7115                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    7116                    where
    7117                        E: serde::de::Error,
    7118                    {
    7119                        use std::result::Result::Ok;
    7120                        use std::string::ToString;
    7121                        match value {
    7122                            "name" => Ok(__FieldTag::__name),
    7123                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    7124                        }
    7125                    }
    7126                }
    7127                deserializer.deserialize_identifier(Visitor)
    7128            }
    7129        }
    7130        struct Visitor;
    7131        impl<'de> serde::de::Visitor<'de> for Visitor {
    7132            type Value = super::DeleteSchemaRequest;
    7133            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    7134                formatter.write_str("struct DeleteSchemaRequest")
    7135            }
    7136            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    7137            where
    7138                A: serde::de::MapAccess<'de>,
    7139            {
    7140                #[allow(unused_imports)]
    7141                use serde::de::Error;
    7142                use std::option::Option::Some;
    7143                let mut fields = std::collections::HashSet::new();
    7144                let mut result = Self::Value::new();
    7145                while let Some(tag) = map.next_key::<__FieldTag>()? {
    7146                    #[allow(clippy::match_single_binding)]
    7147                    match tag {
    7148                        __FieldTag::__name => {
    7149                            if !fields.insert(__FieldTag::__name) {
    7150                                return std::result::Result::Err(A::Error::duplicate_field(
    7151                                    "multiple values for name",
    7152                                ));
    7153                            }
    7154                            result.name = map
    7155                                .next_value::<std::option::Option<std::string::String>>()?
    7156                                .unwrap_or_default();
    7157                        }
    7158                        __FieldTag::Unknown(key) => {
    7159                            let value = map.next_value::<serde_json::Value>()?;
    7160                            result._unknown_fields.insert(key, value);
    7161                        }
    7162                    }
    7163                }
    7164                std::result::Result::Ok(result)
    7165            }
    7166        }
    7167        deserializer.deserialize_any(Visitor)
    7168    }
    7169}
    7170
    7171#[doc(hidden)]
    7172impl<'de> serde::de::Deserialize<'de> for super::ValidateSchemaRequest {
    7173    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    7174    where
    7175        D: serde::Deserializer<'de>,
    7176    {
    7177        #[allow(non_camel_case_types)]
    7178        #[doc(hidden)]
    7179        #[derive(PartialEq, Eq, Hash)]
    7180        enum __FieldTag {
    7181            __parent,
    7182            __schema,
    7183            Unknown(std::string::String),
    7184        }
    7185        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    7186            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    7187            where
    7188                D: serde::Deserializer<'de>,
    7189            {
    7190                struct Visitor;
    7191                impl<'de> serde::de::Visitor<'de> for Visitor {
    7192                    type Value = __FieldTag;
    7193                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    7194                        formatter.write_str("a field name for ValidateSchemaRequest")
    7195                    }
    7196                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    7197                    where
    7198                        E: serde::de::Error,
    7199                    {
    7200                        use std::result::Result::Ok;
    7201                        use std::string::ToString;
    7202                        match value {
    7203                            "parent" => Ok(__FieldTag::__parent),
    7204                            "schema" => Ok(__FieldTag::__schema),
    7205                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    7206                        }
    7207                    }
    7208                }
    7209                deserializer.deserialize_identifier(Visitor)
    7210            }
    7211        }
    7212        struct Visitor;
    7213        impl<'de> serde::de::Visitor<'de> for Visitor {
    7214            type Value = super::ValidateSchemaRequest;
    7215            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    7216                formatter.write_str("struct ValidateSchemaRequest")
    7217            }
    7218            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    7219            where
    7220                A: serde::de::MapAccess<'de>,
    7221            {
    7222                #[allow(unused_imports)]
    7223                use serde::de::Error;
    7224                use std::option::Option::Some;
    7225                let mut fields = std::collections::HashSet::new();
    7226                let mut result = Self::Value::new();
    7227                while let Some(tag) = map.next_key::<__FieldTag>()? {
    7228                    #[allow(clippy::match_single_binding)]
    7229                    match tag {
    7230                        __FieldTag::__parent => {
    7231                            if !fields.insert(__FieldTag::__parent) {
    7232                                return std::result::Result::Err(A::Error::duplicate_field(
    7233                                    "multiple values for parent",
    7234                                ));
    7235                            }
    7236                            result.parent = map
    7237                                .next_value::<std::option::Option<std::string::String>>()?
    7238                                .unwrap_or_default();
    7239                        }
    7240                        __FieldTag::__schema => {
    7241                            if !fields.insert(__FieldTag::__schema) {
    7242                                return std::result::Result::Err(A::Error::duplicate_field(
    7243                                    "multiple values for schema",
    7244                                ));
    7245                            }
    7246                            result.schema =
    7247                                map.next_value::<std::option::Option<crate::model::Schema>>()?;
    7248                        }
    7249                        __FieldTag::Unknown(key) => {
    7250                            let value = map.next_value::<serde_json::Value>()?;
    7251                            result._unknown_fields.insert(key, value);
    7252                        }
    7253                    }
    7254                }
    7255                std::result::Result::Ok(result)
    7256            }
    7257        }
    7258        deserializer.deserialize_any(Visitor)
    7259    }
    7260}
    7261
    7262#[doc(hidden)]
    7263impl<'de> serde::de::Deserialize<'de> for super::ValidateSchemaResponse {
    7264    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    7265    where
    7266        D: serde::Deserializer<'de>,
    7267    {
    7268        #[allow(non_camel_case_types)]
    7269        #[doc(hidden)]
    7270        #[derive(PartialEq, Eq, Hash)]
    7271        enum __FieldTag {
    7272            Unknown(std::string::String),
    7273        }
    7274        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    7275            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    7276            where
    7277                D: serde::Deserializer<'de>,
    7278            {
    7279                struct Visitor;
    7280                impl<'de> serde::de::Visitor<'de> for Visitor {
    7281                    type Value = __FieldTag;
    7282                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    7283                        formatter.write_str("a field name for ValidateSchemaResponse")
    7284                    }
    7285                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    7286                    where
    7287                        E: serde::de::Error,
    7288                    {
    7289                        use std::result::Result::Ok;
    7290                        use std::string::ToString;
    7291                        Ok(__FieldTag::Unknown(value.to_string()))
    7292                    }
    7293                }
    7294                deserializer.deserialize_identifier(Visitor)
    7295            }
    7296        }
    7297        struct Visitor;
    7298        impl<'de> serde::de::Visitor<'de> for Visitor {
    7299            type Value = super::ValidateSchemaResponse;
    7300            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    7301                formatter.write_str("struct ValidateSchemaResponse")
    7302            }
    7303            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    7304            where
    7305                A: serde::de::MapAccess<'de>,
    7306            {
    7307                #[allow(unused_imports)]
    7308                use serde::de::Error;
    7309                use std::option::Option::Some;
    7310                let mut result = Self::Value::new();
    7311                while let Some(tag) = map.next_key::<__FieldTag>()? {
    7312                    #[allow(clippy::match_single_binding)]
    7313                    match tag {
    7314                        __FieldTag::Unknown(key) => {
    7315                            let value = map.next_value::<serde_json::Value>()?;
    7316                            result._unknown_fields.insert(key, value);
    7317                        }
    7318                    }
    7319                }
    7320                std::result::Result::Ok(result)
    7321            }
    7322        }
    7323        deserializer.deserialize_any(Visitor)
    7324    }
    7325}
    7326
    7327#[doc(hidden)]
    7328impl<'de> serde::de::Deserialize<'de> for super::ValidateMessageRequest {
    7329    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    7330    where
    7331        D: serde::Deserializer<'de>,
    7332    {
    7333        #[allow(non_camel_case_types)]
    7334        #[doc(hidden)]
    7335        #[derive(PartialEq, Eq, Hash)]
    7336        enum __FieldTag {
    7337            __parent,
    7338            __name,
    7339            __schema,
    7340            __message,
    7341            __encoding,
    7342            Unknown(std::string::String),
    7343        }
    7344        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    7345            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    7346            where
    7347                D: serde::Deserializer<'de>,
    7348            {
    7349                struct Visitor;
    7350                impl<'de> serde::de::Visitor<'de> for Visitor {
    7351                    type Value = __FieldTag;
    7352                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    7353                        formatter.write_str("a field name for ValidateMessageRequest")
    7354                    }
    7355                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    7356                    where
    7357                        E: serde::de::Error,
    7358                    {
    7359                        use std::result::Result::Ok;
    7360                        use std::string::ToString;
    7361                        match value {
    7362                            "parent" => Ok(__FieldTag::__parent),
    7363                            "name" => Ok(__FieldTag::__name),
    7364                            "schema" => Ok(__FieldTag::__schema),
    7365                            "message" => Ok(__FieldTag::__message),
    7366                            "encoding" => Ok(__FieldTag::__encoding),
    7367                            _ => Ok(__FieldTag::Unknown(value.to_string())),
    7368                        }
    7369                    }
    7370                }
    7371                deserializer.deserialize_identifier(Visitor)
    7372            }
    7373        }
    7374        struct Visitor;
    7375        impl<'de> serde::de::Visitor<'de> for Visitor {
    7376            type Value = super::ValidateMessageRequest;
    7377            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    7378                formatter.write_str("struct ValidateMessageRequest")
    7379            }
    7380            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    7381            where
    7382                A: serde::de::MapAccess<'de>,
    7383            {
    7384                #[allow(unused_imports)]
    7385                use serde::de::Error;
    7386                use std::option::Option::Some;
    7387                let mut fields = std::collections::HashSet::new();
    7388                let mut result = Self::Value::new();
    7389                while let Some(tag) = map.next_key::<__FieldTag>()? {
    7390                    #[allow(clippy::match_single_binding)]
    7391                    match tag {
    7392                        __FieldTag::__parent => {
    7393                            if !fields.insert(__FieldTag::__parent) {
    7394                                return std::result::Result::Err(A::Error::duplicate_field(
    7395                                    "multiple values for parent",
    7396                                ));
    7397                            }
    7398                            result.parent = map
    7399                                .next_value::<std::option::Option<std::string::String>>()?
    7400                                .unwrap_or_default();
    7401                        }
    7402                        __FieldTag::__name => {
    7403                            if !fields.insert(__FieldTag::__name) {
    7404                                return std::result::Result::Err(A::Error::duplicate_field(
    7405                                    "multiple values for name",
    7406                                ));
    7407                            }
    7408                            if result.schema_spec.is_some() {
    7409                                return std::result::Result::Err(A::Error::duplicate_field(
    7410                                    "multiple values for `schema_spec`, a oneof with full ID .google.pubsub.v1.ValidateMessageRequest.name, latest field was name",
    7411                                ));
    7412                            }
    7413                            result.schema_spec = std::option::Option::Some(
    7414                                crate::model::validate_message_request::SchemaSpec::Name(
    7415                                    map.next_value::<std::option::Option<std::string::String>>()?
    7416                                        .unwrap_or_default(),
    7417                                ),
    7418                            );
    7419                        }
    7420                        __FieldTag::__schema => {
    7421                            if !fields.insert(__FieldTag::__schema) {
    7422                                return std::result::Result::Err(A::Error::duplicate_field(
    7423                                    "multiple values for schema",
    7424                                ));
    7425                            }
    7426                            if result.schema_spec.is_some() {
    7427                                return std::result::Result::Err(A::Error::duplicate_field(
    7428                                    "multiple values for `schema_spec`, a oneof with full ID .google.pubsub.v1.ValidateMessageRequest.schema, latest field was schema",
    7429                                ));
    7430                            }
    7431                            result.schema_spec =
    7432                                std::option::Option::Some(
    7433                                    crate::model::validate_message_request::SchemaSpec::Schema(
    7434                                        map.next_value::<std::option::Option<
    7435                                            std::boxed::Box<crate::model::Schema>,
    7436                                        >>()?
    7437                                        .unwrap_or_default(),
    7438                                    ),
    7439                                );
    7440                        }
    7441                        __FieldTag::__message => {
    7442                            if !fields.insert(__FieldTag::__message) {
    7443                                return std::result::Result::Err(A::Error::duplicate_field(
    7444                                    "multiple values for message",
    7445                                ));
    7446                            }
    7447                            struct __With(std::option::Option<::bytes::Bytes>);
    7448                            impl<'de> serde::de::Deserialize<'de> for __With {
    7449                                fn deserialize<D>(
    7450                                    deserializer: D,
    7451                                ) -> std::result::Result<Self, D::Error>
    7452                                where
    7453                                    D: serde::de::Deserializer<'de>,
    7454                                {
    7455                                    serde_with::As::< std::option::Option<serde_with::base64::Base64> >::deserialize(deserializer).map(__With)
    7456                                }
    7457                            }
    7458                            result.message = map.next_value::<__With>()?.0.unwrap_or_default();
    7459                        }
    7460                        __FieldTag::__encoding => {
    7461                            if !fields.insert(__FieldTag::__encoding) {
    7462                                return std::result::Result::Err(A::Error::duplicate_field(
    7463                                    "multiple values for encoding",
    7464                                ));
    7465                            }
    7466                            result.encoding = map
    7467                                .next_value::<std::option::Option<crate::model::Encoding>>()?
    7468                                .unwrap_or_default();
    7469                        }
    7470                        __FieldTag::Unknown(key) => {
    7471                            let value = map.next_value::<serde_json::Value>()?;
    7472                            result._unknown_fields.insert(key, value);
    7473                        }
    7474                    }
    7475                }
    7476                std::result::Result::Ok(result)
    7477            }
    7478        }
    7479        deserializer.deserialize_any(Visitor)
    7480    }
    7481}
    7482
    7483#[doc(hidden)]
    7484impl<'de> serde::de::Deserialize<'de> for super::ValidateMessageResponse {
    7485    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    7486    where
    7487        D: serde::Deserializer<'de>,
    7488    {
    7489        #[allow(non_camel_case_types)]
    7490        #[doc(hidden)]
    7491        #[derive(PartialEq, Eq, Hash)]
    7492        enum __FieldTag {
    7493            Unknown(std::string::String),
    7494        }
    7495        impl<'de> serde::de::Deserialize<'de> for __FieldTag {
    7496            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    7497            where
    7498                D: serde::Deserializer<'de>,
    7499            {
    7500                struct Visitor;
    7501                impl<'de> serde::de::Visitor<'de> for Visitor {
    7502                    type Value = __FieldTag;
    7503                    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    7504                        formatter.write_str("a field name for ValidateMessageResponse")
    7505                    }
    7506                    fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
    7507                    where
    7508                        E: serde::de::Error,
    7509                    {
    7510                        use std::result::Result::Ok;
    7511                        use std::string::ToString;
    7512                        Ok(__FieldTag::Unknown(value.to_string()))
    7513                    }
    7514                }
    7515                deserializer.deserialize_identifier(Visitor)
    7516            }
    7517        }
    7518        struct Visitor;
    7519        impl<'de> serde::de::Visitor<'de> for Visitor {
    7520            type Value = super::ValidateMessageResponse;
    7521            fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
    7522                formatter.write_str("struct ValidateMessageResponse")
    7523            }
    7524            fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
    7525            where
    7526                A: serde::de::MapAccess<'de>,
    7527            {
    7528                #[allow(unused_imports)]
    7529                use serde::de::Error;
    7530                use std::option::Option::Some;
    7531                let mut result = Self::Value::new();
    7532                while let Some(tag) = map.next_key::<__FieldTag>()? {
    7533                    #[allow(clippy::match_single_binding)]
    7534                    match tag {
    7535                        __FieldTag::Unknown(key) => {
    7536                            let value = map.next_value::<serde_json::Value>()?;
    7537                            result._unknown_fields.insert(key, value);
    7538                        }
    7539                    }
    7540                }
    7541                std::result::Result::Ok(result)
    7542            }
    7543        }
    7544        deserializer.deserialize_any(Visitor)
    7545    }
    7546}