#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct ResolvedNumericAggregationUdf {
    #[builder(
        custom(type = super::super::super::super::api::S3Handle, convert = Box::new)
    )]
    #[serde(rename = "artifactHandle")]
    artifact_handle: Box<super::super::super::super::api::S3Handle>,
    #[builder(
        custom(type = super::super::super::super::api::S3Handle, convert = Box::new)
    )]
    #[serde(rename = "manifestHandle")]
    manifest_handle: Box<super::super::super::super::api::S3Handle>,
    #[builder(default, list(item(type = super::super::super::api::LocalVariableName)))]
    #[serde(rename = "parameterNames", skip_serializing_if = "Vec::is_empty", default)]
    parameter_names: Vec<super::super::super::api::LocalVariableName>,
    #[builder(default, list(item(type = super::ResolvedUdfParameterType)))]
    #[serde(rename = "parameterTypes", skip_serializing_if = "Vec::is_empty", default)]
    parameter_types: Vec<super::ResolvedUdfParameterType>,
    #[serde(rename = "returnShape")]
    return_shape: super::ResolvedAggregationUdfReturnShape,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::Window>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "bucketWindow", skip_serializing_if = "Option::is_none", default)]
    bucket_window: Option<Box<super::Window>>,
}
impl ResolvedNumericAggregationUdf {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        artifact_handle: super::super::super::super::api::S3Handle,
        manifest_handle: super::super::super::super::api::S3Handle,
        return_shape: super::ResolvedAggregationUdfReturnShape,
    ) -> Self {
        Self::builder()
            .artifact_handle(artifact_handle)
            .manifest_handle(manifest_handle)
            .return_shape(return_shape)
            .build()
    }
    #[inline]
    pub fn artifact_handle(&self) -> &super::super::super::super::api::S3Handle {
        &*self.artifact_handle
    }
    #[inline]
    pub fn manifest_handle(&self) -> &super::super::super::super::api::S3Handle {
        &*self.manifest_handle
    }
    #[inline]
    pub fn parameter_names(&self) -> &[super::super::super::api::LocalVariableName] {
        &*self.parameter_names
    }
    #[inline]
    pub fn parameter_types(&self) -> &[super::ResolvedUdfParameterType] {
        &*self.parameter_types
    }
    #[inline]
    pub fn return_shape(&self) -> &super::ResolvedAggregationUdfReturnShape {
        &self.return_shape
    }
    #[inline]
    pub fn bucket_window(&self) -> Option<&super::Window> {
        self.bucket_window.as_ref().map(|o| &**o)
    }
}
