#[allow(unused_imports)]
use super::*;
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::ListUsersRequest {
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 ListUsersRequest")
}
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::ListUsersRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListUsersRequest")
}
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::ListUsersResponse {
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 {
__users,
__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 ListUsersResponse")
}
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 {
"users" => Ok(__FieldTag::__users),
"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::ListUsersResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListUsersResponse")
}
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::__users => {
if !fields.insert(__FieldTag::__users) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for users",
));
}
result.users = map.next_value::<std::option::Option<std::vec::Vec<crate::model::User>>>()?.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::Connection {
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 {
__github_config,
__github_enterprise_config,
__gitlab_config,
__gitlab_enterprise_config,
__bitbucket_data_center_config,
__bitbucket_cloud_config,
__secure_source_manager_instance_config,
__http_config,
__name,
__create_time,
__update_time,
__delete_time,
__labels,
__installation_state,
__disabled,
__reconciling,
__annotations,
__etag,
__uid,
__crypto_key_config,
__git_proxy_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 Connection")
}
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 {
"githubConfig" => Ok(__FieldTag::__github_config),
"github_config" => Ok(__FieldTag::__github_config),
"githubEnterpriseConfig" => Ok(__FieldTag::__github_enterprise_config),
"github_enterprise_config" => {
Ok(__FieldTag::__github_enterprise_config)
}
"gitlabConfig" => Ok(__FieldTag::__gitlab_config),
"gitlab_config" => Ok(__FieldTag::__gitlab_config),
"gitlabEnterpriseConfig" => Ok(__FieldTag::__gitlab_enterprise_config),
"gitlab_enterprise_config" => {
Ok(__FieldTag::__gitlab_enterprise_config)
}
"bitbucketDataCenterConfig" => {
Ok(__FieldTag::__bitbucket_data_center_config)
}
"bitbucket_data_center_config" => {
Ok(__FieldTag::__bitbucket_data_center_config)
}
"bitbucketCloudConfig" => Ok(__FieldTag::__bitbucket_cloud_config),
"bitbucket_cloud_config" => Ok(__FieldTag::__bitbucket_cloud_config),
"secureSourceManagerInstanceConfig" => {
Ok(__FieldTag::__secure_source_manager_instance_config)
}
"secure_source_manager_instance_config" => {
Ok(__FieldTag::__secure_source_manager_instance_config)
}
"httpConfig" => Ok(__FieldTag::__http_config),
"http_config" => Ok(__FieldTag::__http_config),
"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),
"deleteTime" => Ok(__FieldTag::__delete_time),
"delete_time" => Ok(__FieldTag::__delete_time),
"labels" => Ok(__FieldTag::__labels),
"installationState" => Ok(__FieldTag::__installation_state),
"installation_state" => Ok(__FieldTag::__installation_state),
"disabled" => Ok(__FieldTag::__disabled),
"reconciling" => Ok(__FieldTag::__reconciling),
"annotations" => Ok(__FieldTag::__annotations),
"etag" => Ok(__FieldTag::__etag),
"uid" => Ok(__FieldTag::__uid),
"cryptoKeyConfig" => Ok(__FieldTag::__crypto_key_config),
"crypto_key_config" => Ok(__FieldTag::__crypto_key_config),
"gitProxyConfig" => Ok(__FieldTag::__git_proxy_config),
"git_proxy_config" => Ok(__FieldTag::__git_proxy_config),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::Connection;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct Connection")
}
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::__github_config => {
if !fields.insert(__FieldTag::__github_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for github_config",
));
}
if result.connection_config.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `connection_config`, a oneof with full ID .google.cloud.developerconnect.v1.Connection.github_config, latest field was githubConfig",
));
}
result.connection_config = std::option::Option::Some(
crate::model::connection::ConnectionConfig::GithubConfig(
map.next_value::<std::option::Option<
std::boxed::Box<crate::model::GitHubConfig>,
>>()?
.unwrap_or_default(),
),
);
}
__FieldTag::__github_enterprise_config => {
if !fields.insert(__FieldTag::__github_enterprise_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for github_enterprise_config",
));
}
if result.connection_config.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `connection_config`, a oneof with full ID .google.cloud.developerconnect.v1.Connection.github_enterprise_config, latest field was githubEnterpriseConfig",
));
}
result.connection_config = std::option::Option::Some(
crate::model::connection::ConnectionConfig::GithubEnterpriseConfig(
map.next_value::<std::option::Option<
std::boxed::Box<crate::model::GitHubEnterpriseConfig>,
>>()?
.unwrap_or_default(),
),
);
}
__FieldTag::__gitlab_config => {
if !fields.insert(__FieldTag::__gitlab_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for gitlab_config",
));
}
if result.connection_config.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `connection_config`, a oneof with full ID .google.cloud.developerconnect.v1.Connection.gitlab_config, latest field was gitlabConfig",
));
}
result.connection_config = std::option::Option::Some(
crate::model::connection::ConnectionConfig::GitlabConfig(
map.next_value::<std::option::Option<
std::boxed::Box<crate::model::GitLabConfig>,
>>()?
.unwrap_or_default(),
),
);
}
__FieldTag::__gitlab_enterprise_config => {
if !fields.insert(__FieldTag::__gitlab_enterprise_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for gitlab_enterprise_config",
));
}
if result.connection_config.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `connection_config`, a oneof with full ID .google.cloud.developerconnect.v1.Connection.gitlab_enterprise_config, latest field was gitlabEnterpriseConfig",
));
}
result.connection_config = std::option::Option::Some(
crate::model::connection::ConnectionConfig::GitlabEnterpriseConfig(
map.next_value::<std::option::Option<
std::boxed::Box<crate::model::GitLabEnterpriseConfig>,
>>()?
.unwrap_or_default(),
),
);
}
__FieldTag::__bitbucket_data_center_config => {
if !fields.insert(__FieldTag::__bitbucket_data_center_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for bitbucket_data_center_config",
));
}
if result.connection_config.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `connection_config`, a oneof with full ID .google.cloud.developerconnect.v1.Connection.bitbucket_data_center_config, latest field was bitbucketDataCenterConfig",
));
}
result.connection_config = std::option::Option::Some(
crate::model::connection::ConnectionConfig::BitbucketDataCenterConfig(
map.next_value::<std::option::Option<std::boxed::Box<crate::model::BitbucketDataCenterConfig>>>()?.unwrap_or_default()
),
);
}
__FieldTag::__bitbucket_cloud_config => {
if !fields.insert(__FieldTag::__bitbucket_cloud_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for bitbucket_cloud_config",
));
}
if result.connection_config.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `connection_config`, a oneof with full ID .google.cloud.developerconnect.v1.Connection.bitbucket_cloud_config, latest field was bitbucketCloudConfig",
));
}
result.connection_config = std::option::Option::Some(
crate::model::connection::ConnectionConfig::BitbucketCloudConfig(
map.next_value::<std::option::Option<
std::boxed::Box<crate::model::BitbucketCloudConfig>,
>>()?
.unwrap_or_default(),
),
);
}
__FieldTag::__secure_source_manager_instance_config => {
if !fields.insert(__FieldTag::__secure_source_manager_instance_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for secure_source_manager_instance_config",
));
}
if result.connection_config.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `connection_config`, a oneof with full ID .google.cloud.developerconnect.v1.Connection.secure_source_manager_instance_config, latest field was secureSourceManagerInstanceConfig",
));
}
result.connection_config = std::option::Option::Some(
crate::model::connection::ConnectionConfig::SecureSourceManagerInstanceConfig(
map.next_value::<std::option::Option<std::boxed::Box<crate::model::SecureSourceManagerInstanceConfig>>>()?.unwrap_or_default()
),
);
}
__FieldTag::__http_config => {
if !fields.insert(__FieldTag::__http_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for http_config",
));
}
if result.connection_config.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `connection_config`, a oneof with full ID .google.cloud.developerconnect.v1.Connection.http_config, latest field was httpConfig",
));
}
result.connection_config = std::option::Option::Some(
crate::model::connection::ConnectionConfig::HttpConfig(
map.next_value::<std::option::Option<
std::boxed::Box<crate::model::GenericHTTPEndpointConfig>,
>>()?
.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::__delete_time => {
if !fields.insert(__FieldTag::__delete_time) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for delete_time",
));
}
result.delete_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::__installation_state => {
if !fields.insert(__FieldTag::__installation_state) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for installation_state",
));
}
result.installation_state = map
.next_value::<std::option::Option<crate::model::InstallationState>>(
)?;
}
__FieldTag::__disabled => {
if !fields.insert(__FieldTag::__disabled) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for disabled",
));
}
result.disabled = map
.next_value::<std::option::Option<bool>>()?
.unwrap_or_default();
}
__FieldTag::__reconciling => {
if !fields.insert(__FieldTag::__reconciling) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for reconciling",
));
}
result.reconciling = map
.next_value::<std::option::Option<bool>>()?
.unwrap_or_default();
}
__FieldTag::__annotations => {
if !fields.insert(__FieldTag::__annotations) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for annotations",
));
}
result.annotations = map
.next_value::<std::option::Option<
std::collections::HashMap<
std::string::String,
std::string::String,
>,
>>()?
.unwrap_or_default();
}
__FieldTag::__etag => {
if !fields.insert(__FieldTag::__etag) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for etag",
));
}
result.etag = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__uid => {
if !fields.insert(__FieldTag::__uid) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for uid",
));
}
result.uid = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__crypto_key_config => {
if !fields.insert(__FieldTag::__crypto_key_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for crypto_key_config",
));
}
result.crypto_key_config = map
.next_value::<std::option::Option<crate::model::CryptoKeyConfig>>(
)?;
}
__FieldTag::__git_proxy_config => {
if !fields.insert(__FieldTag::__git_proxy_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for git_proxy_config",
));
}
result.git_proxy_config = map
.next_value::<std::option::Option<crate::model::GitProxyConfig>>(
)?;
}
__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::CryptoKeyConfig {
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 {
__key_reference,
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 CryptoKeyConfig")
}
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 {
"keyReference" => Ok(__FieldTag::__key_reference),
"key_reference" => Ok(__FieldTag::__key_reference),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::CryptoKeyConfig;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct CryptoKeyConfig")
}
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::__key_reference => {
if !fields.insert(__FieldTag::__key_reference) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for key_reference",
));
}
result.key_reference = 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::GitProxyConfig {
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 {
__enabled,
__http_proxy_base_uri,
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 GitProxyConfig")
}
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 {
"enabled" => Ok(__FieldTag::__enabled),
"httpProxyBaseUri" => Ok(__FieldTag::__http_proxy_base_uri),
"http_proxy_base_uri" => Ok(__FieldTag::__http_proxy_base_uri),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::GitProxyConfig;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GitProxyConfig")
}
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::__enabled => {
if !fields.insert(__FieldTag::__enabled) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for enabled",
));
}
result.enabled = map
.next_value::<std::option::Option<bool>>()?
.unwrap_or_default();
}
__FieldTag::__http_proxy_base_uri => {
if !fields.insert(__FieldTag::__http_proxy_base_uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for http_proxy_base_uri",
));
}
result.http_proxy_base_uri = 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::InstallationState {
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 {
__stage,
__message,
__action_uri,
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 InstallationState")
}
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 {
"stage" => Ok(__FieldTag::__stage),
"message" => Ok(__FieldTag::__message),
"actionUri" => Ok(__FieldTag::__action_uri),
"action_uri" => Ok(__FieldTag::__action_uri),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::InstallationState;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct InstallationState")
}
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::__stage => {
if !fields.insert(__FieldTag::__stage) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for stage",
));
}
result.stage = map.next_value::<std::option::Option<crate::model::installation_state::Stage>>()?.unwrap_or_default();
}
__FieldTag::__message => {
if !fields.insert(__FieldTag::__message) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for message",
));
}
result.message = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__action_uri => {
if !fields.insert(__FieldTag::__action_uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for action_uri",
));
}
result.action_uri = 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::GenericHTTPEndpointConfig {
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 {
__basic_authentication,
__bearer_token_authentication,
__host_uri,
__service_directory_config,
__ssl_ca_certificate,
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 GenericHTTPEndpointConfig")
}
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 {
"basicAuthentication" => Ok(__FieldTag::__basic_authentication),
"basic_authentication" => Ok(__FieldTag::__basic_authentication),
"bearerTokenAuthentication" => {
Ok(__FieldTag::__bearer_token_authentication)
}
"bearer_token_authentication" => {
Ok(__FieldTag::__bearer_token_authentication)
}
"hostUri" => Ok(__FieldTag::__host_uri),
"host_uri" => Ok(__FieldTag::__host_uri),
"serviceDirectoryConfig" => Ok(__FieldTag::__service_directory_config),
"service_directory_config" => {
Ok(__FieldTag::__service_directory_config)
}
"sslCaCertificate" => Ok(__FieldTag::__ssl_ca_certificate),
"ssl_ca_certificate" => Ok(__FieldTag::__ssl_ca_certificate),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::GenericHTTPEndpointConfig;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GenericHTTPEndpointConfig")
}
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::__basic_authentication => {
if !fields.insert(__FieldTag::__basic_authentication) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for basic_authentication",
));
}
if result.authentication.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `authentication`, a oneof with full ID .google.cloud.developerconnect.v1.GenericHTTPEndpointConfig.basic_authentication, latest field was basicAuthentication",
));
}
result.authentication = std::option::Option::Some(
crate::model::generic_http_endpoint_config::Authentication::BasicAuthentication(
map.next_value::<std::option::Option<std::boxed::Box<crate::model::generic_http_endpoint_config::BasicAuthentication>>>()?.unwrap_or_default()
),
);
}
__FieldTag::__bearer_token_authentication => {
if !fields.insert(__FieldTag::__bearer_token_authentication) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for bearer_token_authentication",
));
}
if result.authentication.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `authentication`, a oneof with full ID .google.cloud.developerconnect.v1.GenericHTTPEndpointConfig.bearer_token_authentication, latest field was bearerTokenAuthentication",
));
}
result.authentication = std::option::Option::Some(
crate::model::generic_http_endpoint_config::Authentication::BearerTokenAuthentication(
map.next_value::<std::option::Option<std::boxed::Box<crate::model::generic_http_endpoint_config::BearerTokenAuthentication>>>()?.unwrap_or_default()
),
);
}
__FieldTag::__host_uri => {
if !fields.insert(__FieldTag::__host_uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for host_uri",
));
}
result.host_uri = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__service_directory_config => {
if !fields.insert(__FieldTag::__service_directory_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for service_directory_config",
));
}
result.service_directory_config = map.next_value::<std::option::Option<crate::model::ServiceDirectoryConfig>>()?
;
}
__FieldTag::__ssl_ca_certificate => {
if !fields.insert(__FieldTag::__ssl_ca_certificate) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for ssl_ca_certificate",
));
}
result.ssl_ca_certificate = 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::generic_http_endpoint_config::BasicAuthentication {
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 {
__password_secret_version,
__username,
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 BasicAuthentication")
}
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 {
"passwordSecretVersion" => Ok(__FieldTag::__password_secret_version),
"password_secret_version" => Ok(__FieldTag::__password_secret_version),
"username" => Ok(__FieldTag::__username),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::generic_http_endpoint_config::BasicAuthentication;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct BasicAuthentication")
}
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::__password_secret_version => {
if !fields.insert(__FieldTag::__password_secret_version) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for password_secret_version",
));
}
if result.password.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `password`, a oneof with full ID .google.cloud.developerconnect.v1.GenericHTTPEndpointConfig.BasicAuthentication.password_secret_version, latest field was passwordSecretVersion",
));
}
result.password = std::option::Option::Some(
crate::model::generic_http_endpoint_config::basic_authentication::Password::PasswordSecretVersion(
map.next_value::<std::option::Option<std::string::String>>()?.unwrap_or_default()
),
);
}
__FieldTag::__username => {
if !fields.insert(__FieldTag::__username) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for username",
));
}
result.username = 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::generic_http_endpoint_config::BearerTokenAuthentication
{
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 {
__token_secret_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 BearerTokenAuthentication")
}
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 {
"tokenSecretVersion" => Ok(__FieldTag::__token_secret_version),
"token_secret_version" => Ok(__FieldTag::__token_secret_version),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::generic_http_endpoint_config::BearerTokenAuthentication;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct BearerTokenAuthentication")
}
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::__token_secret_version => {
if !fields.insert(__FieldTag::__token_secret_version) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for token_secret_version",
));
}
if result.token.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `token`, a oneof with full ID .google.cloud.developerconnect.v1.GenericHTTPEndpointConfig.BearerTokenAuthentication.token_secret_version, latest field was tokenSecretVersion",
));
}
result.token = std::option::Option::Some(
crate::model::generic_http_endpoint_config::bearer_token_authentication::Token::TokenSecretVersion(
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::GitHubConfig {
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 {
__github_app,
__authorizer_credential,
__app_installation_id,
__installation_uri,
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 GitHubConfig")
}
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 {
"githubApp" => Ok(__FieldTag::__github_app),
"github_app" => Ok(__FieldTag::__github_app),
"authorizerCredential" => Ok(__FieldTag::__authorizer_credential),
"authorizer_credential" => Ok(__FieldTag::__authorizer_credential),
"appInstallationId" => Ok(__FieldTag::__app_installation_id),
"app_installation_id" => Ok(__FieldTag::__app_installation_id),
"installationUri" => Ok(__FieldTag::__installation_uri),
"installation_uri" => Ok(__FieldTag::__installation_uri),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::GitHubConfig;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GitHubConfig")
}
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::__github_app => {
if !fields.insert(__FieldTag::__github_app) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for github_app",
));
}
result.github_app = map.next_value::<std::option::Option<crate::model::git_hub_config::GitHubApp>>()?.unwrap_or_default();
}
__FieldTag::__authorizer_credential => {
if !fields.insert(__FieldTag::__authorizer_credential) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for authorizer_credential",
));
}
result.authorizer_credential = map
.next_value::<std::option::Option<crate::model::OAuthCredential>>(
)?;
}
__FieldTag::__app_installation_id => {
if !fields.insert(__FieldTag::__app_installation_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for app_installation_id",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.app_installation_id =
map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__installation_uri => {
if !fields.insert(__FieldTag::__installation_uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for installation_uri",
));
}
result.installation_uri = 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::GitHubEnterpriseConfig {
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 {
__host_uri,
__app_id,
__app_slug,
__private_key_secret_version,
__webhook_secret_secret_version,
__app_installation_id,
__installation_uri,
__service_directory_config,
__server_version,
__ssl_ca_certificate,
__organization,
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 GitHubEnterpriseConfig")
}
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 {
"hostUri" => Ok(__FieldTag::__host_uri),
"host_uri" => Ok(__FieldTag::__host_uri),
"appId" => Ok(__FieldTag::__app_id),
"app_id" => Ok(__FieldTag::__app_id),
"appSlug" => Ok(__FieldTag::__app_slug),
"app_slug" => Ok(__FieldTag::__app_slug),
"privateKeySecretVersion" => {
Ok(__FieldTag::__private_key_secret_version)
}
"private_key_secret_version" => {
Ok(__FieldTag::__private_key_secret_version)
}
"webhookSecretSecretVersion" => {
Ok(__FieldTag::__webhook_secret_secret_version)
}
"webhook_secret_secret_version" => {
Ok(__FieldTag::__webhook_secret_secret_version)
}
"appInstallationId" => Ok(__FieldTag::__app_installation_id),
"app_installation_id" => Ok(__FieldTag::__app_installation_id),
"installationUri" => Ok(__FieldTag::__installation_uri),
"installation_uri" => Ok(__FieldTag::__installation_uri),
"serviceDirectoryConfig" => Ok(__FieldTag::__service_directory_config),
"service_directory_config" => {
Ok(__FieldTag::__service_directory_config)
}
"serverVersion" => Ok(__FieldTag::__server_version),
"server_version" => Ok(__FieldTag::__server_version),
"sslCaCertificate" => Ok(__FieldTag::__ssl_ca_certificate),
"ssl_ca_certificate" => Ok(__FieldTag::__ssl_ca_certificate),
"organization" => Ok(__FieldTag::__organization),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::GitHubEnterpriseConfig;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GitHubEnterpriseConfig")
}
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::__host_uri => {
if !fields.insert(__FieldTag::__host_uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for host_uri",
));
}
result.host_uri = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__app_id => {
if !fields.insert(__FieldTag::__app_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for app_id",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.app_id = map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__app_slug => {
if !fields.insert(__FieldTag::__app_slug) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for app_slug",
));
}
result.app_slug = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__private_key_secret_version => {
if !fields.insert(__FieldTag::__private_key_secret_version) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for private_key_secret_version",
));
}
result.private_key_secret_version = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__webhook_secret_secret_version => {
if !fields.insert(__FieldTag::__webhook_secret_secret_version) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for webhook_secret_secret_version",
));
}
result.webhook_secret_secret_version = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__app_installation_id => {
if !fields.insert(__FieldTag::__app_installation_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for app_installation_id",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.app_installation_id =
map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__installation_uri => {
if !fields.insert(__FieldTag::__installation_uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for installation_uri",
));
}
result.installation_uri = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__service_directory_config => {
if !fields.insert(__FieldTag::__service_directory_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for service_directory_config",
));
}
result.service_directory_config = map.next_value::<std::option::Option<crate::model::ServiceDirectoryConfig>>()?
;
}
__FieldTag::__server_version => {
if !fields.insert(__FieldTag::__server_version) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for server_version",
));
}
result.server_version = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__ssl_ca_certificate => {
if !fields.insert(__FieldTag::__ssl_ca_certificate) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for ssl_ca_certificate",
));
}
result.ssl_ca_certificate = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__organization => {
if !fields.insert(__FieldTag::__organization) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for organization",
));
}
result.organization = 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::ServiceDirectoryConfig {
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 {
__service,
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 ServiceDirectoryConfig")
}
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 {
"service" => Ok(__FieldTag::__service),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ServiceDirectoryConfig;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ServiceDirectoryConfig")
}
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::__service => {
if !fields.insert(__FieldTag::__service) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for service",
));
}
result.service = 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::OAuthCredential {
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 {
__oauth_token_secret_version,
__username,
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 OAuthCredential")
}
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 {
"oauthTokenSecretVersion" => {
Ok(__FieldTag::__oauth_token_secret_version)
}
"oauth_token_secret_version" => {
Ok(__FieldTag::__oauth_token_secret_version)
}
"username" => Ok(__FieldTag::__username),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::OAuthCredential;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct OAuthCredential")
}
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::__oauth_token_secret_version => {
if !fields.insert(__FieldTag::__oauth_token_secret_version) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for oauth_token_secret_version",
));
}
result.oauth_token_secret_version = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__username => {
if !fields.insert(__FieldTag::__username) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for username",
));
}
result.username = 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::GitLabConfig {
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 {
__webhook_secret_secret_version,
__read_authorizer_credential,
__authorizer_credential,
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 GitLabConfig")
}
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 {
"webhookSecretSecretVersion" => {
Ok(__FieldTag::__webhook_secret_secret_version)
}
"webhook_secret_secret_version" => {
Ok(__FieldTag::__webhook_secret_secret_version)
}
"readAuthorizerCredential" => {
Ok(__FieldTag::__read_authorizer_credential)
}
"read_authorizer_credential" => {
Ok(__FieldTag::__read_authorizer_credential)
}
"authorizerCredential" => Ok(__FieldTag::__authorizer_credential),
"authorizer_credential" => Ok(__FieldTag::__authorizer_credential),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::GitLabConfig;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GitLabConfig")
}
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::__webhook_secret_secret_version => {
if !fields.insert(__FieldTag::__webhook_secret_secret_version) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for webhook_secret_secret_version",
));
}
result.webhook_secret_secret_version = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__read_authorizer_credential => {
if !fields.insert(__FieldTag::__read_authorizer_credential) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for read_authorizer_credential",
));
}
result.read_authorizer_credential = map
.next_value::<std::option::Option<crate::model::UserCredential>>(
)?;
}
__FieldTag::__authorizer_credential => {
if !fields.insert(__FieldTag::__authorizer_credential) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for authorizer_credential",
));
}
result.authorizer_credential = map
.next_value::<std::option::Option<crate::model::UserCredential>>(
)?;
}
__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::UserCredential {
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 {
__user_token_secret_version,
__username,
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 UserCredential")
}
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 {
"userTokenSecretVersion" => Ok(__FieldTag::__user_token_secret_version),
"user_token_secret_version" => {
Ok(__FieldTag::__user_token_secret_version)
}
"username" => Ok(__FieldTag::__username),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::UserCredential;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct UserCredential")
}
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::__user_token_secret_version => {
if !fields.insert(__FieldTag::__user_token_secret_version) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for user_token_secret_version",
));
}
result.user_token_secret_version = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__username => {
if !fields.insert(__FieldTag::__username) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for username",
));
}
result.username = 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::GitLabEnterpriseConfig {
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 {
__host_uri,
__webhook_secret_secret_version,
__read_authorizer_credential,
__authorizer_credential,
__service_directory_config,
__ssl_ca_certificate,
__server_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 GitLabEnterpriseConfig")
}
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 {
"hostUri" => Ok(__FieldTag::__host_uri),
"host_uri" => Ok(__FieldTag::__host_uri),
"webhookSecretSecretVersion" => {
Ok(__FieldTag::__webhook_secret_secret_version)
}
"webhook_secret_secret_version" => {
Ok(__FieldTag::__webhook_secret_secret_version)
}
"readAuthorizerCredential" => {
Ok(__FieldTag::__read_authorizer_credential)
}
"read_authorizer_credential" => {
Ok(__FieldTag::__read_authorizer_credential)
}
"authorizerCredential" => Ok(__FieldTag::__authorizer_credential),
"authorizer_credential" => Ok(__FieldTag::__authorizer_credential),
"serviceDirectoryConfig" => Ok(__FieldTag::__service_directory_config),
"service_directory_config" => {
Ok(__FieldTag::__service_directory_config)
}
"sslCaCertificate" => Ok(__FieldTag::__ssl_ca_certificate),
"ssl_ca_certificate" => Ok(__FieldTag::__ssl_ca_certificate),
"serverVersion" => Ok(__FieldTag::__server_version),
"server_version" => Ok(__FieldTag::__server_version),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::GitLabEnterpriseConfig;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GitLabEnterpriseConfig")
}
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::__host_uri => {
if !fields.insert(__FieldTag::__host_uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for host_uri",
));
}
result.host_uri = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__webhook_secret_secret_version => {
if !fields.insert(__FieldTag::__webhook_secret_secret_version) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for webhook_secret_secret_version",
));
}
result.webhook_secret_secret_version = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__read_authorizer_credential => {
if !fields.insert(__FieldTag::__read_authorizer_credential) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for read_authorizer_credential",
));
}
result.read_authorizer_credential = map
.next_value::<std::option::Option<crate::model::UserCredential>>(
)?;
}
__FieldTag::__authorizer_credential => {
if !fields.insert(__FieldTag::__authorizer_credential) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for authorizer_credential",
));
}
result.authorizer_credential = map
.next_value::<std::option::Option<crate::model::UserCredential>>(
)?;
}
__FieldTag::__service_directory_config => {
if !fields.insert(__FieldTag::__service_directory_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for service_directory_config",
));
}
result.service_directory_config = map.next_value::<std::option::Option<crate::model::ServiceDirectoryConfig>>()?
;
}
__FieldTag::__ssl_ca_certificate => {
if !fields.insert(__FieldTag::__ssl_ca_certificate) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for ssl_ca_certificate",
));
}
result.ssl_ca_certificate = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__server_version => {
if !fields.insert(__FieldTag::__server_version) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for server_version",
));
}
result.server_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)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::BitbucketDataCenterConfig {
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 {
__host_uri,
__webhook_secret_secret_version,
__read_authorizer_credential,
__authorizer_credential,
__service_directory_config,
__ssl_ca_certificate,
__server_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 BitbucketDataCenterConfig")
}
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 {
"hostUri" => Ok(__FieldTag::__host_uri),
"host_uri" => Ok(__FieldTag::__host_uri),
"webhookSecretSecretVersion" => {
Ok(__FieldTag::__webhook_secret_secret_version)
}
"webhook_secret_secret_version" => {
Ok(__FieldTag::__webhook_secret_secret_version)
}
"readAuthorizerCredential" => {
Ok(__FieldTag::__read_authorizer_credential)
}
"read_authorizer_credential" => {
Ok(__FieldTag::__read_authorizer_credential)
}
"authorizerCredential" => Ok(__FieldTag::__authorizer_credential),
"authorizer_credential" => Ok(__FieldTag::__authorizer_credential),
"serviceDirectoryConfig" => Ok(__FieldTag::__service_directory_config),
"service_directory_config" => {
Ok(__FieldTag::__service_directory_config)
}
"sslCaCertificate" => Ok(__FieldTag::__ssl_ca_certificate),
"ssl_ca_certificate" => Ok(__FieldTag::__ssl_ca_certificate),
"serverVersion" => Ok(__FieldTag::__server_version),
"server_version" => Ok(__FieldTag::__server_version),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::BitbucketDataCenterConfig;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct BitbucketDataCenterConfig")
}
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::__host_uri => {
if !fields.insert(__FieldTag::__host_uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for host_uri",
));
}
result.host_uri = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__webhook_secret_secret_version => {
if !fields.insert(__FieldTag::__webhook_secret_secret_version) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for webhook_secret_secret_version",
));
}
result.webhook_secret_secret_version = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__read_authorizer_credential => {
if !fields.insert(__FieldTag::__read_authorizer_credential) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for read_authorizer_credential",
));
}
result.read_authorizer_credential = map
.next_value::<std::option::Option<crate::model::UserCredential>>(
)?;
}
__FieldTag::__authorizer_credential => {
if !fields.insert(__FieldTag::__authorizer_credential) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for authorizer_credential",
));
}
result.authorizer_credential = map
.next_value::<std::option::Option<crate::model::UserCredential>>(
)?;
}
__FieldTag::__service_directory_config => {
if !fields.insert(__FieldTag::__service_directory_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for service_directory_config",
));
}
result.service_directory_config = map.next_value::<std::option::Option<crate::model::ServiceDirectoryConfig>>()?
;
}
__FieldTag::__ssl_ca_certificate => {
if !fields.insert(__FieldTag::__ssl_ca_certificate) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for ssl_ca_certificate",
));
}
result.ssl_ca_certificate = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__server_version => {
if !fields.insert(__FieldTag::__server_version) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for server_version",
));
}
result.server_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)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::BitbucketCloudConfig {
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 {
__workspace,
__webhook_secret_secret_version,
__read_authorizer_credential,
__authorizer_credential,
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 BitbucketCloudConfig")
}
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 {
"workspace" => Ok(__FieldTag::__workspace),
"webhookSecretSecretVersion" => {
Ok(__FieldTag::__webhook_secret_secret_version)
}
"webhook_secret_secret_version" => {
Ok(__FieldTag::__webhook_secret_secret_version)
}
"readAuthorizerCredential" => {
Ok(__FieldTag::__read_authorizer_credential)
}
"read_authorizer_credential" => {
Ok(__FieldTag::__read_authorizer_credential)
}
"authorizerCredential" => Ok(__FieldTag::__authorizer_credential),
"authorizer_credential" => Ok(__FieldTag::__authorizer_credential),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::BitbucketCloudConfig;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct BitbucketCloudConfig")
}
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::__workspace => {
if !fields.insert(__FieldTag::__workspace) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for workspace",
));
}
result.workspace = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__webhook_secret_secret_version => {
if !fields.insert(__FieldTag::__webhook_secret_secret_version) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for webhook_secret_secret_version",
));
}
result.webhook_secret_secret_version = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__read_authorizer_credential => {
if !fields.insert(__FieldTag::__read_authorizer_credential) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for read_authorizer_credential",
));
}
result.read_authorizer_credential = map
.next_value::<std::option::Option<crate::model::UserCredential>>(
)?;
}
__FieldTag::__authorizer_credential => {
if !fields.insert(__FieldTag::__authorizer_credential) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for authorizer_credential",
));
}
result.authorizer_credential = map
.next_value::<std::option::Option<crate::model::UserCredential>>(
)?;
}
__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::SecureSourceManagerInstanceConfig {
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 {
__instance,
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 SecureSourceManagerInstanceConfig")
}
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 {
"instance" => Ok(__FieldTag::__instance),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::SecureSourceManagerInstanceConfig;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct SecureSourceManagerInstanceConfig")
}
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::__instance => {
if !fields.insert(__FieldTag::__instance) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for instance",
));
}
result.instance = 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::ListConnectionsRequest {
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 ListConnectionsRequest")
}
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::ListConnectionsRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListConnectionsRequest")
}
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::ListConnectionsResponse {
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 {
__connections,
__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 ListConnectionsResponse")
}
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 {
"connections" => Ok(__FieldTag::__connections),
"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::ListConnectionsResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListConnectionsResponse")
}
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::__connections => {
if !fields.insert(__FieldTag::__connections) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for connections",
));
}
result.connections = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Connection>>>()?.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::GetConnectionRequest {
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 GetConnectionRequest")
}
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::GetConnectionRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GetConnectionRequest")
}
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::CreateConnectionRequest {
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,
__connection_id,
__connection,
__request_id,
__validate_only,
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 CreateConnectionRequest")
}
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),
"connectionId" => Ok(__FieldTag::__connection_id),
"connection_id" => Ok(__FieldTag::__connection_id),
"connection" => Ok(__FieldTag::__connection),
"requestId" => Ok(__FieldTag::__request_id),
"request_id" => Ok(__FieldTag::__request_id),
"validateOnly" => Ok(__FieldTag::__validate_only),
"validate_only" => Ok(__FieldTag::__validate_only),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::CreateConnectionRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct CreateConnectionRequest")
}
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::__connection_id => {
if !fields.insert(__FieldTag::__connection_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for connection_id",
));
}
result.connection_id = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__connection => {
if !fields.insert(__FieldTag::__connection) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for connection",
));
}
result.connection =
map.next_value::<std::option::Option<crate::model::Connection>>()?;
}
__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::__validate_only => {
if !fields.insert(__FieldTag::__validate_only) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for validate_only",
));
}
result.validate_only = 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::UpdateConnectionRequest {
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,
__connection,
__request_id,
__allow_missing,
__validate_only,
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 UpdateConnectionRequest")
}
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),
"connection" => Ok(__FieldTag::__connection),
"requestId" => Ok(__FieldTag::__request_id),
"request_id" => Ok(__FieldTag::__request_id),
"allowMissing" => Ok(__FieldTag::__allow_missing),
"allow_missing" => Ok(__FieldTag::__allow_missing),
"validateOnly" => Ok(__FieldTag::__validate_only),
"validate_only" => Ok(__FieldTag::__validate_only),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::UpdateConnectionRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct UpdateConnectionRequest")
}
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::__connection => {
if !fields.insert(__FieldTag::__connection) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for connection",
));
}
result.connection =
map.next_value::<std::option::Option<crate::model::Connection>>()?;
}
__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::__allow_missing => {
if !fields.insert(__FieldTag::__allow_missing) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for allow_missing",
));
}
result.allow_missing = map
.next_value::<std::option::Option<bool>>()?
.unwrap_or_default();
}
__FieldTag::__validate_only => {
if !fields.insert(__FieldTag::__validate_only) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for validate_only",
));
}
result.validate_only = 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::DeleteConnectionRequest {
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,
__validate_only,
__etag,
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 DeleteConnectionRequest")
}
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),
"validateOnly" => Ok(__FieldTag::__validate_only),
"validate_only" => Ok(__FieldTag::__validate_only),
"etag" => Ok(__FieldTag::__etag),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::DeleteConnectionRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct DeleteConnectionRequest")
}
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::__validate_only => {
if !fields.insert(__FieldTag::__validate_only) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for validate_only",
));
}
result.validate_only = map
.next_value::<std::option::Option<bool>>()?
.unwrap_or_default();
}
__FieldTag::__etag => {
if !fields.insert(__FieldTag::__etag) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for etag",
));
}
result.etag = 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::ListAccountConnectorsRequest {
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 ListAccountConnectorsRequest")
}
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::ListAccountConnectorsRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListAccountConnectorsRequest")
}
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::ListAccountConnectorsResponse {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__account_connectors,
__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 ListAccountConnectorsResponse")
}
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 {
"accountConnectors" => Ok(__FieldTag::__account_connectors),
"account_connectors" => Ok(__FieldTag::__account_connectors),
"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::ListAccountConnectorsResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListAccountConnectorsResponse")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__account_connectors => {
if !fields.insert(__FieldTag::__account_connectors) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for account_connectors",
));
}
result.account_connectors =
map.next_value::<std::option::Option<
std::vec::Vec<crate::model::AccountConnector>,
>>()?
.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::GetAccountConnectorRequest {
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 GetAccountConnectorRequest")
}
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::GetAccountConnectorRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GetAccountConnectorRequest")
}
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::CreateAccountConnectorRequest {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__parent,
__account_connector_id,
__account_connector,
__request_id,
__validate_only,
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 CreateAccountConnectorRequest")
}
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),
"accountConnectorId" => Ok(__FieldTag::__account_connector_id),
"account_connector_id" => Ok(__FieldTag::__account_connector_id),
"accountConnector" => Ok(__FieldTag::__account_connector),
"account_connector" => Ok(__FieldTag::__account_connector),
"requestId" => Ok(__FieldTag::__request_id),
"request_id" => Ok(__FieldTag::__request_id),
"validateOnly" => Ok(__FieldTag::__validate_only),
"validate_only" => Ok(__FieldTag::__validate_only),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::CreateAccountConnectorRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct CreateAccountConnectorRequest")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__parent => {
if !fields.insert(__FieldTag::__parent) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for parent",
));
}
result.parent = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__account_connector_id => {
if !fields.insert(__FieldTag::__account_connector_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for account_connector_id",
));
}
result.account_connector_id = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__account_connector => {
if !fields.insert(__FieldTag::__account_connector) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for account_connector",
));
}
result.account_connector = map
.next_value::<std::option::Option<crate::model::AccountConnector>>(
)?;
}
__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::__validate_only => {
if !fields.insert(__FieldTag::__validate_only) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for validate_only",
));
}
result.validate_only = 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::UpdateAccountConnectorRequest {
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,
__account_connector,
__request_id,
__allow_missing,
__validate_only,
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 UpdateAccountConnectorRequest")
}
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),
"accountConnector" => Ok(__FieldTag::__account_connector),
"account_connector" => Ok(__FieldTag::__account_connector),
"requestId" => Ok(__FieldTag::__request_id),
"request_id" => Ok(__FieldTag::__request_id),
"allowMissing" => Ok(__FieldTag::__allow_missing),
"allow_missing" => Ok(__FieldTag::__allow_missing),
"validateOnly" => Ok(__FieldTag::__validate_only),
"validate_only" => Ok(__FieldTag::__validate_only),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::UpdateAccountConnectorRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct UpdateAccountConnectorRequest")
}
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::__account_connector => {
if !fields.insert(__FieldTag::__account_connector) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for account_connector",
));
}
result.account_connector = map
.next_value::<std::option::Option<crate::model::AccountConnector>>(
)?;
}
__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::__allow_missing => {
if !fields.insert(__FieldTag::__allow_missing) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for allow_missing",
));
}
result.allow_missing = map
.next_value::<std::option::Option<bool>>()?
.unwrap_or_default();
}
__FieldTag::__validate_only => {
if !fields.insert(__FieldTag::__validate_only) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for validate_only",
));
}
result.validate_only = 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::DeleteAccountConnectorRequest {
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,
__validate_only,
__etag,
__force,
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 DeleteAccountConnectorRequest")
}
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),
"validateOnly" => Ok(__FieldTag::__validate_only),
"validate_only" => Ok(__FieldTag::__validate_only),
"etag" => Ok(__FieldTag::__etag),
"force" => Ok(__FieldTag::__force),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::DeleteAccountConnectorRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct DeleteAccountConnectorRequest")
}
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::__validate_only => {
if !fields.insert(__FieldTag::__validate_only) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for validate_only",
));
}
result.validate_only = map
.next_value::<std::option::Option<bool>>()?
.unwrap_or_default();
}
__FieldTag::__etag => {
if !fields.insert(__FieldTag::__etag) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for etag",
));
}
result.etag = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__force => {
if !fields.insert(__FieldTag::__force) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for force",
));
}
result.force = 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::DeleteUserRequest {
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,
__validate_only,
__etag,
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 DeleteUserRequest")
}
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),
"validateOnly" => Ok(__FieldTag::__validate_only),
"validate_only" => Ok(__FieldTag::__validate_only),
"etag" => Ok(__FieldTag::__etag),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::DeleteUserRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct DeleteUserRequest")
}
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::__validate_only => {
if !fields.insert(__FieldTag::__validate_only) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for validate_only",
));
}
result.validate_only = map
.next_value::<std::option::Option<bool>>()?
.unwrap_or_default();
}
__FieldTag::__etag => {
if !fields.insert(__FieldTag::__etag) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for etag",
));
}
result.etag = 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)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::FetchSelfRequest {
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 FetchSelfRequest")
}
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::FetchSelfRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct FetchSelfRequest")
}
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::DeleteSelfRequest {
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 DeleteSelfRequest")
}
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::DeleteSelfRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct DeleteSelfRequest")
}
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::FetchAccessTokenRequest {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__account_connector,
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 FetchAccessTokenRequest")
}
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 {
"accountConnector" => Ok(__FieldTag::__account_connector),
"account_connector" => Ok(__FieldTag::__account_connector),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::FetchAccessTokenRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct FetchAccessTokenRequest")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__account_connector => {
if !fields.insert(__FieldTag::__account_connector) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for account_connector",
));
}
result.account_connector = 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::FetchAccessTokenResponse {
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 {
__token,
__expiration_time,
__scopes,
__exchange_error,
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 FetchAccessTokenResponse")
}
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 {
"token" => Ok(__FieldTag::__token),
"expirationTime" => Ok(__FieldTag::__expiration_time),
"expiration_time" => Ok(__FieldTag::__expiration_time),
"scopes" => Ok(__FieldTag::__scopes),
"exchangeError" => Ok(__FieldTag::__exchange_error),
"exchange_error" => Ok(__FieldTag::__exchange_error),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::FetchAccessTokenResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct FetchAccessTokenResponse")
}
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::__token => {
if !fields.insert(__FieldTag::__token) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for token",
));
}
result.token = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__expiration_time => {
if !fields.insert(__FieldTag::__expiration_time) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for expiration_time",
));
}
result.expiration_time =
map.next_value::<std::option::Option<wkt::Timestamp>>()?;
}
__FieldTag::__scopes => {
if !fields.insert(__FieldTag::__scopes) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for scopes",
));
}
result.scopes = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
}
__FieldTag::__exchange_error => {
if !fields.insert(__FieldTag::__exchange_error) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for exchange_error",
));
}
result.exchange_error = map
.next_value::<std::option::Option<crate::model::ExchangeError>>()?;
}
__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::StartOAuthRequest {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__account_connector,
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 StartOAuthRequest")
}
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 {
"accountConnector" => Ok(__FieldTag::__account_connector),
"account_connector" => Ok(__FieldTag::__account_connector),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::StartOAuthRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct StartOAuthRequest")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__account_connector => {
if !fields.insert(__FieldTag::__account_connector) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for account_connector",
));
}
result.account_connector = 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::StartOAuthResponse {
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 {
__system_provider_id,
__ticket,
__code_challenge,
__code_challenge_method,
__client_id,
__scopes,
__auth_uri,
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 StartOAuthResponse")
}
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 {
"systemProviderId" => Ok(__FieldTag::__system_provider_id),
"system_provider_id" => Ok(__FieldTag::__system_provider_id),
"ticket" => Ok(__FieldTag::__ticket),
"codeChallenge" => Ok(__FieldTag::__code_challenge),
"code_challenge" => Ok(__FieldTag::__code_challenge),
"codeChallengeMethod" => Ok(__FieldTag::__code_challenge_method),
"code_challenge_method" => Ok(__FieldTag::__code_challenge_method),
"clientId" => Ok(__FieldTag::__client_id),
"client_id" => Ok(__FieldTag::__client_id),
"scopes" => Ok(__FieldTag::__scopes),
"authUri" => Ok(__FieldTag::__auth_uri),
"auth_uri" => Ok(__FieldTag::__auth_uri),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::StartOAuthResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct StartOAuthResponse")
}
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::__system_provider_id => {
if !fields.insert(__FieldTag::__system_provider_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for system_provider_id",
));
}
if result.id.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `id`, a oneof with full ID .google.cloud.developerconnect.v1.StartOAuthResponse.system_provider_id, latest field was systemProviderId",
));
}
result.id = std::option::Option::Some(
crate::model::start_o_auth_response::Id::SystemProviderId(
map.next_value::<std::option::Option<crate::model::SystemProvider>>()?.unwrap_or_default()
),
);
}
__FieldTag::__ticket => {
if !fields.insert(__FieldTag::__ticket) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for ticket",
));
}
result.ticket = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__code_challenge => {
if !fields.insert(__FieldTag::__code_challenge) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for code_challenge",
));
}
result.code_challenge = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__code_challenge_method => {
if !fields.insert(__FieldTag::__code_challenge_method) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for code_challenge_method",
));
}
result.code_challenge_method = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__client_id => {
if !fields.insert(__FieldTag::__client_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for client_id",
));
}
result.client_id = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__scopes => {
if !fields.insert(__FieldTag::__scopes) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for scopes",
));
}
result.scopes = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
}
__FieldTag::__auth_uri => {
if !fields.insert(__FieldTag::__auth_uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for auth_uri",
));
}
result.auth_uri = 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::FinishOAuthRequest {
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 {
__oauth_params,
__google_oauth_params,
__account_connector,
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 FinishOAuthRequest")
}
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 {
"oauthParams" => Ok(__FieldTag::__oauth_params),
"oauth_params" => Ok(__FieldTag::__oauth_params),
"googleOauthParams" => Ok(__FieldTag::__google_oauth_params),
"google_oauth_params" => Ok(__FieldTag::__google_oauth_params),
"accountConnector" => Ok(__FieldTag::__account_connector),
"account_connector" => Ok(__FieldTag::__account_connector),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::FinishOAuthRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct FinishOAuthRequest")
}
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::__oauth_params => {
if !fields.insert(__FieldTag::__oauth_params) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for oauth_params",
));
}
if result.params.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `params`, a oneof with full ID .google.cloud.developerconnect.v1.FinishOAuthRequest.oauth_params, latest field was oauthParams",
));
}
result.params = std::option::Option::Some(
crate::model::finish_o_auth_request::Params::OauthParams(
map.next_value::<std::option::Option<
std::boxed::Box<
crate::model::finish_o_auth_request::OAuthParams,
>,
>>()?
.unwrap_or_default(),
),
);
}
__FieldTag::__google_oauth_params => {
if !fields.insert(__FieldTag::__google_oauth_params) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for google_oauth_params",
));
}
if result.params.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `params`, a oneof with full ID .google.cloud.developerconnect.v1.FinishOAuthRequest.google_oauth_params, latest field was googleOauthParams",
));
}
result.params = std::option::Option::Some(
crate::model::finish_o_auth_request::Params::GoogleOauthParams(
map.next_value::<std::option::Option<
std::boxed::Box<
crate::model::finish_o_auth_request::GoogleOAuthParams,
>,
>>()?
.unwrap_or_default(),
),
);
}
__FieldTag::__account_connector => {
if !fields.insert(__FieldTag::__account_connector) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for account_connector",
));
}
result.account_connector = 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::finish_o_auth_request::OAuthParams {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__code,
__ticket,
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 OAuthParams")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"code" => Ok(__FieldTag::__code),
"ticket" => Ok(__FieldTag::__ticket),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::finish_o_auth_request::OAuthParams;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct OAuthParams")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__code => {
if !fields.insert(__FieldTag::__code) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for code",
));
}
result.code = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__ticket => {
if !fields.insert(__FieldTag::__ticket) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for ticket",
));
}
result.ticket = 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::finish_o_auth_request::GoogleOAuthParams {
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 {
__scopes,
__version_info,
__ticket,
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 GoogleOAuthParams")
}
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 {
"scopes" => Ok(__FieldTag::__scopes),
"versionInfo" => Ok(__FieldTag::__version_info),
"version_info" => Ok(__FieldTag::__version_info),
"ticket" => Ok(__FieldTag::__ticket),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::finish_o_auth_request::GoogleOAuthParams;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GoogleOAuthParams")
}
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::__scopes => {
if !fields.insert(__FieldTag::__scopes) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for scopes",
));
}
result.scopes = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
}
__FieldTag::__version_info => {
if !fields.insert(__FieldTag::__version_info) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for version_info",
));
}
result.version_info = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__ticket => {
if !fields.insert(__FieldTag::__ticket) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for ticket",
));
}
result.ticket = 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::FinishOAuthResponse {
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 {
__exchange_error,
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 FinishOAuthResponse")
}
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 {
"exchangeError" => Ok(__FieldTag::__exchange_error),
"exchange_error" => Ok(__FieldTag::__exchange_error),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::FinishOAuthResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct FinishOAuthResponse")
}
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::__exchange_error => {
if !fields.insert(__FieldTag::__exchange_error) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for exchange_error",
));
}
result.exchange_error = map
.next_value::<std::option::Option<crate::model::ExchangeError>>()?;
}
__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::ExchangeError {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[allow(non_camel_case_types)]
#[doc(hidden)]
#[derive(PartialEq, Eq, Hash)]
enum __FieldTag {
__code,
__description,
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 ExchangeError")
}
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
where
E: serde::de::Error,
{
use std::result::Result::Ok;
use std::string::ToString;
match value {
"code" => Ok(__FieldTag::__code),
"description" => Ok(__FieldTag::__description),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ExchangeError;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ExchangeError")
}
fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
where
A: serde::de::MapAccess<'de>,
{
#[allow(unused_imports)]
use serde::de::Error;
use std::option::Option::Some;
let mut fields = std::collections::HashSet::new();
let mut result = Self::Value::new();
while let Some(tag) = map.next_key::<__FieldTag>()? {
#[allow(clippy::match_single_binding)]
match tag {
__FieldTag::__code => {
if !fields.insert(__FieldTag::__code) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for code",
));
}
result.code = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__description => {
if !fields.insert(__FieldTag::__description) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for description",
));
}
result.description = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::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::GitRepositoryLink {
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,
__clone_uri,
__create_time,
__update_time,
__delete_time,
__labels,
__etag,
__reconciling,
__annotations,
__uid,
__webhook_id,
__git_proxy_uri,
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 GitRepositoryLink")
}
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),
"cloneUri" => Ok(__FieldTag::__clone_uri),
"clone_uri" => Ok(__FieldTag::__clone_uri),
"createTime" => Ok(__FieldTag::__create_time),
"create_time" => Ok(__FieldTag::__create_time),
"updateTime" => Ok(__FieldTag::__update_time),
"update_time" => Ok(__FieldTag::__update_time),
"deleteTime" => Ok(__FieldTag::__delete_time),
"delete_time" => Ok(__FieldTag::__delete_time),
"labels" => Ok(__FieldTag::__labels),
"etag" => Ok(__FieldTag::__etag),
"reconciling" => Ok(__FieldTag::__reconciling),
"annotations" => Ok(__FieldTag::__annotations),
"uid" => Ok(__FieldTag::__uid),
"webhookId" => Ok(__FieldTag::__webhook_id),
"webhook_id" => Ok(__FieldTag::__webhook_id),
"gitProxyUri" => Ok(__FieldTag::__git_proxy_uri),
"git_proxy_uri" => Ok(__FieldTag::__git_proxy_uri),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::GitRepositoryLink;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GitRepositoryLink")
}
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::__clone_uri => {
if !fields.insert(__FieldTag::__clone_uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for clone_uri",
));
}
result.clone_uri = 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::__delete_time => {
if !fields.insert(__FieldTag::__delete_time) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for delete_time",
));
}
result.delete_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::__etag => {
if !fields.insert(__FieldTag::__etag) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for etag",
));
}
result.etag = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__reconciling => {
if !fields.insert(__FieldTag::__reconciling) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for reconciling",
));
}
result.reconciling = map
.next_value::<std::option::Option<bool>>()?
.unwrap_or_default();
}
__FieldTag::__annotations => {
if !fields.insert(__FieldTag::__annotations) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for annotations",
));
}
result.annotations = map
.next_value::<std::option::Option<
std::collections::HashMap<
std::string::String,
std::string::String,
>,
>>()?
.unwrap_or_default();
}
__FieldTag::__uid => {
if !fields.insert(__FieldTag::__uid) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for uid",
));
}
result.uid = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__webhook_id => {
if !fields.insert(__FieldTag::__webhook_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for webhook_id",
));
}
result.webhook_id = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__git_proxy_uri => {
if !fields.insert(__FieldTag::__git_proxy_uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for git_proxy_uri",
));
}
result.git_proxy_uri = 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::CreateGitRepositoryLinkRequest {
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,
__git_repository_link,
__git_repository_link_id,
__request_id,
__validate_only,
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 CreateGitRepositoryLinkRequest")
}
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),
"gitRepositoryLink" => Ok(__FieldTag::__git_repository_link),
"git_repository_link" => Ok(__FieldTag::__git_repository_link),
"gitRepositoryLinkId" => Ok(__FieldTag::__git_repository_link_id),
"git_repository_link_id" => Ok(__FieldTag::__git_repository_link_id),
"requestId" => Ok(__FieldTag::__request_id),
"request_id" => Ok(__FieldTag::__request_id),
"validateOnly" => Ok(__FieldTag::__validate_only),
"validate_only" => Ok(__FieldTag::__validate_only),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::CreateGitRepositoryLinkRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct CreateGitRepositoryLinkRequest")
}
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::__git_repository_link => {
if !fields.insert(__FieldTag::__git_repository_link) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for git_repository_link",
));
}
result.git_repository_link = map
.next_value::<std::option::Option<crate::model::GitRepositoryLink>>(
)?;
}
__FieldTag::__git_repository_link_id => {
if !fields.insert(__FieldTag::__git_repository_link_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for git_repository_link_id",
));
}
result.git_repository_link_id = 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::__validate_only => {
if !fields.insert(__FieldTag::__validate_only) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for validate_only",
));
}
result.validate_only = 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::DeleteGitRepositoryLinkRequest {
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,
__validate_only,
__etag,
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 DeleteGitRepositoryLinkRequest")
}
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),
"validateOnly" => Ok(__FieldTag::__validate_only),
"validate_only" => Ok(__FieldTag::__validate_only),
"etag" => Ok(__FieldTag::__etag),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::DeleteGitRepositoryLinkRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct DeleteGitRepositoryLinkRequest")
}
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::__validate_only => {
if !fields.insert(__FieldTag::__validate_only) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for validate_only",
));
}
result.validate_only = map
.next_value::<std::option::Option<bool>>()?
.unwrap_or_default();
}
__FieldTag::__etag => {
if !fields.insert(__FieldTag::__etag) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for etag",
));
}
result.etag = 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::ListGitRepositoryLinksRequest {
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 ListGitRepositoryLinksRequest")
}
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::ListGitRepositoryLinksRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListGitRepositoryLinksRequest")
}
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::ListGitRepositoryLinksResponse {
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 {
__git_repository_links,
__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 ListGitRepositoryLinksResponse")
}
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 {
"gitRepositoryLinks" => Ok(__FieldTag::__git_repository_links),
"git_repository_links" => Ok(__FieldTag::__git_repository_links),
"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::ListGitRepositoryLinksResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListGitRepositoryLinksResponse")
}
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::__git_repository_links => {
if !fields.insert(__FieldTag::__git_repository_links) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for git_repository_links",
));
}
result.git_repository_links =
map.next_value::<std::option::Option<
std::vec::Vec<crate::model::GitRepositoryLink>,
>>()?
.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::GetGitRepositoryLinkRequest {
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 GetGitRepositoryLinkRequest")
}
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::GetGitRepositoryLinkRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GetGitRepositoryLinkRequest")
}
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::FetchReadWriteTokenRequest {
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 {
__git_repository_link,
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 FetchReadWriteTokenRequest")
}
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 {
"gitRepositoryLink" => Ok(__FieldTag::__git_repository_link),
"git_repository_link" => Ok(__FieldTag::__git_repository_link),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::FetchReadWriteTokenRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct FetchReadWriteTokenRequest")
}
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::__git_repository_link => {
if !fields.insert(__FieldTag::__git_repository_link) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for git_repository_link",
));
}
result.git_repository_link = 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::FetchReadTokenRequest {
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 {
__git_repository_link,
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 FetchReadTokenRequest")
}
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 {
"gitRepositoryLink" => Ok(__FieldTag::__git_repository_link),
"git_repository_link" => Ok(__FieldTag::__git_repository_link),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::FetchReadTokenRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct FetchReadTokenRequest")
}
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::__git_repository_link => {
if !fields.insert(__FieldTag::__git_repository_link) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for git_repository_link",
));
}
result.git_repository_link = 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::FetchReadTokenResponse {
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 {
__token,
__expiration_time,
__git_username,
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 FetchReadTokenResponse")
}
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 {
"token" => Ok(__FieldTag::__token),
"expirationTime" => Ok(__FieldTag::__expiration_time),
"expiration_time" => Ok(__FieldTag::__expiration_time),
"gitUsername" => Ok(__FieldTag::__git_username),
"git_username" => Ok(__FieldTag::__git_username),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::FetchReadTokenResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct FetchReadTokenResponse")
}
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::__token => {
if !fields.insert(__FieldTag::__token) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for token",
));
}
result.token = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__expiration_time => {
if !fields.insert(__FieldTag::__expiration_time) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for expiration_time",
));
}
result.expiration_time =
map.next_value::<std::option::Option<wkt::Timestamp>>()?;
}
__FieldTag::__git_username => {
if !fields.insert(__FieldTag::__git_username) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for git_username",
));
}
result.git_username = 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::FetchReadWriteTokenResponse {
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 {
__token,
__expiration_time,
__git_username,
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 FetchReadWriteTokenResponse")
}
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 {
"token" => Ok(__FieldTag::__token),
"expirationTime" => Ok(__FieldTag::__expiration_time),
"expiration_time" => Ok(__FieldTag::__expiration_time),
"gitUsername" => Ok(__FieldTag::__git_username),
"git_username" => Ok(__FieldTag::__git_username),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::FetchReadWriteTokenResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct FetchReadWriteTokenResponse")
}
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::__token => {
if !fields.insert(__FieldTag::__token) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for token",
));
}
result.token = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__expiration_time => {
if !fields.insert(__FieldTag::__expiration_time) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for expiration_time",
));
}
result.expiration_time =
map.next_value::<std::option::Option<wkt::Timestamp>>()?;
}
__FieldTag::__git_username => {
if !fields.insert(__FieldTag::__git_username) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for git_username",
));
}
result.git_username = 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::FetchLinkableGitRepositoriesRequest {
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 {
__connection,
__page_size,
__page_token,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for FetchLinkableGitRepositoriesRequest")
}
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 {
"connection" => Ok(__FieldTag::__connection),
"pageSize" => Ok(__FieldTag::__page_size),
"page_size" => Ok(__FieldTag::__page_size),
"pageToken" => Ok(__FieldTag::__page_token),
"page_token" => Ok(__FieldTag::__page_token),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::FetchLinkableGitRepositoriesRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct FetchLinkableGitRepositoriesRequest")
}
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::__connection => {
if !fields.insert(__FieldTag::__connection) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for connection",
));
}
result.connection = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__page_size => {
if !fields.insert(__FieldTag::__page_size) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for page_size",
));
}
struct __With(std::option::Option<i32>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
}
}
result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__page_token => {
if !fields.insert(__FieldTag::__page_token) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for page_token",
));
}
result.page_token = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::FetchLinkableGitRepositoriesResponse {
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 {
__linkable_git_repositories,
__next_page_token,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for FetchLinkableGitRepositoriesResponse")
}
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 {
"linkableGitRepositories" => {
Ok(__FieldTag::__linkable_git_repositories)
}
"linkable_git_repositories" => {
Ok(__FieldTag::__linkable_git_repositories)
}
"nextPageToken" => Ok(__FieldTag::__next_page_token),
"next_page_token" => Ok(__FieldTag::__next_page_token),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::FetchLinkableGitRepositoriesResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct FetchLinkableGitRepositoriesResponse")
}
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::__linkable_git_repositories => {
if !fields.insert(__FieldTag::__linkable_git_repositories) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for linkable_git_repositories",
));
}
result.linkable_git_repositories = map
.next_value::<std::option::Option<
std::vec::Vec<crate::model::LinkableGitRepository>,
>>()?
.unwrap_or_default();
}
__FieldTag::__next_page_token => {
if !fields.insert(__FieldTag::__next_page_token) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for next_page_token",
));
}
result.next_page_token = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::LinkableGitRepository {
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 {
__clone_uri,
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 LinkableGitRepository")
}
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 {
"cloneUri" => Ok(__FieldTag::__clone_uri),
"clone_uri" => Ok(__FieldTag::__clone_uri),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::LinkableGitRepository;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct LinkableGitRepository")
}
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::__clone_uri => {
if !fields.insert(__FieldTag::__clone_uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for clone_uri",
));
}
result.clone_uri = 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::FetchGitHubInstallationsRequest {
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 {
__connection,
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 FetchGitHubInstallationsRequest")
}
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 {
"connection" => Ok(__FieldTag::__connection),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::FetchGitHubInstallationsRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct FetchGitHubInstallationsRequest")
}
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::__connection => {
if !fields.insert(__FieldTag::__connection) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for connection",
));
}
result.connection = 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::FetchGitHubInstallationsResponse {
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 {
__installations,
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 FetchGitHubInstallationsResponse")
}
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 {
"installations" => Ok(__FieldTag::__installations),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::FetchGitHubInstallationsResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct FetchGitHubInstallationsResponse")
}
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::__installations => {
if !fields.insert(__FieldTag::__installations) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for installations",
));
}
result.installations = map.next_value::<std::option::Option<std::vec::Vec<crate::model::fetch_git_hub_installations_response::Installation>>>()?.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::fetch_git_hub_installations_response::Installation
{
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 {
__id,
__name,
__type,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for Installation")
}
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 {
"id" => Ok(__FieldTag::__id),
"name" => Ok(__FieldTag::__name),
"type" => Ok(__FieldTag::__type),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::fetch_git_hub_installations_response::Installation;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct Installation")
}
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::__id => {
if !fields.insert(__FieldTag::__id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for id",
));
}
struct __With(std::option::Option<i64>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
}
}
result.id = map.next_value::<__With>()?.0.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::__type => {
if !fields.insert(__FieldTag::__type) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for type",
));
}
result.r#type = 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::FetchGitRefsRequest {
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 {
__git_repository_link,
__ref_type,
__page_size,
__page_token,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for FetchGitRefsRequest")
}
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 {
"gitRepositoryLink" => Ok(__FieldTag::__git_repository_link),
"git_repository_link" => Ok(__FieldTag::__git_repository_link),
"refType" => Ok(__FieldTag::__ref_type),
"ref_type" => Ok(__FieldTag::__ref_type),
"pageSize" => Ok(__FieldTag::__page_size),
"page_size" => Ok(__FieldTag::__page_size),
"pageToken" => Ok(__FieldTag::__page_token),
"page_token" => Ok(__FieldTag::__page_token),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::FetchGitRefsRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct FetchGitRefsRequest")
}
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::__git_repository_link => {
if !fields.insert(__FieldTag::__git_repository_link) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for git_repository_link",
));
}
result.git_repository_link = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__ref_type => {
if !fields.insert(__FieldTag::__ref_type) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for ref_type",
));
}
result.ref_type =
map.next_value::<std::option::Option<
crate::model::fetch_git_refs_request::RefType,
>>()?
.unwrap_or_default();
}
__FieldTag::__page_size => {
if !fields.insert(__FieldTag::__page_size) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for page_size",
));
}
struct __With(std::option::Option<i32>);
impl<'de> serde::de::Deserialize<'de> for __With {
fn deserialize<D>(
deserializer: D,
) -> std::result::Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
}
}
result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
}
__FieldTag::__page_token => {
if !fields.insert(__FieldTag::__page_token) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for page_token",
));
}
result.page_token = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::FetchGitRefsResponse {
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 {
__ref_names,
__next_page_token,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for FetchGitRefsResponse")
}
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 {
"refNames" => Ok(__FieldTag::__ref_names),
"ref_names" => Ok(__FieldTag::__ref_names),
"nextPageToken" => Ok(__FieldTag::__next_page_token),
"next_page_token" => Ok(__FieldTag::__next_page_token),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::FetchGitRefsResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct FetchGitRefsResponse")
}
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::__ref_names => {
if !fields.insert(__FieldTag::__ref_names) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for ref_names",
));
}
result.ref_names = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
}
__FieldTag::__next_page_token => {
if !fields.insert(__FieldTag::__next_page_token) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for next_page_token",
));
}
result.next_page_token = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::AccountConnector {
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 {
__provider_oauth_config,
__name,
__create_time,
__update_time,
__annotations,
__etag,
__labels,
__oauth_start_uri,
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 AccountConnector")
}
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 {
"providerOauthConfig" => Ok(__FieldTag::__provider_oauth_config),
"provider_oauth_config" => Ok(__FieldTag::__provider_oauth_config),
"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),
"annotations" => Ok(__FieldTag::__annotations),
"etag" => Ok(__FieldTag::__etag),
"labels" => Ok(__FieldTag::__labels),
"oauthStartUri" => Ok(__FieldTag::__oauth_start_uri),
"oauth_start_uri" => Ok(__FieldTag::__oauth_start_uri),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::AccountConnector;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct AccountConnector")
}
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::__provider_oauth_config => {
if !fields.insert(__FieldTag::__provider_oauth_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for provider_oauth_config",
));
}
if result.account_connector_config.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `account_connector_config`, a oneof with full ID .google.cloud.developerconnect.v1.AccountConnector.provider_oauth_config, latest field was providerOauthConfig",
));
}
result.account_connector_config = std::option::Option::Some(
crate::model::account_connector::AccountConnectorConfig::ProviderOauthConfig(
map.next_value::<std::option::Option<std::boxed::Box<crate::model::ProviderOAuthConfig>>>()?.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::__annotations => {
if !fields.insert(__FieldTag::__annotations) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for annotations",
));
}
result.annotations = map
.next_value::<std::option::Option<
std::collections::HashMap<
std::string::String,
std::string::String,
>,
>>()?
.unwrap_or_default();
}
__FieldTag::__etag => {
if !fields.insert(__FieldTag::__etag) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for etag",
));
}
result.etag = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__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::__oauth_start_uri => {
if !fields.insert(__FieldTag::__oauth_start_uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for oauth_start_uri",
));
}
result.oauth_start_uri = 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::User {
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,
__display_name,
__create_time,
__last_token_request_time,
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 User")
}
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),
"displayName" => Ok(__FieldTag::__display_name),
"display_name" => Ok(__FieldTag::__display_name),
"createTime" => Ok(__FieldTag::__create_time),
"create_time" => Ok(__FieldTag::__create_time),
"lastTokenRequestTime" => Ok(__FieldTag::__last_token_request_time),
"last_token_request_time" => Ok(__FieldTag::__last_token_request_time),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::User;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct User")
}
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::__display_name => {
if !fields.insert(__FieldTag::__display_name) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for display_name",
));
}
result.display_name = map
.next_value::<std::option::Option<std::string::String>>()?
.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::__last_token_request_time => {
if !fields.insert(__FieldTag::__last_token_request_time) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for last_token_request_time",
));
}
result.last_token_request_time =
map.next_value::<std::option::Option<wkt::Timestamp>>()?;
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::ProviderOAuthConfig {
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 {
__system_provider_id,
__scopes,
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 ProviderOAuthConfig")
}
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 {
"systemProviderId" => Ok(__FieldTag::__system_provider_id),
"system_provider_id" => Ok(__FieldTag::__system_provider_id),
"scopes" => Ok(__FieldTag::__scopes),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ProviderOAuthConfig;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ProviderOAuthConfig")
}
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::__system_provider_id => {
if !fields.insert(__FieldTag::__system_provider_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for system_provider_id",
));
}
if result.oauth_provider_id.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `oauth_provider_id`, a oneof with full ID .google.cloud.developerconnect.v1.ProviderOAuthConfig.system_provider_id, latest field was systemProviderId",
));
}
result.oauth_provider_id = std::option::Option::Some(
crate::model::provider_o_auth_config::OauthProviderId::SystemProviderId(
map.next_value::<std::option::Option<crate::model::SystemProvider>>()?.unwrap_or_default()
),
);
}
__FieldTag::__scopes => {
if !fields.insert(__FieldTag::__scopes) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for scopes",
));
}
result.scopes = 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::InsightsConfig {
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 {
__app_hub_application,
__projects,
__name,
__create_time,
__update_time,
__runtime_configs,
__artifact_configs,
__state,
__annotations,
__labels,
__reconciling,
__errors,
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 InsightsConfig")
}
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 {
"appHubApplication" => Ok(__FieldTag::__app_hub_application),
"app_hub_application" => Ok(__FieldTag::__app_hub_application),
"projects" => Ok(__FieldTag::__projects),
"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),
"runtimeConfigs" => Ok(__FieldTag::__runtime_configs),
"runtime_configs" => Ok(__FieldTag::__runtime_configs),
"artifactConfigs" => Ok(__FieldTag::__artifact_configs),
"artifact_configs" => Ok(__FieldTag::__artifact_configs),
"state" => Ok(__FieldTag::__state),
"annotations" => Ok(__FieldTag::__annotations),
"labels" => Ok(__FieldTag::__labels),
"reconciling" => Ok(__FieldTag::__reconciling),
"errors" => Ok(__FieldTag::__errors),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::InsightsConfig;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct InsightsConfig")
}
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::__app_hub_application => {
if !fields.insert(__FieldTag::__app_hub_application) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for app_hub_application",
));
}
if result.insights_config_context.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `insights_config_context`, a oneof with full ID .google.cloud.developerconnect.v1.InsightsConfig.app_hub_application, latest field was appHubApplication",
));
}
result.insights_config_context = std::option::Option::Some(
crate::model::insights_config::InsightsConfigContext::AppHubApplication(
map.next_value::<std::option::Option<std::string::String>>()?.unwrap_or_default()
),
);
}
__FieldTag::__projects => {
if !fields.insert(__FieldTag::__projects) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for projects",
));
}
if result.insights_config_context.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `insights_config_context`, a oneof with full ID .google.cloud.developerconnect.v1.InsightsConfig.projects, latest field was projects",
));
}
result.insights_config_context = std::option::Option::Some(
crate::model::insights_config::InsightsConfigContext::Projects(
map.next_value::<std::option::Option<
std::boxed::Box<crate::model::Projects>,
>>()?
.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::__runtime_configs => {
if !fields.insert(__FieldTag::__runtime_configs) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for runtime_configs",
));
}
result.runtime_configs = map.next_value::<std::option::Option<std::vec::Vec<crate::model::RuntimeConfig>>>()?.unwrap_or_default();
}
__FieldTag::__artifact_configs => {
if !fields.insert(__FieldTag::__artifact_configs) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for artifact_configs",
));
}
result.artifact_configs =
map.next_value::<std::option::Option<
std::vec::Vec<crate::model::ArtifactConfig>,
>>()?
.unwrap_or_default();
}
__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::insights_config::State>>()?.unwrap_or_default();
}
__FieldTag::__annotations => {
if !fields.insert(__FieldTag::__annotations) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for annotations",
));
}
result.annotations = map
.next_value::<std::option::Option<
std::collections::HashMap<
std::string::String,
std::string::String,
>,
>>()?
.unwrap_or_default();
}
__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::__reconciling => {
if !fields.insert(__FieldTag::__reconciling) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for reconciling",
));
}
result.reconciling = map
.next_value::<std::option::Option<bool>>()?
.unwrap_or_default();
}
__FieldTag::__errors => {
if !fields.insert(__FieldTag::__errors) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for errors",
));
}
result.errors =
map.next_value::<std::option::Option<
std::vec::Vec<google_cloud_rpc::model::Status>,
>>()?
.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::Projects {
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 {
__project_ids,
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 Projects")
}
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 {
"projectIds" => Ok(__FieldTag::__project_ids),
"project_ids" => Ok(__FieldTag::__project_ids),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::Projects;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct Projects")
}
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::__project_ids => {
if !fields.insert(__FieldTag::__project_ids) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for project_ids",
));
}
result.project_ids = 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::RuntimeConfig {
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 {
__gke_workload,
__google_cloud_run,
__app_hub_workload,
__app_hub_service,
__uri,
__state,
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 RuntimeConfig")
}
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 {
"gkeWorkload" => Ok(__FieldTag::__gke_workload),
"gke_workload" => Ok(__FieldTag::__gke_workload),
"googleCloudRun" => Ok(__FieldTag::__google_cloud_run),
"google_cloud_run" => Ok(__FieldTag::__google_cloud_run),
"appHubWorkload" => Ok(__FieldTag::__app_hub_workload),
"app_hub_workload" => Ok(__FieldTag::__app_hub_workload),
"appHubService" => Ok(__FieldTag::__app_hub_service),
"app_hub_service" => Ok(__FieldTag::__app_hub_service),
"uri" => Ok(__FieldTag::__uri),
"state" => Ok(__FieldTag::__state),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::RuntimeConfig;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct RuntimeConfig")
}
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::__gke_workload => {
if !fields.insert(__FieldTag::__gke_workload) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for gke_workload",
));
}
if result.runtime.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `runtime`, a oneof with full ID .google.cloud.developerconnect.v1.RuntimeConfig.gke_workload, latest field was gkeWorkload",
));
}
result.runtime = std::option::Option::Some(
crate::model::runtime_config::Runtime::GkeWorkload(
map.next_value::<std::option::Option<
std::boxed::Box<crate::model::GKEWorkload>,
>>()?
.unwrap_or_default(),
),
);
}
__FieldTag::__google_cloud_run => {
if !fields.insert(__FieldTag::__google_cloud_run) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for google_cloud_run",
));
}
if result.runtime.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `runtime`, a oneof with full ID .google.cloud.developerconnect.v1.RuntimeConfig.google_cloud_run, latest field was googleCloudRun",
));
}
result.runtime = std::option::Option::Some(
crate::model::runtime_config::Runtime::GoogleCloudRun(
map.next_value::<std::option::Option<
std::boxed::Box<crate::model::GoogleCloudRun>,
>>()?
.unwrap_or_default(),
),
);
}
__FieldTag::__app_hub_workload => {
if !fields.insert(__FieldTag::__app_hub_workload) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for app_hub_workload",
));
}
if result.derived_from.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `derived_from`, a oneof with full ID .google.cloud.developerconnect.v1.RuntimeConfig.app_hub_workload, latest field was appHubWorkload",
));
}
result.derived_from = std::option::Option::Some(
crate::model::runtime_config::DerivedFrom::AppHubWorkload(
map.next_value::<std::option::Option<
std::boxed::Box<crate::model::AppHubWorkload>,
>>()?
.unwrap_or_default(),
),
);
}
__FieldTag::__app_hub_service => {
if !fields.insert(__FieldTag::__app_hub_service) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for app_hub_service",
));
}
if result.derived_from.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `derived_from`, a oneof with full ID .google.cloud.developerconnect.v1.RuntimeConfig.app_hub_service, latest field was appHubService",
));
}
result.derived_from = std::option::Option::Some(
crate::model::runtime_config::DerivedFrom::AppHubService(
map.next_value::<std::option::Option<
std::boxed::Box<crate::model::AppHubService>,
>>()?
.unwrap_or_default(),
),
);
}
__FieldTag::__uri => {
if !fields.insert(__FieldTag::__uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for uri",
));
}
result.uri = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__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::runtime_config::State>>()?.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::GKEWorkload {
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 {
__cluster,
__deployment,
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 GKEWorkload")
}
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 {
"cluster" => Ok(__FieldTag::__cluster),
"deployment" => Ok(__FieldTag::__deployment),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::GKEWorkload;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GKEWorkload")
}
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::__cluster => {
if !fields.insert(__FieldTag::__cluster) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for cluster",
));
}
result.cluster = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__deployment => {
if !fields.insert(__FieldTag::__deployment) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for deployment",
));
}
result.deployment = 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::GoogleCloudRun {
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 {
__service_uri,
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 GoogleCloudRun")
}
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 {
"serviceUri" => Ok(__FieldTag::__service_uri),
"service_uri" => Ok(__FieldTag::__service_uri),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::GoogleCloudRun;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GoogleCloudRun")
}
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::__service_uri => {
if !fields.insert(__FieldTag::__service_uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for service_uri",
));
}
result.service_uri = 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::AppHubWorkload {
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 {
__workload,
__criticality,
__environment,
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 AppHubWorkload")
}
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 {
"workload" => Ok(__FieldTag::__workload),
"criticality" => Ok(__FieldTag::__criticality),
"environment" => Ok(__FieldTag::__environment),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::AppHubWorkload;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct AppHubWorkload")
}
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::__workload => {
if !fields.insert(__FieldTag::__workload) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for workload",
));
}
result.workload = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__criticality => {
if !fields.insert(__FieldTag::__criticality) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for criticality",
));
}
result.criticality = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__environment => {
if !fields.insert(__FieldTag::__environment) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for environment",
));
}
result.environment = 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::AppHubService {
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 {
__apphub_service,
__criticality,
__environment,
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 AppHubService")
}
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 {
"apphubService" => Ok(__FieldTag::__apphub_service),
"apphub_service" => Ok(__FieldTag::__apphub_service),
"criticality" => Ok(__FieldTag::__criticality),
"environment" => Ok(__FieldTag::__environment),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::AppHubService;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct AppHubService")
}
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::__apphub_service => {
if !fields.insert(__FieldTag::__apphub_service) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for apphub_service",
));
}
result.apphub_service = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__criticality => {
if !fields.insert(__FieldTag::__criticality) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for criticality",
));
}
result.criticality = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__environment => {
if !fields.insert(__FieldTag::__environment) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for environment",
));
}
result.environment = 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::ArtifactConfig {
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 {
__google_artifact_registry,
__google_artifact_analysis,
__uri,
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 ArtifactConfig")
}
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 {
"googleArtifactRegistry" => Ok(__FieldTag::__google_artifact_registry),
"google_artifact_registry" => {
Ok(__FieldTag::__google_artifact_registry)
}
"googleArtifactAnalysis" => Ok(__FieldTag::__google_artifact_analysis),
"google_artifact_analysis" => {
Ok(__FieldTag::__google_artifact_analysis)
}
"uri" => Ok(__FieldTag::__uri),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ArtifactConfig;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ArtifactConfig")
}
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::__google_artifact_registry => {
if !fields.insert(__FieldTag::__google_artifact_registry) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for google_artifact_registry",
));
}
if result.artifact_storage.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `artifact_storage`, a oneof with full ID .google.cloud.developerconnect.v1.ArtifactConfig.google_artifact_registry, latest field was googleArtifactRegistry",
));
}
result.artifact_storage = std::option::Option::Some(
crate::model::artifact_config::ArtifactStorage::GoogleArtifactRegistry(
map.next_value::<std::option::Option<std::boxed::Box<crate::model::GoogleArtifactRegistry>>>()?.unwrap_or_default()
),
);
}
__FieldTag::__google_artifact_analysis => {
if !fields.insert(__FieldTag::__google_artifact_analysis) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for google_artifact_analysis",
));
}
if result.artifact_metadata_storage.is_some() {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for `artifact_metadata_storage`, a oneof with full ID .google.cloud.developerconnect.v1.ArtifactConfig.google_artifact_analysis, latest field was googleArtifactAnalysis",
));
}
result.artifact_metadata_storage = std::option::Option::Some(
crate::model::artifact_config::ArtifactMetadataStorage::GoogleArtifactAnalysis(
map.next_value::<std::option::Option<std::boxed::Box<crate::model::GoogleArtifactAnalysis>>>()?.unwrap_or_default()
),
);
}
__FieldTag::__uri => {
if !fields.insert(__FieldTag::__uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for uri",
));
}
result.uri = 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::GoogleArtifactAnalysis {
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 {
__project_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 GoogleArtifactAnalysis")
}
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 {
"projectId" => Ok(__FieldTag::__project_id),
"project_id" => Ok(__FieldTag::__project_id),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::GoogleArtifactAnalysis;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GoogleArtifactAnalysis")
}
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::__project_id => {
if !fields.insert(__FieldTag::__project_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for project_id",
));
}
result.project_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::GoogleArtifactRegistry {
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 {
__project_id,
__artifact_registry_package,
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 GoogleArtifactRegistry")
}
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 {
"projectId" => Ok(__FieldTag::__project_id),
"project_id" => Ok(__FieldTag::__project_id),
"artifactRegistryPackage" => {
Ok(__FieldTag::__artifact_registry_package)
}
"artifact_registry_package" => {
Ok(__FieldTag::__artifact_registry_package)
}
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::GoogleArtifactRegistry;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GoogleArtifactRegistry")
}
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::__project_id => {
if !fields.insert(__FieldTag::__project_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for project_id",
));
}
result.project_id = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__artifact_registry_package => {
if !fields.insert(__FieldTag::__artifact_registry_package) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for artifact_registry_package",
));
}
result.artifact_registry_package = 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::DeploymentEvent {
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,
__create_time,
__update_time,
__runtime_config,
__runtime_deployment_uri,
__state,
__artifact_deployments,
__deploy_time,
__undeploy_time,
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 DeploymentEvent")
}
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),
"createTime" => Ok(__FieldTag::__create_time),
"create_time" => Ok(__FieldTag::__create_time),
"updateTime" => Ok(__FieldTag::__update_time),
"update_time" => Ok(__FieldTag::__update_time),
"runtimeConfig" => Ok(__FieldTag::__runtime_config),
"runtime_config" => Ok(__FieldTag::__runtime_config),
"runtimeDeploymentUri" => Ok(__FieldTag::__runtime_deployment_uri),
"runtime_deployment_uri" => Ok(__FieldTag::__runtime_deployment_uri),
"state" => Ok(__FieldTag::__state),
"artifactDeployments" => Ok(__FieldTag::__artifact_deployments),
"artifact_deployments" => Ok(__FieldTag::__artifact_deployments),
"deployTime" => Ok(__FieldTag::__deploy_time),
"deploy_time" => Ok(__FieldTag::__deploy_time),
"undeployTime" => Ok(__FieldTag::__undeploy_time),
"undeploy_time" => Ok(__FieldTag::__undeploy_time),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::DeploymentEvent;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct DeploymentEvent")
}
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::__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::__runtime_config => {
if !fields.insert(__FieldTag::__runtime_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for runtime_config",
));
}
result.runtime_config = map
.next_value::<std::option::Option<crate::model::RuntimeConfig>>()?;
}
__FieldTag::__runtime_deployment_uri => {
if !fields.insert(__FieldTag::__runtime_deployment_uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for runtime_deployment_uri",
));
}
result.runtime_deployment_uri = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__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::deployment_event::State>>()?.unwrap_or_default();
}
__FieldTag::__artifact_deployments => {
if !fields.insert(__FieldTag::__artifact_deployments) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for artifact_deployments",
));
}
result.artifact_deployments = map
.next_value::<std::option::Option<
std::vec::Vec<crate::model::ArtifactDeployment>,
>>()?
.unwrap_or_default();
}
__FieldTag::__deploy_time => {
if !fields.insert(__FieldTag::__deploy_time) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for deploy_time",
));
}
result.deploy_time =
map.next_value::<std::option::Option<wkt::Timestamp>>()?;
}
__FieldTag::__undeploy_time => {
if !fields.insert(__FieldTag::__undeploy_time) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for undeploy_time",
));
}
result.undeploy_time =
map.next_value::<std::option::Option<wkt::Timestamp>>()?;
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::GetDeploymentEventRequest {
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 GetDeploymentEventRequest")
}
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::GetDeploymentEventRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GetDeploymentEventRequest")
}
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::ListDeploymentEventsRequest {
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,
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 ListDeploymentEventsRequest")
}
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),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ListDeploymentEventsRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListDeploymentEventsRequest")
}
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::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::ListDeploymentEventsResponse {
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 {
__deployment_events,
__next_page_token,
Unknown(std::string::String),
}
impl<'de> serde::de::Deserialize<'de> for __FieldTag {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = __FieldTag;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("a field name for ListDeploymentEventsResponse")
}
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 {
"deploymentEvents" => Ok(__FieldTag::__deployment_events),
"deployment_events" => Ok(__FieldTag::__deployment_events),
"nextPageToken" => Ok(__FieldTag::__next_page_token),
"next_page_token" => Ok(__FieldTag::__next_page_token),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ListDeploymentEventsResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListDeploymentEventsResponse")
}
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::__deployment_events => {
if !fields.insert(__FieldTag::__deployment_events) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for deployment_events",
));
}
result.deployment_events =
map.next_value::<std::option::Option<
std::vec::Vec<crate::model::DeploymentEvent>,
>>()?
.unwrap_or_default();
}
__FieldTag::__next_page_token => {
if !fields.insert(__FieldTag::__next_page_token) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for next_page_token",
));
}
result.next_page_token = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::Unknown(key) => {
let value = map.next_value::<serde_json::Value>()?;
result._unknown_fields.insert(key, value);
}
}
}
std::result::Result::Ok(result)
}
}
deserializer.deserialize_any(Visitor)
}
}
#[doc(hidden)]
impl<'de> serde::de::Deserialize<'de> for super::ArtifactDeployment {
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 {
__id,
__artifact_reference,
__artifact_alias,
__source_commit_uris,
__deploy_time,
__undeploy_time,
__container_status_summary,
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 ArtifactDeployment")
}
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 {
"id" => Ok(__FieldTag::__id),
"artifactReference" => Ok(__FieldTag::__artifact_reference),
"artifact_reference" => Ok(__FieldTag::__artifact_reference),
"artifactAlias" => Ok(__FieldTag::__artifact_alias),
"artifact_alias" => Ok(__FieldTag::__artifact_alias),
"sourceCommitUris" => Ok(__FieldTag::__source_commit_uris),
"source_commit_uris" => Ok(__FieldTag::__source_commit_uris),
"deployTime" => Ok(__FieldTag::__deploy_time),
"deploy_time" => Ok(__FieldTag::__deploy_time),
"undeployTime" => Ok(__FieldTag::__undeploy_time),
"undeploy_time" => Ok(__FieldTag::__undeploy_time),
"containerStatusSummary" => Ok(__FieldTag::__container_status_summary),
"container_status_summary" => {
Ok(__FieldTag::__container_status_summary)
}
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ArtifactDeployment;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ArtifactDeployment")
}
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::__id => {
if !fields.insert(__FieldTag::__id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for id",
));
}
result.id = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__artifact_reference => {
if !fields.insert(__FieldTag::__artifact_reference) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for artifact_reference",
));
}
result.artifact_reference = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__artifact_alias => {
if !fields.insert(__FieldTag::__artifact_alias) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for artifact_alias",
));
}
result.artifact_alias = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__source_commit_uris => {
if !fields.insert(__FieldTag::__source_commit_uris) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for source_commit_uris",
));
}
result.source_commit_uris = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
}
__FieldTag::__deploy_time => {
if !fields.insert(__FieldTag::__deploy_time) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for deploy_time",
));
}
result.deploy_time =
map.next_value::<std::option::Option<wkt::Timestamp>>()?;
}
__FieldTag::__undeploy_time => {
if !fields.insert(__FieldTag::__undeploy_time) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for undeploy_time",
));
}
result.undeploy_time =
map.next_value::<std::option::Option<wkt::Timestamp>>()?;
}
__FieldTag::__container_status_summary => {
if !fields.insert(__FieldTag::__container_status_summary) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for container_status_summary",
));
}
result.container_status_summary = 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::CreateInsightsConfigRequest {
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,
__insights_config_id,
__insights_config,
__validate_only,
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 CreateInsightsConfigRequest")
}
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),
"insightsConfigId" => Ok(__FieldTag::__insights_config_id),
"insights_config_id" => Ok(__FieldTag::__insights_config_id),
"insightsConfig" => Ok(__FieldTag::__insights_config),
"insights_config" => Ok(__FieldTag::__insights_config),
"validateOnly" => Ok(__FieldTag::__validate_only),
"validate_only" => Ok(__FieldTag::__validate_only),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::CreateInsightsConfigRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct CreateInsightsConfigRequest")
}
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::__insights_config_id => {
if !fields.insert(__FieldTag::__insights_config_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for insights_config_id",
));
}
result.insights_config_id = map
.next_value::<std::option::Option<std::string::String>>()?
.unwrap_or_default();
}
__FieldTag::__insights_config => {
if !fields.insert(__FieldTag::__insights_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for insights_config",
));
}
result.insights_config = map
.next_value::<std::option::Option<crate::model::InsightsConfig>>(
)?;
}
__FieldTag::__validate_only => {
if !fields.insert(__FieldTag::__validate_only) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for validate_only",
));
}
result.validate_only = 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::GetInsightsConfigRequest {
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 GetInsightsConfigRequest")
}
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::GetInsightsConfigRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GetInsightsConfigRequest")
}
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::ListInsightsConfigsRequest {
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 ListInsightsConfigsRequest")
}
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::ListInsightsConfigsRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListInsightsConfigsRequest")
}
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::ListInsightsConfigsResponse {
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 {
__insights_configs,
__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 ListInsightsConfigsResponse")
}
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 {
"insightsConfigs" => Ok(__FieldTag::__insights_configs),
"insights_configs" => Ok(__FieldTag::__insights_configs),
"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::ListInsightsConfigsResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListInsightsConfigsResponse")
}
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::__insights_configs => {
if !fields.insert(__FieldTag::__insights_configs) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for insights_configs",
));
}
result.insights_configs =
map.next_value::<std::option::Option<
std::vec::Vec<crate::model::InsightsConfig>,
>>()?
.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::DeleteInsightsConfigRequest {
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,
__validate_only,
__etag,
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 DeleteInsightsConfigRequest")
}
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),
"validateOnly" => Ok(__FieldTag::__validate_only),
"validate_only" => Ok(__FieldTag::__validate_only),
"etag" => Ok(__FieldTag::__etag),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::DeleteInsightsConfigRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct DeleteInsightsConfigRequest")
}
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::__validate_only => {
if !fields.insert(__FieldTag::__validate_only) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for validate_only",
));
}
result.validate_only = map
.next_value::<std::option::Option<bool>>()?
.unwrap_or_default();
}
__FieldTag::__etag => {
if !fields.insert(__FieldTag::__etag) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for etag",
));
}
result.etag = 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::UpdateInsightsConfigRequest {
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 {
__insights_config,
__request_id,
__allow_missing,
__validate_only,
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 UpdateInsightsConfigRequest")
}
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 {
"insightsConfig" => Ok(__FieldTag::__insights_config),
"insights_config" => Ok(__FieldTag::__insights_config),
"requestId" => Ok(__FieldTag::__request_id),
"request_id" => Ok(__FieldTag::__request_id),
"allowMissing" => Ok(__FieldTag::__allow_missing),
"allow_missing" => Ok(__FieldTag::__allow_missing),
"validateOnly" => Ok(__FieldTag::__validate_only),
"validate_only" => Ok(__FieldTag::__validate_only),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::UpdateInsightsConfigRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct UpdateInsightsConfigRequest")
}
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::__insights_config => {
if !fields.insert(__FieldTag::__insights_config) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for insights_config",
));
}
result.insights_config = map
.next_value::<std::option::Option<crate::model::InsightsConfig>>(
)?;
}
__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::__allow_missing => {
if !fields.insert(__FieldTag::__allow_missing) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for allow_missing",
));
}
result.allow_missing = map
.next_value::<std::option::Option<bool>>()?
.unwrap_or_default();
}
__FieldTag::__validate_only => {
if !fields.insert(__FieldTag::__validate_only) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for validate_only",
));
}
result.validate_only = 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)
}
}