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>An edge represents a directed connection between two Glue components that are part of the workflow the edge belongs to.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Edge {
    /// <p>The unique of the node within the workflow where the edge starts.</p>
    pub source_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique of the node within the workflow where the edge ends.</p>
    pub destination_id: ::std::option::Option<::std::string::String>,
}
impl Edge {
    /// <p>The unique of the node within the workflow where the edge starts.</p>
    pub fn source_id(&self) -> ::std::option::Option<&str> {
        self.source_id.as_deref()
    }
    /// <p>The unique of the node within the workflow where the edge ends.</p>
    pub fn destination_id(&self) -> ::std::option::Option<&str> {
        self.destination_id.as_deref()
    }
}
impl Edge {
    /// Creates a new builder-style object to manufacture [`Edge`](crate::types::Edge).
    pub fn builder() -> crate::types::builders::EdgeBuilder {
        crate::types::builders::EdgeBuilder::default()
    }
}

/// A builder for [`Edge`](crate::types::Edge).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct EdgeBuilder {
    pub(crate) source_id: ::std::option::Option<::std::string::String>,
    pub(crate) destination_id: ::std::option::Option<::std::string::String>,
}
impl EdgeBuilder {
    /// <p>The unique of the node within the workflow where the edge starts.</p>
    pub fn source_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique of the node within the workflow where the edge starts.</p>
    pub fn set_source_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_id = input;
        self
    }
    /// <p>The unique of the node within the workflow where the edge starts.</p>
    pub fn get_source_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_id
    }
    /// <p>The unique of the node within the workflow where the edge ends.</p>
    pub fn destination_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.destination_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique of the node within the workflow where the edge ends.</p>
    pub fn set_destination_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.destination_id = input;
        self
    }
    /// <p>The unique of the node within the workflow where the edge ends.</p>
    pub fn get_destination_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.destination_id
    }
    /// Consumes the builder and constructs a [`Edge`](crate::types::Edge).
    pub fn build(self) -> crate::types::Edge {
        crate::types::Edge {
            source_id: self.source_id,
            destination_id: self.destination_id,
        }
    }
}