aws_sdk_dynamodb/types/
_input_format_options.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The format options for the data that was imported into the target table. There is one value, CsvOption.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct InputFormatOptions {
7    /// <p>The options for imported source files in CSV format. The values are Delimiter and HeaderList.</p>
8    pub csv: ::std::option::Option<crate::types::CsvOptions>,
9}
10impl InputFormatOptions {
11    /// <p>The options for imported source files in CSV format. The values are Delimiter and HeaderList.</p>
12    pub fn csv(&self) -> ::std::option::Option<&crate::types::CsvOptions> {
13        self.csv.as_ref()
14    }
15}
16impl InputFormatOptions {
17    /// Creates a new builder-style object to manufacture [`InputFormatOptions`](crate::types::InputFormatOptions).
18    pub fn builder() -> crate::types::builders::InputFormatOptionsBuilder {
19        crate::types::builders::InputFormatOptionsBuilder::default()
20    }
21}
22
23/// A builder for [`InputFormatOptions`](crate::types::InputFormatOptions).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct InputFormatOptionsBuilder {
27    pub(crate) csv: ::std::option::Option<crate::types::CsvOptions>,
28}
29impl InputFormatOptionsBuilder {
30    /// <p>The options for imported source files in CSV format. The values are Delimiter and HeaderList.</p>
31    pub fn csv(mut self, input: crate::types::CsvOptions) -> Self {
32        self.csv = ::std::option::Option::Some(input);
33        self
34    }
35    /// <p>The options for imported source files in CSV format. The values are Delimiter and HeaderList.</p>
36    pub fn set_csv(mut self, input: ::std::option::Option<crate::types::CsvOptions>) -> Self {
37        self.csv = input;
38        self
39    }
40    /// <p>The options for imported source files in CSV format. The values are Delimiter and HeaderList.</p>
41    pub fn get_csv(&self) -> &::std::option::Option<crate::types::CsvOptions> {
42        &self.csv
43    }
44    /// Consumes the builder and constructs a [`InputFormatOptions`](crate::types::InputFormatOptions).
45    pub fn build(self) -> crate::types::InputFormatOptions {
46        crate::types::InputFormatOptions { csv: self.csv }
47    }
48}