#[allow(unused_imports)]
use super::*;
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::BlockchainNode {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__ethereum_details,
__name,
__create_time,
__update_time,
__labels,
__blockchain_type,
__connection_info,
__state,
__private_service_connect_enabled,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for BlockchainNode")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"ethereumDetails" => Ok(__FieldTag::__ethereum_details),
"ethereum_details" => Ok(__FieldTag::__ethereum_details),
"name" => Ok(__FieldTag::__name),
"createTime" => Ok(__FieldTag::__create_time),
"create_time" => Ok(__FieldTag::__create_time),
"updateTime" => Ok(__FieldTag::__update_time),
"update_time" => Ok(__FieldTag::__update_time),
"labels" => Ok(__FieldTag::__labels),
"blockchainType" => Ok(__FieldTag::__blockchain_type),
"blockchain_type" => Ok(__FieldTag::__blockchain_type),
"connectionInfo" => Ok(__FieldTag::__connection_info),
"connection_info" => Ok(__FieldTag::__connection_info),
"state" => Ok(__FieldTag::__state),
"privateServiceConnectEnabled" => {
Ok(__FieldTag::__private_service_connect_enabled)
}
"private_service_connect_enabled" => {
Ok(__FieldTag::__private_service_connect_enabled)
}
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::BlockchainNode;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct BlockchainNode")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__ethereum_details => {
if !fields.insert(__FieldTag::__ethereum_details) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for ethereum_details",
));
}
if result.blockchain_type_details.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `blockchain_type_details`, a oneof with full ID .google.cloud.blockchainnodeengine.v1.BlockchainNode.ethereum_details, latest field was ethereumDetails",
));
}
result.blockchain_type_details = std::option::Option::Some(
crate::model::blockchain_node::BlockchainTypeDetails::EthereumDetails(
map.next_value::<std::option::Option<std::boxed::Box<crate::model::blockchain_node::EthereumDetails>>>()?.unwrap_or_default()
),
);
}
__FieldTag::__name => {
if !fields.insert(__FieldTag::__name) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for name",
));
}
result.name = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__create_time => {
if !fields.insert(__FieldTag::__create_time) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for create_time",
));
}
result.create_time =
map.next_value::<std::option::Option<wkt::Timestamp>>()?;
}
__FieldTag::__update_time => {
if !fields.insert(__FieldTag::__update_time) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for update_time",
));
}
result.update_time =
map.next_value::<std::option::Option<wkt::Timestamp>>()?;
}
__FieldTag::__labels => {
if !fields.insert(__FieldTag::__labels) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for labels",
));
}
result.labels = map
.next_value::<std::option::Option<
std::collections::HashMap<
std::string::String,
std::string::String,
>,
>>()?
.unwrap_or_default();
}
__FieldTag::__blockchain_type => {
if !fields.insert(__FieldTag::__blockchain_type) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for blockchain_type",
));
}
result.blockchain_type = map.next_value::<std::option::Option<
crate::model::blockchain_node::BlockchainType,
>>()?;
}
__FieldTag::__connection_info => {
if !fields.insert(__FieldTag::__connection_info) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for connection_info",
));
}
result.connection_info = map.next_value::<std::option::Option<
crate::model::blockchain_node::ConnectionInfo,
>>()?;
}
__FieldTag::__state => {
if !fields.insert(__FieldTag::__state) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for state",
));
}
result.state = map.next_value::<std::option::Option<crate::model::blockchain_node::State>>()?.unwrap_or_default();
}
__FieldTag::__private_service_connect_enabled => {
if !fields.insert(__FieldTag::__private_service_connect_enabled) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for private_service_connect_enabled",
));
}
result.private_service_connect_enabled = map
.next_value::<std::option::Option<bool>>()?
.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::blockchain_node::ConnectionInfo {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__endpoint_info,
__service_attachment,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for ConnectionInfo")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"endpointInfo" => Ok(__FieldTag::__endpoint_info),
"endpoint_info" => Ok(__FieldTag::__endpoint_info),
"serviceAttachment" => Ok(__FieldTag::__service_attachment),
"service_attachment" => Ok(__FieldTag::__service_attachment),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::blockchain_node::ConnectionInfo;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ConnectionInfo")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__endpoint_info => {
if !fields.insert(__FieldTag::__endpoint_info) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for endpoint_info",
));
}
result.endpoint_info = map.next_value::<std::option::Option<
crate::model::blockchain_node::connection_info::EndpointInfo,
>>()?;
}
__FieldTag::__service_attachment => {
if !fields.insert(__FieldTag::__service_attachment) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for service_attachment",
));
}
result.service_attachment = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::blockchain_node::connection_info::EndpointInfo {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__json_rpc_api_endpoint,
__websockets_api_endpoint,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for EndpointInfo")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"jsonRpcApiEndpoint" => Ok(__FieldTag::__json_rpc_api_endpoint),
"json_rpc_api_endpoint" => Ok(__FieldTag::__json_rpc_api_endpoint),
"websocketsApiEndpoint" => Ok(__FieldTag::__websockets_api_endpoint),
"websockets_api_endpoint" => Ok(__FieldTag::__websockets_api_endpoint),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::blockchain_node::connection_info::EndpointInfo;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct EndpointInfo")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__json_rpc_api_endpoint => {
if !fields.insert(__FieldTag::__json_rpc_api_endpoint) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for json_rpc_api_endpoint",
));
}
result.json_rpc_api_endpoint = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__websockets_api_endpoint => {
if !fields.insert(__FieldTag::__websockets_api_endpoint) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for websockets_api_endpoint",
));
}
result.websockets_api_endpoint = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::blockchain_node::EthereumDetails {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__geth_details,
__network,
__node_type,
__execution_client,
__consensus_client,
__api_enable_admin,
__api_enable_debug,
__additional_endpoints,
__validator_config,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for EthereumDetails")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"gethDetails" => Ok(__FieldTag::__geth_details),
"geth_details" => Ok(__FieldTag::__geth_details),
"network" => Ok(__FieldTag::__network),
"nodeType" => Ok(__FieldTag::__node_type),
"node_type" => Ok(__FieldTag::__node_type),
"executionClient" => Ok(__FieldTag::__execution_client),
"execution_client" => Ok(__FieldTag::__execution_client),
"consensusClient" => Ok(__FieldTag::__consensus_client),
"consensus_client" => Ok(__FieldTag::__consensus_client),
"apiEnableAdmin" => Ok(__FieldTag::__api_enable_admin),
"api_enable_admin" => Ok(__FieldTag::__api_enable_admin),
"apiEnableDebug" => Ok(__FieldTag::__api_enable_debug),
"api_enable_debug" => Ok(__FieldTag::__api_enable_debug),
"additionalEndpoints" => Ok(__FieldTag::__additional_endpoints),
"additional_endpoints" => Ok(__FieldTag::__additional_endpoints),
"validatorConfig" => Ok(__FieldTag::__validator_config),
"validator_config" => Ok(__FieldTag::__validator_config),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::blockchain_node::EthereumDetails;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct EthereumDetails")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__geth_details => {
if !fields.insert(__FieldTag::__geth_details) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for geth_details",
));
}
if result.execution_client_details.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `execution_client_details`, a oneof with full ID .google.cloud.blockchainnodeengine.v1.BlockchainNode.EthereumDetails.geth_details, latest field was gethDetails",
));
}
result.execution_client_details = std::option::Option::Some(
crate::model::blockchain_node::ethereum_details::ExecutionClientDetails::GethDetails(
map.next_value::<std::option::Option<std::boxed::Box<crate::model::blockchain_node::ethereum_details::GethDetails>>>()?.unwrap_or_default()
),
);
}
__FieldTag::__network => {
if !fields.insert(__FieldTag::__network) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for network",
));
}
result.network = map.next_value::<std::option::Option<
crate::model::blockchain_node::ethereum_details::Network,
>>()?;
}
__FieldTag::__node_type => {
if !fields.insert(__FieldTag::__node_type) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for node_type",
));
}
result.node_type = map.next_value::<std::option::Option<
crate::model::blockchain_node::ethereum_details::NodeType,
>>()?;
}
__FieldTag::__execution_client => {
if !fields.insert(__FieldTag::__execution_client) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for execution_client",
));
}
result.execution_client = map.next_value::<std::option::Option<
crate::model::blockchain_node::ethereum_details::ExecutionClient,
>>()?;
}
__FieldTag::__consensus_client => {
if !fields.insert(__FieldTag::__consensus_client) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for consensus_client",
));
}
result.consensus_client = map.next_value::<std::option::Option<
crate::model::blockchain_node::ethereum_details::ConsensusClient,
>>()?;
}
__FieldTag::__api_enable_admin => {
if !fields.insert(__FieldTag::__api_enable_admin) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for api_enable_admin",
));
}
result.api_enable_admin =
map.next_value::<std::option::Option<bool>>()?;
}
__FieldTag::__api_enable_debug => {
if !fields.insert(__FieldTag::__api_enable_debug) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for api_enable_debug",
));
}
result.api_enable_debug =
map.next_value::<std::option::Option<bool>>()?;
}
__FieldTag::__additional_endpoints => {
if !fields.insert(__FieldTag::__additional_endpoints) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for additional_endpoints",
));
}
result.additional_endpoints = map.next_value::<std::option::Option<
crate::model::blockchain_node::ethereum_details::EthereumEndpoints,
>>()?;
}
__FieldTag::__validator_config => {
if !fields.insert(__FieldTag::__validator_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for validator_config",
));
}
result.validator_config = map.next_value::<std::option::Option<
crate::model::blockchain_node::ethereum_details::ValidatorConfig,
>>()?;
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::blockchain_node::ethereum_details::GethDetails {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__garbage_collection_mode,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for GethDetails")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"garbageCollectionMode" => Ok(__FieldTag::__garbage_collection_mode),
"garbage_collection_mode" => Ok(__FieldTag::__garbage_collection_mode),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::blockchain_node::ethereum_details::GethDetails;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GethDetails")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__garbage_collection_mode => {
if !fields.insert(__FieldTag::__garbage_collection_mode) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for garbage_collection_mode",
));
}
result.garbage_collection_mode = map.next_value::<std::option::Option<crate::model::blockchain_node::ethereum_details::geth_details::GarbageCollectionMode>>()?
;
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de>
for super::blockchain_node::ethereum_details::EthereumEndpoints
{
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__beacon_api_endpoint,
__beacon_prometheus_metrics_api_endpoint,
__execution_client_prometheus_metrics_api_endpoint,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for EthereumEndpoints")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"beaconApiEndpoint" => Ok(__FieldTag::__beacon_api_endpoint),
"beacon_api_endpoint" => Ok(__FieldTag::__beacon_api_endpoint),
"beaconPrometheusMetricsApiEndpoint" => {
Ok(__FieldTag::__beacon_prometheus_metrics_api_endpoint)
}
"beacon_prometheus_metrics_api_endpoint" => {
Ok(__FieldTag::__beacon_prometheus_metrics_api_endpoint)
}
"executionClientPrometheusMetricsApiEndpoint" => {
Ok(__FieldTag::__execution_client_prometheus_metrics_api_endpoint)
}
"execution_client_prometheus_metrics_api_endpoint" => {
Ok(__FieldTag::__execution_client_prometheus_metrics_api_endpoint)
}
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::blockchain_node::ethereum_details::EthereumEndpoints;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct EthereumEndpoints")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__beacon_api_endpoint => {
if !fields.insert(__FieldTag::__beacon_api_endpoint) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for beacon_api_endpoint",
));
}
result.beacon_api_endpoint = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__beacon_prometheus_metrics_api_endpoint => {
if !fields.insert(__FieldTag::__beacon_prometheus_metrics_api_endpoint)
{
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for beacon_prometheus_metrics_api_endpoint",
));
}
result.beacon_prometheus_metrics_api_endpoint = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__execution_client_prometheus_metrics_api_endpoint => {
if !fields.insert(
__FieldTag::__execution_client_prometheus_metrics_api_endpoint,
) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for execution_client_prometheus_metrics_api_endpoint",
));
}
result.execution_client_prometheus_metrics_api_endpoint = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de>
for super::blockchain_node::ethereum_details::ValidatorConfig
{
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__mev_relay_urls,
__managed_validator_client,
__beacon_fee_recipient,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for ValidatorConfig")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"mevRelayUrls" => Ok(__FieldTag::__mev_relay_urls),
"mev_relay_urls" => Ok(__FieldTag::__mev_relay_urls),
"managedValidatorClient" => Ok(__FieldTag::__managed_validator_client),
"managed_validator_client" => {
Ok(__FieldTag::__managed_validator_client)
}
"beaconFeeRecipient" => Ok(__FieldTag::__beacon_fee_recipient),
"beacon_fee_recipient" => Ok(__FieldTag::__beacon_fee_recipient),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::blockchain_node::ethereum_details::ValidatorConfig;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ValidatorConfig")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__mev_relay_urls => {
if !fields.insert(__FieldTag::__mev_relay_urls) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for mev_relay_urls",
));
}
result.mev_relay_urls = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
}
__FieldTag::__managed_validator_client => {
if !fields.insert(__FieldTag::__managed_validator_client) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for managed_validator_client",
));
}
result.managed_validator_client = map
.next_value::<std::option::Option<bool>>()?
.unwrap_or_default();
}
__FieldTag::__beacon_fee_recipient => {
if !fields.insert(__FieldTag::__beacon_fee_recipient) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for beacon_fee_recipient",
));
}
result.beacon_fee_recipient =
map.next_value::<std::option::Option<std::string::String>>()?;
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::ListBlockchainNodesRequest {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__parent,
__page_size,
__page_token,
__filter,
__order_by,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for ListBlockchainNodesRequest")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"parent" => Ok(__FieldTag::__parent),
"pageSize" => Ok(__FieldTag::__page_size),
"page_size" => Ok(__FieldTag::__page_size),
"pageToken" => Ok(__FieldTag::__page_token),
"page_token" => Ok(__FieldTag::__page_token),
"filter" => Ok(__FieldTag::__filter),
"orderBy" => Ok(__FieldTag::__order_by),
"order_by" => Ok(__FieldTag::__order_by),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ListBlockchainNodesRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListBlockchainNodesRequest")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__parent => {
if !fields.insert(__FieldTag::__parent) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for parent",
));
}
result.parent = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__page_size => {
if !fields.insert(__FieldTag::__page_size) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for page_size",
));
}
struct __With(std::option::Option<i32>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
}
}
result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__page_token => {
if !fields.insert(__FieldTag::__page_token) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for page_token",
));
}
result.page_token = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__filter => {
if !fields.insert(__FieldTag::__filter) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for filter",
));
}
result.filter = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__order_by => {
if !fields.insert(__FieldTag::__order_by) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for order_by",
));
}
result.order_by = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::ListBlockchainNodesResponse {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__blockchain_nodes,
__next_page_token,
__unreachable,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for ListBlockchainNodesResponse")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"blockchainNodes" => Ok(__FieldTag::__blockchain_nodes),
"blockchain_nodes" => Ok(__FieldTag::__blockchain_nodes),
"nextPageToken" => Ok(__FieldTag::__next_page_token),
"next_page_token" => Ok(__FieldTag::__next_page_token),
"unreachable" => Ok(__FieldTag::__unreachable),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ListBlockchainNodesResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListBlockchainNodesResponse")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__blockchain_nodes => {
if !fields.insert(__FieldTag::__blockchain_nodes) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for blockchain_nodes",
));
}
result.blockchain_nodes =
map.next_value::<std::option::Option<
std::vec::Vec<crate::model::BlockchainNode>,
>>()?
.unwrap_or_default();
}
__FieldTag::__next_page_token => {
if !fields.insert(__FieldTag::__next_page_token) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for next_page_token",
));
}
result.next_page_token = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__unreachable => {
if !fields.insert(__FieldTag::__unreachable) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for unreachable",
));
}
result.unreachable = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::GetBlockchainNodeRequest {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__name,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for GetBlockchainNodeRequest")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"name" => Ok(__FieldTag::__name),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::GetBlockchainNodeRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GetBlockchainNodeRequest")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__name => {
if !fields.insert(__FieldTag::__name) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for name",
));
}
result.name = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::CreateBlockchainNodeRequest {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__parent,
__blockchain_node_id,
__blockchain_node,
__request_id,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for CreateBlockchainNodeRequest")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"parent" => Ok(__FieldTag::__parent),
"blockchainNodeId" => Ok(__FieldTag::__blockchain_node_id),
"blockchain_node_id" => Ok(__FieldTag::__blockchain_node_id),
"blockchainNode" => Ok(__FieldTag::__blockchain_node),
"blockchain_node" => Ok(__FieldTag::__blockchain_node),
"requestId" => Ok(__FieldTag::__request_id),
"request_id" => Ok(__FieldTag::__request_id),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::CreateBlockchainNodeRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct CreateBlockchainNodeRequest")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__parent => {
if !fields.insert(__FieldTag::__parent) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for parent",
));
}
result.parent = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__blockchain_node_id => {
if !fields.insert(__FieldTag::__blockchain_node_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for blockchain_node_id",
));
}
result.blockchain_node_id = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__blockchain_node => {
if !fields.insert(__FieldTag::__blockchain_node) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for blockchain_node",
));
}
result.blockchain_node = map
.next_value::<std::option::Option<crate::model::BlockchainNode>>(
)?;
}
__FieldTag::__request_id => {
if !fields.insert(__FieldTag::__request_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for request_id",
));
}
result.request_id = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::UpdateBlockchainNodeRequest {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__update_mask,
__blockchain_node,
__request_id,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for UpdateBlockchainNodeRequest")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"updateMask" => Ok(__FieldTag::__update_mask),
"update_mask" => Ok(__FieldTag::__update_mask),
"blockchainNode" => Ok(__FieldTag::__blockchain_node),
"blockchain_node" => Ok(__FieldTag::__blockchain_node),
"requestId" => Ok(__FieldTag::__request_id),
"request_id" => Ok(__FieldTag::__request_id),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::UpdateBlockchainNodeRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct UpdateBlockchainNodeRequest")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__update_mask => {
if !fields.insert(__FieldTag::__update_mask) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for update_mask",
));
}
result.update_mask =
map.next_value::<std::option::Option<wkt::FieldMask>>()?;
}
__FieldTag::__blockchain_node => {
if !fields.insert(__FieldTag::__blockchain_node) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for blockchain_node",
));
}
result.blockchain_node = map
.next_value::<std::option::Option<crate::model::BlockchainNode>>(
)?;
}
__FieldTag::__request_id => {
if !fields.insert(__FieldTag::__request_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for request_id",
));
}
result.request_id = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::DeleteBlockchainNodeRequest {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__name,
__request_id,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for DeleteBlockchainNodeRequest")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"name" => Ok(__FieldTag::__name),
"requestId" => Ok(__FieldTag::__request_id),
"request_id" => Ok(__FieldTag::__request_id),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::DeleteBlockchainNodeRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct DeleteBlockchainNodeRequest")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__name => {
if !fields.insert(__FieldTag::__name) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for name",
));
}
result.name = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__request_id => {
if !fields.insert(__FieldTag::__request_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for request_id",
));
}
result.request_id = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::OperationMetadata {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__create_time,
__end_time,
__target,
__verb,
__status_message,
__requested_cancellation,
__api_version,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for OperationMetadata")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"createTime" => Ok(__FieldTag::__create_time),
"create_time" => Ok(__FieldTag::__create_time),
"endTime" => Ok(__FieldTag::__end_time),
"end_time" => Ok(__FieldTag::__end_time),
"target" => Ok(__FieldTag::__target),
"verb" => Ok(__FieldTag::__verb),
"statusMessage" => Ok(__FieldTag::__status_message),
"status_message" => Ok(__FieldTag::__status_message),
"requestedCancellation" => Ok(__FieldTag::__requested_cancellation),
"requested_cancellation" => Ok(__FieldTag::__requested_cancellation),
"apiVersion" => Ok(__FieldTag::__api_version),
"api_version" => Ok(__FieldTag::__api_version),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::OperationMetadata;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct OperationMetadata")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__create_time => {
if !fields.insert(__FieldTag::__create_time) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for create_time",
));
}
result.create_time =
map.next_value::<std::option::Option<wkt::Timestamp>>()?;
}
__FieldTag::__end_time => {
if !fields.insert(__FieldTag::__end_time) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for end_time",
));
}
result.end_time =
map.next_value::<std::option::Option<wkt::Timestamp>>()?;
}
__FieldTag::__target => {
if !fields.insert(__FieldTag::__target) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for target",
));
}
result.target = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__verb => {
if !fields.insert(__FieldTag::__verb) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for verb",
));
}
result.verb = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__status_message => {
if !fields.insert(__FieldTag::__status_message) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for status_message",
));
}
result.status_message = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__requested_cancellation => {
if !fields.insert(__FieldTag::__requested_cancellation) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for requested_cancellation",
));
}
result.requested_cancellation = map
.next_value::<std::option::Option<bool>>()?
.unwrap_or_default();
}
__FieldTag::__api_version => {
if !fields.insert(__FieldTag::__api_version) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for api_version",
));
}
result.api_version = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}