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>The location of resources.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Location {
    /// <p>A JDBC location.</p>
    pub jdbc: ::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>>,
    /// <p>An Amazon Simple Storage Service (Amazon S3) location.</p>
    pub s3: ::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>>,
    /// <p>An Amazon DynamoDB table location.</p>
    pub dynamo_db: ::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>>,
}
impl Location {
    /// <p>A JDBC location.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.jdbc.is_none()`.
    pub fn jdbc(&self) -> &[crate::types::CodeGenNodeArg] {
        self.jdbc.as_deref().unwrap_or_default()
    }
    /// <p>An Amazon Simple Storage Service (Amazon S3) location.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.s3.is_none()`.
    pub fn s3(&self) -> &[crate::types::CodeGenNodeArg] {
        self.s3.as_deref().unwrap_or_default()
    }
    /// <p>An Amazon DynamoDB table location.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.dynamo_db.is_none()`.
    pub fn dynamo_db(&self) -> &[crate::types::CodeGenNodeArg] {
        self.dynamo_db.as_deref().unwrap_or_default()
    }
}
impl Location {
    /// Creates a new builder-style object to manufacture [`Location`](crate::types::Location).
    pub fn builder() -> crate::types::builders::LocationBuilder {
        crate::types::builders::LocationBuilder::default()
    }
}

/// A builder for [`Location`](crate::types::Location).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct LocationBuilder {
    pub(crate) jdbc: ::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>>,
    pub(crate) s3: ::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>>,
    pub(crate) dynamo_db: ::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>>,
}
impl LocationBuilder {
    /// Appends an item to `jdbc`.
    ///
    /// To override the contents of this collection use [`set_jdbc`](Self::set_jdbc).
    ///
    /// <p>A JDBC location.</p>
    pub fn jdbc(mut self, input: crate::types::CodeGenNodeArg) -> Self {
        let mut v = self.jdbc.unwrap_or_default();
        v.push(input);
        self.jdbc = ::std::option::Option::Some(v);
        self
    }
    /// <p>A JDBC location.</p>
    pub fn set_jdbc(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>>) -> Self {
        self.jdbc = input;
        self
    }
    /// <p>A JDBC location.</p>
    pub fn get_jdbc(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>> {
        &self.jdbc
    }
    /// Appends an item to `s3`.
    ///
    /// To override the contents of this collection use [`set_s3`](Self::set_s3).
    ///
    /// <p>An Amazon Simple Storage Service (Amazon S3) location.</p>
    pub fn s3(mut self, input: crate::types::CodeGenNodeArg) -> Self {
        let mut v = self.s3.unwrap_or_default();
        v.push(input);
        self.s3 = ::std::option::Option::Some(v);
        self
    }
    /// <p>An Amazon Simple Storage Service (Amazon S3) location.</p>
    pub fn set_s3(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>>) -> Self {
        self.s3 = input;
        self
    }
    /// <p>An Amazon Simple Storage Service (Amazon S3) location.</p>
    pub fn get_s3(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>> {
        &self.s3
    }
    /// Appends an item to `dynamo_db`.
    ///
    /// To override the contents of this collection use [`set_dynamo_db`](Self::set_dynamo_db).
    ///
    /// <p>An Amazon DynamoDB table location.</p>
    pub fn dynamo_db(mut self, input: crate::types::CodeGenNodeArg) -> Self {
        let mut v = self.dynamo_db.unwrap_or_default();
        v.push(input);
        self.dynamo_db = ::std::option::Option::Some(v);
        self
    }
    /// <p>An Amazon DynamoDB table location.</p>
    pub fn set_dynamo_db(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>>) -> Self {
        self.dynamo_db = input;
        self
    }
    /// <p>An Amazon DynamoDB table location.</p>
    pub fn get_dynamo_db(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>> {
        &self.dynamo_db
    }
    /// Consumes the builder and constructs a [`Location`](crate::types::Location).
    pub fn build(self) -> crate::types::Location {
        crate::types::Location {
            jdbc: self.jdbc,
            s3: self.s3,
            dynamo_db: self.dynamo_db,
        }
    }
}