#[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 RegisterContainerizedExtractorRequest {
    #[builder(into)]
    #[serde(rename = "name")]
    name: String,
    #[builder(default, into)]
    #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
    description: Option<String>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::DockerImageSource>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "image", skip_serializing_if = "Option::is_none", default)]
    image: Option<Box<super::DockerImageSource>>,
    #[builder(default, into)]
    #[serde(
        rename = "containerImageRid",
        skip_serializing_if = "Option::is_none",
        default
    )]
    container_image_rid: Option<conjure_object::ResourceIdentifier>,
    #[builder(default, list(item(type = super::FileExtractionInput)))]
    #[serde(rename = "inputs", skip_serializing_if = "Vec::is_empty", default)]
    inputs: Vec<super::FileExtractionInput>,
    #[builder(default, list(item(type = super::FileExtractionParameter)))]
    #[serde(rename = "parameters", skip_serializing_if = "Vec::is_empty", default)]
    parameters: Vec<super::FileExtractionParameter>,
    #[builder(default, map(key(type = String, into), value(type = String, into)))]
    #[serde(
        rename = "properties",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    properties: std::collections::BTreeMap<String, String>,
    #[builder(default, set(item(type = String, into)))]
    #[serde(
        rename = "labels",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    labels: std::collections::BTreeSet<String>,
    #[serde(rename = "workspace")]
    workspace: conjure_object::ResourceIdentifier,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::TimestampMetadata>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(
        rename = "timestampMetadata",
        skip_serializing_if = "Option::is_none",
        default
    )]
    timestamp_metadata: Option<Box<super::TimestampMetadata>>,
    #[builder(default, into)]
    #[serde(
        rename = "outputFileFormat",
        skip_serializing_if = "Option::is_none",
        default
    )]
    output_file_format: Option<super::FileOutputFormat>,
}
impl RegisterContainerizedExtractorRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        name: impl Into<String>,
        workspace: conjure_object::ResourceIdentifier,
    ) -> Self {
        Self::builder().name(name).workspace(workspace).build()
    }
    #[inline]
    pub fn name(&self) -> &str {
        &*self.name
    }
    #[inline]
    pub fn description(&self) -> Option<&str> {
        self.description.as_ref().map(|o| &**o)
    }
    /// Deprecated: use containerImageRid instead for self-hosted images.
    /// Container image for the extractor. Used for external registries.
    /// Ignored when containerImageRid is set.
    #[deprecated(note = "Use containerImageRid for self-hosted images.")]
    #[inline]
    pub fn image(&self) -> Option<&super::DockerImageSource> {
        self.image.as_ref().map(|o| &**o)
    }
    /// RID of a self-hosted container image. When set, the extractor uses the internal registry
    /// and the image field is ignored.
    #[inline]
    pub fn container_image_rid(&self) -> Option<&conjure_object::ResourceIdentifier> {
        self.container_image_rid.as_ref().map(|o| &*o)
    }
    /// payload must match input defined in containerized extraction
    #[inline]
    pub fn inputs(&self) -> &[super::FileExtractionInput] {
        &*self.inputs
    }
    /// Describes the parameters of the extractor.
    #[inline]
    pub fn parameters(&self) -> &[super::FileExtractionParameter] {
        &*self.parameters
    }
    #[inline]
    pub fn properties(&self) -> &std::collections::BTreeMap<String, String> {
        &self.properties
    }
    #[inline]
    pub fn labels(&self) -> &std::collections::BTreeSet<String> {
        &self.labels
    }
    /// The workspace in which to create the extractor
    #[inline]
    pub fn workspace(&self) -> &conjure_object::ResourceIdentifier {
        &self.workspace
    }
    /// Metadata about the intermediate parquet this extractor will produce.
    /// If not set, timestamp metadata must be provided at ingest time.
    #[inline]
    pub fn timestamp_metadata(&self) -> Option<&super::TimestampMetadata> {
        self.timestamp_metadata.as_ref().map(|o| &**o)
    }
    /// The format of the output file. Currently only "parquet", "csv", "parquet.tar" are supported
    #[inline]
    pub fn output_file_format(&self) -> Option<&super::FileOutputFormat> {
        self.output_file_format.as_ref().map(|o| &*o)
    }
}
