#[derive(
    Clone,
    Default,
    PartialEq,
    serde::Deserialize,
    serde::Serialize,
    std::fmt::Debug
)]
/// Info contains versioning information. how we'll want to distribute that information.
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct InfoAc {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub build_date: Option<std::string::String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub compiler: Option<std::string::String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub git_commit: Option<std::string::String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub git_tree_state: Option<std::string::String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub git_version: Option<std::string::String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub go_version: Option<std::string::String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub major: Option<std::string::String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub minor: Option<std::string::String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub platform: Option<std::string::String>,
}
#[automatically_derived]
impl crate::Optionable for k8s_openapi027::apimachinery::pkg::version::Info {
    type Optioned = InfoAc;
}
#[automatically_derived]
impl crate::Optionable for InfoAc {
    type Optioned = InfoAc;
}
#[automatically_derived]
#[cfg(feature = "k8s_openapi_convert")]
impl crate::OptionableConvert for k8s_openapi027::apimachinery::pkg::version::Info {
    fn into_optioned(self) -> InfoAc {
        InfoAc {
            build_date: Some(self.build_date),
            compiler: Some(self.compiler),
            git_commit: Some(self.git_commit),
            git_tree_state: Some(self.git_tree_state),
            git_version: Some(self.git_version),
            go_version: Some(self.go_version),
            major: Some(self.major),
            minor: Some(self.minor),
            platform: Some(self.platform),
        }
    }
    fn try_from_optioned(value: InfoAc) -> Result<Self, crate::Error> {
        Ok(Self {
            build_date: value
                .build_date
                .ok_or(crate::Error {
                    missing_field: "build_date",
                })?,
            compiler: value
                .compiler
                .ok_or(crate::Error {
                    missing_field: "compiler",
                })?,
            git_commit: value
                .git_commit
                .ok_or(crate::Error {
                    missing_field: "git_commit",
                })?,
            git_tree_state: value
                .git_tree_state
                .ok_or(crate::Error {
                    missing_field: "git_tree_state",
                })?,
            git_version: value
                .git_version
                .ok_or(crate::Error {
                    missing_field: "git_version",
                })?,
            go_version: value
                .go_version
                .ok_or(crate::Error {
                    missing_field: "go_version",
                })?,
            major: value
                .major
                .ok_or(crate::Error {
                    missing_field: "major",
                })?,
            minor: value
                .minor
                .ok_or(crate::Error {
                    missing_field: "minor",
                })?,
            platform: value
                .platform
                .ok_or(crate::Error {
                    missing_field: "platform",
                })?,
        })
    }
    fn merge(&mut self, other: InfoAc) -> Result<(), crate::Error> {
        if let Some(other_value) = other.build_date {
            self.build_date = crate::OptionableConvert::try_from_optioned(other_value)?;
        }
        if let Some(other_value) = other.compiler {
            self.compiler = crate::OptionableConvert::try_from_optioned(other_value)?;
        }
        if let Some(other_value) = other.git_commit {
            self.git_commit = crate::OptionableConvert::try_from_optioned(other_value)?;
        }
        if let Some(other_value) = other.git_tree_state {
            self.git_tree_state = crate::OptionableConvert::try_from_optioned(
                other_value,
            )?;
        }
        if let Some(other_value) = other.git_version {
            self.git_version = crate::OptionableConvert::try_from_optioned(other_value)?;
        }
        if let Some(other_value) = other.go_version {
            self.go_version = crate::OptionableConvert::try_from_optioned(other_value)?;
        }
        if let Some(other_value) = other.major {
            self.major = crate::OptionableConvert::try_from_optioned(other_value)?;
        }
        if let Some(other_value) = other.minor {
            self.minor = crate::OptionableConvert::try_from_optioned(other_value)?;
        }
        if let Some(other_value) = other.platform {
            self.platform = crate::OptionableConvert::try_from_optioned(other_value)?;
        }
        Ok(())
    }
}
#[automatically_derived]
#[cfg(feature = "k8s_openapi_convert")]
impl crate::OptionedConvert<k8s_openapi027::apimachinery::pkg::version::Info>
for InfoAc {
    fn from_optionable(value: k8s_openapi027::apimachinery::pkg::version::Info) -> Self {
        crate::OptionableConvert::into_optioned(value)
    }
    fn try_into_optionable(
        self,
    ) -> Result<k8s_openapi027::apimachinery::pkg::version::Info, crate::Error> {
        crate::OptionableConvert::try_from_optioned(self)
    }
    fn merge_into(
        self,
        other: &mut k8s_openapi027::apimachinery::pkg::version::Info,
    ) -> Result<(), crate::Error> {
        crate::OptionableConvert::merge(other, self)
    }
}
impl k8s_openapi027::DeepMerge for InfoAc {
    fn merge_from(&mut self, other: Self) {
        k8s_openapi027::DeepMerge::merge_from(&mut self.build_date, other.build_date);
        k8s_openapi027::DeepMerge::merge_from(&mut self.compiler, other.compiler);
        k8s_openapi027::DeepMerge::merge_from(&mut self.git_commit, other.git_commit);
        k8s_openapi027::DeepMerge::merge_from(
            &mut self.git_tree_state,
            other.git_tree_state,
        );
        k8s_openapi027::DeepMerge::merge_from(&mut self.git_version, other.git_version);
        k8s_openapi027::DeepMerge::merge_from(&mut self.go_version, other.go_version);
        k8s_openapi027::DeepMerge::merge_from(&mut self.major, other.major);
        k8s_openapi027::DeepMerge::merge_from(&mut self.minor, other.minor);
        k8s_openapi027::DeepMerge::merge_from(&mut self.platform, other.platform);
    }
}
