aws-sdk-glue 1.149.0

AWS SDK for AWS Glue
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A node represents an Glue component (trigger, crawler, or job) on a workflow graph.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Node {
    /// <p>The type of Glue component represented by the node.</p>
    pub r#type: ::std::option::Option<crate::types::NodeType>,
    /// <p>The name of the Glue component represented by the node.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The unique Id assigned to the node within the workflow.</p>
    pub unique_id: ::std::option::Option<::std::string::String>,
    /// <p>Details of the Trigger when the node represents a Trigger.</p>
    pub trigger_details: ::std::option::Option<crate::types::TriggerNodeDetails>,
    /// <p>Details of the Job when the node represents a Job.</p>
    pub job_details: ::std::option::Option<crate::types::JobNodeDetails>,
    /// <p>Details of the crawler when the node represents a crawler.</p>
    pub crawler_details: ::std::option::Option<crate::types::CrawlerNodeDetails>,
}
impl Node {
    /// <p>The type of Glue component represented by the node.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::NodeType> {
        self.r#type.as_ref()
    }
    /// <p>The name of the Glue component represented by the node.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The unique Id assigned to the node within the workflow.</p>
    pub fn unique_id(&self) -> ::std::option::Option<&str> {
        self.unique_id.as_deref()
    }
    /// <p>Details of the Trigger when the node represents a Trigger.</p>
    pub fn trigger_details(&self) -> ::std::option::Option<&crate::types::TriggerNodeDetails> {
        self.trigger_details.as_ref()
    }
    /// <p>Details of the Job when the node represents a Job.</p>
    pub fn job_details(&self) -> ::std::option::Option<&crate::types::JobNodeDetails> {
        self.job_details.as_ref()
    }
    /// <p>Details of the crawler when the node represents a crawler.</p>
    pub fn crawler_details(&self) -> ::std::option::Option<&crate::types::CrawlerNodeDetails> {
        self.crawler_details.as_ref()
    }
}
impl Node {
    /// Creates a new builder-style object to manufacture [`Node`](crate::types::Node).
    pub fn builder() -> crate::types::builders::NodeBuilder {
        crate::types::builders::NodeBuilder::default()
    }
}

/// A builder for [`Node`](crate::types::Node).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct NodeBuilder {
    pub(crate) r#type: ::std::option::Option<crate::types::NodeType>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) unique_id: ::std::option::Option<::std::string::String>,
    pub(crate) trigger_details: ::std::option::Option<crate::types::TriggerNodeDetails>,
    pub(crate) job_details: ::std::option::Option<crate::types::JobNodeDetails>,
    pub(crate) crawler_details: ::std::option::Option<crate::types::CrawlerNodeDetails>,
}
impl NodeBuilder {
    /// <p>The type of Glue component represented by the node.</p>
    pub fn r#type(mut self, input: crate::types::NodeType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of Glue component represented by the node.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::NodeType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of Glue component represented by the node.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::NodeType> {
        &self.r#type
    }
    /// <p>The name of the Glue component represented by the node.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the Glue component represented by the node.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the Glue component represented by the node.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The unique Id assigned to the node within the workflow.</p>
    pub fn unique_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.unique_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique Id assigned to the node within the workflow.</p>
    pub fn set_unique_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.unique_id = input;
        self
    }
    /// <p>The unique Id assigned to the node within the workflow.</p>
    pub fn get_unique_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.unique_id
    }
    /// <p>Details of the Trigger when the node represents a Trigger.</p>
    pub fn trigger_details(mut self, input: crate::types::TriggerNodeDetails) -> Self {
        self.trigger_details = ::std::option::Option::Some(input);
        self
    }
    /// <p>Details of the Trigger when the node represents a Trigger.</p>
    pub fn set_trigger_details(mut self, input: ::std::option::Option<crate::types::TriggerNodeDetails>) -> Self {
        self.trigger_details = input;
        self
    }
    /// <p>Details of the Trigger when the node represents a Trigger.</p>
    pub fn get_trigger_details(&self) -> &::std::option::Option<crate::types::TriggerNodeDetails> {
        &self.trigger_details
    }
    /// <p>Details of the Job when the node represents a Job.</p>
    pub fn job_details(mut self, input: crate::types::JobNodeDetails) -> Self {
        self.job_details = ::std::option::Option::Some(input);
        self
    }
    /// <p>Details of the Job when the node represents a Job.</p>
    pub fn set_job_details(mut self, input: ::std::option::Option<crate::types::JobNodeDetails>) -> Self {
        self.job_details = input;
        self
    }
    /// <p>Details of the Job when the node represents a Job.</p>
    pub fn get_job_details(&self) -> &::std::option::Option<crate::types::JobNodeDetails> {
        &self.job_details
    }
    /// <p>Details of the crawler when the node represents a crawler.</p>
    pub fn crawler_details(mut self, input: crate::types::CrawlerNodeDetails) -> Self {
        self.crawler_details = ::std::option::Option::Some(input);
        self
    }
    /// <p>Details of the crawler when the node represents a crawler.</p>
    pub fn set_crawler_details(mut self, input: ::std::option::Option<crate::types::CrawlerNodeDetails>) -> Self {
        self.crawler_details = input;
        self
    }
    /// <p>Details of the crawler when the node represents a crawler.</p>
    pub fn get_crawler_details(&self) -> &::std::option::Option<crate::types::CrawlerNodeDetails> {
        &self.crawler_details
    }
    /// Consumes the builder and constructs a [`Node`](crate::types::Node).
    pub fn build(self) -> crate::types::Node {
        crate::types::Node {
            r#type: self.r#type,
            name: self.name,
            unique_id: self.unique_id,
            trigger_details: self.trigger_details,
            job_details: self.job_details,
            crawler_details: self.crawler_details,
        }
    }
}