#[allow(unused_imports)]
use super::*;
#[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::RunWorkflowCustomOperationMetadata {
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,
__verb,
__requested_cancellation,
__api_version,
__target,
__pipeline_run_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 RunWorkflowCustomOperationMetadata")
}
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),
"verb" => Ok(__FieldTag::__verb),
"requestedCancellation" => Ok(__FieldTag::__requested_cancellation),
"requested_cancellation" => Ok(__FieldTag::__requested_cancellation),
"apiVersion" => Ok(__FieldTag::__api_version),
"api_version" => Ok(__FieldTag::__api_version),
"target" => Ok(__FieldTag::__target),
"pipelineRunId" => Ok(__FieldTag::__pipeline_run_id),
"pipeline_run_id" => Ok(__FieldTag::__pipeline_run_id),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::RunWorkflowCustomOperationMetadata;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct RunWorkflowCustomOperationMetadata")
}
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::__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::__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::__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::__pipeline_run_id => {
if !fields.insert(__FieldTag::__pipeline_run_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for pipeline_run_id",
));
}
result.pipeline_run_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::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 {
__name,
__create_time,
__update_time,
__github_config,
__github_enterprise_config,
__gitlab_config,
__bitbucket_data_center_config,
__bitbucket_cloud_config,
__installation_state,
__disabled,
__reconciling,
__annotations,
__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 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 {
"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),
"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),
"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),
"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),
_ => 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::__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::__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.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.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::__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.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.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::__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::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::FetchLinkableRepositoriesRequest {
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 FetchLinkableRepositoriesRequest")
}
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::FetchLinkableRepositoriesRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct FetchLinkableRepositoriesRequest")
}
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::FetchLinkableRepositoriesResponse {
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 {
__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 FetchLinkableRepositoriesResponse")
}
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 {
"repositories" => Ok(__FieldTag::__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::FetchLinkableRepositoriesResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct FetchLinkableRepositoriesResponse")
}
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::__repositories => {
if !fields.insert(__FieldTag::__repositories) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for repositories",
));
}
result.repositories = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Repository>>>()?.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::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 {
__authorizer_credential,
__app_installation_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 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 {
"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),
_ => 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::__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::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,
__api_key,
__app_id,
__app_slug,
__private_key_secret_version,
__webhook_secret_secret_version,
__app_installation_id,
__service_directory_config,
__ssl_ca,
__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 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),
"apiKey" => Ok(__FieldTag::__api_key),
"api_key" => Ok(__FieldTag::__api_key),
"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),
"serviceDirectoryConfig" => Ok(__FieldTag::__service_directory_config),
"service_directory_config" => {
Ok(__FieldTag::__service_directory_config)
}
"sslCa" => Ok(__FieldTag::__ssl_ca),
"ssl_ca" => Ok(__FieldTag::__ssl_ca),
"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::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::__api_key => {
if !fields.insert(__FieldTag::__api_key) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for api_key",
));
}
result.api_key = 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::__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 => {
if !fields.insert(__FieldTag::__ssl_ca) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for ssl_ca",
));
}
result.ssl_ca = 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::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 {
__host_uri,
__webhook_secret_secret_version,
__read_authorizer_credential,
__authorizer_credential,
__service_directory_config,
__ssl_ca,
__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 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 {
"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)
}
"sslCa" => Ok(__FieldTag::__ssl_ca),
"ssl_ca" => Ok(__FieldTag::__ssl_ca),
"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::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::__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 => {
if !fields.insert(__FieldTag::__ssl_ca) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for ssl_ca",
));
}
result.ssl_ca = 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,
__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)
}
"sslCa" => Ok(__FieldTag::__ssl_ca),
"ssl_ca" => Ok(__FieldTag::__ssl_ca),
"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 => {
if !fields.insert(__FieldTag::__ssl_ca) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for ssl_ca",
));
}
result.ssl_ca = 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::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::Repository {
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,
__remote_uri,
__create_time,
__update_time,
__annotations,
__etag,
__webhook_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 Repository")
}
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),
"remoteUri" => Ok(__FieldTag::__remote_uri),
"remote_uri" => Ok(__FieldTag::__remote_uri),
"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),
"webhookId" => Ok(__FieldTag::__webhook_id),
"webhook_id" => Ok(__FieldTag::__webhook_id),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::Repository;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct Repository")
}
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::__remote_uri => {
if !fields.insert(__FieldTag::__remote_uri) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for remote_uri",
));
}
result.remote_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::__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::__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::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::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::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,
__connection_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 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),
"connection" => Ok(__FieldTag::__connection),
"connectionId" => Ok(__FieldTag::__connection_id),
"connection_id" => Ok(__FieldTag::__connection_id),
_ => 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 => {
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::__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::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::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,
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),
_ => 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::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,
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),
_ => 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::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 {
__connection,
__update_mask,
__allow_missing,
__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 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 {
"connection" => Ok(__FieldTag::__connection),
"updateMask" => Ok(__FieldTag::__update_mask),
"update_mask" => Ok(__FieldTag::__update_mask),
"allowMissing" => Ok(__FieldTag::__allow_missing),
"allow_missing" => Ok(__FieldTag::__allow_missing),
"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::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::__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::__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::__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::__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::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,
__etag,
__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 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),
"etag" => Ok(__FieldTag::__etag),
"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::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::__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::__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::CreateRepositoryRequest {
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,
__repository,
__repository_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 CreateRepositoryRequest")
}
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),
"repository" => Ok(__FieldTag::__repository),
"repositoryId" => Ok(__FieldTag::__repository_id),
"repository_id" => Ok(__FieldTag::__repository_id),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::CreateRepositoryRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct CreateRepositoryRequest")
}
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::__repository => {
if !fields.insert(__FieldTag::__repository) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for repository",
));
}
result.repository =
map.next_value::<std::option::Option<crate::model::Repository>>()?;
}
__FieldTag::__repository_id => {
if !fields.insert(__FieldTag::__repository_id) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for repository_id",
));
}
result.repository_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::BatchCreateRepositoriesRequest {
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,
__requests,
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 BatchCreateRepositoriesRequest")
}
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),
"requests" => Ok(__FieldTag::__requests),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::BatchCreateRepositoriesRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct BatchCreateRepositoriesRequest")
}
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::__requests => {
if !fields.insert(__FieldTag::__requests) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for requests",
));
}
result.requests = map
.next_value::<std::option::Option<
std::vec::Vec<crate::model::CreateRepositoryRequest>,
>>()?
.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::BatchCreateRepositoriesResponse {
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 {
__repositories,
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 BatchCreateRepositoriesResponse")
}
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 {
"repositories" => Ok(__FieldTag::__repositories),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::BatchCreateRepositoriesResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct BatchCreateRepositoriesResponse")
}
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::__repositories => {
if !fields.insert(__FieldTag::__repositories) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for repositories",
));
}
result.repositories = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Repository>>>()?.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::GetRepositoryRequest {
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 GetRepositoryRequest")
}
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::GetRepositoryRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct GetRepositoryRequest")
}
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::ListRepositoriesRequest {
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 ListRepositoriesRequest")
}
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::ListRepositoriesRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListRepositoriesRequest")
}
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::ListRepositoriesResponse {
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 {
__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 ListRepositoriesResponse")
}
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 {
"repositories" => Ok(__FieldTag::__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::ListRepositoriesResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ListRepositoriesResponse")
}
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::__repositories => {
if !fields.insert(__FieldTag::__repositories) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for repositories",
));
}
result.repositories = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Repository>>>()?.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::DeleteRepositoryRequest {
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,
__etag,
__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 DeleteRepositoryRequest")
}
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),
"etag" => Ok(__FieldTag::__etag),
"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::DeleteRepositoryRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct DeleteRepositoryRequest")
}
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::__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::__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::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 {
__repository,
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 {
"repository" => Ok(__FieldTag::__repository),
_ => 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::__repository => {
if !fields.insert(__FieldTag::__repository) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for repository",
));
}
result.repository = 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 {
__repository,
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 {
"repository" => Ok(__FieldTag::__repository),
_ => 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::__repository => {
if !fields.insert(__FieldTag::__repository) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for repository",
));
}
result.repository = 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,
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),
_ => 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::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,
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),
_ => 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::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::ProcessWebhookRequest {
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,
__body,
__webhook_key,
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 ProcessWebhookRequest")
}
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),
"body" => Ok(__FieldTag::__body),
"webhookKey" => Ok(__FieldTag::__webhook_key),
"webhook_key" => Ok(__FieldTag::__webhook_key),
_ => Ok(__FieldTag::Unknown(value.to_string())),
}
}
}
deserializer.deserialize_identifier(Visitor)
}
}
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = super::ProcessWebhookRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
formatter.write_str("struct ProcessWebhookRequest")
}
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::__body => {
if !fields.insert(__FieldTag::__body) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for body",
));
}
result.body = map.next_value::<std::option::Option<google_cloud_api::model::HttpBody>>()?
;
}
__FieldTag::__webhook_key => {
if !fields.insert(__FieldTag::__webhook_key) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for webhook_key",
));
}
result.webhook_key = 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 {
__repository,
__ref_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 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 {
"repository" => Ok(__FieldTag::__repository),
"refType" => Ok(__FieldTag::__ref_type),
"ref_type" => Ok(__FieldTag::__ref_type),
_ => 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::__repository => {
if !fields.insert(__FieldTag::__repository) {
return std::result::Result::Err(A::Error::duplicate_field(
"multiple values for repository",
));
}
result.repository = 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::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,
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),
_ => 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::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)
}
}