nominal-api 0.1240.0

API bindings for the Nominal platform
Documentation
/// Represents a containerized extractor that processes input files using a container.
#[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 ContainerizedExtractor {
    #[serde(rename = "rid")]
    rid: super::ContainerizedExtractorRid,
    #[builder(into)]
    #[serde(rename = "name")]
    name: String,
    #[builder(default, into)]
    #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
    description: Option<String>,
    #[builder(custom(type = super::DockerImageSource, convert = Box::new))]
    #[serde(rename = "image")]
    image: Box<super::DockerImageSource>,
    #[builder(default, into)]
    #[serde(
        rename = "containerImageRid",
        skip_serializing_if = "Option::is_none",
        default
    )]
    container_image_rid: Option<super::super::super::api::rids::ContainerImageRid>,
    #[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 = super::super::super::api::PropertyName),
            value(type = super::super::super::api::PropertyValue)
        )
    )]
    #[serde(
        rename = "properties",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    properties: std::collections::BTreeMap<
        super::super::super::api::PropertyName,
        super::super::super::api::PropertyValue,
    >,
    #[builder(default, set(item(type = super::super::super::api::Label)))]
    #[serde(
        rename = "labels",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    labels: std::collections::BTreeSet<super::super::super::api::Label>,
    #[serde(rename = "createdAt")]
    created_at: conjure_object::DateTime<conjure_object::Utc>,
    #[serde(rename = "isArchived")]
    is_archived: bool,
    #[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>>,
    #[serde(rename = "outputFileFormat")]
    output_file_format: super::FileOutputFormat,
}
impl ContainerizedExtractor {
    /// Unique resource identifier for the extractor.
    #[inline]
    pub fn rid(&self) -> &super::ContainerizedExtractorRid {
        &self.rid
    }
    /// The name of the extractor as defined by the user.
    #[inline]
    pub fn name(&self) -> &str {
        &*self.name
    }
    /// Optional description of the extractor.
    #[inline]
    pub fn description(&self) -> Option<&str> {
        self.description.as_ref().map(|o| &**o)
    }
    /// Deprecated: use containerImageRid instead for self-hosted images.
    /// Container image used to run the extractor via an external registry.
    /// When containerImageRid is set, this field contains placeholder values and should be ignored.
    #[deprecated(note = "Use containerImageRid for self-hosted images.")]
    #[inline]
    pub fn image(&self) -> &super::DockerImageSource {
        &*self.image
    }
    /// RID of a self-hosted container image in the internal registry.
    /// When set, the extractor uses the internal registry; when absent, the legacy image field is used.
    #[inline]
    pub fn container_image_rid(
        &self,
    ) -> Option<&super::super::super::api::rids::ContainerImageRid> {
        self.container_image_rid.as_ref().map(|o| &*o)
    }
    /// The input files that this extractor requires, mapped to environment variables that store the path to the file.
    #[inline]
    pub fn inputs(&self) -> &[super::FileExtractionInput] {
        &*self.inputs
    }
    /// Describes the parameters of the extractor.
    #[inline]
    pub fn parameters(&self) -> &[super::FileExtractionParameter] {
        &*self.parameters
    }
    /// Additional properties associated with this extractor.
    #[inline]
    pub fn properties(
        &self,
    ) -> &std::collections::BTreeMap<
        super::super::super::api::PropertyName,
        super::super::super::api::PropertyValue,
    > {
        &self.properties
    }
    /// Set of labels applied to this extractor.
    #[inline]
    pub fn labels(
        &self,
    ) -> &std::collections::BTreeSet<super::super::super::api::Label> {
        &self.labels
    }
    /// Timestamp when this extractor was created.
    #[inline]
    pub fn created_at(&self) -> conjure_object::DateTime<conjure_object::Utc> {
        self.created_at
    }
    /// Whether this extractor is archived.
    #[inline]
    pub fn is_archived(&self) -> bool {
        self.is_archived
    }
    /// 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) -> &super::FileOutputFormat {
        &self.output_file_format
    }
}