#[derive(
    Clone,
    Default,
    PartialEq,
    serde::Deserialize,
    serde::Serialize,
    std::fmt::Debug
)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct IngressSpecAc {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub default_backend: <Option<
        ::k8s_openapi::api::networking::v1::IngressBackend,
    > as crate::Optionable>::Optioned,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub ingress_class_name: <Option<std::string::String> as crate::Optionable>::Optioned,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub rules: <Option<
        std::vec::Vec<::k8s_openapi::api::networking::v1::IngressRule>,
    > as crate::Optionable>::Optioned,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tls: <Option<
        std::vec::Vec<::k8s_openapi::api::networking::v1::IngressTLS>,
    > as crate::Optionable>::Optioned,
}
#[automatically_derived]
impl crate::Optionable for ::k8s_openapi::api::networking::v1::IngressSpec {
    type Optioned = IngressSpecAc;
}
#[automatically_derived]
impl crate::Optionable for IngressSpecAc {
    type Optioned = IngressSpecAc;
}
#[automatically_derived]
#[cfg(feature = "k8s_openapi_convert")]
impl crate::OptionableConvert for ::k8s_openapi::api::networking::v1::IngressSpec {
    fn into_optioned(self) -> IngressSpecAc {
        IngressSpecAc {
            default_backend: crate::OptionableConvert::into_optioned(
                self.default_backend,
            ),
            ingress_class_name: crate::OptionableConvert::into_optioned(
                self.ingress_class_name,
            ),
            rules: crate::OptionableConvert::into_optioned(self.rules),
            tls: crate::OptionableConvert::into_optioned(self.tls),
        }
    }
    fn try_from_optioned(value: IngressSpecAc) -> Result<Self, crate::Error> {
        Ok(Self {
            default_backend: crate::OptionableConvert::try_from_optioned(
                value.default_backend,
            )?,
            ingress_class_name: crate::OptionableConvert::try_from_optioned(
                value.ingress_class_name,
            )?,
            rules: crate::OptionableConvert::try_from_optioned(value.rules)?,
            tls: crate::OptionableConvert::try_from_optioned(value.tls)?,
        })
    }
    fn merge(&mut self, other: IngressSpecAc) -> Result<(), crate::Error> {
        crate::OptionableConvert::merge(
            &mut self.default_backend,
            other.default_backend,
        )?;
        crate::OptionableConvert::merge(
            &mut self.ingress_class_name,
            other.ingress_class_name,
        )?;
        crate::OptionableConvert::merge(&mut self.rules, other.rules)?;
        crate::OptionableConvert::merge(&mut self.tls, other.tls)?;
        Ok(())
    }
}
#[automatically_derived]
#[cfg(feature = "k8s_openapi_convert")]
impl crate::OptionedConvert<::k8s_openapi::api::networking::v1::IngressSpec>
for IngressSpecAc {
    fn from_optionable(value: ::k8s_openapi::api::networking::v1::IngressSpec) -> Self {
        crate::OptionableConvert::into_optioned(value)
    }
    fn try_into_optionable(
        self,
    ) -> Result<::k8s_openapi::api::networking::v1::IngressSpec, crate::Error> {
        crate::OptionableConvert::try_from_optioned(self)
    }
    fn merge_into(
        self,
        other: &mut ::k8s_openapi::api::networking::v1::IngressSpec,
    ) -> Result<(), crate::Error> {
        crate::OptionableConvert::merge(other, self)
    }
}
